{
  "name": "karma-edm-vscode",
  "displayName": "Karma EDM",
  "description": "Author, preflight and publish Karma email templates without leaving the editor.",
  "version": "0.1.0",
  "private": true,
  "publisher": "karma-group",
  "engines": {
    "vscode": "^1.85.0"
  },
  "categories": [
    "Other"
  ],
  "activationEvents": [
    "onLanguage:html",
    "onView:karmaEdmExplorer"
  ],
  "main": "./dist/extension.js",
  "contributes": {
    "commands": [
      {
        "command": "karmaEdm.preflight",
        "title": "Karma EDM: Preflight this template",
        "icon": "$(checklist)"
      },
      {
        "command": "karmaEdm.push",
        "title": "Karma EDM: Push this template",
        "icon": "$(cloud-upload)"
      },
      {
        "command": "karmaEdm.pull",
        "title": "Karma EDM: Pull a template into the workspace"
      },
      {
        "command": "karmaEdm.signIn",
        "title": "Karma EDM: Sign in (API key or session)"
      },
      {
        "command": "karmaEdm.signOut",
        "title": "Karma EDM: Sign out"
      },
      {
        "command": "karmaEdm.refreshTree",
        "title": "Karma EDM: Refresh",
        "icon": "$(refresh)"
      },
      {
        "command": "karmaEdm.pullFolder",
        "title": "Karma EDM: Pull folder into workspace",
        "icon": "$(cloud-download)"
      },
      {
        "command": "karmaEdm.openTemplate",
        "title": "Karma EDM: Open template"
      },
      {
        "command": "karmaEdm.openAsset",
        "title": "Karma EDM: Preview image"
      },
      {
        "command": "karmaEdm.unlink",
        "title": "Karma EDM: Unlink this file from its template"
      },
      {
        "command": "karmaEdm.workflowStatus",
        "title": "Karma EDM: Change approval state",
        "icon": "$(git-branch)"
      },
      {
        "command": "karmaEdm.requestChanges",
        "title": "Karma EDM: Request changes at cursor",
        "icon": "$(comment)"
      },
      {
        "command": "karmaEdm.resolveChangeRequest",
        "title": "Karma EDM: Resolve a change request"
      }
    ],
    "menus": {
      "editor/title": [
        {
          "command": "karmaEdm.preflight",
          "when": "resourceExtname == .html",
          "group": "navigation"
        },
        {
          "command": "karmaEdm.push",
          "when": "resourceExtname == .html",
          "group": "navigation"
        },
        {
          "command": "karmaEdm.workflowStatus",
          "when": "resourceExtname == .html",
          "group": "navigation"
        },
        {
          "command": "karmaEdm.requestChanges",
          "when": "resourceExtname == .html",
          "group": "navigation"
        }
      ],
      "view/title": [
        {
          "command": "karmaEdm.refreshTree",
          "when": "view == karmaEdmExplorer",
          "group": "navigation"
        },
        {
          "command": "karmaEdm.pullFolder",
          "when": "view == karmaEdmExplorer",
          "group": "navigation"
        }
      ],
      "view/item/context": [
        {
          "command": "karmaEdm.pullFolder",
          "when": "view == karmaEdmExplorer && viewItem == karmaEdmFolder",
          "group": "inline"
        }
      ],
      "commandPalette": [
        {
          "command": "karmaEdm.openTemplate",
          "when": "false"
        },
        {
          "command": "karmaEdm.openAsset",
          "when": "false"
        }
      ],
      "editor/context": [
        {
          "command": "karmaEdm.requestChanges",
          "when": "resourceExtname == .html",
          "group": "karmaEdm@1"
        }
      ]
    },
    "configuration": {
      "title": "Karma EDM",
      "properties": {
        "karmaEdm.coreUrl": {
          "type": "string",
          "default": "http://127.0.0.1:9005",
          "description": "Base URL of console2 core, no trailing slash. Local dev default is the PORT from apps/core/.env (9005)."
        },
        "karmaEdm.preflightOnSave": {
          "type": "boolean",
          "default": true,
          "description": "Re-run preflight automatically when an .html file is saved."
        }
      }
    },
    "viewsContainers": {
      "activitybar": [
        {
          "id": "karmaEdm",
          "title": "Karma EDM",
          "icon": "media/icon.svg"
        }
      ]
    },
    "views": {
      "karmaEdm": [
        {
          "id": "karmaEdmExplorer",
          "name": "Templates",
          "contextualTitle": "Karma EDM"
        }
      ]
    }
  },
  "scripts": {
    "build": "esbuild src/extension.ts --bundle --outfile=dist/extension.js --external:vscode --format=cjs --platform=node --target=node18",
    "watch": "npm run build -- --sourcemap --watch",
    "package": "npx @vscode/vsce package --no-dependencies",
    "typecheck": "tsc --noEmit"
  },
  "devDependencies": {
    "@types/node": "^20.11.17",
    "@types/vscode": "^1.85.0",
    "esbuild": "^0.20.0",
    "typescript": "^5.4.0"
  }
}
