{
  "name": "api",
  "$schema": "../../node_modules/nx/schemas/project-schema.json",
  "root": "apps/api",
  "sourceRoot": "apps/api",
  "projectType": "application",
  "targets": {
    "dev": {
      "executor": "nx:run-commands",
      "options": {
        "cwd": "apps/api",
        "command": "GO_WATCH_PRESTART='go run ./cmd/migrate' node ../../scripts/go-watch.mjs -- go run ./cmd/gateway"
      }
    },
    "migrate": {
      "executor": "nx:run-commands",
      "options": {
        "cwd": "apps/api",
        "command": "go run ./cmd/migrate"
      }
    },
    "openapi": {
      "executor": "nx:run-commands",
      "outputs": ["{projectRoot}/docs/swagger.json", "{projectRoot}/docs/swagger.yaml"],
      "options": {
        "cwd": "apps/api",
        "command": "go run github.com/swaggo/swag/cmd/swag@v1.16.4 init --parseInternal -d ./cmd/gateway,./internal/httpapi,./internal/store,./internal/auth,./internal/identity,./internal/runner -g main.go -o docs --outputTypes json,yaml"
      }
    },
    "test": {
      "executor": "nx:run-commands",
      "outputs": ["{workspaceRoot}/coverage/apps/api"],
      "options": {
        "cwd": "apps/api",
        "command": "go test ./..."
      }
    },
    "build": {
      "executor": "nx:run-commands",
      "outputs": ["{workspaceRoot}/dist/apps/api"],
      "options": {
        "cwd": "apps/api",
        "command": "go build -o ../../dist/apps/api/easyai-ai-gateway ./cmd/gateway"
      }
    }
  }
}
