♻ Move files into subdirectories

This commit is contained in:
C-3PO 2018-06-24 10:10:00 +02:00
parent 05d721171a
commit 7ce5a177ec
Signed by: c3po
GPG key ID: 62993C4BB4D86F24
16 changed files with 20 additions and 20 deletions

View file

@ -1,5 +1,5 @@
import { ISettings, Product } from './interfaces/ISettings'; import { ISettings, Product } from './interfaces/ISettings';
import verifyProductName from './ssn/verifyProductName'; import verifyProductName from './ssn/verify/verifyProductName';
const settings: ISettings = {}; const settings: ISettings = {};

View file

@ -1,4 +1,4 @@
import updateKeys from './updateKeys'; import updateKeys from './lib/updateKeys';
export default function decryptFile(dv: DataView, length: number, [key0, key1, key2]: [number, number, number]) { export default function decryptFile(dv: DataView, length: number, [key0, key1, key2]: [number, number, number]) {
const decryptedBuffer = new ArrayBuffer(length - 12); const decryptedBuffer = new ArrayBuffer(length - 12);

View file

@ -1,4 +1,4 @@
import updateKeys from './updateKeys'; import updateKeys from './lib/updateKeys';
export default function getDecryptionKeys(password: Uint8Array): [number, number, number] { export default function getDecryptionKeys(password: Uint8Array): [number, number, number] {
let [key0, key1, key2] = [0x12345678, 0x23456789, 0x34567890]; let [key0, key1, key2] = [0x12345678, 0x23456789, 0x34567890];

View file

@ -1,5 +1,5 @@
import { Product } from '../interfaces/ISettings'; import { Product } from '../interfaces/ISettings';
import verifyProductName from '../ssn/verifyProductName'; import verifyProductName from '../ssn/verify/verifyProductName';
/** For the given release in the given product, returns from which releases we can patch to this release. */ /** For the given release in the given product, returns from which releases we can patch to this release. */
function getFroms({ product, to: releaseTo}: {product: Product, to: number}) { function getFroms({ product, to: releaseTo}: {product: Product, to: number}) {

View file

@ -3,7 +3,7 @@ import { Product } from '../interfaces/ISettings';
import { SsnDiffType } from '../interfaces/ISsnFileEntry'; import { SsnDiffType } from '../interfaces/ISsnFileEntry';
import extractFile from './extractFile'; import extractFile from './extractFile';
import getSolidpkg from './getSolidpkg'; import getSolidpkg from './getSolidpkg';
import readSsnFile from './readSsnFile'; import readSsnFile from './reader/readSsnFile';
export default async function getPatch(product: Product, from: number, to: number) { export default async function getPatch(product: Product, from: number, to: number) {
const solidPkg = await getSolidpkg(product, from, to); const solidPkg = await getSolidpkg(product, from, to);

View file

@ -3,11 +3,11 @@ import * as xmlJs from 'xml-js';
import getUrlContents from '../cdn/getUrlContents'; import getUrlContents from '../cdn/getUrlContents';
import IManifest from '../interfaces/IManifest'; import IManifest from '../interfaces/IManifest';
import { Product } from '../interfaces/ISettings'; import { Product } from '../interfaces/ISettings';
import parsePatchmanifest from '../ssn/parsePatchmanifest';
import verifyPatchmanifest from '../ssn/verifyPatchmanifest';
import verifyProductName from '../ssn/verifyProductName';
import extractFile from './extractFile'; import extractFile from './extractFile';
import readSsnFile from './readSsnFile'; import parsePatchmanifest from './reader/parsePatchmanifest';
import readSsnFile from './reader/readSsnFile';
import verifyPatchmanifest from './verify/verifyPatchmanifest';
import verifyProductName from './verify/verifyProductName';
const Decoder = new TextDecoder('utf-8'); const Decoder = new TextDecoder('utf-8');

View file

@ -2,11 +2,11 @@ import getUrlContents from '../cdn/getUrlContents';
import { Product } from '../interfaces/ISettings'; import { Product } from '../interfaces/ISettings';
import ISolid from '../interfaces/ISolidFile'; import ISolid from '../interfaces/ISolidFile';
import ISolidSimple from '../interfaces/ISolidSimple'; import ISolidSimple from '../interfaces/ISolidSimple';
import verifyProductName from '../ssn/verifyProductName';
import parseBencode from './bencodeParser';
import extractFile from './extractFile'; import extractFile from './extractFile';
import readSsnFile from './readSsnFile'; import parseBencode from './reader/bencodeParser';
import verifySolidpkg from './verifySolidpkg'; import readSsnFile from './reader/readSsnFile';
import verifyProductName from './verify/verifyProductName';
import verifySolidpkg from './verify/verifySolidpkg';
export default async function getSolidpkg(product: Product, from: number, to: number): Promise<ISolidSimple> { export default async function getSolidpkg(product: Product, from: number, to: number): Promise<ISolidSimple> {
//Verify function arguments //Verify function arguments

View file

@ -1,4 +1,4 @@
import IManifest from '../interfaces/IManifest'; import IManifest from '../../interfaces/IManifest';
/** Receives a JSON-converted version of the manifest.xml file, and returns an easier to read JSON file */ /** Receives a JSON-converted version of the manifest.xml file, and returns an easier to read JSON file */
export default function parsePatchManifest(manifestFile: any): IManifest { export default function parsePatchManifest(manifestFile: any): IManifest {

View file

@ -4,9 +4,9 @@
*/ */
import { TextDecoder } from 'util'; import { TextDecoder } from 'util';
import { ISsnFileEntry } from '../interfaces/ISsnFileEntry'; import { ISsnFileEntry } from '../../interfaces/ISsnFileEntry';
import getDecryptionKeys from './decryption/getDecryptionKeys'; import getDecryptionKeys from '../decryption/getDecryptionKeys';
import modifyPassword from './decryption/modifyPassword'; import modifyPassword from '../decryption/modifyPassword';
const SIGNATURE_END_OF_CENTRAL_DIR = 0x06054b50; const SIGNATURE_END_OF_CENTRAL_DIR = 0x06054b50;
const SIGNATURE_CENTRAL_DIR = 0x02014b50; const SIGNATURE_CENTRAL_DIR = 0x02014b50;

View file

@ -1,5 +1,5 @@
import * as xmlJs from 'xml-js'; import * as xmlJs from 'xml-js';
import { Product } from '../interfaces/ISettings'; import { Product } from '../../interfaces/ISettings';
/** Receives a JSON-converted version of the manifest.xml file, and verifies that all required elements and attributes are present, and nothing more */ /** 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): any { export default function verifyPatchmanifest(manifestFile: xmlJs.Element, product: Product): any {

View file

@ -1,4 +1,4 @@
import { Product } from '../interfaces/ISettings'; import { Product } from '../../interfaces/ISettings';
const allowedProducts: 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_publictest', 'retailclient_squadron157', 'retailclient_swtor']; const allowedProducts: 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_publictest', 'retailclient_squadron157', 'retailclient_swtor'];

View file

@ -1,4 +1,4 @@
import ISolid from '../interfaces/ISolidFile'; import ISolid from '../../interfaces/ISolidFile';
/** Verifies metafile.solid for correctness. See specification at <http://www.bittorrent.org/beps/bep_0003.html>. */ /** Verifies metafile.solid for correctness. See specification at <http://www.bittorrent.org/beps/bep_0003.html>. */
export default function verifySolidpkg(file: ISolid, { product, from, to }: {product: string, from: number, to: number}) { export default function verifySolidpkg(file: ISolid, { product, from, to }: {product: string, from: number, to: number}) {