Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions src/lib/__tests__/game-config.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -90,27 +90,27 @@ describe('ksa config', () => {

it('should generate netkan URL for active mod', () => {
const url = ksa.netkan('TestMod', false);
expect(url).toBe('https://github.com/KSAModding/KSA-NetKAN/tree/main/NetKAN/TestMod.netkan');
expect(url).toBe('https://github.com/KSP-CKAN/KSA-NetKAN/tree/main/NetKAN/TestMod.netkan');
});

it('should generate netkan URL for frozen mod', () => {
const url = ksa.netkan('TestMod', true);
expect(url).toBe('https://github.com/KSAModding/KSA-NetKAN/tree/main/NetKAN/TestMod.frozen');
expect(url).toBe('https://github.com/KSP-CKAN/KSA-NetKAN/tree/main/NetKAN/TestMod.frozen');
});

it('should generate history URL for active mod', () => {
const url = ksa.history('TestMod', false);
expect(url).toBe('https://github.com/KSAModding/KSA-NetKAN/commits/main/NetKAN/TestMod.netkan');
expect(url).toBe('https://github.com/KSP-CKAN/KSA-NetKAN/commits/main/NetKAN/TestMod.netkan');
});

it('should generate history URL for frozen mod', () => {
const url = ksa.history('TestMod', true);
expect(url).toBe('https://github.com/KSAModding/KSA-NetKAN/commits/main/NetKAN/TestMod.frozen');
expect(url).toBe('https://github.com/KSP-CKAN/KSA-NetKAN/commits/main/NetKAN/TestMod.frozen');
});

it('should generate metadata URL', () => {
const url = ksa.metadata('TestMod');
expect(url).toBe('https://github.com/KSAModding/KSA-CKAN-meta/tree/main/TestMod');
expect(url).toBe('https://github.com/KSP-CKAN/KSA-CKAN-meta/tree/main/TestMod');
});
});

Expand Down
10 changes: 5 additions & 5 deletions src/lib/game-config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,14 +38,14 @@ export const ksa: GameConfig = {
status: '/status/netkan-ksa.json',
netkan: (ident: string, frozen?: boolean) =>
frozen
? `https://github.com/KSAModding/KSA-NetKAN/tree/main/NetKAN/${ident}.frozen`
: `https://github.com/KSAModding/KSA-NetKAN/tree/main/NetKAN/${ident}.netkan`,
? `https://github.com/KSP-CKAN/KSA-NetKAN/tree/main/NetKAN/${ident}.frozen`
: `https://github.com/KSP-CKAN/KSA-NetKAN/tree/main/NetKAN/${ident}.netkan`,
history: (ident: string, frozen?: boolean) =>
frozen
? `https://github.com/KSAModding/KSA-NetKAN/commits/main/NetKAN/${ident}.frozen`
: `https://github.com/KSAModding/KSA-NetKAN/commits/main/NetKAN/${ident}.netkan`,
? `https://github.com/KSP-CKAN/KSA-NetKAN/commits/main/NetKAN/${ident}.frozen`
: `https://github.com/KSP-CKAN/KSA-NetKAN/commits/main/NetKAN/${ident}.netkan`,
metadata: (ident: string) =>
`https://github.com/KSAModding/KSA-CKAN-meta/tree/main/${ident}`,
`https://github.com/KSP-CKAN/KSA-CKAN-meta/tree/main/${ident}`,
};

export const games: GameConfig[] = [ksp, ksp2, ksa];