From e2bb99c2243d4f1580e8508260da1fa47bc66dd2 Mon Sep 17 00:00:00 2001 From: Alex Menor Date: Thu, 20 Jan 2022 10:08:38 +0100 Subject: [PATCH] update inxt-js to 1.3.0 --- package.json | 2 +- src/sync/filesystems/local-filesystem.ts | 3 ++- src/sync/filesystems/remote-filesystem.ts | 17 ++++++++++++----- src/sync/sync.ts | 1 + yarn.lock | 14 ++++++++++---- 5 files changed, 26 insertions(+), 11 deletions(-) diff --git a/package.json b/package.json index 9c3dd4de0..fc7178a38 100644 --- a/package.json +++ b/package.json @@ -105,7 +105,7 @@ "@bachdgvn/vue-otp-input": "^1.0.8", "@electron/remote": "^1.0.4", "@iconscout/vue-unicons": "^0.0.3", - "@internxt/inxt-js": "=1.2.14", + "@internxt/inxt-js": "=1.3.0", "@internxt/lib": "^1.1.3", "analytics-node": "^3.4.0-beta.3", "archiver": "^5.3.0", diff --git a/src/sync/filesystems/local-filesystem.ts b/src/sync/filesystems/local-filesystem.ts index d7b1fa3b4..ca94dad4e 100644 --- a/src/sync/filesystems/local-filesystem.ts +++ b/src/sync/filesystems/local-filesystem.ts @@ -246,6 +246,7 @@ export function getLocalFilesystem( } const stream = createReadStream(tmpFilePath) + const additionalStream = createReadStream(tmpFilePath) const onEndOrError = () => fs.unlink(tmpFilePath) @@ -254,7 +255,7 @@ export function getLocalFilesystem( Logger.debug(`Uploading ${name} from temp location ${tmpFilePath}`) - return { stream, modTime, size } + return { stream, additionalStream, modTime, size } }, async smokeTest() { diff --git a/src/sync/filesystems/remote-filesystem.ts b/src/sync/filesystems/remote-filesystem.ts index c288016de..66144eaa5 100644 --- a/src/sync/filesystems/remote-filesystem.ts +++ b/src/sync/filesystems/remote-filesystem.ts @@ -345,11 +345,17 @@ export function getRemoteFilesystem(baseFolderId: number): FileSystem { } }, { - label: 'OneStreamOnly', + label: 'OneShardOnly', params: { - source, - useProxy: false, - concurrency: 10 + sourceToHash: { + stream: source.additionalStream, + size: source.size + }, + sourceToUpload: { + stream: source.stream, + size: source.size + }, + useProxy: false } } ) @@ -517,6 +523,7 @@ export function getRemoteFilesystem(baseFolderId: number): FileSystem { } else { resolve({ stream: downloadStream, + additionalStream: downloadStream, size: fileInCache.size, modTime: fileInCache.modificationTime }) @@ -524,7 +531,7 @@ export function getRemoteFilesystem(baseFolderId: number): FileSystem { } }, { - label: 'OneStreamOnly', + label: 'Dynamic', params: { useProxy: false, concurrency: 10 diff --git a/src/sync/sync.ts b/src/sync/sync.ts index 454837cb9..63324de65 100644 --- a/src/sync/sync.ts +++ b/src/sync/sync.ts @@ -628,6 +628,7 @@ export type FileSystemProgressCallback = (progress: number) => void export type Source = { stream: Readable + additionalStream: Readable modTime: number size: number } diff --git a/yarn.lock b/yarn.lock index ac07f9a4e..b29e985d6 100644 --- a/yarn.lock +++ b/yarn.lock @@ -472,11 +472,12 @@ resolved "https://registry.yarnpkg.com/@iconscout/vue-unicons/-/vue-unicons-0.0.3.tgz#3569422a46c2b242a39a5654b3f4dbe13a19e706" integrity sha512-wVYaEPNXNCqYoyrhEMoYAm8rxFnPmXLduzH3WmROTdU0D1qcuHj5AjxSCJ+OOs9+Tz3woUjDRjINlZHQmdiPBw== -"@internxt/inxt-js@=1.2.14": - version "1.2.14" - resolved "https://npm.pkg.github.com/download/@internxt/inxt-js/1.2.14/0208ddb893d6ef50e8b2693c07c99217fa0f3a43dc1898dfa111defdac462385#1362f8c0ec0c084a1bb79af979d1133f1fbc85e0" - integrity sha512-RpsyA/e/eLK4z0pH3nG7jyziIuWLDOJrgZWU3bbaMJFuJRClEWg+QZKbnMzMe15mURjYRgFg8MXgmstt40dunw== +"@internxt/inxt-js@=1.3.0": + version "1.3.0" + resolved "https://npm.pkg.github.com/download/@internxt/inxt-js/1.3.0/89a47918aa512d08227637eaddc0941c31b3aa9653d2e3639f15785d47c99008#442a1551efd6f3dc8d60cd35bfc7380663c65df7" + integrity sha512-lyHQXfaB+FEY1KgWS33w3ff4tnmQzejRxiOmGSgXljVrTZtVc2A3IFwSY5keobfyJu2rJKmIDlXwbse4gARM5A== dependencies: + "@internxt/lib" "^1.1.6" async "^3.2.0" axios "^0.23.0" bip39 "^3.0.2" @@ -487,6 +488,11 @@ resolved "https://npm.pkg.github.com/download/@internxt/lib/1.1.3/8e6b89849287a398904d5cf1a0016ef79fb6c8aca478bd076ac2d2142a72ed4b#6f0bbb68f52f9429375922800a5158185ab2ee39" integrity sha512-ATcInvNspO3xxvSQIVc+9iAUFq56MV+Q6cYkJytgfrwcajfjoHmVpchT5r35crgITQ7xGRspqp+7KMqPtvtaTw== +"@internxt/lib@^1.1.6": + version "1.1.6" + resolved "https://npm.pkg.github.com/download/@internxt/lib/1.1.6/f756c6d77338d351ab797f40cc1bf3c25ecccf9ac0c8298c939ee5000ebc42d1#ea931ba39aa0e715704400603beb8833c73c05e4" + integrity sha512-xpnSpDsWr+jemV2aI71B39LGfXnNCsyv2VKND0JAgrOeyHXjnChH+IHxGLq/8f73HT47mpkNXrK4nfpzH4OaaQ== + "@istanbuljs/load-nyc-config@^1.0.0": version "1.1.0" resolved "https://registry.yarnpkg.com/@istanbuljs/load-nyc-config/-/load-nyc-config-1.1.0.tgz#fd3db1d59ecf7cf121e80650bb86712f9b55eced"