mirror of
https://github.com/strapi/strapi.git
synced 2025-11-01 18:33:55 +00:00
remove stream-mock
This commit is contained in:
parent
96846061b5
commit
68a76aa185
@ -1,4 +1,4 @@
|
||||
import { ObjectWritableMock, ObjectReadableMock } from 'stream-mock';
|
||||
import { Readable, Writable } from 'stream-chain';
|
||||
import { createTransferEngine } from '..';
|
||||
import {
|
||||
IDestinationProvider,
|
||||
@ -10,16 +10,17 @@ import {
|
||||
const providerStages = ['bootstrap', 'close'];
|
||||
|
||||
const getMockSourceStream = (data: Iterable<any> = ['foo', 'bar']) => {
|
||||
const stream = new ObjectReadableMock(data).on('close', () => {
|
||||
stream.destroy();
|
||||
});
|
||||
const stream = Readable.from(data);
|
||||
|
||||
return stream;
|
||||
};
|
||||
|
||||
const getMockDestinationStream = () => {
|
||||
const stream = new ObjectWritableMock().on('close', () => {
|
||||
stream.destroy();
|
||||
const stream = new Writable({
|
||||
objectMode: true,
|
||||
write(chunk, encoding, callback) {
|
||||
callback();
|
||||
},
|
||||
});
|
||||
return stream;
|
||||
};
|
||||
|
||||
@ -55,7 +55,6 @@
|
||||
"@types/stream-json": "1.7.2",
|
||||
"@types/tar": "6.1.3",
|
||||
"rimraf": "3.0.2",
|
||||
"stream-mock": "2.0.5",
|
||||
"typescript": "4.6.2"
|
||||
},
|
||||
"engines": {
|
||||
|
||||
@ -20830,11 +20830,6 @@ stream-json@1.7.4:
|
||||
dependencies:
|
||||
stream-chain "^2.2.5"
|
||||
|
||||
stream-mock@2.0.5:
|
||||
version "2.0.5"
|
||||
resolved "https://registry.yarnpkg.com/stream-mock/-/stream-mock-2.0.5.tgz#c99d24bd6dbb0eaa57cf6ffefdb064150747826e"
|
||||
integrity sha512-dx9skT8QYjwLsal+MhGHr4UtgS49brw851C/oTixmhCi4Ip+/qnZmhV1qOcznYYAED6gYKmKea+jjza4/wjpSg==
|
||||
|
||||
stream-shift@^1.0.0:
|
||||
version "1.0.1"
|
||||
resolved "https://registry.yarnpkg.com/stream-shift/-/stream-shift-1.0.1.tgz#d7088281559ab2778424279b0877da3c392d5a3d"
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user