Skip to content

Commit

Permalink
chore(release): automatic release v0.1.0
Browse files Browse the repository at this point in the history
  • Loading branch information
homarr-releases[bot] authored Aug 23, 2024
2 parents 4d86487 + cbf2ecf commit e81edc8
Show file tree
Hide file tree
Showing 31 changed files with 845 additions and 686 deletions.
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
20.16.0
20.17.0
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM node:20.16.0-alpine AS base
FROM node:20.17.0-alpine AS base

FROM base AS builder
RUN apk add --no-cache libc6-compat
Expand Down
16 changes: 8 additions & 8 deletions apps/nextjs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,9 @@
"@mantine/tiptap": "^7.12.1",
"@homarr/server-settings": "workspace:^0.1.0",
"@t3-oss/env-nextjs": "^0.11.0",
"@tanstack/react-query": "^5.51.23",
"@tanstack/react-query-devtools": "^5.51.23",
"@tanstack/react-query-next-experimental": "5.51.23",
"@tanstack/react-query": "^5.52.1",
"@tanstack/react-query-devtools": "^5.52.1",
"@tanstack/react-query-next-experimental": "5.52.1",
"@tabler/icons-react": "^3.12.0",
"@trpc/client": "next",
"@trpc/next": "next",
Expand All @@ -50,15 +50,15 @@
"@xterm/addon-canvas": "^0.7.0",
"@xterm/addon-fit": "0.10.0",
"@xterm/xterm": "^5.5.0",
"chroma-js": "^2.6.0",
"chroma-js": "^3.0.0",
"clsx": "^2.1.1",
"dayjs": "^1.11.12",
"dayjs": "^1.11.13",
"dotenv": "^16.4.5",
"flag-icons": "^7.2.3",
"glob": "^11.0.0",
"jotai": "^2.9.3",
"mantine-react-table": "2.0.0-beta.6",
"next": "^14.2.5",
"next": "^14.2.6",
"postcss-preset-mantine": "^1.17.0",
"prismjs": "^1.29.0",
"react": "^18.3.1",
Expand All @@ -74,9 +74,9 @@
"@homarr/prettier-config": "workspace:^0.1.0",
"@homarr/tsconfig": "workspace:^0.1.0",
"@types/chroma-js": "2.4.4",
"@types/node": "^20.15.0",
"@types/node": "^20.16.1",
"@types/prismjs": "^1.26.4",
"@types/react": "^18.3.3",
"@types/react": "^18.3.4",
"@types/react-dom": "^18.3.0",
"concurrently": "^8.2.2",
"eslint": "^9.9.0",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import { clientApi } from "@homarr/api/client";
import { useZodForm } from "@homarr/form";
import { showErrorNotification, showSuccessNotification } from "@homarr/notifications";
import { useScopedI18n } from "@homarr/translation/client";
import { CustomPasswordInput } from "@homarr/ui";
import type { z } from "@homarr/validation";
import { validation } from "@homarr/validation";

