2018-10-19 01:07:12 +02:00
This library provides various methods for fetching releases from SWTOR’ s patch server CDN and installing them. You can use it to write your own patch program. If you just want to install patches without having to do any programming, use the command-line tools from the [ssn-tools ](/swtor/ssn-tools ) repository.
2018-06-21 11:59:05 +02:00
2018-07-04 17:29:57 +02:00
# Installation
2018-10-19 01:07:12 +02:00
2018-09-30 15:58:00 +02:00
For this tool to work, `tsc` and `tslint` must be globally available, e.g. by running:
2018-06-21 11:59:05 +02:00
```bash
2018-07-09 01:58:10 +02:00
sudo npm install -g typescript tslint
2018-06-21 11:59:05 +02:00
```
2018-07-04 16:29:28 +02:00
2018-10-19 01:07:12 +02:00
In the project where you want to use this library, add the following to your `package.json` file:
2018-07-04 17:29:57 +02:00
2018-10-19 01:07:12 +02:00
```json
{
"dependencies": {
"ssn": "git+https://git.jedipedia.net/swtor/ssn.git"
}
}
2018-07-04 17:29:57 +02:00
```
2018-10-19 01:07:12 +02:00
Then run:
2018-09-30 15:48:26 +02:00
```bash
2018-10-19 01:07:12 +02:00
npm install
2018-09-30 15:48:26 +02:00
```
2018-07-05 00:58:40 +02:00
# Usage
2018-10-19 01:07:12 +02:00
To import the functions into your Node.js application:
2018-07-05 00:58:40 +02:00
2018-10-19 01:07:12 +02:00
```ts
import * as ssn from 'ssn';
2018-07-05 00:58:40 +02:00
(async function() {
const manifestContents = await ssn.getManifest('assets_swtor_main');
console.log(manifestContents);
const solidpkgContents = await ssn.getSolidpkg('assets_swtor_main', 126, 127);
console.log(solidpkgContents);
}())
```
2018-07-04 17:29:57 +02:00
2018-10-19 01:07:12 +02:00
# Development
To work with the repository locally:
```bash
sudo npm install -g typescript tslint
git clone https://git.jedipedia.net/swtor/ssn.git
cd ssn
npm install & & npm start
```
2018-10-07 16:16:18 +02:00
# License
Copyright (C) 2018 Jedipedia.net
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as
published by the Free Software Foundation, either version 3 of the
License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see < https: / / www . gnu . org / licenses / > .