84 lines
2.0 KiB
TOML
84 lines
2.0 KiB
TOML
[tasks.install]
|
|
run = "pnpm install --filter immich --frozen-lockfile"
|
|
|
|
[tasks.build]
|
|
env._.path = "./node_modules/.bin"
|
|
# TODO we shouldn't technically need tsc-alias, but the nestjs tsconfig paths resolution is broken right now with ESM
|
|
# remove when https://github.com/nestjs/nest-cli/pull/3545 has been released
|
|
run = "nest build && tsc-alias"
|
|
|
|
[tasks.test]
|
|
env._.path = "./node_modules/.bin"
|
|
run = "vitest --config test/vitest.config.mjs"
|
|
|
|
[tasks."test-medium"]
|
|
env._.path = "./node_modules/.bin"
|
|
run = "vitest --config test/vitest.config.medium.mjs"
|
|
|
|
[tasks.format]
|
|
env._.path = "./node_modules/.bin"
|
|
run = "prettier --check ."
|
|
|
|
[tasks."format-fix"]
|
|
env._.path = "./node_modules/.bin"
|
|
run = "prettier --write ."
|
|
|
|
[tasks.lint]
|
|
env._.path = "./node_modules/.bin"
|
|
run = "eslint \"src/**/*.ts\" \"test/**/*.ts\" --max-warnings 0"
|
|
|
|
[tasks."lint-fix"]
|
|
run = { task = "lint --fix" }
|
|
|
|
[tasks.check]
|
|
env._.path = "./node_modules/.bin"
|
|
run = "tsc --noEmit"
|
|
|
|
[tasks.sql]
|
|
run = "node ./dist/bin/sync-sql.js"
|
|
|
|
[tasks."sync-open-api"]
|
|
run = "node ./dist/bin/sync-open-api.js"
|
|
|
|
[tasks.migrations]
|
|
env._.path = "./node_modules/.bin"
|
|
run = "sql-tools -u ${DB_URL:-postgres://postgres:postgres@localhost:5432/immich} migrations"
|
|
description = "Run database migration commands (create, generate, run, sync-order, verify-order, ...)"
|
|
|
|
[tasks."schema-drop"]
|
|
run = { task = "migrations query 'DROP schema public cascade; CREATE schema public;'" }
|
|
|
|
[tasks."schema-reset"]
|
|
run = [{ task = ":schema-drop" }, { task = "migrations run" }]
|
|
|
|
[tasks."email-dev"]
|
|
env._.path = "./node_modules/.bin"
|
|
run = "email dev -p 3050 --dir src/emails"
|
|
|
|
[tasks.ci-unit]
|
|
run = [
|
|
{ task = ":install" },
|
|
{ task = "//:plugins" },
|
|
{ task = ":format" },
|
|
{ task = ":lint" },
|
|
{ task = ":check" },
|
|
{ task = ":test --run" },
|
|
]
|
|
|
|
[tasks.ci-medium]
|
|
run = [
|
|
{ task = ":install" },
|
|
{ task = "//:plugins" },
|
|
{ task = "//packages/plugin-core:build" },
|
|
{ task = ":test-medium --run" },
|
|
]
|
|
|
|
[tasks.checklist]
|
|
run = [
|
|
{ task = ":ci-unit" },
|
|
{ task = ":ci-medium" },
|
|
{ task = ":migrations", args = [
|
|
"verify-order",
|
|
] },
|
|
]
|