Skip to content

Commit f23e792

Browse files
authored
Merge pull request #12971 from owncloud/chore/backport-circular-deps-fix
chore: prevent circular deps
2 parents 3940af7 + 5a710ef commit f23e792

File tree

15 files changed

+1402
-1267
lines changed

15 files changed

+1402
-1267
lines changed

packages/web-app-password-protected-folders/src/composables/useApplicationFileExtensions.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { PASSWORD_PROTECTED_FOLDER_FILE_EXTENSION } from '@ownclouders/web-pkg'
1+
import { PASSWORD_PROTECTED_FOLDER_FILE_EXTENSION } from '@ownclouders/web-client'
22
import { useGettext } from 'vue3-gettext'
33
import { shareType } from '../../../design-system/src/utils/shareType'
44
import { useCustomHandler } from './useCustomHandler'

packages/web-client/package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,6 @@
8484
"dependencies": {
8585
"@casl/ability": "^6.7.1",
8686
"@microsoft/fetch-event-source": "^2.0.1",
87-
"@ownclouders/web-pkg": "workspace:*",
8887
"axios": "^1.11.0",
8988
"fast-xml-parser": "^5.0.0",
9089
"lodash-es": "^4.17.21",
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
export const PASSWORD_PROTECTED_FOLDER_FILE_EXTENSION = 'psec'
2+
3+
/**
4+
* List of file extensions that should be hidden from the user.
5+
* Hiding the extension currently leads to hiding all actions except delete.
6+
*/
7+
export const HIDDEN_FILE_EXTENSIONS = [PASSWORD_PROTECTED_FOLDER_FILE_EXTENSION]

packages/web-client/src/helpers/resource/functions.ts

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,7 @@ import { urlJoin } from '../../utils'
33
import { DavPermission, DavProperty } from '../../webdav/constants'
44
import { Resource, SearchResource, TrashResource, WebDavResponseResource } from './types'
55
import { camelCase } from 'lodash-es'
6-
import {
7-
HIDDEN_FILE_EXTENSIONS,
8-
PASSWORD_PROTECTED_FOLDER_FILE_EXTENSION
9-
} from '@ownclouders/web-pkg/src/constants'
6+
import { HIDDEN_FILE_EXTENSIONS, PASSWORD_PROTECTED_FOLDER_FILE_EXTENSION } from '../../constants'
107

118
const fileExtensions = {
129
complex: ['tar.bz2', 'tar.gz', 'tar.xz']

packages/web-client/src/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,5 +5,6 @@ import { webdav } from './webdav'
55
export * from './errors'
66
export * from './helpers'
77
export * from './utils'
8+
export * from './constants'
89

910
export { graph, ocs, webdav }

packages/web-client/tests/unit/helpers/resource/functions.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import {
99
extractNameWithoutExtension
1010
} from '../../../../src/helpers'
1111
import { DavPermission, DavProperty } from '../../../../src/webdav/constants'
12-
import { HIDDEN_FILE_EXTENSIONS } from '@ownclouders/web-pkg'
12+
import { HIDDEN_FILE_EXTENSIONS } from '@ownclouders/web-client'
1313

1414
describe('extractDomSelector', () => {
1515
it.each([

packages/web-pkg/src/components/FilesList/ResourceListItem.vue

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,12 +67,11 @@
6767
<script lang="ts" setup>
6868
import { computed } from 'vue'
6969
import { useGettext } from 'vue3-gettext'
70-
import { Resource } from '@ownclouders/web-client'
70+
import { HIDDEN_FILE_EXTENSIONS, Resource } from '@ownclouders/web-client'
7171
import ResourceIcon from './ResourceIcon.vue'
7272
import ResourceLink from './ResourceLink.vue'
7373
import ResourceName from './ResourceName.vue'
7474
import { RouteLocationRaw } from 'vue-router'
75-
import { HIDDEN_FILE_EXTENSIONS } from '../../constants'
7675
import { dirname, join } from 'node:path'
7776
7877
interface Props {

packages/web-pkg/src/components/SideBar/Files/FileInfo.vue

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,11 +26,10 @@
2626

2727
<script lang="ts">
2828
import { computed, defineComponent, inject, unref } from 'vue'
29-
import { Resource } from '@ownclouders/web-client'
29+
import { HIDDEN_FILE_EXTENSIONS, Resource } from '@ownclouders/web-client'
3030
import { useResourcesStore } from '../../../composables'
3131
import ResourceIcon from '../../FilesList/ResourceIcon.vue'
3232
import ResourceName from '../../FilesList/ResourceName.vue'
33-
import { HIDDEN_FILE_EXTENSIONS } from '../../../constants'
3433
3534
export default defineComponent({
3635
name: 'FileInfo',

packages/web-pkg/src/composables/actions/files/useFileActionsCreateSpaceFromResource.ts

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,12 @@ import { FileAction, FileActionOptions } from '../../actions'
55
import { useAbility } from '../../ability'
66
import { useClientService } from '../../clientService'
77
import { useRouter } from '../../router'
8-
import { Resource, SpaceResource, isPersonalSpaceResource } from '@ownclouders/web-client'
8+
import {
9+
HIDDEN_FILE_EXTENSIONS,
10+
Resource,
11+
SpaceResource,
12+
isPersonalSpaceResource
13+
} from '@ownclouders/web-client'
914
import { isLocationSpacesActive } from '../../../router'
1015
import { useCreateSpace } from '../../spaces'
1116
import { useSpaceHelpers } from '../../spaces'
@@ -17,7 +22,6 @@ import {
1722
useResourcesStore,
1823
useSpacesStore
1924
} from '../../piniaStores'
20-
import { HIDDEN_FILE_EXTENSIONS } from '../../../constants'
2125

2226
export const useFileActionsCreateSpaceFromResource = () => {
2327
const { showMessage, showErrorMessage } = useMessages()

packages/web-pkg/src/composables/actions/helpers/useFileActionsDeleteResources.ts

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,12 @@
11
import { cloneStateObject } from '../../../helpers/store'
22
import { isSameResource } from '../../../helpers/resource'
3-
import { DavHttpError, Resource, SpaceResource, urlJoin } from '@ownclouders/web-client'
3+
import {
4+
DavHttpError,
5+
PASSWORD_PROTECTED_FOLDER_FILE_EXTENSION,
6+
Resource,
7+
SpaceResource,
8+
urlJoin
9+
} from '@ownclouders/web-client'
410
import { isLocationSpacesActive } from '../../../router'
511
import { dirname } from 'path'
612
import { createFileRouteOptions } from '../../../helpers'
@@ -22,7 +28,6 @@ import {
2228
} from '../../piniaStores'
2329
import { storeToRefs } from 'pinia'
2430
import { useDeleteWorker } from '../../webWorkers'
25-
import { PASSWORD_PROTECTED_FOLDER_FILE_EXTENSION } from '../../../constants'
2631
import { captureException } from '@sentry/vue'
2732

2833
export const useFileActionsDeleteResources = () => {

0 commit comments

Comments
 (0)