{
  "name": "fourdst-bundle-manager",
  "version": "1.0.0",
  "description": "Electron app for managing fbundle archives",
  "main": "main-refactored.js",
  "scripts": {
    "start": "electron .",
    "generate-icons": "node generate-icons.js",
    "validate-deps": "node validate-dependencies.js",
    "check-runtime": "node check-runtime-deps.js",
    "refresh-icons": "node refresh-macos-icons.js",
    "prebuild": "node generate-icons.js && node build-backend.js && node validate-dependencies.js",
    "build": "electron-builder",
    "prepack": "node generate-icons.js && node build-backend.js && node validate-dependencies.js",
    "pack": "electron-builder --dir",
    "postbuild": "node validate-dependencies.js",
    "clean": "rm -rf dist build node_modules/.cache icons temp-icons"
  },
  "repository": {
    "type": "git",
    "url": "https://github.com/tboudreaux/fourdst"
  },
  "keywords": [
    "Electron",
    "fbundle",
    "4DSTAR"
  ],
  "author": "4DSTAR Team",
  "license": "MIT",
  "devDependencies": {
    "electron": "^31.0.2",
    "adm-zip": "^0.5.14",
    "electron-builder": "^24.0.0"
  },
  "dependencies": {
    "fs-extra": "^11.0.0",
    "js-yaml": "^4.1.0",
    "adm-zip": "^0.5.14",
    "@electron/remote": "^2.0.0",
    "python-shell": "^5.0.0",
    "plotly.js-dist": "^2.26.0",
    "electron-squirrel-startup": "^1.0.1"
  },
  "build": {
    "appId": "com.fourdst.bundlemanager",
    "productName": "4DSTAR Bundle Manager",
    "directories": {
      "output": "dist"
    },
    "icon": "icons/app-icon.icns",
    "files": [
      "**/*",
      "node_modules/**/*",
      "!node_modules/electron/**/*",
      "!node_modules/electron-builder/**/*",
      "!node_modules/.cache/**/*",
      "!**/*.map",
      "!**/test/**/*",
      "!**/tests/**/*",
      "!**/*.test.js",
      "!**/*.spec.js",
      "!temp-icons/**/*"
    ],
    "fileAssociations": [
      {
        "ext": "fbundle",
        "name": "4DSTAR Bundle File",
        "description": "4DSTAR Bundle Archive",
        "icon": "icons/fbundle-icon.icns",
        "role": "Editor"
      },
      {
        "ext": "opat",
        "name": "OPAT Data File", 
        "description": "Opacity Project for Asteroseismology and Tidal Evolution Data File",
        "icon": "icons/opat-icon.icns",
        "role": "Viewer"
      }
    ],
    "extraResources": [
      {
        "from": "../build/electron/dist/fourdst-backend/",
        "to": "backend/",
        "filter": ["**/*"]
      }
    ],
    "asarUnpack": [
      "node_modules/plotly.js-dist/**/*",
      "resources/backend/**/*"
    ],
    "mac": {
      "category": "public.app-category.developer-tools",
      "target": [
        {
          "target": "dmg",
          "arch": ["x64", "arm64"]
        },
        {
          "target": "pkg",
          "arch": ["x64", "arm64"]
        },
        {
          "target": "zip", 
          "arch": ["x64", "arm64"]
        }
      ],
      "hardenedRuntime": true,
      "gatekeeperAssess": false,
      "entitlements": "entitlements.mac.plist",
      "entitlementsInherit": "entitlements.mac.plist",
      "extendInfo": {
        "CFBundleDocumentTypes": [
          {
            "CFBundleTypeName": "4DSTAR Bundle File",
            "CFBundleTypeDescription": "4DSTAR Bundle Archive",
            "CFBundleTypeRole": "Editor",
            "CFBundleTypeExtensions": ["fbundle"],
            "CFBundleTypeIconFile": "fbundle-icon.icns",
            "LSHandlerRank": "Owner",
            "LSItemContentTypes": ["com.fourdst.fbundle"]
          },
          {
            "CFBundleTypeName": "OPAT Data File",
            "CFBundleTypeDescription": "Opacity Project for Asteroseismology and Tidal Evolution Data File", 
            "CFBundleTypeRole": "Viewer",
            "CFBundleTypeExtensions": ["opat"],
            "CFBundleTypeIconFile": "opat-icon.icns",
            "LSHandlerRank": "Owner",
            "LSItemContentTypes": ["com.fourdst.opat"]
          }
        ],
        "UTExportedTypeDeclarations": [
          {
            "UTTypeIdentifier": "com.fourdst.fbundle",
            "UTTypeDescription": "4DSTAR Bundle Archive",
            "UTTypeConformsTo": ["public.data", "public.archive"],
            "UTTypeTagSpecification": {
              "public.filename-extension": ["fbundle"],
              "public.mime-type": ["application/x-fourdst-bundle"]
            }
          },
          {
            "UTTypeIdentifier": "com.fourdst.opat",
            "UTTypeDescription": "OPAT Data File",
            "UTTypeConformsTo": ["public.data"],
            "UTTypeTagSpecification": {
              "public.filename-extension": ["opat"],
              "public.mime-type": ["application/x-opat-data"]
            }
          }
        ]
      }
    },
    "pkg": {
      "scripts": "installer-scripts",
      "welcome": "installer-resources/welcome.html",
      "conclusion": "installer-resources/conclusion.html",
      "allowAnywhere": false,
      "allowCurrentUserHome": false,
      "allowRootDirectory": false,
      "identity": null,
      "installLocation": "/Applications",
      "mustClose": [
        "com.fourdst.bundlemanager"
      ]
    },
    "linux": {
      "target": [
        "AppImage",
        "deb",
        "rpm"
      ],
      "category": "Development"
    },
    "nsis": {
      "oneClick": false,
      "allowToChangeInstallationDirectory": true
    }
  }
}
