Skip to content

Commit

Permalink
Make dependencies between modules more explicit and resolve some of them
Browse files Browse the repository at this point in the history
  • Loading branch information
dschmidt committed Oct 17, 2022
1 parent 496023b commit 54e26b5
Show file tree
Hide file tree
Showing 172 changed files with 972 additions and 619 deletions.
5 changes: 5 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,10 @@
"@cucumber/messages": "^17.1.1",
"@cucumber/pretty-formatter": "^1.0.0-alpha.2",
"@noble/hashes": "^1.0.0",
"@ownclouders/babel-preset": "workspace:*",
"@ownclouders/eslint-config": "workspace:*",
"@ownclouders/prettier-config": "workspace:*",
"@ownclouders/tsconfig": "workspace:*",
"@playwright/test": "^1.27.0",
"@rollup-extras/plugin-copy": "^1.2.5",
"@rollup/plugin-alias": "^3.1.9",
Expand Down Expand Up @@ -99,6 +103,7 @@
"pino-pretty": "^7.6.0",
"playwright": "^1.26.1",
"postcss": "^8.3.6",
"qs": "^6.10.3",
"react": "^17.0.2",
"regenerator-runtime": "^0.13.7",
"requirejs": "^2.3.6",
Expand Down
9 changes: 8 additions & 1 deletion packages/web-app-draw-io/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,12 @@
"name": "draw-io",
"version": "0.0.0",
"description": "ownCloud web draw.io integration",
"license": "AGPL-3.0"
"license": "AGPL-3.0",
"peerDependencies": {
"@vue/composition-api": "^1.6.2",
"luxon": "^2.4.0",
"vuex": "^3.6.2",
"web-client": "workspace:*",
"web-pkg": "workspace:*"
}
}
2 changes: 1 addition & 1 deletion packages/web-app-draw-io/src/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
import { mapActions } from 'vuex'
import qs from 'qs'
import { DateTime } from 'luxon'
import { DavPermission, DavProperty } from 'web-pkg/src/constants'
import { DavPermission, DavProperty } from 'web-client/src/webdav/constants'
import { useAppDefaults } from 'web-pkg/src/composables'
import { defineComponent } from '@vue/composition-api'
import { basename } from 'path'
Expand Down
9 changes: 8 additions & 1 deletion packages/web-app-external/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,12 @@
"name": "external",
"version": "0.0.0",
"description": "ownCloud web integration of the reva app provider",
"license": "AGPL-3.0"
"license": "AGPL-3.0",
"peerDependencies": {
"@vue/composition-api": "^1.6.2",
"uuid": "^9.0.0",
"vuex": "^3.6.2",
"web-client": "workspace:*",
"web-pkg": "workspace:*"
}
}
6 changes: 3 additions & 3 deletions packages/web-app-external/src/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,9 @@ import ErrorScreen from './components/ErrorScreen.vue'
import LoadingScreen from './components/LoadingScreen.vue'
import { computed, unref } from '@vue/composition-api'
import { queryItemAsString, useAppDefaults, useRouteQuery } from 'web-pkg/src/composables'
import { defineComponent } from '@vue/runtime-core'
import { DavProperty } from 'web-pkg/src/constants'
import { urlJoin } from 'web-pkg/src/utils'
import { defineComponent } from '@vue/composition-api'
import { DavProperty } from 'web-client/src/webdav/constants'
import { urlJoin } from 'web-client/src/utils'
import { stringify } from 'qs'
import { configurationManager } from 'web-pkg/src/configuration'
Expand Down
2 changes: 1 addition & 1 deletion packages/web-app-external/src/store/index.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Commit } from 'vuex'
import { urlJoin } from 'web-pkg/src/utils'
import { urlJoin } from 'web-client/src/utils'
import { configurationManager } from 'web-pkg/src/configuration'
import { v4 as uuidV4 } from 'uuid'

