From 622bf3003107d568e3c798547d4f1aa46e86f50a Mon Sep 17 00:00:00 2001 From: Ferdinand Thiessen Date: Tue, 28 May 2024 10:37:11 +0200 Subject: [PATCH] fix(deps): Update `@nextcloud/event-bus` to version 3.3.1 Signed-off-by: Ferdinand Thiessen --- apps/files/src/actions/deleteAction.spec.ts | 2 +- apps/files/src/actions/favoriteAction.spec.ts | 2 +- apps/files/src/actions/renameAction.spec.ts | 2 +- apps/files/src/eventbus.d.ts | 11 +++++++++++ apps/files/src/views/favorites.spec.ts | 3 ++- .../src/actions/acceptShareAction.spec.ts | 2 +- .../src/actions/rejectShareAction.spec.ts | 2 +- .../src/actions/restoreShareAction.spec.ts | 2 +- package.json | 2 +- 9 files changed, 20 insertions(+), 8 deletions(-) create mode 100644 apps/files/src/eventbus.d.ts diff --git a/apps/files/src/actions/deleteAction.spec.ts b/apps/files/src/actions/deleteAction.spec.ts index 46bb9fd07c8..86e1812a9d1 100644 --- a/apps/files/src/actions/deleteAction.spec.ts +++ b/apps/files/src/actions/deleteAction.spec.ts @@ -5,7 +5,7 @@ import { action } from './deleteAction' import { expect } from '@jest/globals' import { File, Folder, Permission, View, FileAction } from '@nextcloud/files' -import * as eventBus from '@nextcloud/event-bus' +import eventBus from '@nextcloud/event-bus' import axios from '@nextcloud/axios' import logger from '../logger' diff --git a/apps/files/src/actions/favoriteAction.spec.ts b/apps/files/src/actions/favoriteAction.spec.ts index 701047f2660..39b82ff82d6 100644 --- a/apps/files/src/actions/favoriteAction.spec.ts +++ b/apps/files/src/actions/favoriteAction.spec.ts @@ -5,7 +5,7 @@ import { action } from './favoriteAction' import { expect } from '@jest/globals' import { File, Permission, View, FileAction } from '@nextcloud/files' -import * as eventBus from '@nextcloud/event-bus' +import eventBus from '@nextcloud/event-bus' import * as favoriteAction from './favoriteAction' import axios from '@nextcloud/axios' import logger from '../logger' diff --git a/apps/files/src/actions/renameAction.spec.ts b/apps/files/src/actions/renameAction.spec.ts index c1f61c058a4..f0428996972 100644 --- a/apps/files/src/actions/renameAction.spec.ts +++ b/apps/files/src/actions/renameAction.spec.ts @@ -5,7 +5,7 @@ import { action } from './renameAction' import { expect } from '@jest/globals' import { File, Permission, View, FileAction } from '@nextcloud/files' -import * as eventBus from '@nextcloud/event-bus' +import eventBus from '@nextcloud/event-bus' const view = { id: 'files', diff --git a/apps/files/src/eventbus.d.ts b/apps/files/src/eventbus.d.ts new file mode 100644 index 00000000000..1d68a3229a8 --- /dev/null +++ b/apps/files/src/eventbus.d.ts @@ -0,0 +1,11 @@ +import type { Node } from '@nextcloud/files' + +declare module '@nextcloud/event-bus' { + export interface NextcloudEvents { + // mapping of 'event name' => 'event type' + 'files:favorites:removed': Node + 'files:favorites:added': Node + } +} + +export {} diff --git a/apps/files/src/views/favorites.spec.ts b/apps/files/src/views/favorites.spec.ts index b939101f8d3..58e60b2ee06 100644 --- a/apps/files/src/views/favorites.spec.ts +++ b/apps/files/src/views/favorites.spec.ts @@ -1,3 +1,4 @@ +/* eslint-disable import/no-named-as-default-member */ /** * SPDX-FileCopyrightText: 2023 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later @@ -5,7 +6,7 @@ import { basename } from 'path' import { expect } from '@jest/globals' import { Folder, Navigation, getNavigation } from '@nextcloud/files' -import * as eventBus from '@nextcloud/event-bus' +import eventBus from '@nextcloud/event-bus' import * as initialState from '@nextcloud/initial-state' import { action } from '../actions/favoriteAction' diff --git a/apps/files_sharing/src/actions/acceptShareAction.spec.ts b/apps/files_sharing/src/actions/acceptShareAction.spec.ts index 0fae52c2103..5be91040e48 100644 --- a/apps/files_sharing/src/actions/acceptShareAction.spec.ts +++ b/apps/files_sharing/src/actions/acceptShareAction.spec.ts @@ -22,7 +22,7 @@ import { action } from './acceptShareAction' import { expect } from '@jest/globals' import { File, Permission, View, FileAction } from '@nextcloud/files' -import * as eventBus from '@nextcloud/event-bus' +import eventBus from '@nextcloud/event-bus' import axios from '@nextcloud/axios' import '../main' diff --git a/apps/files_sharing/src/actions/rejectShareAction.spec.ts b/apps/files_sharing/src/actions/rejectShareAction.spec.ts index 80c142052f9..7980d971661 100644 --- a/apps/files_sharing/src/actions/rejectShareAction.spec.ts +++ b/apps/files_sharing/src/actions/rejectShareAction.spec.ts @@ -22,7 +22,7 @@ import { action } from './rejectShareAction' import { expect } from '@jest/globals' import { File, Folder, Permission, View, FileAction } from '@nextcloud/files' -import * as eventBus from '@nextcloud/event-bus' +import eventBus from '@nextcloud/event-bus' import axios from '@nextcloud/axios' import '../main' diff --git a/apps/files_sharing/src/actions/restoreShareAction.spec.ts b/apps/files_sharing/src/actions/restoreShareAction.spec.ts index f39694ac730..c00cedff639 100644 --- a/apps/files_sharing/src/actions/restoreShareAction.spec.ts +++ b/apps/files_sharing/src/actions/restoreShareAction.spec.ts @@ -22,7 +22,7 @@ import { action } from './restoreShareAction' import { expect } from '@jest/globals' import { File, Permission, View, FileAction } from '@nextcloud/files' -import * as eventBus from '@nextcloud/event-bus' +import eventBus from '@nextcloud/event-bus' import axios from '@nextcloud/axios' import '../main' diff --git a/package.json b/package.json index 136e084b2b8..b642b45953b 100644 --- a/package.json +++ b/package.json @@ -46,7 +46,7 @@ "@nextcloud/calendar-availability-vue": "^2.2.0", "@nextcloud/capabilities": "^1.0.4", "@nextcloud/dialogs": "^5.3.1", - "@nextcloud/event-bus": "^3.1.0", + "@nextcloud/event-bus": "^3.3.1", "@nextcloud/files": "^3.4.0", "@nextcloud/initial-state": "^2.0.0", "@nextcloud/l10n": "^2.1.0",