mirror of
https://github.com/kmitresse/Compo-Service-Log-Project.git
synced 2026-07-09 12:07:45 +00:00
feat: Get json dataset from stream, convert into NudgerData, start to implement DMN concepts
This commit is contained in:
@@ -3,7 +3,8 @@ import { Archive, ZipArchive, ArchiveType, GzipArchive } from "./";
|
||||
class ArchiveFactory {
|
||||
static getArchive(archiveType: ArchiveType): Archive {
|
||||
if (archiveType === ArchiveType.ZIP) return ZipArchive.instance;
|
||||
if ([ArchiveType.GZIP, ArchiveType.GZ].includes(archiveType)) return GzipArchive.instance;
|
||||
// if ([ArchiveType.GZIP, ArchiveType.GZ].includes(archiveType))
|
||||
// return GzipArchive.instance;
|
||||
|
||||
throw new Error("Unsupported archive type");
|
||||
}
|
||||
|
||||
@@ -3,10 +3,10 @@ import { Duplex } from "node:stream";
|
||||
import { Archive } from "./";
|
||||
|
||||
class GzipArchive implements Archive {
|
||||
public static instance: Archive = new GzipArchive();
|
||||
public static instance: Archive = new GzipArchive();
|
||||
|
||||
public extract(source: string): Duplex {
|
||||
return createGunzip();
|
||||
}
|
||||
public extract(source: string): Duplex {
|
||||
return createGunzip();
|
||||
}
|
||||
}
|
||||
export default GzipArchive;
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
export { default as ArchiveType } from "./ArchiveType";
|
||||
|
||||
export { default as ArchiveFactory } from "./ArchiveFactory";
|
||||
export { default as Archive } from "./Archive";
|
||||
export { default as ArchiveFactory } from "./ArchiveFactory";
|
||||
|
||||
export { default as ZipArchive } from "./ZipArchive";
|
||||
export { default as GzipArchive } from "./GzipArchive";
|
||||
|
||||
Reference in New Issue
Block a user