diff --git a/packages/core/data-transfer/lib/providers/local-file-source-provider.ts b/packages/core/data-transfer/lib/providers/local-file-source-provider.ts index cf97f7b503..4994648034 100644 --- a/packages/core/data-transfer/lib/providers/local-file-source-provider.ts +++ b/packages/core/data-transfer/lib/providers/local-file-source-provider.ts @@ -9,7 +9,6 @@ import { pipeline, PassThrough } from 'stream'; import { parser } from 'stream-json/jsonl/Parser'; import type { IMetadata, ISourceProvider, ProviderType } from '../../types'; -import { createDecryptionCipher } from '../encryption'; import { collect } from '../utils'; type StreamItemArray = Parameters[0]; @@ -104,11 +103,11 @@ class LocalFileSourceProvider implements ISourceProvider { } #getBackupStream(decompress = true) { - const path = this.options.backupFilePath; + const path = this.options.file.path; const readStream = fs.createReadStream(path); const streams: StreamItemArray = [readStream]; - if (compression.enabled) { + if (this.options.compression.enabled) { streams.push(zip.createGunzip()); } @@ -116,7 +115,6 @@ class LocalFileSourceProvider implements ISourceProvider { } #streamJsonlDirectory(directory: string) { - const options = this.options; const inStream = this.#getBackupStream(); const outStream = new PassThrough({ objectMode: true }); diff --git a/packages/core/data-transfer/lib/providers/local-strapi-destination-provider/index.ts b/packages/core/data-transfer/lib/providers/local-strapi-destination-provider/index.ts index bb8e548363..88e8a3847f 100644 --- a/packages/core/data-transfer/lib/providers/local-strapi-destination-provider/index.ts +++ b/packages/core/data-transfer/lib/providers/local-strapi-destination-provider/index.ts @@ -1,8 +1,8 @@ import chalk from 'chalk'; import { Writable } from 'stream'; -import type { IDestinationProvider, IMetadata, ProviderType } from '../../../types'; -import { deleteAllRecords, DeleteOptions } from './restore'; +import type { IConfiguration, IDestinationProvider, IMetadata, ProviderType } from '../../../types'; +import { deleteAllRecords, DeleteOptions, restoreConfigs } from './restore'; import { mapSchemasValues } from '../../utils'; export const VALID_STRATEGIES = ['restore', 'merge'];