Skip to content
Merged
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
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ jobs:

- name: Lint code
run: |
(cd mclib && bunx eslint .)
(cd web && bunx eslint .)
(cd mclib && bun run lint)
(cd web && bun run lint)
Comment thread
iTrooz marked this conversation as resolved.

- name: build CLI
run: cd cli && bun run build
Expand Down
3 changes: 2 additions & 1 deletion mclib/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@
},
"scripts": {
"build": "tsc",
"test": "bunx vitest run"
"test": "bunx vitest run",
"lint": "eslint ."
},
"type": "module",
"types": "dist/index.d.ts",
Expand Down
26 changes: 17 additions & 9 deletions web/src/config.ts
Original file line number Diff line number Diff line change
@@ -1,16 +1,24 @@
import { ModrinthRepository, CurseForgeRepository, ModQueryService, LocalSolutionFinder } from 'mclib';
import {
ModrinthRepository,
CurseForgeRepository,
ModQueryService,
LocalSolutionFinder
} from 'mclib';
import type { ISolutionFinder } from 'mclib';
declare const __APP_VERSION__: string;

// eslint-disable-next-line @typescript-eslint/no-explicit-any
export const fetchClient = (url: any, init: RequestInit = {}) => {
init['headers'] = {
...init['headers'],
'User-Agent': 'github.com/iTrooz/ModpackCreator v' + __APP_VERSION__
};
return fetch(url, init);
}
init['headers'] = {
...init['headers'],
'User-Agent': 'github.com/iTrooz/ModpackCreator v' + __APP_VERSION__
};
return fetch(url, init);
};

export const repositories = [new ModrinthRepository(fetchClient), new CurseForgeRepository(fetchClient)];
export const repositories = [
new ModrinthRepository(fetchClient),
new CurseForgeRepository(fetchClient)
];
export const modQueryService = new ModQueryService(repositories);
export const solutionFinder: ISolutionFinder = new LocalSolutionFinder(modQueryService)
export const solutionFinder: ISolutionFinder = new LocalSolutionFinder(modQueryService);
2 changes: 1 addition & 1 deletion web/src/routes/+layout.ts
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export const prerender = true
export const prerender = true;
60 changes: 30 additions & 30 deletions web/static/colors.css
Original file line number Diff line number Diff line change
@@ -1,32 +1,32 @@
* {
/* GREY */
--grey-light-2: hsla(120, 56%, 96%, 1);
--grey-light-1: hsla(120, 15%, 86%, 1);
--grey: hsla(120, 2%, 47%, 1);
--grey-dark-1: hsla(120, 5%, 22%, 1);
--grey-dark-2: hsla(120, 3%, 13%, 1);
/* GREEN */
--green-light-2: hsla(94, 78%, 87%, 1);
--green-light-1: hsla(94, 59%, 70%, 1);
--green: hsla(94, 39%, 48%, 1);
--green-dark-1: hsla(96, 72%, 19%, 1);
--green-dark-2: hsla(96, 93%, 11%, 1);
/* ORANGE */
--orange-light-2: hsla(37, 78%, 89%, 1);
--orange-light-1: hsla(36, 82%, 72%, 1);
--orange: hsla(38, 62%, 55%, 1);
--orange-dark-1: hsla(38, 68%, 34%, 1);
--orange-dark-2: hsla(38, 88%, 17%, 1);
/* RED */
--red-light-2: hsla(8, 69%, 91%, 1);
--red-light-1: hsla(9, 74%, 73%, 1);
--red: hsla(9, 56%, 53%, 1);
--red-dark-1: hsla(9, 75%, 22%, 1);
--red-dark-2: hsla(9, 90%, 12%, 1);
/* BLUE */
--blue-light-2: hsla(213, 73%, 91%, 1);
--blue-light-1: hsla(212, 90%, 72%, 1);
--blue: hsla(212, 70%, 55%, 1);
--blue-dark-1: hsla(212, 82%, 30%, 1);
--blue-dark-2: hsla(212, 94%, 14%, 1);
/* GREY */
--grey-light-2: hsla(120, 56%, 96%, 1);
--grey-light-1: hsla(120, 15%, 86%, 1);
--grey: hsla(120, 2%, 47%, 1);
--grey-dark-1: hsla(120, 5%, 22%, 1);
--grey-dark-2: hsla(120, 3%, 13%, 1);
/* GREEN */
--green-light-2: hsla(94, 78%, 87%, 1);
--green-light-1: hsla(94, 59%, 70%, 1);
--green: hsla(94, 39%, 48%, 1);
--green-dark-1: hsla(96, 72%, 19%, 1);
--green-dark-2: hsla(96, 93%, 11%, 1);
/* ORANGE */
--orange-light-2: hsla(37, 78%, 89%, 1);
--orange-light-1: hsla(36, 82%, 72%, 1);
--orange: hsla(38, 62%, 55%, 1);
--orange-dark-1: hsla(38, 68%, 34%, 1);
--orange-dark-2: hsla(38, 88%, 17%, 1);
/* RED */
--red-light-2: hsla(8, 69%, 91%, 1);
--red-light-1: hsla(9, 74%, 73%, 1);
--red: hsla(9, 56%, 53%, 1);
--red-dark-1: hsla(9, 75%, 22%, 1);
--red-dark-2: hsla(9, 90%, 12%, 1);
/* BLUE */
--blue-light-2: hsla(213, 73%, 91%, 1);
--blue-light-1: hsla(212, 90%, 72%, 1);
--blue: hsla(212, 70%, 55%, 1);
--blue-dark-1: hsla(212, 82%, 30%, 1);
--blue-dark-2: hsla(212, 94%, 14%, 1);
}
10 changes: 5 additions & 5 deletions web/vitest.config.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import { defineConfig } from 'vitest/config';

export default defineConfig({
test: {
globals: true,
environment: 'node',
include: ['src/**/*.{test,spec}.{js,ts}']
}
test: {
globals: true,
environment: 'node',
include: ['src/**/*.{test,spec}.{js,ts}']
}
});