mirror of
https://github.com/strapi/strapi.git
synced 2025-09-18 21:08:54 +00:00
fixes from bad merge
This commit is contained in:
parent
6d0251ea2b
commit
2b3206afea
@ -9,7 +9,6 @@ import { pipeline, PassThrough } from 'stream';
|
|||||||
import { parser } from 'stream-json/jsonl/Parser';
|
import { parser } from 'stream-json/jsonl/Parser';
|
||||||
import type { IMetadata, ISourceProvider, ProviderType } from '../../types';
|
import type { IMetadata, ISourceProvider, ProviderType } from '../../types';
|
||||||
|
|
||||||
import { createDecryptionCipher } from '../encryption';
|
|
||||||
import { collect } from '../utils';
|
import { collect } from '../utils';
|
||||||
|
|
||||||
type StreamItemArray = Parameters<typeof chain>[0];
|
type StreamItemArray = Parameters<typeof chain>[0];
|
||||||
@ -104,11 +103,11 @@ class LocalFileSourceProvider implements ISourceProvider {
|
|||||||
}
|
}
|
||||||
|
|
||||||
#getBackupStream(decompress = true) {
|
#getBackupStream(decompress = true) {
|
||||||
const path = this.options.backupFilePath;
|
const path = this.options.file.path;
|
||||||
const readStream = fs.createReadStream(path);
|
const readStream = fs.createReadStream(path);
|
||||||
const streams: StreamItemArray = [readStream];
|
const streams: StreamItemArray = [readStream];
|
||||||
|
|
||||||
if (compression.enabled) {
|
if (this.options.compression.enabled) {
|
||||||
streams.push(zip.createGunzip());
|
streams.push(zip.createGunzip());
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -116,7 +115,6 @@ class LocalFileSourceProvider implements ISourceProvider {
|
|||||||
}
|
}
|
||||||
|
|
||||||
#streamJsonlDirectory(directory: string) {
|
#streamJsonlDirectory(directory: string) {
|
||||||
const options = this.options;
|
|
||||||
const inStream = this.#getBackupStream();
|
const inStream = this.#getBackupStream();
|
||||||
|
|
||||||
const outStream = new PassThrough({ objectMode: true });
|
const outStream = new PassThrough({ objectMode: true });
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
import chalk from 'chalk';
|
import chalk from 'chalk';
|
||||||
import { Writable } from 'stream';
|
import { Writable } from 'stream';
|
||||||
|
|
||||||
import type { IDestinationProvider, IMetadata, ProviderType } from '../../../types';
|
import type { IConfiguration, IDestinationProvider, IMetadata, ProviderType } from '../../../types';
|
||||||
import { deleteAllRecords, DeleteOptions } from './restore';
|
import { deleteAllRecords, DeleteOptions, restoreConfigs } from './restore';
|
||||||
import { mapSchemasValues } from '../../utils';
|
import { mapSchemasValues } from '../../utils';
|
||||||
|
|
||||||
export const VALID_STRATEGIES = ['restore', 'merge'];
|
export const VALID_STRATEGIES = ['restore', 'merge'];
|
||||||
|
Loading…
x
Reference in New Issue
Block a user