Expand Down Expand Up @@ -64,7 +65,8 @@ export const RegistrationForm = ({ invite }: RegistrationFormProps) => {
<form onSubmit={form.onSubmit(handleSubmit)}>
<Stack gap="lg">
<TextInput label={t("field.username.label")} autoComplete="off" {...form.getInputProps("username")} />
<PasswordInput
<CustomPasswordInput
withPasswordRequirements
label={t("field.password.label")}
autoComplete="new-password"
{...form.getInputProps("password")}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@

import { useCallback } from "react";
import { Group, Menu } from "@mantine/core";
import { useHotkeys } from "@mantine/hooks";
import {
IconBox,
IconBoxAlignTop,
IconChevronDown,
IconPackageImport,
IconPencil,
IconPencilOff,
IconPlus,
Expand Down Expand Up @@ -95,7 +95,6 @@ const AddMenu = () => {
<Menu.Item leftSection={<IconBox size={20} />} onClick={handleSelectItem}>
{t("item.action.create")}
</Menu.Item>
<Menu.Item leftSection={<IconPackageImport size={20} />}>{t("item.action.import")}</Menu.Item>

<Menu.Divider />

Expand Down Expand Up @@ -139,6 +138,8 @@ const EditModeMenu = () => {
setEditMode(true);
}, [board, isEditMode, saveBoard, setEditMode]);

useHotkeys([["mod+e", toggle]]);

return (
<HeaderButton onClick={toggle} loading={isPending}>
{isEditMode ? <IconPencilOff stroke={1.5} /> : <IconPencil stroke={1.5} />}
Expand Down
7 changes: 6 additions & 1 deletion apps/nextjs/src/app/[locale]/init/user/_init-user-form.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import { clientApi } from "@homarr/api/client";
import { useZodForm } from "@homarr/form";
import { showErrorNotification, showSuccessNotification } from "@homarr/notifications";
import { useScopedI18n } from "@homarr/translation/client";
import { CustomPasswordInput } from "@homarr/ui";
import type { z } from "@homarr/validation";
import { validation } from "@homarr/validation";

Expand Down Expand Up @@ -50,7 +51,11 @@ export const InitUserForm = () => {
>
<Stack gap="lg">
<TextInput label={t("field.username.label")} {...form.getInputProps("username")} />
<PasswordInput label={t("field.password.label")} {...form.getInputProps("password")} />
<CustomPasswordInput
withPasswordRequirements
label={t("field.password.label")}
{...form.getInputProps("password")}
/>
<PasswordInput label={t("field.passwordConfirm.label")} {...form.getInputProps("confirmPassword")} />
<Button type="submit" fullWidth loading={isPending}>
{t("action.create")}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import { useSession } from "@homarr/auth/client";
import { useZodForm } from "@homarr/form";
import { showErrorNotification, showSuccessNotification } from "@homarr/notifications";
import { useI18n } from "@homarr/translation/client";
import { CustomPasswordInput } from "@homarr/ui";
import { validation } from "@homarr/validation";

import { revalidatePathActionAsync } from "~/app/revalidatePathAction";
Expand Down Expand Up @@ -71,7 +72,12 @@ export const ChangePasswordForm = ({ user }: ChangePasswordFormProps) => {
/>
)}

<PasswordInput withAsterisk label={t("user.field.password.label")} {...form.getInputProps("password")} />
<CustomPasswordInput
withPasswordRequirements
withAsterisk
label={t("user.field.password.label")}
{...form.getInputProps("password")}
/>

<PasswordInput
withAsterisk
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import { clientApi } from "@homarr/api/client";
import { useZodForm } from "@homarr/form";
import { showErrorNotification } from "@homarr/notifications";
import { useScopedI18n } from "@homarr/translation/client";
import { UserAvatar } from "@homarr/ui";
import { CustomPasswordInput, UserAvatar } from "@homarr/ui";
import { validation, z } from "@homarr/validation";
import { createCustomErrorParams } from "@homarr/validation/form";

Expand Down Expand Up @@ -124,7 +124,8 @@ export const UserCreateStepperComponent = () => {
<form>
<Card p="xl">
<Stack gap="md">
<PasswordInput
<CustomPasswordInput
withPasswordRequirements
label={tUserField("password.label")}
variant="filled"
withAsterisk
Expand Down
3 changes: 2 additions & 1 deletion apps/nextjs/src/components/user-avatar-menu.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { useCallback, useEffect } from "react";
import Link from "next/link";
import { useRouter } from "next/navigation";
import { Center, Menu, Stack, Text, useMantineColorScheme } from "@mantine/core";
import { useTimeout } from "@mantine/hooks";
import { useHotkeys, useTimeout } from "@mantine/hooks";
import {
IconCheck,
IconHome,
Expand Down Expand Up @@ -33,6 +33,7 @@ interface UserAvatarMenuProps {
export const UserAvatarMenu = ({ children }: UserAvatarMenuProps) => {
const t = useScopedI18n("common.userAvatar.menu");
const { colorScheme, toggleColorScheme } = useMantineColorScheme();
useHotkeys([["mod+J", toggleColorScheme]]);

const ColorSchemeIcon = colorScheme === "dark" ? IconSun : IconMoon;

Expand Down
6 changes: 3 additions & 3 deletions apps/tasks/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,18 +32,18 @@
"@homarr/validation": "workspace:^0.1.0",
"@homarr/cron-jobs-core": "workspace:^0.1.0",
"@homarr/widgets": "workspace:^0.1.0",
"dayjs": "^1.11.12",
"dayjs": "^1.11.13",
"@homarr/cron-jobs": "workspace:^0.1.0",
"@homarr/cron-job-runner": "workspace:^0.1.0",
"dotenv": "^16.4.5",
"superjson": "2.2.1",
"undici": "6.19.7"
"undici": "6.19.8"
},
"devDependencies": {
"@homarr/eslint-config": "workspace:^0.2.0",
"@homarr/prettier-config": "workspace:^0.1.0",
"@homarr/tsconfig": "workspace:^0.1.0",
"@types/node": "^20.15.0",
"@types/node": "^20.16.1",
"dotenv-cli": "^7.4.2",
"eslint": "^9.9.0",
"prettier": "^3.3.3",
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
"name": "homarr",
"private": true,
"engines": {
"node": ">=20.16.0"
"node": ">=20.17.0"
},
"packageManager": "pnpm@9.7.1",
"packageManager": "pnpm@9.8.0",
"scripts": {
"build": "turbo build",
"clean": "git clean -xdf node_modules",
Expand Down
2 changes: 1 addition & 1 deletion packages/analytics/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
"typecheck": "tsc --noEmit"
},
"dependencies": {
"@umami/node": "^0.3.0",
"@umami/node": "^0.4.0",
"superjson": "2.2.1",
"@homarr/db": "workspace:^0.1.0",
"@homarr/log": "workspace:^0.1.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/api/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
"@trpc/server": "next",
"dockerode": "^4.0.2",
"superjson": "2.2.1",
"next": "^14.2.5",
"next": "^14.2.6",
"react": "^18.3.1"
},
"devDependencies": {
Expand Down
34 changes: 20 additions & 14 deletions packages/api/src/router/test/user.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,8 @@ describe("initUser should initialize the first user", () => {
const actAsync = async () =>
await caller.initUser({
username: "test",
password: "12345678",
confirmPassword: "12345678",
password: "123ABCdef+/-",
confirmPassword: "123ABCdef+/-",
});

await expect(actAsync()).rejects.toThrow("User already exists");
Expand All @@ -55,8 +55,8 @@ describe("initUser should initialize the first user", () => {

await caller.initUser({
username: "test",
password: "12345678",
confirmPassword: "12345678",
password: "123ABCdef+/-",
confirmPassword: "123ABCdef+/-",
});

const user = await db.query.users.findFirst({
Expand All @@ -78,14 +78,20 @@ describe("initUser should initialize the first user", () => {
const actAsync = async () =>
await caller.initUser({
username: "test",
password: "12345678",
confirmPassword: "12345679",
password: "123ABCdef+/-",
confirmPassword: "456ABCdef+/-",
});

await expect(actAsync()).rejects.toThrow("passwordsDoNotMatch");
});

it("should not create a user if the password is too short", async () => {
it.each([
["aB2%"], // too short
["abc123DEF"], // does not contain special characters
["abcDEFghi+"], // does not contain numbers
["ABC123+/-"], // does not contain lowercase
["abc123+/-"], // does not contain uppercase
])("should throw error that password requirements do not match for '%s' as password", async (password) => {
const db = createDb();
const caller = userRouter.createCaller({
db,
Expand All @@ -95,11 +101,11 @@ describe("initUser should initialize the first user", () => {
const actAsync = async () =>
await caller.initUser({
username: "test",
password: "1234567",
confirmPassword: "1234567",
password,
confirmPassword: password,
});

await expect(actAsync()).rejects.toThrow("too_small");
await expect(actAsync()).rejects.toThrow("passwordRequirements");
});
});

Expand Down Expand Up @@ -133,8 +139,8 @@ describe("register should create a user with valid invitation", () => {
inviteId,
token: inviteToken,
username: "test",
password: "12345678",
confirmPassword: "12345678",
password: "123ABCdef+/-",
confirmPassword: "123ABCdef+/-",
});

// Assert
Expand Down Expand Up @@ -189,8 +195,8 @@ describe("register should create a user with valid invitation", () => {
inviteId,
token: inviteToken,
username: "test",
password: "12345678",
confirmPassword: "12345678",
password: "123ABCdef+/-",
confirmPassword: "123ABCdef+/-",
...partialInput,
});

Expand Down
2 changes: 1 addition & 1 deletion packages/auth/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
"bcrypt": "^5.1.1",
"cookies": "^0.9.1",
"ldapts": "7.1.0",
"next": "^14.2.5",
"next": "^14.2.6",
"next-auth": "5.0.0-beta.20",
"react": "^18.3.1",
"react-dom": "^18.3.1"
Expand Down
6 changes: 3 additions & 3 deletions packages/common/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,10 @@
"typecheck": "tsc --noEmit"
},
"dependencies": {
"dayjs": "^1.11.12",
"next": "^14.2.5",
"dayjs": "^1.11.13",
"next": "^14.2.6",
"react": "^18.3.1",
"tldts": "^6.1.39"
"tldts": "^6.1.41"
},
"devDependencies": {
"@homarr/eslint-config": "workspace:^0.2.0",
Expand Down
4 changes: 2 additions & 2 deletions packages/db/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,11 @@
"@homarr/log": "workspace:^0.1.0",
"@paralleldrive/cuid2": "^2.2.2",
"@auth/core": "^0.34.2",
"better-sqlite3": "^11.1.2",
"better-sqlite3": "^11.2.1",
"drizzle-orm": "^0.33.0",
"dotenv": "^16.4.5",
"mysql2": "3.11.0",
"drizzle-kit": "^0.24.0"
"drizzle-kit": "^0.24.1"
},
"devDependencies": {
"@homarr/eslint-config": "workspace:^0.2.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/spotlight/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
"@mantine/spotlight": "^7.12.1",
"@tabler/icons-react": "^3.12.0",
"jotai": "^2.9.3",
"next": "^14.2.5",
"next": "^14.2.6",
"react": "^18.3.1",
"use-deep-compare-effect": "^1.8.1"
},
Expand Down
2 changes: 1 addition & 1 deletion packages/translation/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
"typecheck": "tsc --noEmit"
},
"dependencies": {
"dayjs": "^1.11.12",
"dayjs": "^1.11.13",
"mantine-react-table": "2.0.0-beta.6",
"next-international": "^1.2.4"
},
Expand Down
8 changes: 8 additions & 0 deletions packages/translation/src/lang/en.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,13 @@ export default {
},
password: {
label: "Password",
requirement: {
length: "Includes at least 8 characters",
lowercase: "Includes lowercase letter",
uppercase: "Includes uppercase letter",
number: "Includes number",
special: "Includes special symbol",
},
},
passwordConfirm: {
label: "Confirm password",
Expand Down Expand Up @@ -631,6 +638,7 @@ export default {
},
custom: {
passwordsDoNotMatch: "Passwords do not match",
passwordRequirements: "Password does not meet the requirements",
boardAlreadyExists: "A board with this name already exists",
},
},
Expand Down
Loading

0 comments on commit e81edc8

Please sign in to comment.