♻ Move files into subdirectories
This commit is contained in:
parent
05d721171a
commit
7ce5a177ec
16 changed files with 20 additions and 20 deletions
|
@ -1,5 +1,5 @@
|
|||
import { ISettings, Product } from './interfaces/ISettings';
|
||||
import verifyProductName from './ssn/verifyProductName';
|
||||
import verifyProductName from './ssn/verify/verifyProductName';
|
||||
|
||||
const settings: ISettings = {};
|
||||
|
||||
|
|
|
@ -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]) {
|
||||
const decryptedBuffer = new ArrayBuffer(length - 12);
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import updateKeys from './updateKeys';
|
||||
import updateKeys from './lib/updateKeys';
|
||||
|
||||
export default function getDecryptionKeys(password: Uint8Array): [number, number, number] {
|
||||
let [key0, key1, key2] = [0x12345678, 0x23456789, 0x34567890];
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
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. */
|
||||
function getFroms({ product, to: releaseTo}: {product: Product, to: number}) {
|
||||
|
|
|
@ -3,7 +3,7 @@ import { Product } from '../interfaces/ISettings';
|
|||
import { SsnDiffType } from '../interfaces/ISsnFileEntry';
|
||||
import extractFile from './extractFile';
|
||||
import getSolidpkg from './getSolidpkg';
|
||||
import readSsnFile from './readSsnFile';
|
||||
import readSsnFile from './reader/readSsnFile';
|
||||
|
||||
export default async function getPatch(product: Product, from: number, to: number) {
|
||||
const solidPkg = await getSolidpkg(product, from, to);
|
||||
|
|
|
@ -3,11 +3,11 @@ import * as xmlJs from 'xml-js';
|
|||
import getUrlContents from '../cdn/getUrlContents';
|
||||
import IManifest from '../interfaces/IManifest';
|
||||
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 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');
|
||||
|
||||
|
|
|
@ -2,11 +2,11 @@ import getUrlContents from '../cdn/getUrlContents';
|
|||
import { Product } from '../interfaces/ISettings';
|
||||
import ISolid from '../interfaces/ISolidFile';
|
||||
import ISolidSimple from '../interfaces/ISolidSimple';
|
||||
import verifyProductName from '../ssn/verifyProductName';
|
||||
import parseBencode from './bencodeParser';
|
||||
import extractFile from './extractFile';
|
||||
import readSsnFile from './readSsnFile';
|
||||
import verifySolidpkg from './verifySolidpkg';
|
||||
import parseBencode from './reader/bencodeParser';
|
||||
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> {
|
||||
//Verify function arguments
|
||||
|
|
|
@ -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 */
|
||||
export default function parsePatchManifest(manifestFile: any): IManifest {
|
|
@ -4,9 +4,9 @@
|
|||
*/
|
||||
|
||||
import { TextDecoder } from 'util';
|
||||
import { ISsnFileEntry } from '../interfaces/ISsnFileEntry';
|
||||
import getDecryptionKeys from './decryption/getDecryptionKeys';
|
||||
import modifyPassword from './decryption/modifyPassword';
|
||||
import { ISsnFileEntry } from '../../interfaces/ISsnFileEntry';
|
||||
import getDecryptionKeys from '../decryption/getDecryptionKeys';
|
||||
import modifyPassword from '../decryption/modifyPassword';
|
||||
|
||||
const SIGNATURE_END_OF_CENTRAL_DIR = 0x06054b50;
|
||||
const SIGNATURE_CENTRAL_DIR = 0x02014b50;
|
|
@ -1,5 +1,5 @@
|
|||
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 */
|
||||
export default function verifyPatchmanifest(manifestFile: xmlJs.Element, product: Product): any {
|
|
@ -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'];
|
||||
|
|
@ -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>. */
|
||||
export default function verifySolidpkg(file: ISolid, { product, from, to }: {product: string, from: number, to: number}) {
|
Loading…
Reference in a new issue