mirror of
https://github.com/WowUp/WowUp.git
synced 2026-04-26 08:49:28 -04:00
4
.github/workflows/locale-test.yml
vendored
4
.github/workflows/locale-test.yml
vendored
@@ -10,7 +10,7 @@ jobs:
|
||||
strategy:
|
||||
matrix:
|
||||
configuration: [Release]
|
||||
node-version: [ 14.x ]
|
||||
node-version: [ 16.x ]
|
||||
|
||||
runs-on: ubuntu-latest # For a list of available runner types, refer to
|
||||
# https://help.github.com/en/actions/reference/workflow-syntax-for-github-actions#jobsjob_idruns-on
|
||||
@@ -32,7 +32,7 @@ jobs:
|
||||
- name: Install Deps
|
||||
run: |
|
||||
cd ./wowup-electron
|
||||
npm i
|
||||
npm i --force
|
||||
|
||||
- name: Lint
|
||||
run: |
|
||||
|
||||
@@ -16,8 +16,12 @@
|
||||
"main": "src/main.ts",
|
||||
"tsConfig": "src/tsconfig.app.json",
|
||||
"polyfills": "src/polyfills.ts",
|
||||
"assets": ["src/assets"],
|
||||
"styles": ["src/styles.scss"],
|
||||
"assets": [
|
||||
"src/assets"
|
||||
],
|
||||
"styles": [
|
||||
"src/styles.scss"
|
||||
],
|
||||
"scripts": [],
|
||||
"customWebpackConfig": {
|
||||
"path": "./angular.webpack.js"
|
||||
@@ -106,8 +110,12 @@
|
||||
"tsConfig": "src/tsconfig.spec.json",
|
||||
"karmaConfig": "src/karma.conf.js",
|
||||
"scripts": [],
|
||||
"styles": ["src/styles.scss"],
|
||||
"assets": ["src/assets"],
|
||||
"styles": [
|
||||
"src/styles.scss"
|
||||
],
|
||||
"assets": [
|
||||
"src/assets"
|
||||
],
|
||||
"customWebpackConfig": {
|
||||
"path": "./angular.webpack.js"
|
||||
}
|
||||
@@ -117,7 +125,10 @@
|
||||
"builder": "@angular-eslint/builder:lint",
|
||||
"options": {
|
||||
"eslintConfig": ".eslintrc.json",
|
||||
"lintFilePatterns": ["src/**/*.ts", "app/**.ts"]
|
||||
"lintFilePatterns": [
|
||||
"src/**/*.ts",
|
||||
"app/**.ts"
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -130,13 +141,14 @@
|
||||
"builder": "@angular-eslint/builder:lint",
|
||||
"options": {
|
||||
"eslintConfig": ".eslintrc.json",
|
||||
"lintFilePatterns": ["e2e/**/*.ts"]
|
||||
"lintFilePatterns": [
|
||||
"e2e/**/*.ts"
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"defaultProject": "angular-electron",
|
||||
"schematics": {
|
||||
"@schematics/angular:component": {
|
||||
"prefix": "app",
|
||||
|
||||
@@ -60,7 +60,7 @@ export class WowUpFolderScanner {
|
||||
}
|
||||
|
||||
private get tocFileRegex() {
|
||||
return /^([^/]+)[\\/]\1([-|_](mainline|bcc|tbc|classic|vanilla))?\.toc$/i;
|
||||
return /^([^/]+)[\\/]\1([-_](mainline|bcc|tbc|classic|vanilla|wrath|wotlkc))?\.toc$/i;
|
||||
}
|
||||
|
||||
private get bindingsXmlRegex() {
|
||||
|
||||
20717
wowup-electron/package-lock.json
generated
20717
wowup-electron/package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "wowup",
|
||||
"productName": "WowUp",
|
||||
"version": "2.8.3",
|
||||
"version": "2.9.0-beta.1",
|
||||
"description": "World of Warcraft addon updater",
|
||||
"homepage": "https://wowup.io",
|
||||
"author": {
|
||||
@@ -54,25 +54,25 @@
|
||||
"package:local": "npx gulp packageLocal"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@angular-builders/custom-webpack": "13.1.0",
|
||||
"@angular-devkit/build-angular": "13.3.7",
|
||||
"@angular-eslint/builder": "13.2.1",
|
||||
"@angular-eslint/eslint-plugin": "13.2.1",
|
||||
"@angular-eslint/eslint-plugin-template": "13.2.1",
|
||||
"@angular-eslint/schematics": "13.2.1",
|
||||
"@angular-eslint/template-parser": "13.2.1",
|
||||
"@angular/animations": "13.3.10",
|
||||
"@angular/cdk": "13.3.8",
|
||||
"@angular/cli": "13.3.7",
|
||||
"@angular/common": "13.3.10",
|
||||
"@angular/compiler": "13.3.10",
|
||||
"@angular/compiler-cli": "13.3.10",
|
||||
"@angular/core": "13.3.10",
|
||||
"@angular/forms": "13.3.10",
|
||||
"@angular/material": "13.3.8",
|
||||
"@angular/platform-browser": "13.3.10",
|
||||
"@angular/platform-browser-dynamic": "13.3.10",
|
||||
"@angular/router": "13.3.10",
|
||||
"@angular-builders/custom-webpack": "14.0.0",
|
||||
"@angular-devkit/build-angular": "14.0.6",
|
||||
"@angular-eslint/builder": "14.0.2",
|
||||
"@angular-eslint/eslint-plugin": "14.0.2",
|
||||
"@angular-eslint/eslint-plugin-template": "14.0.2",
|
||||
"@angular-eslint/schematics": "14.0.2",
|
||||
"@angular-eslint/template-parser": "14.0.2",
|
||||
"@angular/animations": "14.0.6",
|
||||
"@angular/cdk": "14.0.5",
|
||||
"@angular/cli": "14.0.6",
|
||||
"@angular/common": "14.0.6",
|
||||
"@angular/compiler": "14.0.6",
|
||||
"@angular/compiler-cli": "14.0.6",
|
||||
"@angular/core": "14.0.6",
|
||||
"@angular/forms": "14.0.6",
|
||||
"@angular/material": "14.0.5",
|
||||
"@angular/platform-browser": "14.0.6",
|
||||
"@angular/platform-browser-dynamic": "14.0.6",
|
||||
"@angular/router": "14.0.6",
|
||||
"@bbob/core": "2.8.0",
|
||||
"@bbob/html": "2.8.0",
|
||||
"@bbob/preset-html5": "2.8.0",
|
||||
@@ -100,9 +100,9 @@
|
||||
"@types/slug": "5.0.3",
|
||||
"@types/string-similarity": "4.0.0",
|
||||
"@types/uuid": "8.3.4",
|
||||
"@typescript-eslint/eslint-plugin": "5.23.0",
|
||||
"@typescript-eslint/eslint-plugin": "^5.29.0",
|
||||
"@typescript-eslint/eslint-plugin-tslint": "5.18.0",
|
||||
"@typescript-eslint/parser": "5.18.0",
|
||||
"@typescript-eslint/parser": "^5.29.0",
|
||||
"ag-grid-angular": "27.2.1",
|
||||
"ag-grid-community": "27.2.1",
|
||||
"chai": "4.3.6",
|
||||
@@ -114,7 +114,7 @@
|
||||
"electron-builder": "23.0.3",
|
||||
"electron-notarize": "1.2.1",
|
||||
"electron-reload": "2.0.0-alpha.1",
|
||||
"eslint": "8.15.0",
|
||||
"eslint": "^8.18.0",
|
||||
"eslint-config-prettier": "8.5.0",
|
||||
"eslint-plugin-import": "2.26.0",
|
||||
"eslint-plugin-jsdoc": "39.2.9",
|
||||
@@ -147,7 +147,7 @@
|
||||
"string-similarity": "4.0.4",
|
||||
"ts-custom-error": "3.2.0",
|
||||
"ts-node": "10.7.0",
|
||||
"typescript": "4.5.5",
|
||||
"typescript": "4.7.4",
|
||||
"uuid": "8.3.2",
|
||||
"wait-on": "6.0.1",
|
||||
"webdriver-manager": "12.1.8",
|
||||
|
||||
@@ -6,8 +6,6 @@ import { HttpClient, HttpErrorResponse, HttpHeaders } from "@angular/common/http
|
||||
import { ADDON_PROVIDER_GITHUB, PREF_GITHUB_PERSONAL_ACCESS_TOKEN } from "../../common/constants";
|
||||
import {
|
||||
AssetMissingError,
|
||||
BurningCrusadeAssetMissingError,
|
||||
ClassicAssetMissingError,
|
||||
GitHubError,
|
||||
GitHubFetchReleasesError,
|
||||
GitHubFetchRepositoryError,
|
||||
@@ -17,7 +15,7 @@ import {
|
||||
import { GitHubAsset } from "../models/github/github-asset";
|
||||
import { GitHubRelease } from "../models/github/github-release";
|
||||
import { GitHubRepository } from "../models/github/github-repository";
|
||||
import { WowClientGroup, WowClientType } from "../../common/warcraft/wow-client-type";
|
||||
import { WowClientType } from "../../common/warcraft/wow-client-type";
|
||||
import { AddonChannelType } from "../../common/wowup/models";
|
||||
import { AddonSearchResult } from "../models/wowup/addon-search-result";
|
||||
import { AddonSearchResultFile } from "../models/wowup/addon-search-result-file";
|
||||
@@ -28,7 +26,7 @@ import { strictFilterBy } from "../utils/array.utils";
|
||||
import { getWowClientGroup } from "../../common/warcraft";
|
||||
import { SensitiveStorageService } from "../services/storage/sensitive-storage.service";
|
||||
|
||||
type MetadataFlavor = "bcc" | "classic" | "mainline";
|
||||
type MetadataFlavor = "bcc" | "classic" | "mainline" | "wrath";
|
||||
|
||||
interface GitHubRepoParts {
|
||||
repository: string;
|
||||
@@ -143,13 +141,7 @@ export class GitHubAddonProvider extends AddonProvider {
|
||||
const result = await this.getLatestValidAsset(checkRes, installation.clientType);
|
||||
console.log("searchByUrl result", result);
|
||||
if (!result.matchedAsset && !result.latestAsset) {
|
||||
if (WowClientGroup.Classic === clientGroup) {
|
||||
throw new ClassicAssetMissingError(addonUri.toString());
|
||||
} else if (WowClientGroup.BurningCrusade === clientGroup) {
|
||||
throw new BurningCrusadeAssetMissingError(addonUri.toString());
|
||||
} else {
|
||||
throw new AssetMissingError(addonUri.toString());
|
||||
}
|
||||
throw new AssetMissingError(addonUri.toString(), clientGroup);
|
||||
}
|
||||
|
||||
const repository = await this.getRepository(repoPath);
|
||||
@@ -352,8 +344,9 @@ export class GitHubAddonProvider extends AddonProvider {
|
||||
/** Return the BigWigs metadata flavor for a given client type */
|
||||
private getMetadataTargetFlavor(clientType: WowClientType): MetadataFlavor {
|
||||
switch (clientType) {
|
||||
case WowClientType.Classic:
|
||||
case WowClientType.ClassicBeta:
|
||||
return "wrath";
|
||||
case WowClientType.Classic:
|
||||
case WowClientType.ClassicPtr:
|
||||
return "bcc";
|
||||
case WowClientType.ClassicEra:
|
||||
@@ -417,9 +410,8 @@ export class GitHubAddonProvider extends AddonProvider {
|
||||
return isClassic;
|
||||
case WowClientType.Classic:
|
||||
case WowClientType.ClassicPtr:
|
||||
case WowClientType.ClassicBeta:
|
||||
return isBurningCrusade;
|
||||
case WowClientType.WOTLKBeta:
|
||||
case WowClientType.ClassicBeta:
|
||||
return isWotlk;
|
||||
default:
|
||||
return false;
|
||||
@@ -427,15 +419,15 @@ export class GitHubAddonProvider extends AddonProvider {
|
||||
}
|
||||
|
||||
private isClassicAsset(asset: GitHubAsset): boolean {
|
||||
return /[-|_](classic|vanilla)\.zip$/i.test(asset.name);
|
||||
return /[-_](classic|vanilla)\.zip$/i.test(asset.name);
|
||||
}
|
||||
|
||||
private isBurningCrusadeAsset(asset: GitHubAsset): boolean {
|
||||
return /[-|_](bc|bcc|tbc)\.zip$/i.test(asset.name);
|
||||
return /[-_](bc|bcc|tbc)\.zip$/i.test(asset.name);
|
||||
}
|
||||
|
||||
private isWotlk(asset: GitHubAsset): boolean {
|
||||
return /[-|_](wrath)\.zip$/i.test(asset.name);
|
||||
return /[-_](wrath)\.zip$/i.test(asset.name);
|
||||
}
|
||||
|
||||
private getAddonName(addonId: string): string {
|
||||
|
||||
@@ -382,8 +382,9 @@ export class TukUiAddonProvider extends AddonProvider {
|
||||
return "classic-addons";
|
||||
case WowClientType.Classic:
|
||||
case WowClientType.ClassicPtr:
|
||||
case WowClientType.ClassicBeta:
|
||||
return "classic-tbc-addons";
|
||||
case WowClientType.ClassicBeta:
|
||||
return "wrath";
|
||||
case WowClientType.Retail:
|
||||
case WowClientType.RetailPtr:
|
||||
case WowClientType.Beta:
|
||||
@@ -400,8 +401,9 @@ export class TukUiAddonProvider extends AddonProvider {
|
||||
return "classic";
|
||||
case WowClientType.Classic:
|
||||
case WowClientType.ClassicPtr:
|
||||
case WowClientType.ClassicBeta:
|
||||
return "tbc";
|
||||
case WowClientType.ClassicBeta:
|
||||
return "wrath";
|
||||
case WowClientType.Retail:
|
||||
case WowClientType.RetailPtr:
|
||||
case WowClientType.Beta:
|
||||
|
||||
@@ -28,7 +28,7 @@ import { getWowClientGroup } from "../../common/warcraft";
|
||||
import { HttpErrorResponse } from "@angular/common/http";
|
||||
import { UiMessageService } from "../services/ui-message/ui-message.service";
|
||||
|
||||
declare type WagoGameVersion = "retail" | "classic" | "bc";
|
||||
declare type WagoGameVersion = "retail" | "classic" | "bc" | "wrath";
|
||||
declare type WagoStability = "stable" | "beta" | "alpha";
|
||||
|
||||
interface WagoFingerprintAddon {
|
||||
@@ -677,6 +677,8 @@ export class WagoAddonProvider extends AddonProvider {
|
||||
return "classic";
|
||||
case WowClientGroup.Retail:
|
||||
return "retail";
|
||||
case WowClientGroup.WOTLK:
|
||||
return "wrath";
|
||||
default:
|
||||
throw new Error(`[wago] Un-handled client type: ${clientType}`);
|
||||
}
|
||||
|
||||
@@ -615,8 +615,9 @@ export class WowUpAddonProvider extends AddonProvider {
|
||||
return WowGameType.Classic;
|
||||
case WowClientType.Classic:
|
||||
case WowClientType.ClassicPtr:
|
||||
case WowClientType.ClassicBeta:
|
||||
return WowGameType.BurningCrusade;
|
||||
case WowClientType.ClassicBeta:
|
||||
return WowGameType.WOTLK;
|
||||
case WowClientType.Retail:
|
||||
case WowClientType.RetailPtr:
|
||||
case WowClientType.Beta:
|
||||
@@ -633,6 +634,8 @@ export class WowUpAddonProvider extends AddonProvider {
|
||||
return WowClientGroup.Classic;
|
||||
case WowGameType.Retail:
|
||||
return WowClientGroup.Retail;
|
||||
case WowGameType.WOTLK:
|
||||
return WowClientGroup.WOTLK;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,7 +3,7 @@ import { from, of } from "rxjs";
|
||||
import { catchError, delay, first, switchMap } from "rxjs/operators";
|
||||
|
||||
import { AfterViewInit, Component, Inject, OnInit } from "@angular/core";
|
||||
import { FormControl } from "@angular/forms";
|
||||
import { UntypedFormControl } from "@angular/forms";
|
||||
import { MAT_DIALOG_DATA, MatDialogRef } from "@angular/material/dialog";
|
||||
|
||||
import { ProtocolSearchResult } from "../../../models/wowup/protocol-search-result";
|
||||
@@ -33,7 +33,7 @@ export class InstallFromProtocolDialogComponent implements OnInit, AfterViewInit
|
||||
public error = "";
|
||||
public ready = false;
|
||||
public addon!: ProtocolSearchResult;
|
||||
public installations = new FormControl();
|
||||
public installations = new UntypedFormControl();
|
||||
public validWowInstallations: WowInstallationWrapper[] = [];
|
||||
public installProgress = 0;
|
||||
public isInstalling = false;
|
||||
|
||||
@@ -10,14 +10,9 @@ import { TranslateService } from "@ngx-translate/core";
|
||||
import { roundDownloadCount, shortenDownloadCount } from "../../../utils/number.utils";
|
||||
import { DownloadCountPipe } from "../../../pipes/download-count.pipe";
|
||||
import { NO_SEARCH_RESULTS_ERROR } from "../../../../common/constants";
|
||||
import {
|
||||
AssetMissingError,
|
||||
BurningCrusadeAssetMissingError,
|
||||
ClassicAssetMissingError,
|
||||
GitHubLimitError,
|
||||
NoReleaseFoundError,
|
||||
} from "../../../errors";
|
||||
import { AssetMissingError, GitHubLimitError, NoReleaseFoundError } from "../../../errors";
|
||||
import { SearchByUrlResult } from "../../../addon-providers/addon-provider";
|
||||
import { WowClientGroup } from "../../../../common/warcraft/wow-client-type";
|
||||
|
||||
interface DownloadCounts {
|
||||
count: number;
|
||||
@@ -163,16 +158,22 @@ export class InstallFromUrlDialogComponent implements OnDestroy {
|
||||
message = this._translateService.instant("DIALOGS.INSTALL_FROM_URL.ERROR.FAILED_TO_CONNECT");
|
||||
} else if (message === NO_SEARCH_RESULTS_ERROR) {
|
||||
message = this._translateService.instant("DIALOGS.INSTALL_FROM_URL.ERROR.NO_SEARCH_RESULTS");
|
||||
} else if (err instanceof ClassicAssetMissingError) {
|
||||
message = this._translateService.instant("DIALOGS.INSTALL_FROM_URL.ERROR.CLASSIC_ASSET_NOT_FOUND", {
|
||||
message: err.message,
|
||||
});
|
||||
} else if (err instanceof BurningCrusadeAssetMissingError) {
|
||||
message = this._translateService.instant("DIALOGS.INSTALL_FROM_URL.ERROR.BURNING_CRUSADE_ASSET_NOT_FOUND", {
|
||||
message: err.message,
|
||||
});
|
||||
} else if (err instanceof AssetMissingError) {
|
||||
message = this._translateService.instant("DIALOGS.INSTALL_FROM_URL.ERROR.ASSET_NOT_FOUND", {
|
||||
let key = "ERROR.ASSET_NOT_FOUND";
|
||||
switch (err.clientGroup) {
|
||||
case WowClientGroup.BurningCrusade:
|
||||
key = "DIALOGS.INSTALL_FROM_URL.ERROR.BURNING_CRUSADE_ASSET_NOT_FOUND";
|
||||
break;
|
||||
case WowClientGroup.Classic:
|
||||
key = "DIALOGS.INSTALL_FROM_URL.ERROR.CLASSIC_ASSET_NOT_FOUND";
|
||||
break;
|
||||
case WowClientGroup.WOTLK:
|
||||
key = "DIALOGS.INSTALL_FROM_URL.ERROR.WRATH_ASSET_NOT_FOUND";
|
||||
break;
|
||||
case WowClientGroup.Retail:
|
||||
default:
|
||||
}
|
||||
message = this._translateService.instant(key, {
|
||||
message: err.message,
|
||||
});
|
||||
} else if (err instanceof NoReleaseFoundError) {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { AfterViewChecked, Component, ElementRef, ViewChild } from "@angular/core";
|
||||
import { FormControl, FormGroup } from "@angular/forms";
|
||||
import { UntypedFormControl, UntypedFormGroup } from "@angular/forms";
|
||||
import { MatDialogRef } from "@angular/material/dialog";
|
||||
import { AppConfig } from "../../../../environments/environment";
|
||||
import { LinkService } from "../../../services/links/link.service";
|
||||
@@ -18,15 +18,15 @@ export interface ConsentDialogResult {
|
||||
export class ConsentDialogComponent implements AfterViewChecked {
|
||||
@ViewChild("dialogContent", { read: ElementRef }) public dialogContent!: ElementRef;
|
||||
|
||||
public consentOptions: FormGroup;
|
||||
public consentOptions: UntypedFormGroup;
|
||||
|
||||
public readonly wagoTermsUrl = AppConfig.wago.termsUrl;
|
||||
public readonly wagoDataUrl = AppConfig.wago.dataConsentUrl;
|
||||
|
||||
public constructor(public dialogRef: MatDialogRef<ConsentDialogComponent>, private _linkService: LinkService) {
|
||||
this.consentOptions = new FormGroup({
|
||||
telemetry: new FormControl(true),
|
||||
wagoProvider: new FormControl(true),
|
||||
this.consentOptions = new UntypedFormGroup({
|
||||
telemetry: new UntypedFormControl(true),
|
||||
wagoProvider: new UntypedFormControl(true),
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@ import {
|
||||
} from "rxjs";
|
||||
|
||||
import { Component, ElementRef, OnDestroy, OnInit, ViewChild } from "@angular/core";
|
||||
import { FormControl, FormGroup } from "@angular/forms";
|
||||
import { UntypedFormControl, UntypedFormGroup } from "@angular/forms";
|
||||
import { MatListOption, MatSelectionListChange } from "@angular/material/list";
|
||||
import { TranslateService } from "@ngx-translate/core";
|
||||
|
||||
@@ -44,9 +44,9 @@ export class OptionsAddonSectionComponent implements OnInit, OnDestroy {
|
||||
|
||||
public addonProviderStates$ = new BehaviorSubject<AddonProviderStateModel[]>([]);
|
||||
|
||||
public preferenceForm = new FormGroup({
|
||||
cfV2ApiKey: new FormControl(""),
|
||||
ghPersonalAccessToken: new FormControl(""),
|
||||
public preferenceForm = new UntypedFormGroup({
|
||||
cfV2ApiKey: new UntypedFormControl(""),
|
||||
ghPersonalAccessToken: new UntypedFormControl(""),
|
||||
});
|
||||
|
||||
public constructor(
|
||||
|
||||
@@ -78,14 +78,15 @@ export class WowClientOptionsComponent implements OnInit, OnDestroy {
|
||||
}
|
||||
|
||||
switch (this.installation.clientType) {
|
||||
case WowClientType.Beta:
|
||||
case WowClientType.ClassicBeta:
|
||||
case WowClientType.ClassicPtr:
|
||||
case WowClientType.Classic:
|
||||
return "assets/images/wow-classic-tbc-logo.png";
|
||||
case WowClientType.ClassicEra:
|
||||
case WowClientType.ClassicEraPtr:
|
||||
return "assets/images/wow-classic-logo.png";
|
||||
case WowClientType.Beta:
|
||||
case WowClientType.ClassicPtr:
|
||||
case WowClientType.Classic:
|
||||
return "assets/images/wow-classic-tbc-logo.png";
|
||||
case WowClientType.ClassicBeta:
|
||||
return "assets/images/wow-classic-wotlk-logo.png";
|
||||
case WowClientType.Retail:
|
||||
case WowClientType.RetailPtr:
|
||||
return "assets/images/wow-retail-logo.png";
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
export * from "./install-error";
|
||||
import { CustomError } from "ts-custom-error";
|
||||
import { WowClientGroup, WowClientType } from "../../common/warcraft/wow-client-type";
|
||||
|
||||
import { AddonWarningType } from "../../common/wowup/models";
|
||||
import { AddonSearchResult } from "../models/wowup/addon-search-result";
|
||||
@@ -15,28 +16,16 @@ export class ErrorContainer extends CustomError {
|
||||
}
|
||||
}
|
||||
|
||||
export class ClassicAssetMissingError extends CustomError {
|
||||
public searchResult?: AddonSearchResult;
|
||||
export class AssetMissingError extends CustomError {
|
||||
public clientGroup?: WowClientGroup;
|
||||
|
||||
public constructor(message?: string, searchResult?: AddonSearchResult) {
|
||||
public constructor(message?: string, clientGroup?: WowClientGroup) {
|
||||
super(message);
|
||||
|
||||
this.searchResult = searchResult;
|
||||
this.clientGroup = clientGroup;
|
||||
}
|
||||
}
|
||||
|
||||
export class BurningCrusadeAssetMissingError extends CustomError {
|
||||
public searchResult?: AddonSearchResult;
|
||||
|
||||
public constructor(message?: string, searchResult?: AddonSearchResult) {
|
||||
super(message);
|
||||
|
||||
this.searchResult = searchResult;
|
||||
}
|
||||
}
|
||||
|
||||
export class AssetMissingError extends CustomError {}
|
||||
|
||||
export class NoReleaseFoundError extends CustomError {}
|
||||
|
||||
export interface AddonScanErrorConfig {
|
||||
|
||||
@@ -2,4 +2,5 @@ export enum WowGameType {
|
||||
Retail = "retail",
|
||||
Classic = "classic",
|
||||
BurningCrusade = "burningCrusade",
|
||||
WOTLK = "wotlk",
|
||||
}
|
||||
|
||||
@@ -108,27 +108,31 @@ export class TocService {
|
||||
case WowClientType.Beta:
|
||||
case WowClientType.Retail:
|
||||
case WowClientType.RetailPtr:
|
||||
matchedToc = tocFileNames.find((tfn) => /.*[-|_]mainline\.toc$/gi.test(tfn)) || "";
|
||||
matchedToc = tocFileNames.find((tfn) => /.*[-_]mainline\.toc$/gi.test(tfn)) || "";
|
||||
break;
|
||||
case WowClientType.ClassicEra:
|
||||
case WowClientType.ClassicEraPtr:
|
||||
matchedToc = tocFileNames.find((tfn) => /.*[-|_](classic|vanilla)\.toc$/gi.test(tfn)) || "";
|
||||
matchedToc = tocFileNames.find((tfn) => /.*[-_](classic|vanilla)\.toc$/gi.test(tfn)) || "";
|
||||
break;
|
||||
case WowClientType.Classic:
|
||||
case WowClientType.ClassicBeta:
|
||||
case WowClientType.ClassicPtr:
|
||||
matchedToc = tocFileNames.find((tfn) => /.*[-|_](bcc|tbc)\.toc$/gi.test(tfn)) || "";
|
||||
matchedToc = tocFileNames.find((tfn) => /.*[-_](bcc|tbc)\.toc$/gi.test(tfn)) || "";
|
||||
break;
|
||||
case WowClientType.ClassicBeta:
|
||||
matchedToc = tocFileNames.find((tfn) => /.*[-_](wrath|wotlkc)\.toc$/gi.test(tfn)) || "";
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
return (
|
||||
matchedToc || tocFileNames.find((tfn) => /.*(?<)\.toc$/gi.test(tfn)) || ""
|
||||
matchedToc ||
|
||||
tocFileNames.find((tfn) => /.*(?<)\.toc$/gi.test(tfn)) ||
|
||||
""
|
||||
);
|
||||
}
|
||||
|
||||
public getTocForGameType2(addonFolder: AddonFolder, clientType: WowClientType): tocModels.Toc {
|
||||
public getTocForGameType2(addonFolder: AddonFolder, clientType: WowClientType): tocModels.Toc | undefined {
|
||||
let matchedToc = "";
|
||||
|
||||
const tocs = addonFolder.tocs;
|
||||
|
||||
@@ -275,97 +275,9 @@ export class WarcraftInstallationService {
|
||||
return label;
|
||||
}
|
||||
|
||||
private async migrateAllLegacyInstallations(blizzardAgentPath: string): Promise<string> {
|
||||
if (!blizzardAgentPath) {
|
||||
console.info(`Unable to migrate legacy installations, no agent path`);
|
||||
return "";
|
||||
}
|
||||
|
||||
const legacyInstallations: WowInstallation[] = [];
|
||||
for (const clientType of this._warcraftService.getAllClientTypes()) {
|
||||
try {
|
||||
const legacyInstallation = await this.migrateLegacyInstallations(clientType);
|
||||
if (legacyInstallation) {
|
||||
legacyInstallations.push(legacyInstallation);
|
||||
}
|
||||
} catch (e) {
|
||||
console.error(e);
|
||||
}
|
||||
}
|
||||
|
||||
this._legacyInstallationSrc.next(legacyInstallations);
|
||||
|
||||
return blizzardAgentPath;
|
||||
}
|
||||
|
||||
/**
|
||||
* Migrate the old method of storing installation data into the new more flexible one
|
||||
* @deprecated
|
||||
*/
|
||||
private async migrateLegacyInstallations(clientType: WowClientType): Promise<WowInstallation | undefined> {
|
||||
if ([WowClientType.None, WowClientType.ClassicBeta, WowClientType.ClassicEraPtr].includes(clientType)) {
|
||||
return undefined;
|
||||
}
|
||||
|
||||
const typeName = getEnumName(WowClientType, clientType);
|
||||
|
||||
const existingInstallations = await this.getWowInstallationsByClientType(clientType);
|
||||
if (existingInstallations.length > 0) {
|
||||
// console.debug(`Existing install exists for: ${typeName}`);
|
||||
return undefined;
|
||||
}
|
||||
|
||||
const legacyLocationKey = this._warcraftService.getLegacyClientLocationKey(clientType);
|
||||
const legacyLocation = await this._preferenceStorageService.getAsync(legacyLocationKey);
|
||||
if (!legacyLocation) {
|
||||
// console.debug(`Legacy ${typeName}: nothing to migrate`);
|
||||
return undefined;
|
||||
}
|
||||
|
||||
console.log(`Migrating legacy ${typeName} installation`);
|
||||
|
||||
const legacyDefaultChannel = await this.getLegacyDefaultAddonChannel(typeName);
|
||||
const legacyDefaultAutoUpdate = await this.getLegacyDefaultAutoUpdate(typeName);
|
||||
|
||||
const label = await this._translateService.get(`COMMON.CLIENT_TYPES.${typeName.toUpperCase()}`).toPromise();
|
||||
|
||||
const newLocation = this.getFullProductPath(legacyLocation, clientType);
|
||||
|
||||
const newLocationExists = await this._fileService.pathExists(newLocation);
|
||||
if (!newLocationExists) {
|
||||
throw new Error(`Could not migrate legacy installation, path does not exist: ${newLocation}`);
|
||||
}
|
||||
|
||||
const installation: WowInstallation = {
|
||||
id: uuidv4(),
|
||||
clientType,
|
||||
defaultAddonChannelType: legacyDefaultChannel,
|
||||
defaultAutoUpdate: legacyDefaultAutoUpdate,
|
||||
label,
|
||||
location: newLocation,
|
||||
selected: false,
|
||||
};
|
||||
|
||||
await this.addInstallation(installation, false);
|
||||
|
||||
return installation;
|
||||
}
|
||||
|
||||
private getFullProductPath(location: string, clientType: WowClientType): string {
|
||||
const clientFolderName = getWowClientFolderName(clientType);
|
||||
const executableName = this._warcraftService.getExecutableName(clientType);
|
||||
return path.join(location, clientFolderName, executableName);
|
||||
}
|
||||
|
||||
private async getLegacyDefaultAddonChannel(typeName: string): Promise<AddonChannelType> {
|
||||
const legacyDefaultChannelKey = `${typeName}${DEFAULT_CHANNEL_PREFERENCE_KEY_SUFFIX}`.toLowerCase();
|
||||
const pref = await this._preferenceStorageService.getAsync(legacyDefaultChannelKey);
|
||||
return parseInt(pref, 10) as AddonChannelType;
|
||||
}
|
||||
|
||||
private async getLegacyDefaultAutoUpdate(typeName: string): Promise<boolean> {
|
||||
const legacyDefaultAutoUpdateKey = `${typeName}${DEFAULT_AUTO_UPDATE_PREFERENCE_KEY_SUFFIX}`.toLowerCase();
|
||||
const pref = await this._preferenceStorageService.getAsync(legacyDefaultAutoUpdateKey);
|
||||
return pref === "true";
|
||||
}
|
||||
}
|
||||
|
||||
@@ -15,6 +15,15 @@ export class PatchNotesService {
|
||||
}
|
||||
|
||||
const CHANGELOGS: ChangeLog[] = [
|
||||
{
|
||||
Version: "2.9.0",
|
||||
html: `
|
||||
<h4 style="margin-top: 1em;">New Features</h4>
|
||||
<ul>
|
||||
<li>Add new support for the Wrath of the Lich King Classic Beta client</li>
|
||||
</ul>
|
||||
`,
|
||||
},
|
||||
{
|
||||
Version: "2.8.3",
|
||||
html: `
|
||||
|
||||
@@ -298,7 +298,8 @@
|
||||
"NO_ADDON_FOUND": "Žádný addon na zadané URL adrese nebyl nalezen. Ujistěte se, že URL adresa odkazuje na správnou stránku.\n\nPři instalaci z GitHubu se ujistěte, že repozitář obsahuje release tag s zipem obsahujícím addon.",
|
||||
"NO_RELEASE_FOUND": "Nebyl nalezen žádný soubor ke stažení {message}.\n\nPlatný zip soubor musí být k dispozici, aby ho WowUp mohl stáhnout.",
|
||||
"NO_SEARCH_RESULTS": "Hledání neodpovídá žádný addon.",
|
||||
"TITLE": "Instalace addonu se nepodařila"
|
||||
"TITLE": "Instalace addonu se nepodařila",
|
||||
"WRATH_ASSET_NOT_FOUND": "No asset was found to download from {message}.\n\nA valid zip file ending with '-wrath' is required in order for WowUp to download it."
|
||||
},
|
||||
"IMPORT_ASSET_WARNING": "We were unable to verify if the latest release of this addon is compatible with your selected client.\n\nBut we did find a zip file \"{zipName}\".\n\nInstall at your own risk.",
|
||||
"IMPORT_BUTTON": "Importovat",
|
||||
|
||||
@@ -298,7 +298,8 @@
|
||||
"NO_ADDON_FOUND": "Es wurde kein Addon gefunden. Stelle sicher, dass die URL zur richtigen Website führt.\n\nSolltest Du versuchen ein Addon von GitHub zu installieren, stelle sicher, dass das Repository Release-Tags mit einem ZIP-Archiv, welches das Addon enthält, besitzt.",
|
||||
"NO_RELEASE_FOUND": "Es wurde kein Release für {message} gefunden.\n\nEin gültiges Release mit Zip-Datei-Assets ist erforderlich, damit WowUp sie herunterladen kann.",
|
||||
"NO_SEARCH_RESULTS": "Es wurden keine Suchergebnisse gefunden.",
|
||||
"TITLE": "Installation fehlgeschlagen"
|
||||
"TITLE": "Installation fehlgeschlagen",
|
||||
"WRATH_ASSET_NOT_FOUND": "No asset was found to download from {message}.\n\nA valid zip file ending with '-wrath' is required in order for WowUp to download it."
|
||||
},
|
||||
"IMPORT_ASSET_WARNING": "Wir konnten nicht überprüfen, ob die neueste Version dieses Add-ons mit deinem ausgewählten Client kompatibel ist.\n\nAber wir haben eine ZIP-Datei \"{zipName}\" gefunden.\n\nDie Installation erfolgt auf eigene Gefahr.",
|
||||
"IMPORT_BUTTON": "Importieren",
|
||||
|
||||
@@ -298,7 +298,8 @@
|
||||
"NO_ADDON_FOUND": "No addon was found, make sure your URL is pointing to the correct page.\n\nWhen installing from github, please make sure the repository has a release tag with a zip archive containing the addon.",
|
||||
"NO_RELEASE_FOUND": "No releases were found for {message}.\n\nValid release with zip file assets are required for WowUp to download it.",
|
||||
"NO_SEARCH_RESULTS": "No search results were found.",
|
||||
"TITLE": "Addon Installation Failed"
|
||||
"TITLE": "Addon Installation Failed",
|
||||
"WRATH_ASSET_NOT_FOUND": "No asset was found to download from {message}.\n\nA valid zip file ending with '-wrath' is required in order for WowUp to download it."
|
||||
},
|
||||
"IMPORT_ASSET_WARNING": "We were unable to verify if the latest release of this addon is compatible with your selected client.\n\nBut we did find a zip file \"{zipName}\".\n\nInstall at your own risk.",
|
||||
"IMPORT_BUTTON": "Import",
|
||||
|
||||
@@ -298,7 +298,8 @@
|
||||
"NO_ADDON_FOUND": "No se encontró el addon, asegúrese de que la URL apunta a la página correcta.\n\nSi está instalando desde GitHub, asegúrese de que el repositorio tiene una release tag con un archivo zip conteniendo el addon.",
|
||||
"NO_RELEASE_FOUND": "No se encontraron publicaciones para {message}.\n\nSe requiere una versión válida con los recursos contenidos en un archivo zip para que WowUp pueda descargarla.",
|
||||
"NO_SEARCH_RESULTS": "No se encontraron resultados.",
|
||||
"TITLE": "Falló la instalación del addon"
|
||||
"TITLE": "Falló la instalación del addon",
|
||||
"WRATH_ASSET_NOT_FOUND": "No asset was found to download from {message}.\n\nA valid zip file ending with '-wrath' is required in order for WowUp to download it."
|
||||
},
|
||||
"IMPORT_ASSET_WARNING": "No se pudo comprobar si la última versión de este addon es compatible con el cliente seleccionado. Sin embargo, se encontró un archivo zip \"{zipName}\".\n\n Puede instalarlo bajo su propia responsabilidad.",
|
||||
"IMPORT_BUTTON": "Importar",
|
||||
|
||||
@@ -298,7 +298,8 @@
|
||||
"NO_ADDON_FOUND": "Aucun addon n'a été trouvé, assurez-vous que votre URL pointe vers la bonne page.\n\nLors de l'installation à partir de github, veuillez vous assurer que le référentiel a une balise de version avec une archive zip contenant l'addon.",
|
||||
"NO_RELEASE_FOUND": "No releases were found for {message}.\n\nValid release with zip file assets are required for WowUp to download it.",
|
||||
"NO_SEARCH_RESULTS": "La recherche n'a retourné aucun résultat.",
|
||||
"TITLE": "Echec de l'installation de l'addon"
|
||||
"TITLE": "Echec de l'installation de l'addon",
|
||||
"WRATH_ASSET_NOT_FOUND": "No asset was found to download from {message}.\n\nA valid zip file ending with '-wrath' is required in order for WowUp to download it."
|
||||
},
|
||||
"IMPORT_ASSET_WARNING": "We were unable to verify if the latest release of this addon is compatible with your selected client.\n\nBut we did find a zip file \"{zipName}\".\n\nInstall at your own risk.",
|
||||
"IMPORT_BUTTON": "Importer",
|
||||
|
||||
@@ -298,7 +298,8 @@
|
||||
"NO_ADDON_FOUND": "Non è stato trovato alcun addon, assicurarsi che l'URL sia corretto.\n\nSe si sta installando da GitHub, assicurarsi che la repository abbia un release tag con un file zip contenente l'addon.",
|
||||
"NO_RELEASE_FOUND": "Non è stata trovata alcuna release per {message}.\n\nÈ necessaro ci sia un file zip negli assets affinché WowUp possa scaricarlo.",
|
||||
"NO_SEARCH_RESULTS": "Nessun risultato dalla ricerca.",
|
||||
"TITLE": "Installazione dell'Addon Fallita"
|
||||
"TITLE": "Installazione dell'Addon Fallita",
|
||||
"WRATH_ASSET_NOT_FOUND": "No asset was found to download from {message}.\n\nA valid zip file ending with '-wrath' is required in order for WowUp to download it."
|
||||
},
|
||||
"IMPORT_ASSET_WARNING": "We were unable to verify if the latest release of this addon is compatible with your selected client.\n\nBut we did find a zip file \"{zipName}\".\n\nInstall at your own risk.",
|
||||
"IMPORT_BUTTON": "Importa",
|
||||
|
||||
@@ -298,7 +298,8 @@
|
||||
"NO_ADDON_FOUND": "애드온을 찾을 수 없습니다. 입력하신 주소가 올바른 애드온 페이지를 가리키고 있는지 확인해주세요.\n\nGithub에서 설치할 때는, 애드온을 zip 파일로 묶은 릴리즈 태그가 존재하는 저장소인지 확인하세요.",
|
||||
"NO_RELEASE_FOUND": "No releases were found for {message}.\n\nValid release with zip file assets are required for WowUp to download it.",
|
||||
"NO_SEARCH_RESULTS": "검색 결과가 없습니다.",
|
||||
"TITLE": "애드온 설치 실패"
|
||||
"TITLE": "애드온 설치 실패",
|
||||
"WRATH_ASSET_NOT_FOUND": "No asset was found to download from {message}.\n\nA valid zip file ending with '-wrath' is required in order for WowUp to download it."
|
||||
},
|
||||
"IMPORT_ASSET_WARNING": "We were unable to verify if the latest release of this addon is compatible with your selected client.\n\nBut we did find a zip file \"{zipName}\".\n\nInstall at your own risk.",
|
||||
"IMPORT_BUTTON": "가져오기",
|
||||
|
||||
@@ -298,7 +298,8 @@
|
||||
"NO_ADDON_FOUND": "No addon was found, make sure your URL is pointing to the correct page.\n\nWhen installing from github, please make sure the repository has a release tag with a zip archive containing the addon.",
|
||||
"NO_RELEASE_FOUND": "No releases were found for {message}.\n\nValid release with zip file assets are required for WowUp to download it.",
|
||||
"NO_SEARCH_RESULTS": "No search results were found.",
|
||||
"TITLE": "Addon Installation Failed"
|
||||
"TITLE": "Addon Installation Failed",
|
||||
"WRATH_ASSET_NOT_FOUND": "No asset was found to download from {message}.\n\nA valid zip file ending with '-wrath' is required in order for WowUp to download it."
|
||||
},
|
||||
"IMPORT_ASSET_WARNING": "We were unable to verify if the latest release of this addon is compatible with your selected client.\n\nBut we did find a zip file \"{zipName}\".\n\nInstall at your own risk.",
|
||||
"IMPORT_BUTTON": "Importer",
|
||||
|
||||
@@ -298,7 +298,8 @@
|
||||
"NO_ADDON_FOUND": "Nie znaleziono addonu, upewnij się że twój adres URL wskazuje na właściwą stronę.\n\nKiedy instalujesz z githuba, upewnij się że repozytorium ma znacznik wydania z archiwum zip zawierające addon.",
|
||||
"NO_RELEASE_FOUND": "Nie znaleziono żadnych wydań dla {message}.\n\nPoprawnie wydanie z plikiem zasobów zip są potrzebne aby pobrać je dla WoWUP.",
|
||||
"NO_SEARCH_RESULTS": "Nie znaleziono żadnych wyników wyszukiwania.",
|
||||
"TITLE": "Instalacja addonu nie powiodła się"
|
||||
"TITLE": "Instalacja addonu nie powiodła się",
|
||||
"WRATH_ASSET_NOT_FOUND": "No asset was found to download from {message}.\n\nA valid zip file ending with '-wrath' is required in order for WowUp to download it."
|
||||
},
|
||||
"IMPORT_ASSET_WARNING": "Nie mogliśmy zwerifikować czy najnowsza wersja tego addonu jest kompatybilna z twoim zaznaczonym klientem.\n\nAle znaleźliśmy plik zip \"{zipName}\".\n\nInstalacja na własną odpowiedzialność.",
|
||||
"IMPORT_BUTTON": "Importuj",
|
||||
|
||||
@@ -298,7 +298,8 @@
|
||||
"NO_ADDON_FOUND": "O Addon não foi encontrado, tenha certeza de que a URL está apontando para a página correta.\n\nQuanto estiver instalando do github, certifique-se de que o repositório possui uma tag release com um arquivo zip contendo o Addon.",
|
||||
"NO_RELEASE_FOUND": "Nenhum release foi encontrado para {message}.\n\nRelease válido com recursos em arquivo zip são necessários para que o WowUp possa fazer o download.",
|
||||
"NO_SEARCH_RESULTS": "Nenhum resultado de busca encontrado.",
|
||||
"TITLE": "Instalação do Addon Falhou"
|
||||
"TITLE": "Instalação do Addon Falhou",
|
||||
"WRATH_ASSET_NOT_FOUND": "No asset was found to download from {message}.\n\nA valid zip file ending with '-wrath' is required in order for WowUp to download it."
|
||||
},
|
||||
"IMPORT_ASSET_WARNING": "Não foi possivel verificar se o ultimo release desse addon é compatível com o seu cliente selecionado.\n\nMas nós encontramos um arquivo zip \"{zipName}\".\n\nInstale por sua conta e risco.",
|
||||
"IMPORT_BUTTON": "Importar",
|
||||
|
||||
@@ -298,7 +298,8 @@
|
||||
"NO_ADDON_FOUND": "Модификация не была найдена, убедитесь, что Ваша ссылка указывает на правильную страницу.\n\nПри установке с GitHub, убедитесь, что в репозитории есть тег выпуска с zip-архивом, содержащим модификацию.",
|
||||
"NO_RELEASE_FOUND": "Не найдено выпусков для {message}.\n\nНеобходим верный выпуск с ресурсами в .zip файле, чтобы WowUp мог загрузить его.",
|
||||
"NO_SEARCH_RESULTS": "Поиск не дал результатов.",
|
||||
"TITLE": "Установка модификации не удалась"
|
||||
"TITLE": "Установка модификации не удалась",
|
||||
"WRATH_ASSET_NOT_FOUND": "No asset was found to download from {message}.\n\nA valid zip file ending with '-wrath' is required in order for WowUp to download it."
|
||||
},
|
||||
"IMPORT_ASSET_WARNING": "Мы не смогли убедиться в совместимости последнего выпуска этой модификации с выбранным Вами клиентом.\n\nНо мы нашли zip файл \"{zipName}\".\n\nУстанавливайте его на свой страх и риск.",
|
||||
"IMPORT_BUTTON": "Импорт",
|
||||
|
||||
@@ -298,7 +298,8 @@
|
||||
"NO_ADDON_FOUND": "未找到插件,請檢查 URL 是否指向正確的頁面。\n\n從 GitHub 安裝時,請檢查是否存在帶有 zip 包的 release tag。",
|
||||
"NO_RELEASE_FOUND": "未找到釋出版本 {message}.\n\n要通過 WowUp 下載插件,需要帶有 zip 附件的釋出版本。",
|
||||
"NO_SEARCH_RESULTS": "无搜索结果。",
|
||||
"TITLE": "插件安裝失敗"
|
||||
"TITLE": "插件安裝失敗",
|
||||
"WRATH_ASSET_NOT_FOUND": "No asset was found to download from {message}.\n\nA valid zip file ending with '-wrath' is required in order for WowUp to download it."
|
||||
},
|
||||
"IMPORT_ASSET_WARNING": "已找到此插件的最新版本壓縮包「{zipName}」,但無法驗證它是否相容此《魔獸世界》客戶端。\n\n如要安裝,請自擔風險。",
|
||||
"IMPORT_BUTTON": "匯入",
|
||||
|
||||
@@ -298,7 +298,8 @@
|
||||
"NO_ADDON_FOUND": "未找到插件,请检查 URL 是否指向正确的页面。\n\n从 GitHub 安装时,请检查是否存在带有 zip 包的 release tag。",
|
||||
"NO_RELEASE_FOUND": "未找到发布版本 {message}.\n\n要通过 WowUp 下载插件,需要带有 zip 附件的发布版本。",
|
||||
"NO_SEARCH_RESULTS": "无搜索结果。",
|
||||
"TITLE": "插件安装失败"
|
||||
"TITLE": "插件安装失败",
|
||||
"WRATH_ASSET_NOT_FOUND": "No asset was found to download from {message}.\n\nA valid zip file ending with '-wrath' is required in order for WowUp to download it."
|
||||
},
|
||||
"IMPORT_ASSET_WARNING": "已找到此插件的最新版本压缩包 “{zipName}”,但无法验证它是否兼容此《魔兽世界》客户端。\n\n如要安装,请自担风险。",
|
||||
"IMPORT_BUTTON": "导入",
|
||||
|
||||
BIN
wowup-electron/src/assets/images/wow-classic-wotlk-logo.png
Normal file
BIN
wowup-electron/src/assets/images/wow-classic-wotlk-logo.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 269 KiB |
@@ -35,9 +35,10 @@ export function getWowClientGroup(clientType: string | WowClientType): WowClient
|
||||
case WowClientType.ClassicEraPtr:
|
||||
return WowClientGroup.Classic;
|
||||
case WowClientType.Classic:
|
||||
case WowClientType.ClassicBeta:
|
||||
case WowClientType.ClassicPtr:
|
||||
return WowClientGroup.BurningCrusade;
|
||||
case WowClientType.ClassicBeta:
|
||||
return WowClientGroup.WOTLK;
|
||||
default:
|
||||
throw new Error(`unsupported client type: ${clientType}`);
|
||||
}
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
// Various client types that WoW has to offer
|
||||
export enum WowClientType {
|
||||
Retail = 0,
|
||||
Classic,
|
||||
@@ -7,12 +8,13 @@ export enum WowClientType {
|
||||
ClassicBeta,
|
||||
ClassicEra,
|
||||
ClassicEraPtr,
|
||||
WOTLKBeta,
|
||||
None,
|
||||
}
|
||||
|
||||
// Grouping of the various clients into their expansions
|
||||
export enum WowClientGroup {
|
||||
Retail,
|
||||
BurningCrusade,
|
||||
Classic,
|
||||
WOTLK,
|
||||
}
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
"downlevelIteration": true,
|
||||
"resolveJsonModule": true,
|
||||
"allowSyntheticDefaultImports": true,
|
||||
"target": "es2017",
|
||||
"target": "es2020",
|
||||
"typeRoots": [
|
||||
"node_modules/@types"
|
||||
],
|
||||
|
||||
Reference in New Issue
Block a user