Update dependencies

This commit is contained in:
Darren Clarke 2024-11-25 09:31:25 +01:00
parent 48aa89f7cf
commit 7ad25e8a95
49 changed files with 2116 additions and 1699 deletions

View file

@ -1,10 +1,11 @@
import { Create } from "@link-stack/bridge-ui"; import { Create } from "@link-stack/bridge-ui";
type PageProps = { type PageProps = {
params: { segment: string[] }; params: Promise<{ segment: string[] }>;
}; };
export default function Page({ params: { segment } }: PageProps) { export default async function Page({ params }: PageProps) {
const { segment } = await params;
const service = segment[0]; const service = segment[0];
return <Create service={service} />; return <Create service={service} />;

View file

@ -1,11 +1,12 @@
import { db } from "@link-stack/bridge-common"; import { db } from "@link-stack/bridge-common";
import { serviceConfig, Detail } from "@link-stack/bridge-ui"; import { serviceConfig, Detail } from "@link-stack/bridge-ui";
type Props = { type PageProps = {
params: { segment: string[] }; params: Promise<{ segment: string[] }>;
}; };
export default async function Page({ params: { segment } }: Props) { export default async function Page({ params }: PageProps) {
const { segment } = await params;
const service = segment[0]; const service = segment[0];
const id = segment?.[1]; const id = segment?.[1];

View file

@ -2,10 +2,11 @@ import { db } from "@link-stack/bridge-common";
import { serviceConfig, Edit } from "@link-stack/bridge-ui"; import { serviceConfig, Edit } from "@link-stack/bridge-ui";
type PageProps = { type PageProps = {
params: { segment: string[] }; params: Promise<{ segment: string[] }>;
}; };
export default async function Page({ params: { segment } }: PageProps) { export default async function Page({ params }: PageProps) {
const { segment } = await params;
const service = segment[0]; const service = segment[0];
const id = segment?.[1]; const id = segment?.[1];

View file

@ -2,12 +2,13 @@ import { db } from "@link-stack/bridge-common";
import { serviceConfig, List } from "@link-stack/bridge-ui"; import { serviceConfig, List } from "@link-stack/bridge-ui";
type PageProps = { type PageProps = {
params: { params: Promise<{
segment: string[]; segment: string[];
}; }>;
}; };
export default async function Page({ params: { segment } }: PageProps) { export default async function Page({ params }: PageProps) {
const { segment } = await params;
const service = segment[0]; const service = segment[0];
if (!service) return null; if (!service) return null;

View file

@ -1,6 +1,6 @@
{ {
"name": "@link-stack/bridge-frontend", "name": "@link-stack/bridge-frontend",
"version": "2.2.0", "version": "2.3.4",
"type": "module", "type": "module",
"scripts": { "scripts": {
"dev": "next dev", "dev": "next dev",
@ -13,19 +13,19 @@
"migrate:down:one": "tsx database/migrate.ts down:one" "migrate:down:one": "tsx database/migrate.ts down:one"
}, },
"dependencies": { "dependencies": {
"@auth/kysely-adapter": "^1.5.2", "@auth/kysely-adapter": "^1.7.4",
"@mui/icons-material": "^5", "@mui/icons-material": "^6",
"@mui/material": "^5", "@mui/material": "^6",
"@mui/material-nextjs": "^5", "@mui/material-nextjs": "^6",
"@mui/x-license": "^7.18.0", "@mui/x-license": "^7.21.0",
"@link-stack/bridge-common": "*", "@link-stack/bridge-common": "*",
"@link-stack/bridge-ui": "*", "@link-stack/bridge-ui": "*",
"next": "14.2.13", "next": "15.0.3",
"next-auth": "^4.24.8", "next-auth": "^4.24.10",
"react": "18.3.1", "react": "18.3.1",
"react-dom": "18.3.1", "react-dom": "18.3.1",
"sharp": "^0.33.5", "sharp": "^0.33.5",
"tsx": "^4.19.1", "tsx": "^4.19.2",
"@link-stack/ui": "*" "@link-stack/ui": "*"
}, },
"devDependencies": { "devDependencies": {

View file

@ -1,6 +1,10 @@
{ {
"compilerOptions": { "compilerOptions": {
"lib": ["dom", "dom.iterable", "esnext"], "lib": [
"dom",
"dom.iterable",
"esnext"
],
"allowJs": true, "allowJs": true,
"skipLibCheck": true, "skipLibCheck": true,
"strict": true, "strict": true,
@ -14,14 +18,24 @@
"jsx": "preserve", "jsx": "preserve",
"incremental": true, "incremental": true,
"paths": { "paths": {
"@/*": ["./*"] "@/*": [
"./*"
]
}, },
"plugins": [ "plugins": [
{ {
"name": "next" "name": "next"
} }
] ],
"target": "ES2017"
}, },
"include": ["next-env.d.ts", "**/*.ts", "**/*.tsx", ".next/types/**/*.ts"], "include": [
"exclude": ["node_modules"] "next-env.d.ts",
"**/*.ts",
"**/*.tsx",
".next/types/**/*.ts"
],
"exclude": [
"node_modules"
]
} }

View file

@ -1,6 +1,6 @@
{ {
"name": "@link-stack/bridge-migrations", "name": "@link-stack/bridge-migrations",
"version": "2.2.0", "version": "2.3.4",
"type": "module", "type": "module",
"scripts": { "scripts": {
"migrate:up:all": "tsx migrate.ts up:all", "migrate:up:all": "tsx migrate.ts up:all",
@ -11,8 +11,8 @@
"dependencies": { "dependencies": {
"dotenv": "^16.4.5", "dotenv": "^16.4.5",
"kysely": "0.26.1", "kysely": "0.26.1",
"pg": "^8.13.0", "pg": "^8.13.1",
"tsx": "^4.19.1" "tsx": "^4.19.2"
}, },
"devDependencies": { "devDependencies": {
"@types/node": "^22", "@types/node": "^22",

View file

@ -1,26 +1,26 @@
{ {
"name": "@link-stack/bridge-whatsapp", "name": "@link-stack/bridge-whatsapp",
"version": "2.2.0", "version": "2.3.4",
"main": "build/main/index.js", "main": "build/main/index.js",
"author": "Darren Clarke <darren@redaranj.com>", "author": "Darren Clarke <darren@redaranj.com>",
"license": "AGPL-3.0-or-later", "license": "AGPL-3.0-or-later",
"dependencies": { "dependencies": {
"@adiwajshing/keyed-db": "0.2.4", "@adiwajshing/keyed-db": "0.2.4",
"@hapi/hapi": "^21.3.10", "@hapi/hapi": "^21.3.12",
"@hapipal/schmervice": "^3.0.0", "@hapipal/schmervice": "^3.0.0",
"@hapipal/toys": "^4.0.0", "@hapipal/toys": "^4.0.0",
"@whiskeysockets/baileys": "^6.7.8", "@whiskeysockets/baileys": "^6.7.9",
"hapi-pino": "^12.1.0", "hapi-pino": "^12.1.0",
"link-preview-js": "^3.0.5" "link-preview-js": "^3.0.12"
}, },
"devDependencies": { "devDependencies": {
"@link-stack/eslint-config": "*", "@link-stack/eslint-config": "*",
"@link-stack/jest-config": "*", "@link-stack/jest-config": "*",
"@link-stack/typescript-config": "*", "@link-stack/typescript-config": "*",
"@types/node": "*", "@types/node": "*",
"dotenv-cli": "^7.4.2", "dotenv-cli": "^7.4.4",
"tsx": "^4.19.1", "tsx": "^4.19.2",
"typescript": "^5.6.2" "typescript": "^5.7.2"
}, },
"scripts": { "scripts": {
"build": "tsc -p tsconfig.json", "build": "tsc -p tsconfig.json",

View file

@ -1,6 +1,6 @@
{ {
"name": "@link-stack/bridge-worker", "name": "@link-stack/bridge-worker",
"version": "2.2.0", "version": "2.3.4",
"type": "module", "type": "module",
"main": "build/main/index.js", "main": "build/main/index.js",
"author": "Darren Clarke <darren@redaranj.com>", "author": "Darren Clarke <darren@redaranj.com>",
@ -16,14 +16,14 @@
"@link-stack/signal-api": "*", "@link-stack/signal-api": "*",
"fluent-ffmpeg": "^2.1.3", "fluent-ffmpeg": "^2.1.3",
"graphile-worker": "^0.16.6", "graphile-worker": "^0.16.6",
"remeda": "^2.14.0", "remeda": "^2.17.3",
"twilio": "^5.3.2" "twilio": "^5.3.6"
}, },
"devDependencies": { "devDependencies": {
"@types/fluent-ffmpeg": "^2.1.26", "@types/fluent-ffmpeg": "^2.1.27",
"dotenv-cli": "^7.4.2", "dotenv-cli": "^7.4.4",
"@link-stack/eslint-config": "*", "@link-stack/eslint-config": "*",
"@link-stack/typescript-config": "*", "@link-stack/typescript-config": "*",
"typescript": "^5.6.2" "typescript": "^5.7.2"
} }
} }

View file

@ -1,5 +1,10 @@
import { Suspense } from "react";
import { About } from "@link-stack/leafcutter-ui"; import { About } from "@link-stack/leafcutter-ui";
export default function Page() { export default function Page() {
return <About />; return (
<Suspense>
<About />
</Suspense>
);
} }

View file

@ -1,5 +1,12 @@
import { Suspense } from "react";
import { FAQ } from "@link-stack/leafcutter-ui"; import { FAQ } from "@link-stack/leafcutter-ui";
export default function Page() { export const dynamic = "force-dynamic";
return <FAQ />;
export default async function Page() {
return (
<Suspense>
<FAQ />
</Suspense>
);
} }

View file

@ -2,6 +2,8 @@ import { ReactNode } from "react";
import "app/_styles/global.css"; import "app/_styles/global.css";
import { InternalLayout } from "../_components/InternalLayout"; import { InternalLayout } from "../_components/InternalLayout";
export const dynamic = "force-dynamic";
type LayoutProps = { type LayoutProps = {
children: ReactNode; children: ReactNode;
}; };

View file

@ -1,5 +1,10 @@
import { Suspense } from "react";
import { Setup } from "./_components/Setup"; import { Setup } from "./_components/Setup";
export default function Page() { export default function Page() {
return <Setup />; return (
<Suspense>
<Setup />
</Suspense>
);
} }

View file

@ -34,12 +34,13 @@ const getVisualization = async (visualizationID: string) => {
}; };
type PageProps = { type PageProps = {
params: { params: Promise<{
visualizationID: string; visualizationID: string;
}; }>;
}; };
export default async function Page({ params: { visualizationID } }: PageProps) { export default async function Page({ params }: PageProps) {
const { visualizationID } = await params;
const visualization = await getVisualization(visualizationID); const visualization = await getVisualization(visualizationID);
return <VisualizationDetail {...visualization} editing={false} />; return <VisualizationDetail {...visualization} editing={false} />;

View file

@ -48,7 +48,6 @@ const MenuItem = ({
return ( return (
<Link href={href} passHref> <Link href={href} passHref>
<ListItem <ListItem
button
sx={{ sx={{
paddingLeft: "62px", paddingLeft: "62px",
backgroundColor: selected ? leafcutterLightBlue : "transparent", backgroundColor: selected ? leafcutterLightBlue : "transparent",

View file

@ -3,13 +3,13 @@ import { getServerSession } from "next-auth";
import { authOptions } from "app/_lib/auth"; import { authOptions } from "app/_lib/auth";
import { deleteUserVisualization } from "app/_lib/opensearch"; import { deleteUserVisualization } from "app/_lib/opensearch";
export const POST = async (req: NextRequest, res: NextResponse) => { export const POST = async (req: NextRequest) => {
const session = await getServerSession(authOptions); const session = await getServerSession(authOptions);
const { user: { email } }: any = session; const {
const { id } = await req.json(); user: { email },
await deleteUserVisualization(email as string, id); }: any = session;
const { id } = await req.json();
await deleteUserVisualization(email as string, id);
return NextResponse.json({ id }); return NextResponse.json({ id });
}; };

View file

@ -1,8 +1,5 @@
module.exports = { module.exports = {
transpilePackages: ["@link-stack/leafcutter-ui", "@link-stack/opensearch-common"], transpilePackages: ["@link-stack/leafcutter-ui", "@link-stack/opensearch-common"],
experimental: {
missingSuspenseWithCSRBailout: false,
},
poweredByHeader: false, poweredByHeader: false,
rewrites: async () => ({ rewrites: async () => ({
fallback: [ fallback: [

View file

@ -1,6 +1,6 @@
{ {
"name": "@link-stack/leafcutter", "name": "@link-stack/leafcutter",
"version": "2.2.0", "version": "2.3.4",
"scripts": { "scripts": {
"dev": "next dev -p 3001", "dev": "next dev -p 3001",
"login": "aws sso login --sso-session cdr", "login": "aws sso login --sso-session cdr",
@ -13,37 +13,37 @@
"lint": "next lint" "lint": "next lint"
}, },
"dependencies": { "dependencies": {
"@emotion/cache": "^11.13.1", "@emotion/cache": "^11.13.5",
"@emotion/react": "^11.13.3", "@emotion/react": "^11.13.5",
"@emotion/server": "^11.11.0", "@emotion/server": "^11.11.0",
"@emotion/styled": "^11.13.0", "@emotion/styled": "^11.13.5",
"@link-stack/leafcutter-ui": "*", "@link-stack/leafcutter-ui": "*",
"@link-stack/opensearch-common": "*", "@link-stack/opensearch-common": "*",
"@mui/icons-material": "^5", "@mui/icons-material": "^6",
"@mui/material": "^5", "@mui/material": "^6",
"@mui/material-nextjs": "^5", "@mui/material-nextjs": "^6",
"@mui/x-date-pickers-pro": "^7.18.0", "@mui/x-date-pickers-pro": "^7.22.3",
"@opensearch-project/opensearch": "^2.12.0", "@opensearch-project/opensearch": "^2.13.0",
"date-fns": "^4.1.0", "date-fns": "^4.1.0",
"http-proxy-middleware": "^3.0.2", "http-proxy-middleware": "^3.0.3",
"material-ui-popup-state": "^5.3.1", "material-ui-popup-state": "^5.3.1",
"next": "14.2.13", "next": "15.0.3",
"next-auth": "^4.24.8", "next-auth": "^4.24.10",
"react": "18.3.1", "react": "18.3.1",
"react-cookie": "^7.2.0", "react-cookie": "^7.2.2",
"react-cookie-consent": "^9.0.0", "react-cookie-consent": "^9.0.0",
"react-dom": "18.3.1", "react-dom": "18.3.1",
"react-iframe": "^1.8.5", "react-iframe": "^1.8.5",
"react-polyglot": "^0.7.2", "react-polyglot": "^0.7.2",
"sharp": "^0.33.5", "sharp": "^0.33.5",
"uuid": "^10.0.0" "uuid": "^11.0.3"
}, },
"devDependencies": { "devDependencies": {
"@types/node": "^22.7.3", "@types/node": "^22.9.3",
"@types/react": "18.3.9", "@types/react": "18.3.12",
"@types/uuid": "^10.0.0", "@types/uuid": "^10.0.0",
"@link-stack/eslint-config": "*", "@link-stack/eslint-config": "*",
"@link-stack/typescript-config": "*", "@link-stack/typescript-config": "*",
"typescript": "5.6.2" "typescript": "5.7.2"
} }
} }

View file

@ -1,10 +1,11 @@
import { Create } from "@link-stack/bridge-ui"; import { Create } from "@link-stack/bridge-ui";
type PageProps = { type PageProps = {
params: { segment: string[] }; params: Promise<{ segment: string[] }>;
}; };
export default function Page({ params: { segment } }: PageProps) { export default async function Page({ params }: PageProps) {
const { segment } = await params;
const service = segment[0]; const service = segment[0];
return <Create service={service} />; return <Create service={service} />;

View file

@ -1,11 +1,12 @@
import { db } from "@link-stack/bridge-common"; import { db } from "@link-stack/bridge-common";
import { serviceConfig, Detail } from "@link-stack/bridge-ui"; import { serviceConfig, Detail } from "@link-stack/bridge-ui";
type Props = { type PageProps = {
params: { segment: string[] }; params: Promise<{ segment: string[] }>;
}; };
export default async function Page({ params: { segment } }: Props) { export default async function Page({ params }: PageProps) {
const { segment } = await params;
const service = segment[0]; const service = segment[0];
const id = segment?.[1]; const id = segment?.[1];

View file

@ -2,10 +2,11 @@ import { db } from "@link-stack/bridge-common";
import { serviceConfig, Edit } from "@link-stack/bridge-ui"; import { serviceConfig, Edit } from "@link-stack/bridge-ui";
type PageProps = { type PageProps = {
params: { segment: string[] }; params: Promise<{ segment: string[] }>;
}; };
export default async function Page({ params: { segment } }: PageProps) { export default async function Page({ params }: PageProps) {
const { segment } = await params;
const service = segment[0]; const service = segment[0];
const id = segment?.[1]; const id = segment?.[1];

View file

@ -2,12 +2,13 @@ import { db } from "@link-stack/bridge-common";
import { serviceConfig, List } from "@link-stack/bridge-ui"; import { serviceConfig, List } from "@link-stack/bridge-ui";
type PageProps = { type PageProps = {
params: { params: Promise<{
segment: string[]; segment: string[];
}; }>;
}; };
export default async function Page({ params: { segment } }: PageProps) { export default async function Page({ params }: PageProps) {
const { segment } = await params;
const service = segment[0]; const service = segment[0];
if (!service) return null; if (!service) return null;

View file

@ -6,14 +6,15 @@ const getSection = (overview: string) => {
}; };
type MetadataProps = { type MetadataProps = {
params: { params: Promise<{
overview: string; overview: string;
}; }>;
}; };
export async function generateMetadata({ export async function generateMetadata({
params: { overview }, params,
}: MetadataProps): Promise<Metadata> { }: MetadataProps): Promise<Metadata> {
const { overview } = await params;
const section = getSection(overview); const section = getSection(overview);
return { return {
@ -22,12 +23,13 @@ export async function generateMetadata({
} }
type PageProps = { type PageProps = {
params: { params: Promise<{
overview: string; overview: string;
}; }>;
}; };
export default function Page({ params: { overview } }: PageProps) { export default async function Page({ params }: PageProps) {
const { overview } = await params;
const section = getSection(overview); const section = getSection(overview);
return <ZammadOverview name={section} />; return <ZammadOverview name={section} />;

View file

@ -1,11 +1,13 @@
import { TicketDetail } from "./_components/TicketDetail"; import { TicketDetail } from "./_components/TicketDetail";
type PageProps = { type PageProps = {
params: { params: Promise<{
id: string; id: string;
}; }>;
}; };
export default function Page({ params: { id } }: PageProps) { export default async function Page({ params }: PageProps) {
const { id } = await params;
return <TicketDetail id={id} />; return <TicketDetail id={id} />;
} }

View file

@ -1,11 +1,13 @@
import { TicketEdit } from "./_components/TicketEdit"; import { TicketEdit } from "./_components/TicketEdit";
type PageProps = { type PageProps = {
params: { params: Promise<{
id: string; id: string;
}; }>;
}; };
export default function Page({ params: { id } }: PageProps) { export default async function Page({ params }: PageProps) {
const { id } = await params;
return <TicketEdit id={id} />; return <TicketEdit id={id} />;
} }

View file

@ -2,7 +2,7 @@ import { getServerSession } from "app/_lib/authentication";
import { cookies } from "next/headers"; import { cookies } from "next/headers";
const getHeaders = async () => { const getHeaders = async () => {
const allCookies = cookies().getAll(); const allCookies = (await cookies()).getAll();
const session = await getServerSession(); const session = await getServerSession();
const headers = { const headers = {
"Content-Type": "application/json", "Content-Type": "application/json",

View file

@ -1,6 +1,6 @@
{ {
"name": "@link-stack/link", "name": "@link-stack/link",
"version": "2.2.0", "version": "2.3.4",
"type": "module", "type": "module",
"scripts": { "scripts": {
"dev": "next dev", "dev": "next dev",
@ -12,29 +12,29 @@
"dependencies": { "dependencies": {
"@chatscope/chat-ui-kit-react": "^2.0.3", "@chatscope/chat-ui-kit-react": "^2.0.3",
"@chatscope/chat-ui-kit-styles": "^1.4.0", "@chatscope/chat-ui-kit-styles": "^1.4.0",
"@emotion/cache": "^11.13.1", "@emotion/cache": "^11.13.5",
"@emotion/react": "^11.13.3", "@emotion/react": "^11.13.5",
"@emotion/server": "^11.11.0", "@emotion/server": "^11.11.0",
"@emotion/styled": "^11.13.0", "@emotion/styled": "^11.13.5",
"@link-stack/bridge-common": "*", "@link-stack/bridge-common": "*",
"@link-stack/bridge-ui": "*", "@link-stack/bridge-ui": "*",
"@link-stack/leafcutter-ui": "*", "@link-stack/leafcutter-ui": "*",
"@link-stack/opensearch-common": "*", "@link-stack/opensearch-common": "*",
"@link-stack/ui": "*", "@link-stack/ui": "*",
"@mui/icons-material": "^5", "@mui/icons-material": "^6",
"@mui/material": "^5", "@mui/material": "^6",
"@mui/material-nextjs": "^5", "@mui/material-nextjs": "^6",
"@mui/x-data-grid-pro": "^7.18.0", "@mui/x-data-grid-pro": "^7.22.3",
"@mui/x-date-pickers": "^7.18.0", "@mui/x-date-pickers": "^7.22.3",
"@mui/x-date-pickers-pro": "^7.18.0", "@mui/x-date-pickers-pro": "^7.22.3",
"@mui/x-license": "^7.18.0", "@mui/x-license": "^7.21.0",
"date-fns": "^4.1.0", "date-fns": "^4.1.0",
"graphql-request": "^7.1.0", "graphql-request": "^7.1.2",
"mui-chips-input": "^2.1.5", "mui-chips-input": "^4.0.1",
"next": "14.2.13", "next": "15.0.3",
"next-auth": "^4.24.8", "next-auth": "^4.24.10",
"react": "18.3.1", "react": "18.3.1",
"react-cookie": "^7.2.0", "react-cookie": "^7.2.2",
"react-dom": "18.3.1", "react-dom": "18.3.1",
"react-iframe": "^1.8.5", "react-iframe": "^1.8.5",
"react-polyglot": "^0.7.2", "react-polyglot": "^0.7.2",
@ -42,8 +42,8 @@
}, },
"devDependencies": { "devDependencies": {
"@link-stack/eslint-config": "*", "@link-stack/eslint-config": "*",
"@types/node": "^22.7.3", "@types/node": "^22.9.3",
"@types/react": "18.3.9", "@types/react": "18.3.12",
"@types/uuid": "^10.0.0" "@types/uuid": "^10.0.0"
} }
} }

3359
package-lock.json generated

File diff suppressed because it is too large Load diff

View file

@ -1,13 +1,13 @@
{ {
"name": "@link-stack", "name": "@link-stack",
"version": "2.2.0", "version": "2.3.4",
"description": "Link from the Center for Digital Resilience", "description": "Link from the Center for Digital Resilience",
"scripts": { "scripts": {
"dev": "dotenv -- turbo dev", "dev": "dotenv -- turbo dev",
"build": "dotenv -- turbo build", "build": "dotenv -- turbo build",
"migrate": "dotenv -- npm run migrate --workspace=database", "migrate": "dotenv -- npm run migrate --workspace=database",
"lint": "dotenv turbo lint", "lint": "dotenv turbo lint",
"update-version": "find . -name 'package.json' -exec sed -i -E 's/\"version\": \"[^\"]+\"/\"version\": \"2.2.0\"/' {} +", "update-version": "find . -name 'package.json' -exec sed -i -E 's/\"version\": \"[^\"]+\"/\"version\": \"2.3.4\"/' {} +",
"upgrade:setup": "npm i -g npm-check-updates", "upgrade:setup": "npm i -g npm-check-updates",
"upgrade:check": "ncu && ncu -ws", "upgrade:check": "ncu && ncu -ws",
"upgrade": "ncu -u -x eslint -x kysely && ncu -ws -u -x eslint -x kysely && npm i", "upgrade": "ncu -u -x eslint -x kysely && ncu -ws -u -x eslint -x kysely && npm i",
@ -46,13 +46,13 @@
"type": "git", "type": "git",
"url": "git+https://gitlab.com/digiresilience/link/link-stack.git" "url": "git+https://gitlab.com/digiresilience/link/link-stack.git"
}, },
"packageManager": "npm@10.8.3", "packageManager": "npm@10.9.1",
"author": "Darren Clarke", "author": "Darren Clarke",
"license": "AGPL-3.0-or-later", "license": "AGPL-3.0-or-later",
"devDependencies": { "devDependencies": {
"dotenv-cli": "latest", "dotenv-cli": "latest",
"eslint": "^8", "eslint": "^8",
"turbo": "^2.1.2", "turbo": "^2.3.1",
"typescript": "latest" "typescript": "latest"
}, },
"overrides": { "overrides": {

View file

@ -1,6 +1,6 @@
{ {
"name": "@link-stack/bridge-common", "name": "@link-stack/bridge-common",
"version": "2.2.0", "version": "2.3.4",
"main": "build/main/index.js", "main": "build/main/index.js",
"type": "module", "type": "module",
"author": "Darren Clarke <darren@redaranj.com>", "author": "Darren Clarke <darren@redaranj.com>",
@ -9,14 +9,14 @@
"build": "tsc -p tsconfig.json" "build": "tsc -p tsconfig.json"
}, },
"dependencies": { "dependencies": {
"@auth/kysely-adapter": "^1.5.2", "@auth/kysely-adapter": "^1.7.4",
"graphile-worker": "^0.16.6", "graphile-worker": "^0.16.6",
"kysely": "0.26.1", "kysely": "0.26.1",
"pg": "^8.13.0" "pg": "^8.13.1"
}, },
"devDependencies": { "devDependencies": {
"@link-stack/eslint-config": "*", "@link-stack/eslint-config": "*",
"@link-stack/typescript-config": "*", "@link-stack/typescript-config": "*",
"typescript": "^5.6.2" "typescript": "^5.7.2"
} }
} }

View file

@ -3,18 +3,19 @@ type ServiceLayoutProps = {
detail: any; detail: any;
edit: any; edit: any;
create: any; create: any;
params: { params: Promise<{
segment: string[]; segment: string[];
}; }>;
}; };
export const ServiceLayout = ({ export const ServiceLayout = async ({
children, children,
detail, detail,
edit, edit,
create, create,
params: { segment }, params,
}: ServiceLayoutProps) => { }: ServiceLayoutProps) => {
const { segment } = await params;
const length = segment?.length ?? 0; const length = segment?.length ?? 0;
const isCreate = length === 2 && segment[1] === "create"; const isCreate = length === 2 && segment[1] === "create";
const isEdit = length === 3 && segment[2] === "edit"; const isEdit = length === 3 && segment[2] === "edit";

View file

@ -5,19 +5,21 @@ import { getService } from "./utils";
export const getBot = async ( export const getBot = async (
_req: NextRequest, _req: NextRequest,
params: ServiceParams, params: ServiceParams,
): Promise<NextResponse> => getService(params)?.getBot(params); ): Promise<NextResponse> => (await getService(params))?.getBot(params);
export const sendMessage = async ( export const sendMessage = async (
req: NextRequest, req: NextRequest,
params: ServiceParams, params: ServiceParams,
): Promise<NextResponse> => getService(params)?.sendMessage(req, params); ): Promise<NextResponse> =>
(await getService(params))?.sendMessage(req, params);
export const receiveMessage = async ( export const receiveMessage = async (
req: NextRequest, req: NextRequest,
params: ServiceParams, params: ServiceParams,
): Promise<NextResponse> => getService(params)?.receiveMessage(req, params); ): Promise<NextResponse> =>
(await getService(params))?.receiveMessage(req, params);
export const handleWebhook = async ( export const handleWebhook = async (
req: NextRequest, req: NextRequest,
params: ServiceParams, params: ServiceParams,
): Promise<NextResponse> => getService(params)?.handleWebhook(req); ): Promise<NextResponse> => (await getService(params))?.handleWebhook(req);

View file

@ -51,16 +51,15 @@ export type ServiceConfig = {
}; };
export type ServiceParams = { export type ServiceParams = {
params: { params: Promise<{
service: string; service: string;
token?: string; token?: string;
}; }>;
}; };
export class Service { export class Service {
async getBot({ async getBot({ params }: ServiceParams): Promise<NextResponse> {
params: { service, token }, const { service, token } = await params;
}: ServiceParams): Promise<NextResponse> {
const table = getServiceTable(service); const table = getServiceTable(service);
const row = await db const row = await db
.selectFrom(table) .selectFrom(table)
@ -71,16 +70,15 @@ export class Service {
return NextResponse.json(row); return NextResponse.json(row);
} }
async registerBot({ async registerBot({ params: _params }: ServiceParams): Promise<NextResponse> {
params: { service, token },
}: ServiceParams): Promise<NextResponse> {
return NextResponse.error() as any; return NextResponse.error() as any;
} }
async sendMessage( async sendMessage(
req: NextRequest, req: NextRequest,
{ params: { service, token } }: ServiceParams, { params }: ServiceParams,
): Promise<NextResponse> { ): Promise<NextResponse> {
const { service, token } = await params;
const table = getServiceTable(service); const table = getServiceTable(service);
const row = await db const row = await db
.selectFrom(table) .selectFrom(table)
@ -109,8 +107,9 @@ export class Service {
async receiveMessage( async receiveMessage(
req: NextRequest, req: NextRequest,
{ params: { service, token } }: ServiceParams, { params }: ServiceParams,
): Promise<NextResponse> { ): Promise<NextResponse> {
const { service, token } = await params;
const json = await req.json(); const json = await req.json();
const worker = await getWorkerUtils(); const worker = await getWorkerUtils();
await worker.addJob(`${service}/receive-${service}-message`, { await worker.addJob(`${service}/receive-${service}-message`, {

View file

@ -11,7 +11,8 @@ const fetchNoCache = async (url: string, options = {}) => {
}; };
export class Signal extends Service { export class Signal extends Service {
async getBot({ params: { token } }: ServiceParams) { async getBot({ params }: ServiceParams) {
const { token } = await params;
const row = await db const row = await db
.selectFrom("SignalBot") .selectFrom("SignalBot")
.selectAll() .selectAll()

View file

@ -3,7 +3,10 @@ import { Facebook } from "./facebook";
import { Signal } from "./signal"; import { Signal } from "./signal";
import { Whatsapp } from "./whatsapp"; import { Whatsapp } from "./whatsapp";
export const getService = ({ params: { service } }: ServiceParams): Service => { export const getService = async ({
params,
}: ServiceParams): Promise<Service> => {
const { service } = await params;
if (service === "facebook") { if (service === "facebook") {
return new Facebook(); return new Facebook();
} else if (service === "signal") { } else if (service === "signal") {

View file

@ -4,7 +4,8 @@ import { revalidatePath } from "next/cache";
import { Service, ServiceParams } from "./service"; import { Service, ServiceParams } from "./service";
export class Whatsapp extends Service { export class Whatsapp extends Service {
async getBot({ params: { token } }: ServiceParams) { async getBot({ params }: ServiceParams) {
const { token } = await params;
const row = await db const row = await db
.selectFrom("WhatsappBot") .selectFrom("WhatsappBot")
.selectAll() .selectAll()

View file

@ -1,6 +1,6 @@
{ {
"name": "@link-stack/bridge-ui", "name": "@link-stack/bridge-ui",
"version": "2.2.0", "version": "2.3.4",
"scripts": { "scripts": {
"build": "tsc -p tsconfig.json" "build": "tsc -p tsconfig.json"
}, },
@ -8,18 +8,18 @@
"@link-stack/bridge-common": "^2.2.0", "@link-stack/bridge-common": "^2.2.0",
"@link-stack/signal-api": "*", "@link-stack/signal-api": "*",
"@link-stack/ui": "^2.2.0", "@link-stack/ui": "^2.2.0",
"@mui/material": "^5", "@mui/material": "^6",
"@mui/x-data-grid-pro": "^7.18.0", "@mui/x-data-grid-pro": "^7.22.3",
"kysely": "0.26.1", "kysely": "0.26.1",
"next": "14.2.13", "next": "15.0.3",
"react": "18.3.1", "react": "18.3.1",
"react-dom": "18.3.1", "react-dom": "18.3.1",
"react-qr-code": "^2.0.15" "react-qr-code": "^2.0.15"
}, },
"devDependencies": { "devDependencies": {
"@types/node": "^22.7.3", "@types/node": "^22.9.3",
"@types/react": "18.3.9", "@types/react": "18.3.12",
"@types/react-dom": "^18.3.0", "@types/react-dom": "^18.3.1",
"typescript": "5.6.2" "typescript": "5.7.2"
} }
} }

View file

@ -1,6 +1,6 @@
{ {
"name": "@link-stack/eslint-config", "name": "@link-stack/eslint-config",
"version": "2.2.0", "version": "2.3.4",
"description": "amigo's eslint config", "description": "amigo's eslint config",
"author": "Abel Luck <abel@guardianproject.info>", "author": "Abel Luck <abel@guardianproject.info>",
"license": "AGPL-3.0-or-later", "license": "AGPL-3.0-or-later",
@ -10,17 +10,16 @@
}, },
"dependencies": { "dependencies": {
"@rushstack/eslint-patch": "^1.10.4", "@rushstack/eslint-patch": "^1.10.4",
"@typescript-eslint/eslint-plugin": "^8.7.0", "@typescript-eslint/eslint-plugin": "^8.15.0",
"@typescript-eslint/parser": "^8.7.0", "@typescript-eslint/parser": "^8.15.0",
"eslint-config-prettier": "^9.1.0", "eslint-config-prettier": "^9.1.0",
"eslint-config-xo-space": "^0.35.0", "eslint-config-xo-space": "^0.35.0",
"eslint-plugin-cypress": "^3.5.0",
"eslint-plugin-eslint-comments": "^3.2.0", "eslint-plugin-eslint-comments": "^3.2.0",
"eslint-plugin-import": "^2.30.0", "eslint-plugin-import": "^2.31.0",
"eslint-plugin-jest": "^28.8.3", "eslint-plugin-jest": "^28.9.0",
"eslint-plugin-promise": "^7.1.0", "eslint-plugin-promise": "^7.1.0",
"eslint-plugin-unicorn": "55.0.0", "eslint-plugin-unicorn": "56.0.1",
"@babel/eslint-parser": "7.25.1" "@babel/eslint-parser": "7.25.9"
}, },
"peerDependencies": { "peerDependencies": {
"typescript": "^4.9.5" "typescript": "^4.9.5"
@ -28,6 +27,6 @@
"devDependencies": { "devDependencies": {
"eslint": "^8", "eslint": "^8",
"jest": "^29.7.0", "jest": "^29.7.0",
"typescript": "^5.6.2" "typescript": "^5.7.2"
} }
} }

View file

@ -1,6 +1,6 @@
{ {
"name": "@link-stack/jest-config", "name": "@link-stack/jest-config",
"version": "2.2.0", "version": "2.3.4",
"description": "", "description": "",
"author": "Abel Luck <abel@guardianproject.info>", "author": "Abel Luck <abel@guardianproject.info>",
"license": "AGPL-3.0-or-later", "license": "AGPL-3.0-or-later",
@ -9,7 +9,7 @@
"node": ">=14" "node": ">=14"
}, },
"dependencies": { "dependencies": {
"@types/jest": "^29.5.13", "@types/jest": "^29.5.14",
"jest": "^29.7.0", "jest": "^29.7.0",
"jest-junit": "^16.0.0" "jest-junit": "^16.0.0"
}, },

View file

@ -2,7 +2,7 @@
import { FC } from "react"; import { FC } from "react";
import Image from "next/legacy/image"; import Image from "next/legacy/image";
import { Grid, Box, GridSize } from "@mui/material"; import { Grid, Box } from "@mui/material";
import AboutDots from "../images/about-dots.png"; import AboutDots from "../images/about-dots.png";
import { useLeafcutterContext } from "./LeafcutterProvider"; import { useLeafcutterContext } from "./LeafcutterProvider";
@ -44,7 +44,7 @@ export const AboutFeature: FC<AboutFeatureProps> = ({
spacing={5} spacing={5}
alignContent="flex-start" alignContent="flex-start"
> >
<Grid item xs={textColumns as GridSize}> <Grid item xs={textColumns as any}>
<Box component="h2" sx={h2}> <Box component="h2" sx={h2}>
{title} {title}
</Box> </Box>
@ -54,7 +54,7 @@ export const AboutFeature: FC<AboutFeatureProps> = ({
</Grid> </Grid>
<Grid <Grid
item item
xs={(12 - textColumns) as GridSize} xs={(12 - textColumns) as any}
container container
direction={direction} direction={direction}
> >

View file

@ -1,22 +1,22 @@
{ {
"name": "@link-stack/leafcutter-ui", "name": "@link-stack/leafcutter-ui",
"version": "2.2.0", "version": "2.3.4",
"scripts": { "scripts": {
"build": "tsc -p tsconfig.json" "build": "tsc -p tsconfig.json"
}, },
"dependencies": { "dependencies": {
"@emotion/react": "^11.13.3", "@emotion/react": "^11.13.5",
"@emotion/styled": "^11.13.0", "@emotion/styled": "^11.13.5",
"@link-stack/opensearch-common": "*", "@link-stack/opensearch-common": "*",
"@mui/icons-material": "^5", "@mui/icons-material": "^6",
"@mui/material": "^5", "@mui/material": "^6",
"@mui/x-data-grid-pro": "^7.18.0", "@mui/x-data-grid-pro": "^7.22.3",
"@mui/x-date-pickers-pro": "^7.18.0", "@mui/x-date-pickers-pro": "^7.22.3",
"date-fns": "^4.1.0", "date-fns": "^4.1.0",
"next": "14.2.13", "next": "15.0.3",
"next-auth": "^4.24.8", "next-auth": "^4.24.10",
"react": "18.3.1", "react": "18.3.1",
"react-cookie": "^7.2.0", "react-cookie": "^7.2.2",
"react-dom": "18.3.1", "react-dom": "18.3.1",
"react-iframe": "^1.8.5", "react-iframe": "^1.8.5",
"react-markdown": "^9.0.1", "react-markdown": "^9.0.1",
@ -25,8 +25,8 @@
"devDependencies": { "devDependencies": {
"@link-stack/eslint-config": "*", "@link-stack/eslint-config": "*",
"@link-stack/typescript-config": "*", "@link-stack/typescript-config": "*",
"@types/node": "^22.7.3", "@types/node": "^22.9.3",
"@types/react": "18.3.9", "@types/react": "18.3.12",
"typescript": "5.6.2" "typescript": "5.7.2"
} }
} }

View file

@ -1,18 +1,18 @@
{ {
"name": "@link-stack/opensearch-common", "name": "@link-stack/opensearch-common",
"version": "2.2.0", "version": "2.3.4",
"scripts": { "scripts": {
"build": "tsc -p tsconfig.json" "build": "tsc -p tsconfig.json"
}, },
"dependencies": { "dependencies": {
"@opensearch-project/opensearch": "^2.12.0", "@opensearch-project/opensearch": "^2.13.0",
"uuid": "^10.0.0" "uuid": "^11.0.3"
}, },
"devDependencies": { "devDependencies": {
"@types/node": "^22.7.3", "@types/node": "^22.9.3",
"@types/uuid": "^10.0.0", "@types/uuid": "^10.0.0",
"@link-stack/typescript-config": "*", "@link-stack/typescript-config": "*",
"@link-stack/eslint-config": "*", "@link-stack/eslint-config": "*",
"typescript": "5.6.2" "typescript": "5.7.2"
} }
} }

View file

@ -1,6 +1,6 @@
{ {
"name": "@link-stack/signal-api", "name": "@link-stack/signal-api",
"version": "2.2.0", "version": "2.3.4",
"type": "module", "type": "module",
"main": "build/index.js", "main": "build/index.js",
"exports": { "exports": {
@ -12,7 +12,7 @@
"update-api": "openapi-generator-cli generate -i 'https://bbernhard.github.io/signal-cli-rest-api/src/docs/swagger.json' -g typescript-fetch -o . --skip-validate-spec" "update-api": "openapi-generator-cli generate -i 'https://bbernhard.github.io/signal-cli-rest-api/src/docs/swagger.json' -g typescript-fetch -o . --skip-validate-spec"
}, },
"devDependencies": { "devDependencies": {
"@openapitools/openapi-generator-cli": "^2.13.9", "@openapitools/openapi-generator-cli": "^2.15.3",
"@link-stack/typescript-config": "*", "@link-stack/typescript-config": "*",
"@link-stack/eslint-config": "*", "@link-stack/eslint-config": "*",
"@types/node": "^22", "@types/node": "^22",

View file

@ -1,6 +1,6 @@
{ {
"name": "@link-stack/typescript-config", "name": "@link-stack/typescript-config",
"version": "2.2.0", "version": "2.3.4",
"description": "Shared TypeScript config", "description": "Shared TypeScript config",
"license": "AGPL-3.0-or-later", "license": "AGPL-3.0-or-later",
"author": "Abel Luck <abel@guardianproject.info>", "author": "Abel Luck <abel@guardianproject.info>",

View file

@ -1,23 +1,23 @@
{ {
"name": "@link-stack/ui", "name": "@link-stack/ui",
"version": "2.2.0", "version": "2.3.4",
"description": "", "description": "",
"scripts": { "scripts": {
"build": "tsc -p tsconfig.json" "build": "tsc -p tsconfig.json"
}, },
"author": "", "author": "",
"dependencies": { "dependencies": {
"@mui/icons-material": "^5", "@mui/icons-material": "^6",
"@mui/material": "^5", "@mui/material": "^6",
"@mui/x-data-grid-pro": "^7.18.0", "@mui/x-data-grid-pro": "^7.22.3",
"@mui/x-license": "^7.18.0", "@mui/x-license": "^7.21.0",
"next": "14.2.13", "next": "15.0.3",
"react": "18.3.1", "react": "18.3.1",
"react-dom": "18.3.1" "react-dom": "18.3.1"
}, },
"devDependencies": { "devDependencies": {
"@types/node": "^22.7.3", "@types/node": "^22.9.3",
"@types/react": "18.3.9", "@types/react": "18.3.12",
"typescript": "^5.6.2" "typescript": "^5.7.2"
} }
} }

View file

@ -1,7 +1,7 @@
{ {
"name": "@link-stack/zammad-addon-bridge", "name": "@link-stack/zammad-addon-bridge",
"displayName": "Bridge", "displayName": "Bridge",
"version": "2.2.0", "version": "2.3.4",
"description": "An addon that adds CDR Bridge channels to Zammad.", "description": "An addon that adds CDR Bridge channels to Zammad.",
"scripts": { "scripts": {
"build": "node '../../node_modules/@link-stack/zammad-addon-common/dist/build.js'", "build": "node '../../node_modules/@link-stack/zammad-addon-common/dist/build.js'",

View file

@ -1,6 +1,6 @@
{ {
"name": "@link-stack/zammad-addon-common", "name": "@link-stack/zammad-addon-common",
"version": "2.2.0", "version": "2.3.4",
"description": "", "description": "",
"bin": { "bin": {
"zpm-build": "./dist/build.js", "zpm-build": "./dist/build.js",
@ -10,7 +10,7 @@
"build": "tsc" "build": "tsc"
}, },
"devDependencies": { "devDependencies": {
"@types/node": "^22.7.3", "@types/node": "^22.9.3",
"typescript": "^5" "typescript": "^5"
}, },
"author": "", "author": "",

View file

@ -1,7 +1,7 @@
{ {
"name": "@link-stack/zammad-addon-hardening", "name": "@link-stack/zammad-addon-hardening",
"displayName": "Hardening", "displayName": "Hardening",
"version": "2.2.0", "version": "2.3.4",
"description": "A Zammad addon that hardens a Zammad instance according to CDR's needs.", "description": "A Zammad addon that hardens a Zammad instance according to CDR's needs.",
"scripts": { "scripts": {
"build": "node '../../node_modules/@link-stack/zammad-addon-common/dist/build.js'", "build": "node '../../node_modules/@link-stack/zammad-addon-common/dist/build.js'",

View file

@ -1,7 +1,7 @@
{ {
"name": "@link-stack/zammad-addon-leafcutter", "name": "@link-stack/zammad-addon-leafcutter",
"displayName": "Leafcutter", "displayName": "Leafcutter",
"version": "2.2.0", "version": "2.3.4",
"description": "Adds a common set of tags for Leafcutter uses.", "description": "Adds a common set of tags for Leafcutter uses.",
"scripts": { "scripts": {
"build": "node '../../node_modules/@link-stack/zammad-addon-common/dist/build.js'", "build": "node '../../node_modules/@link-stack/zammad-addon-common/dist/build.js'",