aboutsummaryrefslogtreecommitdiffstats
path: root/apps/files
diff options
context:
space:
mode:
authorFerdinand Thiessen <opensource@fthiessen.de>2024-06-10 21:21:26 +0200
committerFerdinand Thiessen <opensource@fthiessen.de>2024-08-01 03:20:56 +0200
commit172c43351e4d48535a4e623646e6c48096ad802d (patch)
tree2822959459d6236be5703ad33eca2750c536a2d6 /apps/files
parent356860c06d4c5d16b1e0aa9cc9b875f0751f9e51 (diff)
downloadnextcloud-server-172c43351e4d48535a4e623646e6c48096ad802d.tar.gz
nextcloud-server-172c43351e4d48535a4e623646e6c48096ad802d.zip
refactor(files): Migrate logger util to Typescript
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
Diffstat (limited to 'apps/files')
-rw-r--r--apps/files/src/actions/deleteAction.ts2
-rw-r--r--apps/files/src/actions/favoriteAction.ts2
-rw-r--r--apps/files/src/actions/sidebarAction.ts2
-rw-r--r--apps/files/src/components/DragAndDropNotice.vue2
-rw-r--r--apps/files/src/components/FileEntry/FileEntryActions.vue2
-rw-r--r--apps/files/src/components/FileEntry/FileEntryCheckbox.vue3
-rw-r--r--apps/files/src/components/FileEntry/FileEntryName.vue2
-rw-r--r--apps/files/src/components/FileEntryMixin.ts2
-rw-r--r--apps/files/src/components/FilesListTableHeader.vue2
-rw-r--r--apps/files/src/components/FilesListTableHeaderActions.vue2
-rw-r--r--apps/files/src/components/FilesListVirtual.vue2
-rw-r--r--apps/files/src/components/NavigationQuota.vue2
-rw-r--r--apps/files/src/components/TransferOwnershipDialogue.vue2
-rw-r--r--apps/files/src/components/VirtualList.vue2
-rw-r--r--apps/files/src/logger.ts (renamed from apps/files/src/logger.js)0
-rw-r--r--apps/files/src/newMenu/newTemplatesFolder.ts2
-rw-r--r--apps/files/src/services/DropService.ts2
-rw-r--r--apps/files/src/services/DropServiceUtils.ts2
-rw-r--r--apps/files/src/services/ServiceWorker.js2
-rw-r--r--apps/files/src/views/FilesList.vue2
-rw-r--r--apps/files/src/views/Navigation.vue2
-rw-r--r--apps/files/src/views/Sidebar.vue2
-rw-r--r--apps/files/src/views/TemplatePicker.vue2
23 files changed, 22 insertions, 23 deletions
diff --git a/apps/files/src/actions/deleteAction.ts b/apps/files/src/actions/deleteAction.ts
index 53b5690d4dd..63335db194e 100644
--- a/apps/files/src/actions/deleteAction.ts
+++ b/apps/files/src/actions/deleteAction.ts
@@ -11,7 +11,7 @@ import CloseSvg from '@mdi/svg/svg/close.svg?raw'
import NetworkOffSvg from '@mdi/svg/svg/network-off.svg?raw'
import TrashCanSvg from '@mdi/svg/svg/trash-can.svg?raw'
-import logger from '../logger.js'
+import logger from '../logger.ts'
import { askConfirmation, canDisconnectOnly, canUnshareOnly, deleteNode, displayName, isTrashbinEnabled } from './deleteUtils'
const queue = new PQueue({ concurrency: 5 })
diff --git a/apps/files/src/actions/favoriteAction.ts b/apps/files/src/actions/favoriteAction.ts
index 3815fc1a9a3..bb7d82ba2cd 100644
--- a/apps/files/src/actions/favoriteAction.ts
+++ b/apps/files/src/actions/favoriteAction.ts
@@ -12,7 +12,7 @@ import Vue from 'vue'
import StarOutlineSvg from '@mdi/svg/svg/star-outline.svg?raw'
import StarSvg from '@mdi/svg/svg/star.svg?raw'
-import logger from '../logger.js'
+import logger from '../logger.ts'
import { encodePath } from '@nextcloud/paths'
// If any of the nodes is not favorited, we display the favorite action.
diff --git a/apps/files/src/actions/sidebarAction.ts b/apps/files/src/actions/sidebarAction.ts
index 21b5dfc2878..f00088f8d0c 100644
--- a/apps/files/src/actions/sidebarAction.ts
+++ b/apps/files/src/actions/sidebarAction.ts
@@ -6,7 +6,7 @@ import { Permission, type Node, View, FileAction } from '@nextcloud/files'
import { translate as t } from '@nextcloud/l10n'
import InformationSvg from '@mdi/svg/svg/information-variant.svg?raw'
-import logger from '../logger.js'
+import logger from '../logger.ts'
export const ACTION_DETAILS = 'details'
diff --git a/apps/files/src/components/DragAndDropNotice.vue b/apps/files/src/components/DragAndDropNotice.vue
index 0483e71f43b..cc0dc9104b2 100644
--- a/apps/files/src/components/DragAndDropNotice.vue
+++ b/apps/files/src/components/DragAndDropNotice.vue
@@ -37,7 +37,7 @@ import TrayArrowDownIcon from 'vue-material-design-icons/TrayArrowDown.vue'
import { useNavigation } from '../composables/useNavigation'
import { dataTransferToFileTree, onDropExternalFiles } from '../services/DropService'
-import logger from '../logger.js'
+import logger from '../logger.ts'
export default defineComponent({
name: 'DragAndDropNotice',
diff --git a/apps/files/src/components/FileEntry/FileEntryActions.vue b/apps/files/src/components/FileEntry/FileEntryActions.vue
index f886d4be3ec..2c3444a19fd 100644
--- a/apps/files/src/components/FileEntry/FileEntryActions.vue
+++ b/apps/files/src/components/FileEntry/FileEntryActions.vue
@@ -93,7 +93,7 @@ import ArrowLeftIcon from 'vue-material-design-icons/ArrowLeft.vue'
import CustomElementRender from '../CustomElementRender.vue'
import { useNavigation } from '../../composables/useNavigation'
-import logger from '../../logger.js'
+import logger from '../../logger.ts'
export default defineComponent({
name: 'FileEntryActions',
diff --git a/apps/files/src/components/FileEntry/FileEntryCheckbox.vue b/apps/files/src/components/FileEntry/FileEntryCheckbox.vue
index 987b48ef8ae..abf3e32d450 100644
--- a/apps/files/src/components/FileEntry/FileEntryCheckbox.vue
+++ b/apps/files/src/components/FileEntry/FileEntryCheckbox.vue
@@ -23,8 +23,7 @@ import NcLoadingIcon from '@nextcloud/vue/dist/Components/NcLoadingIcon.js'
import { useKeyboardStore } from '../../store/keyboard.ts'
import { useSelectionStore } from '../../store/selection.ts'
-import logger from '../../logger.js'
-import type { FileSource } from '../../types.ts'
+import logger from '../../logger.ts'
export default defineComponent({
name: 'FileEntryCheckbox',
diff --git a/apps/files/src/components/FileEntry/FileEntryName.vue b/apps/files/src/components/FileEntry/FileEntryName.vue
index 08f1dfc4940..1d45f7de17e 100644
--- a/apps/files/src/components/FileEntry/FileEntryName.vue
+++ b/apps/files/src/components/FileEntry/FileEntryName.vue
@@ -53,7 +53,7 @@ import { useNavigation } from '../../composables/useNavigation'
import { useRouteParameters } from '../../composables/useRouteParameters.ts'
import { useRenamingStore } from '../../store/renaming.ts'
import { getFilenameValidity } from '../../utils/filenameValidity.ts'
-import logger from '../../logger.js'
+import logger from '../../logger.ts'
export default defineComponent({
name: 'FileEntryName',
diff --git a/apps/files/src/components/FileEntryMixin.ts b/apps/files/src/components/FileEntryMixin.ts
index e18841e159e..8681e9c3cb2 100644
--- a/apps/files/src/components/FileEntryMixin.ts
+++ b/apps/files/src/components/FileEntryMixin.ts
@@ -18,7 +18,7 @@ import { action as sidebarAction } from '../actions/sidebarAction.ts'
import { getDragAndDropPreview } from '../utils/dragUtils.ts'
import { hashCode } from '../utils/hashUtils.ts'
import { dataTransferToFileTree, onDropExternalFiles, onDropInternalFiles } from '../services/DropService.ts'
-import logger from '../logger.js'
+import logger from '../logger.ts'
Vue.directive('onClickOutside', vOnClickOutside)
diff --git a/apps/files/src/components/FilesListTableHeader.vue b/apps/files/src/components/FilesListTableHeader.vue
index 723dd574da8..e91cfa055c1 100644
--- a/apps/files/src/components/FilesListTableHeader.vue
+++ b/apps/files/src/components/FilesListTableHeader.vue
@@ -68,7 +68,7 @@ import { useNavigation } from '../composables/useNavigation'
import { useFilesStore } from '../store/files.ts'
import { useSelectionStore } from '../store/selection.ts'
import filesSortingMixin from '../mixins/filesSorting.ts'
-import logger from '../logger.js'
+import logger from '../logger.ts'
export default defineComponent({
name: 'FilesListTableHeader',
diff --git a/apps/files/src/components/FilesListTableHeaderActions.vue b/apps/files/src/components/FilesListTableHeaderActions.vue
index 2916ce55e67..30e460b8acf 100644
--- a/apps/files/src/components/FilesListTableHeaderActions.vue
+++ b/apps/files/src/components/FilesListTableHeaderActions.vue
@@ -39,7 +39,7 @@ import { useActionsMenuStore } from '../store/actionsmenu.ts'
import { useFilesStore } from '../store/files.ts'
import { useSelectionStore } from '../store/selection.ts'
import filesListWidthMixin from '../mixins/filesListWidth.ts'
-import logger from '../logger.js'
+import logger from '../logger.ts'
import type { FileSource } from '../types'
// The registered actions list
diff --git a/apps/files/src/components/FilesListVirtual.vue b/apps/files/src/components/FilesListVirtual.vue
index 37638aeabe6..4c9cea00f9c 100644
--- a/apps/files/src/components/FilesListVirtual.vue
+++ b/apps/files/src/components/FilesListVirtual.vue
@@ -81,7 +81,7 @@ import FilesListTableFooter from './FilesListTableFooter.vue'
import FilesListTableHeader from './FilesListTableHeader.vue'
import filesListWidthMixin from '../mixins/filesListWidth.ts'
import VirtualList from './VirtualList.vue'
-import logger from '../logger.js'
+import logger from '../logger.ts'
import FilesListTableHeaderActions from './FilesListTableHeaderActions.vue'
import FileListFilters from './FileListFilters.vue'
diff --git a/apps/files/src/components/NavigationQuota.vue b/apps/files/src/components/NavigationQuota.vue
index 0619f6bc3fd..0e5ef510342 100644
--- a/apps/files/src/components/NavigationQuota.vue
+++ b/apps/files/src/components/NavigationQuota.vue
@@ -37,7 +37,7 @@ import ChartPie from 'vue-material-design-icons/ChartPie.vue'
import NcAppNavigationItem from '@nextcloud/vue/dist/Components/NcAppNavigationItem.js'
import NcProgressBar from '@nextcloud/vue/dist/Components/NcProgressBar.js'
-import logger from '../logger.js'
+import logger from '../logger.ts'
export default {
name: 'NavigationQuota',
diff --git a/apps/files/src/components/TransferOwnershipDialogue.vue b/apps/files/src/components/TransferOwnershipDialogue.vue
index 346bc3bbeb8..f13e6655354 100644
--- a/apps/files/src/components/TransferOwnershipDialogue.vue
+++ b/apps/files/src/components/TransferOwnershipDialogue.vue
@@ -52,7 +52,7 @@ import NcSelect from '@nextcloud/vue/dist/Components/NcSelect.js'
import Vue from 'vue'
import NcButton from '@nextcloud/vue/dist/Components/NcButton.js'
-import logger from '../logger.js'
+import logger from '../logger.ts'
const picker = getFilePickerBuilder(t('files', 'Choose a file or folder to transfer'))
.setMultiSelect(false)
diff --git a/apps/files/src/components/VirtualList.vue b/apps/files/src/components/VirtualList.vue
index 6206f86cda5..859aba6c834 100644
--- a/apps/files/src/components/VirtualList.vue
+++ b/apps/files/src/components/VirtualList.vue
@@ -59,7 +59,7 @@ import debounce from 'debounce'
import Vue from 'vue'
import filesListWidthMixin from '../mixins/filesListWidth.ts'
-import logger from '../logger.js'
+import logger from '../logger.ts'
interface RecycledPoolItem {
key: string,
diff --git a/apps/files/src/logger.js b/apps/files/src/logger.ts
index 33f87b424e0..33f87b424e0 100644
--- a/apps/files/src/logger.js
+++ b/apps/files/src/logger.ts
diff --git a/apps/files/src/newMenu/newTemplatesFolder.ts b/apps/files/src/newMenu/newTemplatesFolder.ts
index 107a281aceb..43a6f08b525 100644
--- a/apps/files/src/newMenu/newTemplatesFolder.ts
+++ b/apps/files/src/newMenu/newTemplatesFolder.ts
@@ -15,7 +15,7 @@ import { newNodeName } from '../utils/newNodeDialog'
import PlusSvg from '@mdi/svg/svg/plus.svg?raw'
import axios from '@nextcloud/axios'
-import logger from '../logger.js'
+import logger from '../logger.ts'
let templatesPath = loadState<string|false>('files', 'templates_path', false)
logger.debug('Initial templates folder', { templatesPath })
diff --git a/apps/files/src/services/DropService.ts b/apps/files/src/services/DropService.ts
index b947c612949..63e7c213f4f 100644
--- a/apps/files/src/services/DropService.ts
+++ b/apps/files/src/services/DropService.ts
@@ -17,7 +17,7 @@ import Vue from 'vue'
import { Directory, traverseTree, resolveConflict, createDirectoryIfNotExists } from './DropServiceUtils'
import { handleCopyMoveNodeTo } from '../actions/moveOrCopyAction'
import { MoveCopyAction } from '../actions/moveOrCopyActionUtils'
-import logger from '../logger.js'
+import logger from '../logger.ts'
/**
* This function converts a list of DataTransferItems to a file tree.
diff --git a/apps/files/src/services/DropServiceUtils.ts b/apps/files/src/services/DropServiceUtils.ts
index 27478dd956a..f10a09cfe27 100644
--- a/apps/files/src/services/DropServiceUtils.ts
+++ b/apps/files/src/services/DropServiceUtils.ts
@@ -10,7 +10,7 @@ import { openConflictPicker } from '@nextcloud/upload'
import { showError, showInfo } from '@nextcloud/dialogs'
import { translate as t } from '@nextcloud/l10n'
-import logger from '../logger.js'
+import logger from '../logger.ts'
/**
* This represents a Directory in the file tree
diff --git a/apps/files/src/services/ServiceWorker.js b/apps/files/src/services/ServiceWorker.js
index 477354d1c36..7d03af65e44 100644
--- a/apps/files/src/services/ServiceWorker.js
+++ b/apps/files/src/services/ServiceWorker.js
@@ -3,7 +3,7 @@
* SPDX-License-Identifier: AGPL-3.0-or-later
*/
import { generateUrl } from '@nextcloud/router'
-import logger from '../logger.js'
+import logger from '../logger.ts'
export default () => {
if ('serviceWorker' in navigator) {
diff --git a/apps/files/src/views/FilesList.vue b/apps/files/src/views/FilesList.vue
index d3b79c1d952..d486b6f1bae 100644
--- a/apps/files/src/views/FilesList.vue
+++ b/apps/files/src/views/FilesList.vue
@@ -159,7 +159,7 @@ import BreadCrumbs from '../components/BreadCrumbs.vue'
import FilesListVirtual from '../components/FilesListVirtual.vue'
import filesListWidthMixin from '../mixins/filesListWidth.ts'
import filesSortingMixin from '../mixins/filesSorting.ts'
-import logger from '../logger.js'
+import logger from '../logger.ts'
import DragAndDropNotice from '../components/DragAndDropNotice.vue'
const isSharingEnabled = (getCapabilities() as { files_sharing?: boolean })?.files_sharing !== undefined
diff --git a/apps/files/src/views/Navigation.vue b/apps/files/src/views/Navigation.vue
index f431ca62b5f..b0588863f5d 100644
--- a/apps/files/src/views/Navigation.vue
+++ b/apps/files/src/views/Navigation.vue
@@ -81,7 +81,7 @@ import { useNavigation } from '../composables/useNavigation'
import { useFilenameFilter } from '../composables/useFilenameFilter'
import { useFiltersStore } from '../store/filters.ts'
import { useViewConfigStore } from '../store/viewConfig.ts'
-import logger from '../logger.js'
+import logger from '../logger.ts'
export default defineComponent({
name: 'Navigation',
diff --git a/apps/files/src/views/Sidebar.vue b/apps/files/src/views/Sidebar.vue
index 8c4af5fd80f..efa090112de 100644
--- a/apps/files/src/views/Sidebar.vue
+++ b/apps/files/src/views/Sidebar.vue
@@ -108,7 +108,7 @@ import FileInfo from '../services/FileInfo.js'
import LegacyView from '../components/LegacyView.vue'
import SidebarTab from '../components/SidebarTab.vue'
import SystemTags from '../../../systemtags/src/components/SystemTags.vue'
-import logger from '../logger.js'
+import logger from '../logger.ts'
export default {
name: 'Sidebar',
diff --git a/apps/files/src/views/TemplatePicker.vue b/apps/files/src/views/TemplatePicker.vue
index 2a346ae139f..0d5b3cbaac9 100644
--- a/apps/files/src/views/TemplatePicker.vue
+++ b/apps/files/src/views/TemplatePicker.vue
@@ -60,7 +60,7 @@ import NcEmptyContent from '@nextcloud/vue/dist/Components/NcEmptyContent.js'
import NcModal from '@nextcloud/vue/dist/Components/NcModal.js'
import TemplatePreview from '../components/TemplatePreview.vue'
import TemplateFiller from '../components/TemplateFiller.vue'
-import logger from '../logger.js'
+import logger from '../logger.ts'
const border = 2
const margin = 8