Skip to content

Commit e14f2ca

Browse files
committed
Add URLCompressedSource class
Change-type: minor
1 parent abb420b commit e14f2ca

File tree

5 files changed

+433
-11
lines changed

5 files changed

+433
-11
lines changed

lib/source-destination/balena-s3-compressed-source.ts

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -24,16 +24,7 @@ import { CreateReadStreamOptions } from './source-destination';
2424
import { NotCapable } from '../errors';
2525
import { StreamLimiter } from '../stream-limiter';
2626
import { Dictionary, streamToBuffer } from '../utils';
27-
28-
interface ImageJSONPart {
29-
filename: string;
30-
crc: number;
31-
len: number;
32-
zLen: number;
33-
partitionIndex?: string;
34-
}
35-
36-
export type ImageJSON = Dictionary<{ parts: ImageJSONPart[] }>;
27+
import type { ImageJSON, ImageJSONPart } from './compressed-source-types';
3728

3829
export interface BalenaS3CompressedSourceOptions extends BalenaS3SourceOptions {
3930
format: 'zip' | 'gzip';
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
import { Dictionary } from '../utils';
2+
3+
export interface ImageJSONPart {
4+
filename: string;
5+
crc: number;
6+
len: number;
7+
zLen: number;
8+
partitionIndex?: string;
9+
}
10+
11+
export type ImageJSON = Dictionary<{ parts: ImageJSONPart[] }>;

lib/source-destination/index.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,8 @@ export * from './multi-destination';
2828
export * from './progress';
2929
export * from './balena-s3-source';
3030
export * from './balena-s3-compressed-source';
31+
export * from './compressed-source-types';
32+
export * from './url-compressed-source';
3133
export * from './source-destination';
3234
export * from './source-source';
3335
export * from './single-use-stream-source';

0 commit comments

Comments
 (0)