Update dependencies
This commit is contained in:
parent
48aa89f7cf
commit
7ad25e8a95
49 changed files with 2116 additions and 1699 deletions
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "@link-stack/bridge-common",
|
||||
"version": "2.2.0",
|
||||
"version": "2.3.4",
|
||||
"main": "build/main/index.js",
|
||||
"type": "module",
|
||||
"author": "Darren Clarke <darren@redaranj.com>",
|
||||
|
|
@ -9,14 +9,14 @@
|
|||
"build": "tsc -p tsconfig.json"
|
||||
},
|
||||
"dependencies": {
|
||||
"@auth/kysely-adapter": "^1.5.2",
|
||||
"@auth/kysely-adapter": "^1.7.4",
|
||||
"graphile-worker": "^0.16.6",
|
||||
"kysely": "0.26.1",
|
||||
"pg": "^8.13.0"
|
||||
"pg": "^8.13.1"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@link-stack/eslint-config": "*",
|
||||
"@link-stack/typescript-config": "*",
|
||||
"typescript": "^5.6.2"
|
||||
"typescript": "^5.7.2"
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3,18 +3,19 @@ type ServiceLayoutProps = {
|
|||
detail: any;
|
||||
edit: any;
|
||||
create: any;
|
||||
params: {
|
||||
params: Promise<{
|
||||
segment: string[];
|
||||
};
|
||||
}>;
|
||||
};
|
||||
|
||||
export const ServiceLayout = ({
|
||||
export const ServiceLayout = async ({
|
||||
children,
|
||||
detail,
|
||||
edit,
|
||||
create,
|
||||
params: { segment },
|
||||
params,
|
||||
}: ServiceLayoutProps) => {
|
||||
const { segment } = await params;
|
||||
const length = segment?.length ?? 0;
|
||||
const isCreate = length === 2 && segment[1] === "create";
|
||||
const isEdit = length === 3 && segment[2] === "edit";
|
||||
|
|
|
|||
|
|
@ -5,19 +5,21 @@ import { getService } from "./utils";
|
|||
export const getBot = async (
|
||||
_req: NextRequest,
|
||||
params: ServiceParams,
|
||||
): Promise<NextResponse> => getService(params)?.getBot(params);
|
||||
): Promise<NextResponse> => (await getService(params))?.getBot(params);
|
||||
|
||||
export const sendMessage = async (
|
||||
req: NextRequest,
|
||||
params: ServiceParams,
|
||||
): Promise<NextResponse> => getService(params)?.sendMessage(req, params);
|
||||
): Promise<NextResponse> =>
|
||||
(await getService(params))?.sendMessage(req, params);
|
||||
|
||||
export const receiveMessage = async (
|
||||
req: NextRequest,
|
||||
params: ServiceParams,
|
||||
): Promise<NextResponse> => getService(params)?.receiveMessage(req, params);
|
||||
): Promise<NextResponse> =>
|
||||
(await getService(params))?.receiveMessage(req, params);
|
||||
|
||||
export const handleWebhook = async (
|
||||
req: NextRequest,
|
||||
params: ServiceParams,
|
||||
): Promise<NextResponse> => getService(params)?.handleWebhook(req);
|
||||
): Promise<NextResponse> => (await getService(params))?.handleWebhook(req);
|
||||
|
|
|
|||
|
|
@ -51,16 +51,15 @@ export type ServiceConfig = {
|
|||
};
|
||||
|
||||
export type ServiceParams = {
|
||||
params: {
|
||||
params: Promise<{
|
||||
service: string;
|
||||
token?: string;
|
||||
};
|
||||
}>;
|
||||
};
|
||||
|
||||
export class Service {
|
||||
async getBot({
|
||||
params: { service, token },
|
||||
}: ServiceParams): Promise<NextResponse> {
|
||||
async getBot({ params }: ServiceParams): Promise<NextResponse> {
|
||||
const { service, token } = await params;
|
||||
const table = getServiceTable(service);
|
||||
const row = await db
|
||||
.selectFrom(table)
|
||||
|
|
@ -71,16 +70,15 @@ export class Service {
|
|||
return NextResponse.json(row);
|
||||
}
|
||||
|
||||
async registerBot({
|
||||
params: { service, token },
|
||||
}: ServiceParams): Promise<NextResponse> {
|
||||
async registerBot({ params: _params }: ServiceParams): Promise<NextResponse> {
|
||||
return NextResponse.error() as any;
|
||||
}
|
||||
|
||||
async sendMessage(
|
||||
req: NextRequest,
|
||||
{ params: { service, token } }: ServiceParams,
|
||||
{ params }: ServiceParams,
|
||||
): Promise<NextResponse> {
|
||||
const { service, token } = await params;
|
||||
const table = getServiceTable(service);
|
||||
const row = await db
|
||||
.selectFrom(table)
|
||||
|
|
@ -109,8 +107,9 @@ export class Service {
|
|||
|
||||
async receiveMessage(
|
||||
req: NextRequest,
|
||||
{ params: { service, token } }: ServiceParams,
|
||||
{ params }: ServiceParams,
|
||||
): Promise<NextResponse> {
|
||||
const { service, token } = await params;
|
||||
const json = await req.json();
|
||||
const worker = await getWorkerUtils();
|
||||
await worker.addJob(`${service}/receive-${service}-message`, {
|
||||
|
|
|
|||
|
|
@ -11,7 +11,8 @@ const fetchNoCache = async (url: string, options = {}) => {
|
|||
};
|
||||
|
||||
export class Signal extends Service {
|
||||
async getBot({ params: { token } }: ServiceParams) {
|
||||
async getBot({ params }: ServiceParams) {
|
||||
const { token } = await params;
|
||||
const row = await db
|
||||
.selectFrom("SignalBot")
|
||||
.selectAll()
|
||||
|
|
|
|||
|
|
@ -3,7 +3,10 @@ import { Facebook } from "./facebook";
|
|||
import { Signal } from "./signal";
|
||||
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") {
|
||||
return new Facebook();
|
||||
} else if (service === "signal") {
|
||||
|
|
|
|||
|
|
@ -4,7 +4,8 @@ import { revalidatePath } from "next/cache";
|
|||
import { Service, ServiceParams } from "./service";
|
||||
|
||||
export class Whatsapp extends Service {
|
||||
async getBot({ params: { token } }: ServiceParams) {
|
||||
async getBot({ params }: ServiceParams) {
|
||||
const { token } = await params;
|
||||
const row = await db
|
||||
.selectFrom("WhatsappBot")
|
||||
.selectAll()
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "@link-stack/bridge-ui",
|
||||
"version": "2.2.0",
|
||||
"version": "2.3.4",
|
||||
"scripts": {
|
||||
"build": "tsc -p tsconfig.json"
|
||||
},
|
||||
|
|
@ -8,18 +8,18 @@
|
|||
"@link-stack/bridge-common": "^2.2.0",
|
||||
"@link-stack/signal-api": "*",
|
||||
"@link-stack/ui": "^2.2.0",
|
||||
"@mui/material": "^5",
|
||||
"@mui/x-data-grid-pro": "^7.18.0",
|
||||
"@mui/material": "^6",
|
||||
"@mui/x-data-grid-pro": "^7.22.3",
|
||||
"kysely": "0.26.1",
|
||||
"next": "14.2.13",
|
||||
"next": "15.0.3",
|
||||
"react": "18.3.1",
|
||||
"react-dom": "18.3.1",
|
||||
"react-qr-code": "^2.0.15"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/node": "^22.7.3",
|
||||
"@types/react": "18.3.9",
|
||||
"@types/react-dom": "^18.3.0",
|
||||
"typescript": "5.6.2"
|
||||
"@types/node": "^22.9.3",
|
||||
"@types/react": "18.3.12",
|
||||
"@types/react-dom": "^18.3.1",
|
||||
"typescript": "5.7.2"
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "@link-stack/eslint-config",
|
||||
"version": "2.2.0",
|
||||
"version": "2.3.4",
|
||||
"description": "amigo's eslint config",
|
||||
"author": "Abel Luck <abel@guardianproject.info>",
|
||||
"license": "AGPL-3.0-or-later",
|
||||
|
|
@ -10,17 +10,16 @@
|
|||
},
|
||||
"dependencies": {
|
||||
"@rushstack/eslint-patch": "^1.10.4",
|
||||
"@typescript-eslint/eslint-plugin": "^8.7.0",
|
||||
"@typescript-eslint/parser": "^8.7.0",
|
||||
"@typescript-eslint/eslint-plugin": "^8.15.0",
|
||||
"@typescript-eslint/parser": "^8.15.0",
|
||||
"eslint-config-prettier": "^9.1.0",
|
||||
"eslint-config-xo-space": "^0.35.0",
|
||||
"eslint-plugin-cypress": "^3.5.0",
|
||||
"eslint-plugin-eslint-comments": "^3.2.0",
|
||||
"eslint-plugin-import": "^2.30.0",
|
||||
"eslint-plugin-jest": "^28.8.3",
|
||||
"eslint-plugin-import": "^2.31.0",
|
||||
"eslint-plugin-jest": "^28.9.0",
|
||||
"eslint-plugin-promise": "^7.1.0",
|
||||
"eslint-plugin-unicorn": "55.0.0",
|
||||
"@babel/eslint-parser": "7.25.1"
|
||||
"eslint-plugin-unicorn": "56.0.1",
|
||||
"@babel/eslint-parser": "7.25.9"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"typescript": "^4.9.5"
|
||||
|
|
@ -28,6 +27,6 @@
|
|||
"devDependencies": {
|
||||
"eslint": "^8",
|
||||
"jest": "^29.7.0",
|
||||
"typescript": "^5.6.2"
|
||||
"typescript": "^5.7.2"
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "@link-stack/jest-config",
|
||||
"version": "2.2.0",
|
||||
"version": "2.3.4",
|
||||
"description": "",
|
||||
"author": "Abel Luck <abel@guardianproject.info>",
|
||||
"license": "AGPL-3.0-or-later",
|
||||
|
|
@ -9,7 +9,7 @@
|
|||
"node": ">=14"
|
||||
},
|
||||
"dependencies": {
|
||||
"@types/jest": "^29.5.13",
|
||||
"@types/jest": "^29.5.14",
|
||||
"jest": "^29.7.0",
|
||||
"jest-junit": "^16.0.0"
|
||||
},
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
import { FC } from "react";
|
||||
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 { useLeafcutterContext } from "./LeafcutterProvider";
|
||||
|
||||
|
|
@ -44,7 +44,7 @@ export const AboutFeature: FC<AboutFeatureProps> = ({
|
|||
spacing={5}
|
||||
alignContent="flex-start"
|
||||
>
|
||||
<Grid item xs={textColumns as GridSize}>
|
||||
<Grid item xs={textColumns as any}>
|
||||
<Box component="h2" sx={h2}>
|
||||
{title}
|
||||
</Box>
|
||||
|
|
@ -54,7 +54,7 @@ export const AboutFeature: FC<AboutFeatureProps> = ({
|
|||
</Grid>
|
||||
<Grid
|
||||
item
|
||||
xs={(12 - textColumns) as GridSize}
|
||||
xs={(12 - textColumns) as any}
|
||||
container
|
||||
direction={direction}
|
||||
>
|
||||
|
|
|
|||
|
|
@ -1,22 +1,22 @@
|
|||
{
|
||||
"name": "@link-stack/leafcutter-ui",
|
||||
"version": "2.2.0",
|
||||
"version": "2.3.4",
|
||||
"scripts": {
|
||||
"build": "tsc -p tsconfig.json"
|
||||
},
|
||||
"dependencies": {
|
||||
"@emotion/react": "^11.13.3",
|
||||
"@emotion/styled": "^11.13.0",
|
||||
"@emotion/react": "^11.13.5",
|
||||
"@emotion/styled": "^11.13.5",
|
||||
"@link-stack/opensearch-common": "*",
|
||||
"@mui/icons-material": "^5",
|
||||
"@mui/material": "^5",
|
||||
"@mui/x-data-grid-pro": "^7.18.0",
|
||||
"@mui/x-date-pickers-pro": "^7.18.0",
|
||||
"@mui/icons-material": "^6",
|
||||
"@mui/material": "^6",
|
||||
"@mui/x-data-grid-pro": "^7.22.3",
|
||||
"@mui/x-date-pickers-pro": "^7.22.3",
|
||||
"date-fns": "^4.1.0",
|
||||
"next": "14.2.13",
|
||||
"next-auth": "^4.24.8",
|
||||
"next": "15.0.3",
|
||||
"next-auth": "^4.24.10",
|
||||
"react": "18.3.1",
|
||||
"react-cookie": "^7.2.0",
|
||||
"react-cookie": "^7.2.2",
|
||||
"react-dom": "18.3.1",
|
||||
"react-iframe": "^1.8.5",
|
||||
"react-markdown": "^9.0.1",
|
||||
|
|
@ -25,8 +25,8 @@
|
|||
"devDependencies": {
|
||||
"@link-stack/eslint-config": "*",
|
||||
"@link-stack/typescript-config": "*",
|
||||
"@types/node": "^22.7.3",
|
||||
"@types/react": "18.3.9",
|
||||
"typescript": "5.6.2"
|
||||
"@types/node": "^22.9.3",
|
||||
"@types/react": "18.3.12",
|
||||
"typescript": "5.7.2"
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,18 +1,18 @@
|
|||
{
|
||||
"name": "@link-stack/opensearch-common",
|
||||
"version": "2.2.0",
|
||||
"version": "2.3.4",
|
||||
"scripts": {
|
||||
"build": "tsc -p tsconfig.json"
|
||||
},
|
||||
"dependencies": {
|
||||
"@opensearch-project/opensearch": "^2.12.0",
|
||||
"uuid": "^10.0.0"
|
||||
"@opensearch-project/opensearch": "^2.13.0",
|
||||
"uuid": "^11.0.3"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/node": "^22.7.3",
|
||||
"@types/node": "^22.9.3",
|
||||
"@types/uuid": "^10.0.0",
|
||||
"@link-stack/typescript-config": "*",
|
||||
"@link-stack/eslint-config": "*",
|
||||
"typescript": "5.6.2"
|
||||
"typescript": "5.7.2"
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "@link-stack/signal-api",
|
||||
"version": "2.2.0",
|
||||
"version": "2.3.4",
|
||||
"type": "module",
|
||||
"main": "build/index.js",
|
||||
"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"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@openapitools/openapi-generator-cli": "^2.13.9",
|
||||
"@openapitools/openapi-generator-cli": "^2.15.3",
|
||||
"@link-stack/typescript-config": "*",
|
||||
"@link-stack/eslint-config": "*",
|
||||
"@types/node": "^22",
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "@link-stack/typescript-config",
|
||||
"version": "2.2.0",
|
||||
"version": "2.3.4",
|
||||
"description": "Shared TypeScript config",
|
||||
"license": "AGPL-3.0-or-later",
|
||||
"author": "Abel Luck <abel@guardianproject.info>",
|
||||
|
|
|
|||
|
|
@ -1,23 +1,23 @@
|
|||
{
|
||||
"name": "@link-stack/ui",
|
||||
"version": "2.2.0",
|
||||
"version": "2.3.4",
|
||||
"description": "",
|
||||
"scripts": {
|
||||
"build": "tsc -p tsconfig.json"
|
||||
},
|
||||
"author": "",
|
||||
"dependencies": {
|
||||
"@mui/icons-material": "^5",
|
||||
"@mui/material": "^5",
|
||||
"@mui/x-data-grid-pro": "^7.18.0",
|
||||
"@mui/x-license": "^7.18.0",
|
||||
"next": "14.2.13",
|
||||
"@mui/icons-material": "^6",
|
||||
"@mui/material": "^6",
|
||||
"@mui/x-data-grid-pro": "^7.22.3",
|
||||
"@mui/x-license": "^7.21.0",
|
||||
"next": "15.0.3",
|
||||
"react": "18.3.1",
|
||||
"react-dom": "18.3.1"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/node": "^22.7.3",
|
||||
"@types/react": "18.3.9",
|
||||
"typescript": "^5.6.2"
|
||||
"@types/node": "^22.9.3",
|
||||
"@types/react": "18.3.12",
|
||||
"typescript": "^5.7.2"
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
{
|
||||
"name": "@link-stack/zammad-addon-bridge",
|
||||
"displayName": "Bridge",
|
||||
"version": "2.2.0",
|
||||
"version": "2.3.4",
|
||||
"description": "An addon that adds CDR Bridge channels to Zammad.",
|
||||
"scripts": {
|
||||
"build": "node '../../node_modules/@link-stack/zammad-addon-common/dist/build.js'",
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "@link-stack/zammad-addon-common",
|
||||
"version": "2.2.0",
|
||||
"version": "2.3.4",
|
||||
"description": "",
|
||||
"bin": {
|
||||
"zpm-build": "./dist/build.js",
|
||||
|
|
@ -10,7 +10,7 @@
|
|||
"build": "tsc"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/node": "^22.7.3",
|
||||
"@types/node": "^22.9.3",
|
||||
"typescript": "^5"
|
||||
},
|
||||
"author": "",
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
{
|
||||
"name": "@link-stack/zammad-addon-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.",
|
||||
"scripts": {
|
||||
"build": "node '../../node_modules/@link-stack/zammad-addon-common/dist/build.js'",
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
{
|
||||
"name": "@link-stack/zammad-addon-leafcutter",
|
||||
"displayName": "Leafcutter",
|
||||
"version": "2.2.0",
|
||||
"version": "2.3.4",
|
||||
"description": "Adds a common set of tags for Leafcutter uses.",
|
||||
"scripts": {
|
||||
"build": "node '../../node_modules/@link-stack/zammad-addon-common/dist/build.js'",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue