feat(files): refactor circular deps
This commit is contained in:
@@ -1,9 +1,9 @@
|
||||
import { sleep } from '@standardnotes/utils'
|
||||
import { PureCryptoInterface, StreamEncryptor } from '@standardnotes/sncrypto-common'
|
||||
import { FileDownloadProgress } from '../Types/FileDownloadProgress'
|
||||
import { FilesApiInterface } from '@standardnotes/services'
|
||||
import { DownloadAndDecryptFileOperation } from './DownloadAndDecrypt'
|
||||
import { FileContent } from '@standardnotes/models'
|
||||
import { FilesApiInterface } from '../Api/FilesApiInterface'
|
||||
|
||||
describe('download and decrypt', () => {
|
||||
let apiService: FilesApiInterface
|
||||
|
||||
@@ -2,10 +2,10 @@ import { ClientDisplayableError } from '@standardnotes/responses'
|
||||
import { AbortFunction, FileDownloader } from '../UseCase/FileDownloader'
|
||||
import { FileDecryptor } from '../UseCase/FileDecryptor'
|
||||
import { FileDownloadProgress } from '../Types/FileDownloadProgress'
|
||||
import { FilesApiInterface } from '@standardnotes/services'
|
||||
import { PureCryptoInterface } from '@standardnotes/sncrypto-common'
|
||||
import { FileContent } from '@standardnotes/models'
|
||||
import { DecryptedBytes, EncryptedBytes } from '@standardnotes/filepicker'
|
||||
import { FilesApiInterface } from '../Api/FilesApiInterface'
|
||||
|
||||
export type DownloadAndDecryptResult = { success: boolean; error?: ClientDisplayableError; aborted?: boolean }
|
||||
|
||||
|
||||
@@ -1,8 +1,9 @@
|
||||
import { EncryptAndUploadFileOperation } from './EncryptAndUpload'
|
||||
import { PureCryptoInterface, StreamEncryptor } from '@standardnotes/sncrypto-common'
|
||||
import { FilesApiInterface } from '@standardnotes/services'
|
||||
import { FileContent } from '@standardnotes/models'
|
||||
|
||||
import { FilesApiInterface } from '../Api/FilesApiInterface'
|
||||
|
||||
describe('encrypt and upload', () => {
|
||||
let apiService: FilesApiInterface
|
||||
let operation: EncryptAndUploadFileOperation
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
import { FileUploadProgress } from '../Types/FileUploadProgress'
|
||||
import { FileUploadResult } from '../Types/FileUploadResult'
|
||||
import { FilesApiInterface } from '@standardnotes/services'
|
||||
import { FileUploader } from '../UseCase/FileUploader'
|
||||
import { PureCryptoInterface } from '@standardnotes/sncrypto-common'
|
||||
import { FileEncryptor } from '../UseCase/FileEncryptor'
|
||||
import { FileContent } from '@standardnotes/models'
|
||||
import { FilesApiInterface } from '../Api/FilesApiInterface'
|
||||
|
||||
export class EncryptAndUploadFileOperation {
|
||||
public readonly encryptedChunkSizes: number[] = []
|
||||
|
||||
Reference in New Issue
Block a user