Fix file pollution and some ESLint errors in github actions

This commit is contained in:
Jesse Wierzbinski 2024-03-10 19:55:20 -10:00
parent 69f7c470f7
commit f282fcacae
No known key found for this signature in database
4 changed files with 7 additions and 23 deletions

View file

@ -9,7 +9,7 @@ module.exports = {
parserOptions: {
project: "./tsconfig.json",
},
ignorePatterns: ["node_modules/", "dist/", ".eslintrc.cjs"],
ignorePatterns: ["node_modules/", "dist/", ".eslintrc.cjs", "cli.ts"],
plugins: ["@typescript-eslint"],
root: true,
rules: {

View file

@ -38,7 +38,7 @@
"start": "NODE_ENV=production bun run dist/index.js --prod",
"migrate-dev": "bun prisma migrate dev",
"migrate": "bun prisma migrate deploy",
"lint": "eslint --config .eslintrc.cjs --ext .ts .",
"lint": "bunx --bun eslint --config .eslintrc.cjs --ext .ts .",
"prod-build": "bunx --bun vite build pages && bun run build.ts",
"prisma": "DATABASE_URL=$(bun run prisma.ts) bunx prisma",
"generate": "bun prisma generate",

View file

@ -146,9 +146,9 @@ export class CliBuilder {
// Split the command into parts and iterate over them
for (const part of command.categories) {
// If this part doesn't exist in the current level of the tree, add it
// If this part doesn't exist in the current level of the tree, add it (__proto__ check to prevent prototype pollution)
// eslint-disable-next-line @typescript-eslint/no-unnecessary-condition
if (!currentLevel[part]) {
if (!currentLevel[part] && part !== "__proto__") {
// If this is the last part of the command, add the command itself
if (
part ===
@ -253,24 +253,6 @@ export class CliBuilder {
}
}
/* type CliParametersToType<T extends CliParameter[]> = {
[K in T[number]["name"]]: T[number]["type"] extends CliParameterType.STRING
? string
: T[number]["type"] extends CliParameterType.NUMBER
? number
: T[number]["type"] extends CliParameterType.BOOLEAN
? boolean
: T[number]["type"] extends CliParameterType.ARRAY
? string[]
: T[number]["type"] extends CliParameterType.EMPTY
? never
: never;
};
type ExecuteFunction<T extends CliParameter[]> = (
args: CliParametersToType<T>
) => void; */
type ExecuteFunction<T> = (
instance: CliCommand,
args: Partial<T>

View file

@ -1,3 +1,5 @@
import type { MediaBackendType } from "media-manager";
export interface ConfigType {
database: {
host: string;
@ -95,7 +97,7 @@ export interface ConfigType {
};
media: {
backend: string;
backend: MediaBackendType;
deduplicate_media: boolean;
conversion: {
convert_images: boolean;