{
  "name": "factoriomod-debug",
  "displayName": "Factorio Modding Tool Kit",
  "version": "2.1.9",
  "publisher": "justarandomgeek",
  "description": "Debug Tools for developing Factorio Mods",
  "author": {
    "name": "justarandomgeek",
    "email": "justarandomgeek@live.com"
  },
  "license": "MIT",
  "keywords": [
    "multi-root ready"
  ],
  "engines": {
    "vscode": "^1.120.0",
    "node": ">=22.7.0"
  },
  "icon": "images/factoriomod-debug-icon.png",
  "categories": [
    "Debuggers",
    "Programming Languages",
    "Linters"
  ],
  "repository": {
    "type": "git",
    "url": "git+https://github.com/justarandomgeek/vscode-factoriomod-debug.git"
  },
  "bugs": {
    "url": "https://github.com/justarandomgeek/vscode-factoriomod-debug/issues"
  },
  "scripts": {
    "lint": "eslint . --ext ts --flag unstable_native_nodejs_ts_config",
    "typecheck": "tsc -p tsconfig.json --noEmit",
    "typecheck-watch": "tsc -p tsconfig.json --noEmit --watch",
    "esbuild": "node ./build.ts",
    "watch": "npm run esbuild -- --watch",
    "stats": "esbuild-visualizer --metadata ./out/meta.json --filename ./out/stats.html",
    "vscode:prepublish": "rimraf dist && npm run esbuild -- --minify --meta && npm run stats",
    "prepack": "vsce pack",
    "test": "c8 node --test ./test/*.spec.ts"
  },
  "devDependencies": {
    "@inquirer/input": "^5.1.2",
    "@inquirer/password": "^5.1.1",
    "@stylistic/eslint-plugin": "^5.10.0",
    "@types/archiver": "^8.0.0",
    "@types/dateformat": "^5.0.3",
    "@types/ini": "^4.1.1",
    "@types/node": "^26.2.0",
    "@types/readdir-glob": "^1.1.5",
    "@types/semver": "^7.8.0",
    "@types/vscode": "^1.120.0",
    "@types/vscode-webview": "^1.57.5",
    "@vscode/codicons": "^0.0.45",
    "@vscode/vsce": "^3.9.2",
    "@vscode/webview-ui-toolkit": "^1.4.0",
    "archiver": "^8.0.0",
    "c8": "^12.0.0",
    "commander": "^15.0.0",
    "dateformat": "^5.0.3",
    "dotize": "^0.6.0",
    "esbuild": "^0.28.2",
    "esbuild-compress": "^2.2.0",
    "esbuild-plugin-import-glob": "^0.1.1",
    "esbuild-visualizer": "^0.7.0",
    "eslint": "^10.8.1",
    "globals": "^17.11.0",
    "ini": "^7.0.0",
    "jsonc-parser": "^3.3.1",
    "mime": "^4.1.0",
    "patch-package": "^8.0.1",
    "readdir-glob": "^3.0.0",
    "remark": "^15.0.1",
    "rimraf": "^6.1.3",
    "semver": "^7.8.5",
    "typescript": "^6.0.3",
    "typescript-eslint": "^8.67.0",
    "vscode-languageclient": "^10.1.0",
    "vscode-languageserver": "^10.1.0",
    "vscode-languageserver-textdocument": "^1.0.12",
    "vscode-uri": "^3.1.0",
    "yoctocolors": "^2.2.0"
  },
  "type": "module",
  "main": "dist/fmtk-vscode.js",
  "bin": {
    "fmtk": "dist/fmtk-cli.js",
    "factoriomod-debug": "dist/fmtk-cli.js"
  },
  "activationEvents": [
    "onDebug",
    "onCommand:workbench.action.tasks.runTask",
    "workspaceContains:**/changelog.txt",
    "workspaceContains:**/info.json",
    "workspaceContains:**/control.lua",
    "workspaceContains:**/mod-list.json",
    "workspaceContains:**/mod-settings.dat"
  ],
  "contributes": {
    "configuration": [
      {
        "title": "Factorio",
        "properties": {
          "factorio.package.preparingCommitMessage": {
            "type": "string",
            "description": "Commit message for preparing release. Use `$VERSION` or `$MODNAME` to insert the version number or name.",
            "default": "preparing release of version $VERSION",
            "pattern": "\\$VERSION",
            "editPresentation": "multilineText"
          },
          "factorio.package.movedToCommitMessage": {
            "type": "string",
            "description": "Commit message for raising version after release. Use `$VERSION` or `$MODNAME` to insert the version number or name.",
            "default": "moved to version $VERSION",
            "pattern": "\\$VERSION",
            "editPresentation": "multilineText"
          },
          "factorio.package.autoCommitAuthor": {
            "type": "string",
            "description": "Author for automatically created commits",
            "default": "compilatron <compilatron@justarandomgeek.com>"
          },
          "factorio.package.tagName": {
            "type": "string",
            "description": "Template for release tag names. Use `$VERSION` or `$MODNAME` to insert the version number or name.",
            "default": "$VERSION",
            "pattern": "\\$VERSION"
          },
          "factorio.package.defaultPublishBranch": {
            "deprecationMessage": "This setting is no longer used. If not set in `info.json`, the value of git config init.defaultBranch will be used."
          },
          "factorio.package.tagMessage": {
            "type": "string",
            "description": "Message for version tags. Use `$VERSION` or `$MODNAME` to insert the version number or name.",
            "editPresentation": "multilineText"
          },
          "factorio.package.zipLocation": {
            "type": "string",
            "description": "Location to place mod zip packages.",
            "enumDescriptions": [
              "Inside Mod (sibling of info.json)",
              "Outside Mod (one level up from info.json)"
            ],
            "enum": [
              "inside",
              "outside"
            ],
            "default": "inside"
          },
          "factorio.versions": {
            "type": "array",
            "description": "Factorio installations configured for use with debugging and profiling.",
            "items": {
              "type": "object",
              "required": [
                "name"
              ],
              "anyOf": [
                {
                  "required": [
                    "onlineDocs"
                  ]
                },
                {
                  "required": [
                    "factorioPath"
                  ],
                  "properties": {
                    "configPath": {
                      "type": "string",
                      "description": "Path to Factorio config.ini file."
                    },
                    "docsPath": {
                      "type": "string",
                      "description": "Path to runtime-api.json, must be relative to factorioPath."
                    },
                    "protosPath": {
                      "type": "string",
                      "description": "Path to prototype-api.json, must be relative to factorioPath."
                    }
                  }
                }
              ],
              "properties": {
                "name": {
                  "type": "string",
                  "description": "Display name for this installation"
                },
                "active": {
                  "deprecationMessage": "Active status is no longer marked in settings"
                },
                "factorioPath": {
                  "type": "string",
                  "description": "Path to Factorio binary file.",
                  "examples": [
                    "C:/Program Files (x86)/Steam/steamapps/common/Factorio/bin/x64/factorio.exe",
                    "C:/Program Files/Factorio/bin/x64/factorio.exe",
                    "~/Library/Application Support/Steam/steamapps/common/Factorio/factorio.app/Contents/MacOS/factorio",
                    "/Applications/factorio.app/Contents/MacOS/factorio",
                    "~/.factorio/bin/x64/factorio",
                    "${userHome}/.factorio/bin/x64/factorio",
                    "${workspaceFolder}/factorio/bin/x64/factorio"
                  ]
                },
                "onlineDocs": {
                  "type": [
                    "boolean",
                    "string"
                  ],
                  "description": "Use online docs, version id or `true` for `latest`"
                }
              }
            }
          },
          "factorio.docs.generateDocs": {
            "type": "boolean",
            "description": "Generate docs files when selecting a Factorio version.",
            "default": true
          },
          "factorio.docs.usePrototypeDumps": {
            "type": "boolean",
            "description": "EXPERIMENTAL: Use prototype dumps `script-output/mod-settings-dump.json` and `script-output/data-raw-dump.json` if available when generating docs",
            "default": false
          },
          "factorio.docs.docLinksBaseUri": {
            "description": "Base URI for doc links",
            "type": "string",
            "format": "uri"
          },
          "factorio.workspace.manageLibraryDataLinks": {
            "type": [
              "boolean",
              "null"
            ],
            "default": null,
            "description": "Automatically manage /data link in `\"Lua.workspace.library\"`. Setting to false will remove the link if present. Default off for LuaLS, on for EmmyLua."
          },
          "factorio.debug.env": {
            "type": "object",
            "description": "Environment variables to pass to Factorio",
            "additionalProperties": {
              "type": "string"
            }
          },
          "factorio.debug.shim": {
            "description": "debug shim to launch instead of native DAP",
            "type": "string",
            "examples": [
              "vsjitdebugger.exe"
            ]
          },
          "factorio.tasks.execArgvOptions": {
            "description": "Options to modify existing `execArgv` when forking",
            "type": "array",
            "default": [],
            "uniqueItems": true,
            "items": {
              "enum": [
                "clear",
                "stripjsflags",
                "stripinspect"
              ]
            }
          },
          "factorio.tasks.execArgvExtras": {
            "description": "Extra options to add to `execArgv` when forking",
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        }
      }
    ],
    "taskDefinitions": [
      {
        "type": "factorio",
        "required": [
          "command"
        ],
        "properties": {
          "command": {
            "type": "string",
            "enum": [
              "datestamp",
              "package",
              "version",
              "upload",
              "details",
              "publish",
              "run",
              "adjustMods"
            ]
          },
          "modname": {
            "type": "string"
          },
          "script": {
            "type": "string"
          },
          "scriptArgs": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "adjustMods": {
            "type": "object",
            "additionalProperties": {
              "oneOf": [
                {
                  "type": "boolean"
                },
                {
                  "type": "string",
                  "pattern": "(\\d+\\.){2}\\d+"
                }
              ]
            }
          },
          "modsPath": {
            "type": "string"
          },
          "disableExtraMods": {
            "type": "boolean"
          },
          "allowDisableBaseMod": {
            "type": "boolean"
          }
        }
      }
    ],
    "commands": [
      {
        "command": "factorio.openchangelog",
        "category": "Factorio",
        "title": "Open Changelog",
        "icon": "$(versions)"
      },
      {
        "command": "factorio.datestamp",
        "category": "Factorio",
        "title": "Datestamp Changelog",
        "icon": "$(calendar)"
      },
      {
        "command": "factorio.package",
        "category": "Factorio",
        "title": "Package Mod",
        "icon": "$(package)"
      },
      {
        "command": "factorio.version",
        "category": "Factorio",
        "title": "Increment Version",
        "icon": "$(tag)"
      },
      {
        "command": "factorio.upload",
        "category": "Factorio",
        "title": "Upload to Portal",
        "icon": "$(cloud-upload)"
      },
      {
        "command": "factorio.details",
        "category": "Factorio",
        "title": "Sync details to Portal"
      },
      {
        "command": "factorio.publish",
        "category": "Factorio",
        "title": "Publish Mod",
        "icon": "$(repo-push)"
      },
      {
        "command": "factorio.clearApiKey",
        "category": "Factorio",
        "title": "Clear API Key"
      },
      {
        "command": "factorio.setApiKey",
        "category": "Factorio",
        "title": "Set API Key"
      },
      {
        "command": "factorio.selectVersion",
        "category": "Factorio",
        "title": "Select Version"
      },
      {
        "command": "factorio.checkConfig",
        "category": "Factorio",
        "title": "Check Config"
      },
      {
        "command": "factorio.disablePrototypeCache",
        "category": "Factorio",
        "title": "Disable Prototype Cache"
      },
      {
        "command": "factorio.disableMouseAutoCapture",
        "category": "Factorio",
        "title": "Disable Mouse Auto Capture"
      },
      {
        "command": "factorio.startProfile",
        "category": "Factorio",
        "title": "Start Profile",
        "icon": "$(record)",
        "enablement": "!factorio.debugProfileStarting"
      },
      {
        "command": "factorio.stopProfile",
        "category": "Factorio",
        "title": "Stop Profile",
        "icon": "$(stop-circle)",
        "enablement": "!factorio.debugProfileStopping"
      }
    ],
    "views": {
      "scm": [
        {
          "id": "factoriomods",
          "name": "Factorio Mod Packages",
          "icon": "images/viewicon.svg",
          "contextualTitle": "Factorio Mod Packages"
        }
      ]
    },
    "menus": {
      "commandPalette": [
        {
          "command": "factorio.openchangelog",
          "when": "false"
        },
        {
          "command": "factorio.datestamp",
          "when": "false"
        },
        {
          "command": "factorio.package",
          "when": "false"
        },
        {
          "command": "factorio.version",
          "when": "false"
        },
        {
          "command": "factorio.upload",
          "when": "false"
        },
        {
          "command": "factorio.details",
          "when": "false"
        },
        {
          "command": "factorio.publish",
          "when": "false"
        }
      ],
      "view/item/context": [
        {
          "command": "factorio.openchangelog",
          "when": "view == factoriomods && viewItem =~ /haschangelog/",
          "group": "1_info@1"
        },
        {
          "command": "factorio.datestamp",
          "when": "view == factoriomods && viewItem =~ /latest/ && viewItem =~ /haschangelog/",
          "group": "2_basic@2"
        },
        {
          "command": "factorio.package",
          "when": "view == factoriomods && viewItem =~ /latest/",
          "group": "2_basic@3"
        },
        {
          "command": "factorio.version",
          "when": "view == factoriomods && viewItem =~ /latest/",
          "group": "2_basic@4"
        },
        {
          "command": "factorio.upload",
          "when": "view == factoriomods && viewItem =~ /latest/",
          "group": "2_basic@5"
        },
        {
          "command": "factorio.details",
          "when": "view == factoriomods && viewItem =~ /latest/",
          "group": "2_basic@6"
        },
        {
          "command": "factorio.publish",
          "when": "view == factoriomods && viewItem =~ /latest/",
          "group": "3_publish@1"
        },
        {
          "command": "factorio.openchangelog",
          "when": "view == factoriomods && viewItem =~ /haschangelog/",
          "group": "inline@1"
        },
        {
          "command": "factorio.datestamp",
          "when": "view == factoriomods && viewItem =~ /latest/ && viewItem =~ /haschangelog/",
          "group": "inline@2"
        },
        {
          "command": "factorio.package",
          "when": "view == factoriomods && viewItem =~ /latest/",
          "group": "inline@3"
        },
        {
          "command": "factorio.version",
          "when": "view == factoriomods && viewItem =~ /latest/",
          "group": "inline@4"
        },
        {
          "command": "factorio.upload",
          "when": "view == factoriomods && viewItem =~ /latest/",
          "group": "inline@5"
        },
        {
          "command": "factorio.publish",
          "when": "view == factoriomods && viewItem =~ /latest/",
          "group": "inline@6"
        }
      ],
      "debug/toolBar": [
        {
          "command": "factorio.startProfile",
          "group": "navigation",
          "when": "debugType == 'factorio' && !factorio.debugProfileIsRunning"
        },
        {
          "command": "factorio.stopProfile",
          "group": "navigation",
          "when": "debugType == 'factorio' && factorio.debugProfileIsRunning"
        }
      ]
    },
    "languages": [
      {
        "id": "factorio-locale",
        "aliases": [
          "Factorio Locale",
          "factorio-locale"
        ],
        "filenamePatterns": [
          "**/locale/*/*.cfg"
        ],
        "configuration": "./language/factorio-locale.language-configuration.json"
      },
      {
        "id": "factorio-changelog",
        "aliases": [
          "Factorio Changelog",
          "factorio-changelog"
        ],
        "filenames": [
          "changelog.txt"
        ],
        "configuration": "./language/factorio-changelog.language-configuration.json"
      }
    ],
    "grammars": [
      {
        "language": "factorio-locale",
        "scopeName": "source.factorio-locale",
        "path": "./language/factorio-locale.tmLanguage.json"
      },
      {
        "language": "factorio-changelog",
        "scopeName": "source.factorio-changelog",
        "path": "./language/factorio-changelog.tmLanguage.json"
      }
    ],
    "snippets": [
      {
        "language": "factorio-changelog",
        "path": "./language/factorio-changelog.json"
      },
      {
        "language": "factorio-locale",
        "path": "./language/factorio-locale.json"
      }
    ],
    "configurationDefaults": {
      "[factorio-changelog]": {
        "editor.detectIndentation": false,
        "editor.insertSpaces": true,
        "editor.tabSize": 2,
        "gitlens.codeLens.symbolScopes": [
          "Namespace",
          "!Class"
        ]
      },
      "[factorio-locale]": {
        "editor.wordWrap": "on"
      }
    },
    "jsonValidation": [
      {
        "fileMatch": [
          "map-gen-settings.json",
          "map-gen-settings.*.json",
          "*.map-gen-settings.json",
          "map-gen-settings.example.json"
        ],
        "url": "./schema/mapgen.json"
      },
      {
        "fileMatch": [
          "map-settings.json",
          "map-settings.*.json",
          "*.map-settings.json",
          "map-settings.example.json"
        ],
        "url": "./schema/mapsettings.json"
      },
      {
        "fileMatch": [
          "server-settings.json",
          "server-settings.*.json",
          "*.server-settings.json",
          "server-settings.example.json"
        ],
        "url": "./schema/serversettings.json"
      },
      {
        "fileMatch": [
          "info.json",
          "!locale/*/info.json",
          "!data/**/info.json",
          "!tests/**/info.json",
          "!temp/**/info.json",
          "!campaigns/*/info.json",
          "!scenarios/*/info.json",
          "!saves/**/info.json",
          "!blueprint/info.json"
        ],
        "url": "./schema/modinfo.json"
      },
      {
        "fileMatch": [
          "data/**/info.json",
          "tests/**/info.json",
          "!locale/*/info.json",
          "!campaigns/*/info.json",
          "!scenarios/*/info.json",
          "!saves/**/info.json",
          "!blueprint/info.json"
        ],
        "url": "./schema/datainfo.json"
      },
      {
        "fileMatch": "locale/*/info.json",
        "url": "./schema/localeinfo.json"
      },
      {
        "fileMatch": "scenarios/*/description.json",
        "url": "./schema/scenario.json"
      },
      {
        "fileMatch": "campaigns/*/description.json",
        "url": "./schema/campaign.json"
      },
      {
        "fileMatch": "migrations/*.json",
        "url": "./schema/migration.json"
      }
    ],
    "breakpoints": [
      {
        "language": "lua"
      }
    ],
    "debuggers": [
      {
        "type": "factorio",
        "label": "Factorio Debug Adapter",
        "program": "factorio",
        "args": [
          "--dap"
        ],
        "languages": [
          "lua"
        ],
        "configurationAttributes": {
          "launch": {
            "properties": {
              "tags": {
                "type": "object",
                "description": "Extra debug session tags, readable under `debugadapter.tags` during this session."
              },
              "factorioArgs": {
                "type": "array",
                "items": {
                  "type": "string",
                  "examples": [
                    "--load-scenario",
                    "--disable-migration-window"
                  ]
                },
                "default": [],
                "description": "Extra command line arguments to pass to Factorio"
              },
              "followSymlinks": {
                "type": "boolean",
                "default": true,
                "description": "Follow symlinks when emitting source locations"
              },
              "hookDebugConsole": {
                "type": "boolean",
                "default": false,
                "description": "Enable catching errors and breakpoints/stepping in code called from the Debug Console (Evaluate context='repl')"
              },
              "trace": {
                "type": "boolean",
                "default": false,
                "description": "Trace DAP messages to a `dap-trace.log`"
              }
            }
          }
        },
        "initialConfigurations": [
          {
            "type": "factorio",
            "request": "launch",
            "name": "Factorio Debug Adapter"
          }
        ],
        "configurationSnippets": [
          {
            "type": "factorio",
            "request": "launch",
            "name": "Factorio Debug Adapter",
            "factorioArgs": [],
            "tags": {}
          }
        ]
      },
      {
        "type": "factoriomod",
        "deprecated": "Please upgrade to `factorio` launch type"
      }
    ],
    "customEditors": [
      {
        "viewType": "fmtk.modsettings",
        "displayName": "Mod Settings",
        "priority": "default",
        "selector": [
          {
            "filenamePattern": "*mod-settings*.dat"
          }
        ]
      },
      {
        "viewType": "fmtk.scriptdat",
        "displayName": "Script.Dat",
        "priority": "default",
        "selector": [
          {
            "filenamePattern": "*script*.dat"
          }
        ]
      }
    ]
  }
}
