fixes from bad merge

This commit is contained in:
Ben Irvin 2022-12-07 11:56:21 +01:00
parent 6d0251ea2b
commit 2b3206afea
2 changed files with 4 additions and 6 deletions

View File

@ -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<typeof chain>[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 });

View File

@ -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'];