From dc1ca39f0fd42aca3cf41b47d76a32f990883a97 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-lock.json | 2 +- package.json | 2 +- 10 files changed, 21 insertions(+), 9 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 0adb302dc32..936079f8597 100644 --- a/apps/files/src/actions/deleteAction.spec.ts +++ b/apps/files/src/actions/deleteAction.spec.ts @@ -22,7 +22,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 13d24c57179..a5864d55835 100644 --- a/apps/files/src/actions/favoriteAction.spec.ts +++ b/apps/files/src/actions/favoriteAction.spec.ts @@ -22,7 +22,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 7166483f72c..461fb24f938 100644 --- a/apps/files/src/actions/renameAction.spec.ts +++ b/apps/files/src/actions/renameAction.spec.ts @@ -22,7 +22,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 9497a7be1f9..b33a68955f1 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 */ /** * @copyright Copyright (c) 2023 John Molakvoæ * @@ -22,7 +23,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 b87cbef6a1c..8a063fdf6c0 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 292aec4c630..b98396bb3a9 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 44460a62495..55d2a9a3a0a 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-lock.json b/package-lock.json index d8b68d1bf5c..48ec033f280 100644 --- a/package-lock.json +++ b/package-lock.json @@ -19,7 +19,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", diff --git a/package.json b/package.json index b95fe545f7c..a3a84fa44ba 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",