🗑️ Remove unused ISettings interface
This commit is contained in:
parent
78bda898f9
commit
bb57e99d04
12 changed files with 35 additions and 22 deletions
|
@ -1,9 +1,9 @@
|
|||
//Make endpoints available for import by other modules
|
||||
|
||||
import IManifest from './interfaces/IManifest';
|
||||
import { Product } from './interfaces/ISettings';
|
||||
import ISolidSimple from './interfaces/ISolidSimple';
|
||||
import { ISsnFileEntry } from './interfaces/ISsnFileEntry';
|
||||
import Product from './interfaces/Product';
|
||||
import findReleasePath from './ssn/findReleasePath';
|
||||
import getManifest from './ssn/getManifest';
|
||||
import getPatchZip from './ssn/getPatchZip';
|
||||
|
|
|
@ -1,11 +0,0 @@
|
|||
type Product = 'assets_swtor_de_de' | 'assets_swtor_en_us' | 'assets_swtor_fr_fr' | 'assets_swtor_main' | 'assets_swtor_test_de_de' | 'assets_swtor_test_en_us' | 'assets_swtor_test_fr_fr' | 'assets_swtor_test_main' | 'eualas' | 'movies_de_de' | 'movies_en_us' | 'movies_fr_fr' | 'patcher2014' | 'patcher2017' | 'retailclient_betatest' | 'retailclient_cstraining' | 'retailclient_liveeptest' | 'retailclient_liveqatest' | 'retailclient_publictest' | 'retailclient_squadron157' | 'retailclient_swtor';
|
||||
|
||||
interface ISettings {
|
||||
[key: string]: any;
|
||||
product?: Product;
|
||||
release?: number; //TODO: allow 'current', but how will we know what current version is?
|
||||
from?: number;
|
||||
outputType?: 'info' | 'file'; //whether to just show JSON information, or actually write files into a directory
|
||||
}
|
||||
|
||||
export { ISettings, Product };
|
|
@ -5,7 +5,7 @@ interface ISolidFile {
|
|||
path: [string];
|
||||
}
|
||||
|
||||
interface ISolidFileInfo {
|
||||
interface ISolidInfo {
|
||||
/** List of files that are part of this torrent. */
|
||||
files: ISolidFile[];
|
||||
/** Length of one piece in bytes, i.e. 64 KiB, 128 KiB, 256 KiB, 512 KiB, 1 MiB, 2MiB or 4 MiB */
|
||||
|
@ -34,7 +34,7 @@ interface ISolid {
|
|||
/** Integer in the range 0-3 */
|
||||
'reliable-id': '0' | '1' | '2' | '3';
|
||||
/** Contains further information about this torrent, including the list of files. */
|
||||
info: ISolidFileInfo;
|
||||
info: ISolidInfo;
|
||||
}
|
||||
|
||||
export default ISolid;
|
||||
|
|
24
src/interfaces/Product.ts
Normal file
24
src/interfaces/Product.ts
Normal file
|
@ -0,0 +1,24 @@
|
|||
type Product =
|
||||
'assets_swtor_de_de' |
|
||||
'assets_swtor_en_us' |
|
||||
'assets_swtor_fr_fr' |
|
||||
'assets_swtor_main' |
|
||||
'assets_swtor_test_de_de' |
|
||||
'assets_swtor_test_en_us' |
|
||||
'assets_swtor_test_fr_fr' |
|
||||
'assets_swtor_test_main' |
|
||||
'eualas' |
|
||||
'movies_de_de' |
|
||||
'movies_en_us' |
|
||||
'movies_fr_fr' |
|
||||
'patcher2014' |
|
||||
'patcher2017' |
|
||||
'retailclient_betatest' |
|
||||
'retailclient_cstraining' |
|
||||
'retailclient_liveeptest' |
|
||||
'retailclient_liveqatest' |
|
||||
'retailclient_publictest' |
|
||||
'retailclient_squadron157' |
|
||||
'retailclient_swtor';
|
||||
|
||||
export default Product;
|
|
@ -1,4 +1,4 @@
|
|||
import { Product } from '../interfaces/ISettings';
|
||||
import Product from '../interfaces/Product';
|
||||
import verifyProductName from './verify/verifyProductName';
|
||||
|
||||
/** For the given release in the given product, returns from which releases we can patch to this release. */
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import * as xmlJs from 'xml-js';
|
||||
import getUrlContents from '../cdn/getUrlContents';
|
||||
import IManifest from '../interfaces/IManifest';
|
||||
import { Product } from '../interfaces/ISettings';
|
||||
import Product from '../interfaces/Product';
|
||||
import extractFileAsStream from './extractFileAsStream';
|
||||
import parsePatchmanifest from './reader/parsePatchmanifest';
|
||||
import readSsnFile from './reader/readSsnFile';
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import getUrlContents from '../cdn/getUrlContents';
|
||||
import { Product } from '../interfaces/ISettings';
|
||||
import { ISsnFileEntry } from '../interfaces/ISsnFileEntry';
|
||||
import Product from '../interfaces/Product';
|
||||
import getSolidpkg from './getSolidpkg';
|
||||
import readSsnFile from './reader/readSsnFile';
|
||||
import verifyPatch from './verify/verifyPatch';
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import getUrlContents from '../cdn/getUrlContents';
|
||||
import { Product } from '../interfaces/ISettings';
|
||||
import ISolid from '../interfaces/ISolidFile';
|
||||
import ISolidSimple from '../interfaces/ISolidSimple';
|
||||
import Product from '../interfaces/Product';
|
||||
import extractFileAsStream from './extractFileAsStream';
|
||||
import parseBencode from './reader/bencodeParser';
|
||||
import readSsnFile from './reader/readSsnFile';
|
||||
|
|
|
@ -3,8 +3,8 @@ import * as path from 'path';
|
|||
import downloadWrapper from '../cdn/downloadWrapper';
|
||||
import createDirRecursively from '../cdn/funcs/createDirRecursively';
|
||||
import getUrlContents from '../cdn/getUrlContents';
|
||||
import { Product } from '../interfaces/ISettings';
|
||||
import { ISsnFileEntry, SsnDiffType } from '../interfaces/ISsnFileEntry';
|
||||
import Product from '../interfaces/Product';
|
||||
import getSolidpkg from './getSolidpkg';
|
||||
import launch from './installation/launch';
|
||||
import taskManager from './installation/taskManager';
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import { Product } from '../../interfaces/ISettings';
|
||||
import { ISsnFileEntry } from '../../interfaces/ISsnFileEntry';
|
||||
import { SsnDiffType } from '../../interfaces/ISsnFileEntry';
|
||||
import Product from '../../interfaces/Product';
|
||||
|
||||
/** Receives a list of file entries from the .zip file and checks them for correctness */
|
||||
export default function verifyPatch(fileEntries: ISsnFileEntry[], product: Product, from: number): void {
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import * as xmlJs from 'xml-js';
|
||||
import { Product } from '../../interfaces/ISettings';
|
||||
import Product from '../../interfaces/Product';
|
||||
|
||||
/** Receives a JSON-converted version of the manifest.xml file, and verifies that all required elements and attributes are present, and nothing more */
|
||||
export default function verifyPatchmanifest(manifestFile: xmlJs.Element, product: Product): void {
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import { Product } from '../../interfaces/ISettings';
|
||||
import Product from '../../interfaces/Product';
|
||||
|
||||
const allowedProducts: Product[] = [
|
||||
'assets_swtor_de_de',
|
||||
|
|
Loading…
Reference in a new issue