🚚 Rename getReleaseZip to getPatchZip, add comments
This commit is contained in:
parent
f56f0c85e1
commit
a6c5204b50
6 changed files with 18 additions and 5 deletions
2
package-lock.json
generated
2
package-lock.json
generated
|
@ -15,7 +15,7 @@
|
|||
"integrity": "sha512-NqVDv9TpANUjFm0N8uM5GxL36UgKi9/atZw+x7YFnQ8ckwFGKrl4xX4yWtrey3UJm5nP1kUbnYgLopqWNSRhWw=="
|
||||
},
|
||||
"ssn-installer": {
|
||||
"version": "git+https://git.jedipedia.net/swtor/ssn-installer.git#01926cfe97a3166cff46a2061dda519f9c262d40",
|
||||
"version": "git+https://git.jedipedia.net/swtor/ssn-installer.git#9a5db3aa4eaa7e6b01a26de47151c2dbe6520c82",
|
||||
"from": "git+https://git.jedipedia.net/swtor/ssn-installer.git"
|
||||
},
|
||||
"xml-js": {
|
||||
|
|
|
@ -7,8 +7,8 @@ import { ISsnFileEntry } from './interfaces/ISsnFileEntry';
|
|||
import findReleasePath from './ssn/findReleasePath';
|
||||
import getManifest from './ssn/getManifest';
|
||||
import getPatch from './ssn/getPatch';
|
||||
import getReleaseZip from './ssn/getReleaseZip';
|
||||
import getPatchZip from './ssn/getPatchZip';
|
||||
import getSolidpkg from './ssn/getSolidpkg';
|
||||
import verifyProductName from './ssn/verify/verifyProductName';
|
||||
|
||||
export { IManifest, ISolidSimple, ISsnFileEntry, Product, findReleasePath, getManifest, getPatch, getSolidpkg, getReleaseZip, verifyProductName };
|
||||
export { IManifest, ISolidSimple, ISsnFileEntry, Product, findReleasePath, getManifest, getPatch, getSolidpkg, getPatchZip, verifyProductName };
|
||||
|
|
|
@ -11,6 +11,10 @@ import streamToString from './streams/streamToString';
|
|||
import verifyPatchmanifest from './verify/verifyPatchmanifest';
|
||||
import verifyProductName from './verify/verifyProductName';
|
||||
|
||||
/** Downloads the .patchmanifest file for the given product,
|
||||
* extracts the manifest.xml file inside and returns it in
|
||||
* JSON format.
|
||||
*/
|
||||
export default async function getManifest(product: Product): Promise<IManifest> {
|
||||
//Verify function arguments
|
||||
if (!verifyProductName(product)) {
|
||||
|
|
|
@ -25,7 +25,7 @@ interface IGetPatchArgs {
|
|||
targetDirectory: string;
|
||||
}
|
||||
|
||||
/** Downloads and applies the specified patch. */
|
||||
/** Downloads and installs the specified patch. */
|
||||
export default async function getPatch({ product, from, to, sourceDirectory, targetDirectory }: IGetPatchArgs) {
|
||||
//Verify function arguments
|
||||
|
||||
|
|
|
@ -5,7 +5,12 @@ import getSolidpkg from './getSolidpkg';
|
|||
import readSsnFile from './reader/readSsnFile';
|
||||
import verifyPatch from './verify/verifyPatch';
|
||||
|
||||
export default async function getSolidpkgZip(product: Product, from: number, to: number): Promise<ISsnFileEntry[]> {
|
||||
/** Downloads the .solidpkg file from from the given patch
|
||||
* to get a the URL of the .zip file, then downloads that
|
||||
* zip file, reads the list of file entries and returns
|
||||
* them.
|
||||
*/
|
||||
export default async function getPatchZip(product: Product, from: number, to: number): Promise<ISsnFileEntry[]> {
|
||||
const solidpkg = await getSolidpkg(product, from, to);
|
||||
|
||||
function createUrlObject({ name, length }: {name: string, length: number}) {
|
|
@ -11,6 +11,10 @@ import streamToArrayBuffer from './streams/streamToArrayBuffer';
|
|||
import verifyProductName from './verify/verifyProductName';
|
||||
import verifySolidpkg from './verify/verifySolidpkg';
|
||||
|
||||
/** Downloads the .solidpkg file from the given patch,
|
||||
* extracts the metafile.solid file inside and returns
|
||||
* the contents (list of .zip and .z01 disk files).
|
||||
*/
|
||||
export default async function getSolidpkg(product: Product, from: number, to: number): Promise<ISolidSimple> {
|
||||
//Verify function arguments
|
||||
if (!verifyProductName(product)) {
|
||||
|
|
Loading…
Reference in a new issue