diff --git a/package.json b/package.json index 7f9c0574c..370af3081 100644 --- a/package.json +++ b/package.json @@ -59,14 +59,14 @@ "@sentry/integrations": "7.114.0", "@sentry/react-native": "5.33.1", "base-64": "^1.0.0", - "cozy-client": "^51.7.0", + "cozy-client": "^52.0.0", "cozy-clisk": "^0.38.1", "cozy-device-helper": "^2.7.0", "cozy-flags": "^3.2.0", "cozy-intent": "^2.23.0", "cozy-logger": "^1.10.0", "cozy-minilog": "3.3.1", - "cozy-pouch-link": "^51.7.0", + "cozy-pouch-link": "^52.0.0", "date-fns": "2.29.3", "events": "^3.3.0", "html-entities": "^2.3.3", diff --git a/src/app/domain/backup/services/manageLocalBackupConfig.ts b/src/app/domain/backup/services/manageLocalBackupConfig.ts index 77334baff..26a61ba53 100644 --- a/src/app/domain/backup/services/manageLocalBackupConfig.ts +++ b/src/app/domain/backup/services/manageLocalBackupConfig.ts @@ -205,11 +205,15 @@ export const fixLocalBackupConfigIfNecessary = async ( const fileQuery = buildFileQuery( localBackupConfig.remoteBackupConfig.backupFolder.id ) + const fileQueryOptions = { forceStack: true } let remoteBackupFolderUpdated try { - const { data } = (await client.query(fileQuery)) as FileCollectionGetResult + const { data } = (await client.query( + fileQuery, + fileQueryOptions + )) as FileCollectionGetResult remoteBackupFolderUpdated = data } catch (e) { diff --git a/src/app/domain/backup/services/manageRemoteBackupConfig.ts b/src/app/domain/backup/services/manageRemoteBackupConfig.ts index 2a163d5f6..e267d162a 100644 --- a/src/app/domain/backup/services/manageRemoteBackupConfig.ts +++ b/src/app/domain/backup/services/manageRemoteBackupConfig.ts @@ -230,9 +230,11 @@ export const createRemoteBackupFolder = async ( ) const fileQuery = buildFileQuery(backupFolderId) + const fileQueryOptions = { forceStack: true } const { data: backupFolder } = (await client.query( - fileQuery + fileQuery, + fileQueryOptions )) as FileCollectionGetResult const remoteBackupConfig = { @@ -331,8 +333,12 @@ export const getRemoteFiles = (): File[] => { const fetchAllRemoteFiles = async (client: CozyClient): Promise => { const filesQuery = buildAllMediasFilesQuery() + const fileQueryOptions = { forceStack: true } - const remoteFiles = (await client.queryAll(filesQuery)) as FilesQueryAllResult + const remoteFiles = (await client.queryAll( + filesQuery, + fileQueryOptions + )) as FilesQueryAllResult const remoteFilesNotInTrash = remoteFiles.filter( file => !isInTrash(file.path) @@ -372,7 +378,11 @@ export const fetchBackupedMedias = async ( const filesQuery = buildFilesQuery(deviceId) - const data = (await client.queryAll(filesQuery)) as FilesQueryAllResult + const filesQueryOption = { forceStack: true } + const data = (await client.queryAll( + filesQuery, + filesQueryOption + )) as FilesQueryAllResult const backupedMedias = filterMediasAlreadyBackuped(allMedias, data) diff --git a/yarn.lock b/yarn.lock index 59f9bccbb..b4dac9697 100644 --- a/yarn.lock +++ b/yarn.lock @@ -8683,16 +8683,16 @@ cosmiconfig@^8.1.3: parse-json "^5.2.0" path-type "^4.0.0" -cozy-client@^51.7.0: - version "51.7.0" - resolved "https://registry.yarnpkg.com/cozy-client/-/cozy-client-51.7.0.tgz#c06393a9e13a6f2f2abcdf7cd1e4236a3e20588f" - integrity sha512-PffTajP04alPRrrWhuOdcmbqpV71nk7KQk+WkWCKXPbbjGU8NBcpLtJLLK/0IaI74DTiT0MSnwtl7fp+m0fR9w== +cozy-client@^52.0.0: + version "52.0.0" + resolved "https://registry.yarnpkg.com/cozy-client/-/cozy-client-52.0.0.tgz#bedbdee24846b8cc24cd4966ec8d19dd9661c872" + integrity sha512-WRjutF8NYRjNttllxPW0w94SSwNorJuWlZrsfjNshezMPGfK8eCGTC4Kyreo21dIbg3v4yRahlIKAqdvmBlNWw== dependencies: "@cozy/minilog" "1.0.0" "@types/jest" "^26.0.20" "@types/lodash" "^4.14.170" btoa "^1.2.1" - cozy-stack-client "^51.6.0" + cozy-stack-client "^52.0.0" date-fns "2.29.3" json-stable-stringify "^1.0.1" lodash "^4.17.13" @@ -8759,19 +8759,19 @@ cozy-minilog@3.3.1, cozy-minilog@^3.3.1: dependencies: microee "0.0.6" -cozy-pouch-link@^51.7.0: - version "51.7.0" - resolved "https://registry.yarnpkg.com/cozy-pouch-link/-/cozy-pouch-link-51.7.0.tgz#667c6c6d466fd51c89779f853ad174483e3cb57a" - integrity sha512-XSQzTWznD0YS7BFaYv3P7lCKbQb2//KILVZD+urR7IhzqzHkEr3jJux8RdaNLm2gdxvC8CQvRsoxG1v54W5sYg== +cozy-pouch-link@^52.0.0: + version "52.0.0" + resolved "https://registry.yarnpkg.com/cozy-pouch-link/-/cozy-pouch-link-52.0.0.tgz#c3dac6497ecc1af6827657a20072f03d99c3e7e9" + integrity sha512-/pEDlkgxx9R2RuThRboohTAXLLwz/uFqLWfUynne3BhvpIAZ3pupOElJfcSHhMJbbIxY4iIiJvZZWkl8TYBvRQ== dependencies: - cozy-client "^51.7.0" + cozy-client "^52.0.0" pouchdb-browser "^7.2.2" pouchdb-find "^7.2.2" -cozy-stack-client@^51.6.0: - version "51.6.0" - resolved "https://registry.yarnpkg.com/cozy-stack-client/-/cozy-stack-client-51.6.0.tgz#bd81605bdd1e68161d1143856f78bca969086575" - integrity sha512-MRBTKtBtQ6jnmS4ij+nYjgeOecSNr9Z9kCNDlKW9884JxnI4VGfpq1w+ihN3EVh3EyqD98vnaQZ8VuYr6czeVQ== +cozy-stack-client@^52.0.0: + version "52.0.0" + resolved "https://registry.yarnpkg.com/cozy-stack-client/-/cozy-stack-client-52.0.0.tgz#b146997637facc8de55033a84fd7e4b30ea4533d" + integrity sha512-rJOUp7jcnIBEaL48+HVRF24IzYgNJYh2KLpkKFKfaNhO6oz/+dwW1VfETAKWldtNk1hMcFapbQIN58CqhGkIzA== dependencies: detect-node "^2.0.4" mime "^2.4.0"