Skip to content

Commit 9be43a8

Browse files
committed
Autogenerate ./types
1 parent 95c4534 commit 9be43a8

5 files changed

Lines changed: 17 additions & 12 deletions

File tree

pnpm-lock.yaml

Lines changed: 4 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/local-mods.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import { ModDB } from './moddb'
66
import { ModInstaller } from './mod-installer'
77
import type { ValidTags } from 'ccmoddb/build/src/types'
88

9-
type CCL2Mod = {
9+
interface CCL2Mod {
1010
baseDirectory: string
1111
dependencies?: Record<string, string>
1212
disabled: boolean
@@ -19,6 +19,7 @@ type CCL2Mod = {
1919
homepage?: string
2020
tags?: ValidTags[]
2121
authors?: string[] | string
22+
assets?: string[]
2223

2324
active?: boolean
2425
}

types/gui/install-dialogs.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ export declare function prepareModName(mod: {
33
name: string;
44
}): string;
55
export declare class ModInstallDialogs {
6-
static showModInstallDialog(): void;
6+
static showModInstallDialog(autoupdate?: boolean): void;
77
static showAutoUpdateDialog(): void;
88
static showModUninstallDialog(localMod: ModEntryLocal): boolean;
99
static checkCanDisableMod(mod: ModEntryLocal): boolean;

types/local-mods.d.ts

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import { ModEntry, ModEntryLocal } from './types';
2-
type CCL2Mod = {
2+
import type { ValidTags } from 'ccmoddb/build/src/types';
3+
interface CCL2Mod {
34
baseDirectory: string;
45
dependencies?: Record<string, string>;
56
disabled: boolean;
@@ -12,8 +13,11 @@ type CCL2Mod = {
1213
};
1314
repository?: string;
1415
homepage?: string;
16+
tags?: ValidTags[];
17+
authors?: string[] | string;
18+
assets?: string[];
1519
active?: boolean;
16-
};
20+
}
1721
declare global {
1822
var activeMods: CCL2Mod[];
1923
var inactiveMods: CCL2Mod[];

types/types.d.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,10 @@ interface ModEntryBase extends ModEntryBaseBase {
4646
awaitingRestart?: boolean;
4747
/** Mod repository web link */
4848
repositoryUrl?: string;
49+
/** Author list, may be empty */
50+
authors?: string[];
51+
/** Mod tag list */
52+
tags?: ValidTags[];
4953
}
5054
export interface ModEntryServer extends ModEntryBase {
5155
isLocal: false;
@@ -55,14 +59,10 @@ export interface ModEntryServer extends ModEntryBase {
5559
installation: InstallMethod[];
5660
/** UNIX timestamp of the last commit of the primary git branch of the repostory provided by "repositoryUrl", fetched by CCModDB */
5761
lastUpdateTimestamp?: number;
58-
/** Author list, may be empty */
59-
authors: string[];
6062
/** GitHub star count, local mods have this set if they have a server counterpart */
6163
stars?: number;
6264
/** Represents the release page info fetched from the mods repository */
6365
releasePages?: ReleasePage[];
64-
/** Mod tag list */
65-
tags: ValidTags[];
6666
/** The testing counterpart */
6767
testingVersion?: ModEntryServer;
6868
dependenciesCached?: Record<string, {

0 commit comments

Comments
 (0)