Skip to content

High performance self-hosted photo and video management solution.

1.8 KB
Raw Blame
[tasks.install]
run = "pnpm install --filter immich --frozen-lockfile"

[tasks.build]
env._.path = "./node_modules/.bin"
run = "nest build"

[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",
  ] },
]