Expand Down
25 changes: 24 additions & 1 deletion packages/web-app-files/package.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,32 @@
{
"name": "files",
"name": "web-app-files",
"version": "0.0.0",
"description": "ownCloud web files",
"license": "AGPL-3.0",
"dependencies": {
"copy-to-clipboard": "^3.3.1"
},
"peerDependencies": {
"@vue/composition-api": "^1.6.2",
"filesize": "^9.0.11",
"fuse.js": "^6.5.3",
"lodash-es": "4.17.21",
"luxon": "^2.4.0",
"marked": "^4.0.12",
"p-queue": "^6.6.2",
"popper-max-size-modifier": "^0.2.0",
"qs": "^6.10.3",
"sanitize-html": "^2.7.0",
"semver": "^7.3.8",
"uuid": "^9.0.0",
"vue-concurrency": "^3.0.0-7",
"vue-gettext": "^2.1.5",
"vue-resize": "^1.0.1",
"vue-router": "~3.5.3",
"vuex": "^3.6.2",
"web-app-search": "workspace:*",
"web-client": "workspace:*",
"web-pkg": "workspace:*",
"web-runtime": "workspace:*"
}
}
3 changes: 1 addition & 2 deletions packages/web-app-files/src/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,13 @@
</template>
<script lang="ts">
import { defineComponent, watch } from '@vue/composition-api'
import { Route } from 'vue-router'
import { useRoute, useStore } from 'web-pkg/src/composables'
import { eventBus } from 'web-pkg/src/services/eventBus'
export default defineComponent({
setup() {
const store = useStore<any>()
watch(useRoute(), (to: Route, from?: Route) => {
watch(useRoute(), () => {
store.dispatch('Files/resetFileSelection')
})
},
Expand Down
14 changes: 5 additions & 9 deletions packages/web-app-files/src/components/AppBar/CreateAndUpload.vue
Original file line number Diff line number Diff line change
Expand Up @@ -132,14 +132,14 @@ import pathUtil from 'path'
import MixinFileActions, { EDITOR_MODE_CREATE } from '../../mixins/fileActions'
import { isLocationPublicActive, isLocationSpacesActive } from '../../router'
import { useActiveLocation } from '../../composables'
import { useGraphClient } from 'web-client/src/composables'
import {
useRequest,
useCapabilityShareJailEnabled,
useCapabilitySpacesEnabled,
useStore,
useUserContext
useUserContext,
useGraphClient
} from 'web-pkg/src/composables'
import ResourceUpload from './Upload/ResourceUpload.vue'
Expand All @@ -153,15 +153,11 @@ import {
import { useUpload } from 'web-runtime/src/composables/upload'
import { useUploadHelpers } from '../../composables/upload'
import { eventBus } from 'web-pkg/src/services/eventBus'
import { SpaceResource } from 'web-client/src/helpers'
import {
extractNameWithoutExtension,
resolveFileNameDuplicate,
ResourcesUpload
} from '../../helpers/resource'
import { extractNameWithoutExtension, SpaceResource } from 'web-client/src/helpers'
import { resolveFileNameDuplicate, ResourcesUpload } from '../../helpers/resource'
import { WebDAV } from 'web-client/src/webdav'
import { configurationManager } from 'web-pkg/src/configuration'
import { urlJoin } from 'web-pkg/src/utils'
import { urlJoin } from 'web-client/src/utils'
import qs from 'qs'
export default defineComponent({
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
import { mapActions, mapMutations } from 'vuex'
import { defineComponent } from '@vue/composition-api'
import { useGraphClient } from 'web-client/src/composables'
import { useGraphClient } from 'web-pkg/src/composables'
import { buildSpace } from 'web-client/src/helpers'
import { configurationManager } from 'web-pkg/src/configuration'
import { WebDAV } from 'web-client/src/webdav'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@
import { defineComponent, ref, unref } from '@vue/composition-api'
import { mapGetters } from 'vuex'
import { useTask } from 'vue-concurrency'
import { buildResource } from '../../../helpers/resources'
import { buildResource } from 'web-client/src/helpers'
import { loadPreview } from 'web-pkg/src/helpers/preview'
import { spaceRoleManager } from 'web-client/src/helpers/share'
import { buildWebDavSpacesPath } from 'web-client/src/helpers'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ import {
useCapabilityShareJailEnabled
} from 'web-pkg/src/composables'
import { defineComponent } from '@vue/runtime-core'
import { defineComponent } from '@vue/composition-api'
// just a dummy function to trick gettext tools
const $gettext = (str) => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ import {
SpacePeopleShareRoles
} from 'web-client/src/helpers/share'
import * as uuid from 'uuid'
import { defineComponent } from '@vue/runtime-core'
import { defineComponent } from '@vue/composition-api'
import { PropType } from '@vue/composition-api'
export default defineComponent({
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ import { cloneStateObject } from '../../../helpers/store'
import { showQuickLinkPasswordModal } from '../../../quickActions'
import DetailsAndEdit from './Links/DetailsAndEdit.vue'
import NameAndCopy from './Links/NameAndCopy.vue'
import { useGraphClient } from 'web-client/src/composables'
import { useGraphClient } from 'web-pkg/src/composables'
import CreateQuickLink from './Links/CreateQuickLink.vue'
import { getLocaleFromLanguage } from 'web-pkg/src/helpers'
import { SpaceResource } from 'web-client/src/helpers'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ import {
linkRoleInternalFolder,
LinkShareRoles
} from 'web-client/src/helpers/share'
import { defineComponent } from '@vue/runtime-core'
import { defineComponent } from '@vue/composition-api'
import { formatDateFromDateTime, formatRelativeDateFromDateTime } from 'web-pkg/src/helpers'
import { SpaceResource } from 'web-client/src/helpers'
import { PropType } from '@vue/composition-api'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

<script lang="ts">
import { PropType } from '@vue/composition-api'
import { defineComponent } from '@vue/runtime-core'
import { defineComponent } from '@vue/composition-api'
import { ShareRole } from 'web-client/src/helpers/share'
export default defineComponent({
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
</template>
<script lang="ts">
import { mapActions, mapGetters, mapMutations } from 'vuex'
import { DavProperty } from 'web-pkg/src/constants'
import { DavProperty } from 'web-client/src/webdav/constants'
import { formatRelativeDateFromHTTP, formatFileSize } from 'web-pkg/src/helpers'
import { WebDAV } from 'web-client/src/webdav'
import { inject } from '@vue/composition-api'
Expand Down
4 changes: 2 additions & 2 deletions packages/web-app-files/src/components/Spaces/QuotaModal.vue
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@
</template>

<script lang="ts">
import { defineComponent } from '@vue/runtime-core'
import { defineComponent } from '@vue/composition-api'
import { mapActions, mapMutations } from 'vuex'
import { useGraphClient } from 'web-client/src/composables'
import { useGraphClient } from 'web-pkg/src/composables'
import QuotaSelect from 'web-pkg/src/components/QuotaSelect.vue'
export default defineComponent({
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { ComputedRef, Ref, unref } from '@vue/composition-api'
import * as uuid from 'uuid'
import path from 'path'
import { Resource, SpaceResource } from 'web-client/src/helpers'
import { urlJoin } from 'web-pkg/src/utils'
import { urlJoin } from 'web-client/src/utils'

interface UploadHelpersOptions {
space: ComputedRef<SpaceResource>
Expand Down

This file was deleted.

2 changes: 1 addition & 1 deletion packages/web-app-files/src/helpers/path.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { urlJoin } from 'web-pkg/src/utils'
import { urlJoin } from 'web-client/src/utils'

/**
* Return all absolute parent paths.
Expand Down
12 changes: 5 additions & 7 deletions packages/web-app-files/src/helpers/resource/actions/upload.ts
Original file line number Diff line number Diff line change
@@ -1,14 +1,12 @@
import filesize from 'filesize'
import { Resource } from 'web-client'
import { isShareSpaceResource, SpaceResource } from 'web-client/src/helpers'
import { UppyResource } from 'web-runtime/src/composables/upload'
import {
ConflictDialog,
extractExtensionFromFile,
ResolveConflict,
resolveFileNameDuplicate,
ResolveStrategy
} from '..'
isShareSpaceResource,
SpaceResource
} from 'web-client/src/helpers'
import { UppyResource } from 'web-runtime/src/composables/upload'
import { ConflictDialog, ResolveConflict, resolveFileNameDuplicate, ResolveStrategy } from '..'
import { locationPublicLink } from '../../../router/public'
import { locationSpacesGeneric } from '../../../router/spaces'

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import { dirname } from 'path'
import { Resource, SpaceResource } from 'web-client/src/helpers'
import { extractNameWithoutExtension } from '../index'
import { extractNameWithoutExtension, Resource, SpaceResource } from 'web-client/src/helpers'

export const resolveFileNameDuplicate = (name, extension, existingFiles, iteration = 1) => {
let potentialName
Expand Down
1 change: 0 additions & 1 deletion packages/web-app-files/src/helpers/resource/index.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
export * from './filter'
export * from './resource'
export * from './sameResource'
export * from './conflictHandling'
export * from './actions'
49 changes: 0 additions & 49 deletions packages/web-app-files/src/helpers/resource/resource.ts

This file was deleted.

Loading

0 comments on commit 54e26b5

Please sign in to comment.