{
  "type": "object",
  "additionalProperties": false,
  "if": {
    "required": ["extends"]
  },
  "then": {
    "required": ["id"]
  },
  "else": {
    "required": ["id", "icon", "schemaVersion"]
  },
  "macIconComposerAppBuilderLibVersion": {},
  "properties": {
    "$schema": {
      "type": "string",
      "description": "To enable JSON validation and IntelliSense for your `todesktop.json` file in compatible code editors, your editor needs to know where the schema file is located. You can add a `$schema` property to the top of your `todesktop.json` file, pointing to a version of the schema. This can be a local path or a hosted URL.",
      "examples": [
        "https://unpkg.com/@todesktop/cli@1.12.5/schemas/schema.json",
        "./node_modules/@todesktop/cli/schemas/schema.json"
      ]
    },
    "appBuilderLibVersion": {
      "$ref": "#/definitions/appBuilderLibVersionProperty"
    },
    "appId": { "$ref": "#/definitions/appIdProperty" },
    "appFiles": { "$ref": "#/definitions/appFilesProperty" },
    "appProtocolScheme": { "$ref": "#/definitions/appProtocolSchemeProperty" },
    "appPath": { "$ref": "#/definitions/appPathProperty" },
    "bundleWorkspacePackages": {
      "type": "object",
      "additionalProperties": false,
      "description": "Useful when your application is a monorepo (e.g. pnpm workspaces). You can configure whether the CLI bundles workspace packages alongside the app upload. When enabled, workspace dependencies referenced via `workspace:` or local `file:` specifiers are bundled with your application upload and dependency ranges are rewritten to `file:` paths so they install deterministically on the build servers.",
      "examples": ["{\"enabled\":true}"],
      "default": { "enabled": false },
      "properties": {
        "enabled": {
          "type": "boolean",
          "default": false,
          "description": "Enable automatic bundling of workspace packages for this project."
        }
      }
    },
    "bytenode": { "$ref": "#/definitions/bytenodeConfigProperty" },
    "fuses": { "$ref": "#/definitions/fusesConfigProperty" },
    "asar": { "$ref": "#/definitions/asarProperty" },
    "asarUnpack": { "$ref": "#/definitions/asarUnpackProperty" },
    "buildVersion": { "$ref": "#/definitions/buildVersionProperty" },
    "copyright": { "$ref": "#/definitions/copyrightProperty" },
    "electronMirror": { "$ref": "#/definitions/electronMirrorProperty" },
    "electronVersion": { "$ref": "#/definitions/electronVersionProperty" },
    "extends": {
      "type": "string",
      "minLength": 1,
      "description": "This is the path to a base configuration file (`.json` or `.js`). This is especially useful for configuration sharing between different environments (e.g., staging and production). The base configuration file can be a relative path from the project root or an absolute path.",
      "examples": ["./todesktop.base.json", "./todesktop.base.js"],
      "default": null
    },
    "extraContentFiles": { "$ref": "#/definitions/extraContentFilesProperty" },
    "extraResources": { "$ref": "#/definitions/extraResourcesProperty" },
    "fileAssociations": { "$ref": "#/definitions/fileAssociationsProperty" },
    "updateUrlBase": { "$ref": "#/definitions/updateUrlBaseProperty" },
    "filesForDistribution": {
      "$ref": "#/definitions/filesForDistributionProperty"
    },
    "icon": {
      "type": "string",
      "description": "The path to your application's desktop icon. It must be an ICNS or PNG.",
      "examples": ["./appIcon.png"],
      "file": {
        "extensions": ["icns", "png"],
        "mustBeFile": true
      },
      "minLength": 3
    },
    "linux": { "$ref": "#/definitions/linuxConfigProperty" },
    "id": {
      "type": "string",
      "minLength": 1,
      "description": "Your ToDesktop application ID. This is used to identify your app. This would have been generated when you first created your ToDesktop application via the web interface.",
      "examples": ["2005223bd1nqpl7"]
    },
    "includeSubNodeModules": {
      "$ref": "#/definitions/includeSubNodeModulesProperty"
    },
    "mac": { "$ref": "#/definitions/macConfigProperty" },
    "mas": { "$ref": "#/definitions/masConfigProperty" },
    "dmg": { "$ref": "#/definitions/dmgConfigProperty" },
    "nodeVersion": { "$ref": "#/definitions/nodeVersionProperty" },
    "npmVersion": { "$ref": "#/definitions/npmVersionProperty" },
    "pnpmVersion": { "$ref": "#/definitions/pnpmVersionProperty" },
    "bunVersion": { "$ref": "#/definitions/bunVersionProperty" },
    "packageJson": { "$ref": "#/definitions/packageJsonProperty" },
    "packageManager": { "$ref": "#/definitions/packageManagerProperty" },
    "rebuildLibrary": { "$ref": "#/definitions/rebuildLibraryProperty" },
    "schemaVersion": {
      "type": "number",
      "minimum": 1,
      "maximum": 1,
      "description": "This is the `todesktop.json` schema version. This must be `1`.",
      "examples": [1]
    },
    "snap": { "$ref": "#/definitions/snapConfigProperty" },
    "uploadSizeLimit": { "$ref": "#/definitions/uploadSizeLimitProperty" },
    "windows": { "$ref": "#/definitions/windowsConfigProperty" },
    "platformOverrides": {
      "type": "object",
      "additionalProperties": false,
      "description": "This option allows you to specify platform-specific configurations for Windows, macOS, and Linux builds. Most top-level configuration fields available in `todesktop.json` can be overridden within the `windows`, `mac`, or `linux` objects under `platformOverrides`.",
      "default": {},
      "properties": {
        "windows": {
          "$ref": "#/definitions/platformOverridableProperties"
        },
        "mac": {
          "$ref": "#/definitions/platformOverridableProperties"
        },
        "linux": {
          "$ref": "#/definitions/platformOverridableProperties"
        }
      }
    }
  },
  "definitions": {
    "appBuilderLibVersionProperty": {
      "type": "string",
      "validSemverOrLatest": {},
      "minLength": 1,
      "description": "The version of app-builder-lib that ToDesktop should use for building your app. This can be a specific version, a semantic version range, or \"latest\". This can be useful if you need to use a specific version that includes certain features or fixes.",
      "examples": ["22.14.13", "latest"]
    },
    "appIdProperty": {
      "type": "string",
      "minLength": 1,
      "description": "Your application ID. Omit this unless you know what you're doing. It's used as the [CFBundleIdentifier](https://developer.apple.com/library/ios/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html#//apple_ref/doc/uid/20001431-102070) for MacOS and as the [Application User Model ID](<https://msdn.microsoft.com/en-us/library/windows/desktop/dd378459(v=vs.85).aspx>) for Windows.",
      "examples": ["com.microsoft.word"],
      "default": "auto-generated"
    },
    "bytenodeConfigProperty": {
      "type": "object",
      "additionalProperties": false,
      "description": "Compile selected source files to .jsc using Bytenode during the build. Provide glob patterns relative to your appPath.",
      "default": { "enabled": false },
      "properties": {
        "enabled": {
          "type": "boolean",
          "default": false,
          "description": "Enable Bytenode compilation."
        },
        "files": {
          "type": "array",
          "items": { "type": "string", "minLength": 1 },
          "minItems": 1,
          "description": "Glob patterns relative to appPath for files to compile to Bytenode."
        }
      },
      "allOf": [
        {
          "if": {
            "properties": { "enabled": { "const": true } },
            "required": ["enabled"]
          },
          "then": { "required": ["files"] }
        }
      ]
    },
    "fusesConfigProperty": {
      "type": "object",
      "additionalProperties": false,
      "description": "Configure Electron Fuses to enable or disable certain Electron features at package time. Fuses are compile-time feature flags that cannot be changed at runtime, providing security benefits. See https://www.electronjs.org/docs/latest/tutorial/fuses for more information.",
      "properties": {
        "runAsNode": {
          "type": "boolean",
          "description": "Controls whether the ELECTRON_RUN_AS_NODE environment variable is respected. When disabled, the env variable will be ignored. Default: true (enabled)."
        },
        "enableCookieEncryption": {
          "type": "boolean",
          "description": "Controls whether the cookie store on disk is encrypted using OS-level cryptography. Default: false (disabled)."
        },
        "enableNodeOptionsEnvironmentVariable": {
          "type": "boolean",
          "description": "Controls whether the NODE_OPTIONS environment variable is respected. When disabled, the env variable will be ignored. Default: true (enabled)."
        },
        "enableNodeCliInspectArguments": {
          "type": "boolean",
          "description": "Controls whether command line arguments like --inspect are respected. When disabled, these arguments will be ignored. Default: true (enabled)."
        },
        "enableEmbeddedAsarIntegrityValidation": {
          "type": "boolean",
          "description": "Controls whether Electron validates the integrity of the app.asar file. Requires the integrity block in the asar header. Default: false (disabled)."
        },
        "onlyLoadAppFromAsar": {
          "type": "boolean",
          "description": "Controls whether Electron only loads the app from an asar archive. When enabled, Electron will not search for loose files. Default: false (disabled)."
        },
        "loadBrowserProcessSpecificV8Snapshot": {
          "type": "boolean",
          "description": "Controls whether the browser process uses a V8 snapshot file located at browser_v8_context_snapshot.bin. Default: false (disabled)."
        },
        "grantFileProtocolExtraPrivileges": {
          "type": "boolean",
          "description": "Controls whether pages loaded via file:// protocol get extra privileges. When disabled, file:// pages are more restricted. Requires Electron 29+. Default: true (enabled)."
        }
      }
    },
    "appFilesProperty": {
      "type": "array",
      "description": "This option allows you to decide which files get uploaded to be built on the ToDesktop servers. By default, all files in your app path are included in your app, except for `node_modules` and `.git`. Dependencies are installed on our build servers as there could be platform-specific postinstall steps.",
      "default": ["**"],
      "examples": ["[\"dist/**\", \"!static/**\"]"],
      "items": {
        "type": "string",
        "minLength": 1
      },
      "minItems": 1
    },
    "appProtocolSchemeProperty": {
      "oneOf": [
        {
          "type": "string",
          "minLength": 1
        },
        {
          "type": "array",
          "items": {
            "type": "string",
            "minLength": 1
          },
          "minItems": 1
        }
      ],
      "description": "If you want to register a protocol for your application (e.g. `example://`) and or support deeplinking, you will need to use this option. If your desired protocol is `example://`, you would set `\"appProtocolScheme\": \"example\"`. NOTE: these features also require additional application logic.",
      "examples": ["word", "[\"word\", \"excel\"]"],
      "default": "no protocol scheme is registered"
    },
    "appPathProperty": {
      "type": "string",
      "description": "This is the path to your Electron application directory. Omit this unless your project setup is complicated. This is the directory that the CLI uploads.",
      "default": ".",
      "examples": ["./dist"],
      "file": {
        "isOptional": true,
        "mustBeElectronApp": true
      }
    },
    "asarProperty": {
      "type": "boolean",
      "default": true,
      "description": "Whether to package your application's source code within an asar archive. You should only turn this off if you have a good reason to."
    },
    "asarUnpackProperty": {
      "oneOf": [
        {
          "type": "boolean"
        },
        {
          "type": "array",
          "items": {
            "type": "string",
            "minLength": 1
          },
          "minItems": 1
        }
      ],
      "description": "This option allows you to decide which files get unpacked from the asar archive. By default we unpack all native `*.node` files.",
      "default": ["**/*.node"]
    },
    "buildVersionProperty": {
      "type": "string",
      "minLength": 1,
      "description": "The build version. Maps to the CFBundleVersion on macOS, and FileVersion metadata property on Windows.",
      "default": "auto-generated from build id"
    },
    "copyrightProperty": {
      "type": "string",
      "minLength": 1,
      "description": "The human-readable copyright line for the app.",
      "examples": ["Copyright © 1995 Walt Disney"],
      "default": "The `package.json` [productName](#recommendations-for-app-packagejson) / `name`."
    },
    "electronMirrorProperty": {
      "type": "string",
      "format": "uri",
      "description": "The base URL of the mirror to download Electron from. This may be a mirror geographically closer to you or even your own mirror which contains custom Electron builds. The version downloaded is the Electron version specified in `devDependencies` in your app's `package.json`. Alternatively you can explicitly specify an `electronVersion` in `todesktop.json` as described below.",
      "examples": ["https://cdn.npm.taobao.org/dist/electron/"],
      "default": "Electron is downloaded from the main official source."
    },
    "electronVersionProperty": {
      "type": "string",
      "minLength": 1,
      "description": "The version of Electron to use. In most cases you should not specify an `electronVersion` property. Only specify this option if you wish to override the version that is specified in `package.json`.",
      "examples": ["12.0.7-beta.17"],
      "default": "Electron version specified in `devDependencies` in your app's `package.json`"
    },
    "extraContentFilesProperty": {
      "type": "array",
      "description": "This option allows you specify files to be copied into the application's content directory (`Contents` for MacOS, root directory for Linux and Windows).",
      "default": [],
      "items": {
        "type": "object",
        "required": ["from"],
        "additionalProperties": false,
        "properties": {
          "from": {
            "type": "string",
            "file": {}
          },
          "to": {
            "type": "string"
          }
        }
      }
    },
    "extraResourcesProperty": {
      "type": "array",
      "description": "This option allows you to specify files to be copied into the application's resources directory (`Contents/Resources` for MacOS, `resources` for Linux and Windows). It works just like the `extraContentFiles` option, except the files go to a different directory.",
      "default": [],
      "items": {
        "type": "object",
        "required": ["from"],
        "additionalProperties": false,
        "properties": {
          "from": {
            "type": "string",
            "file": {
              "from": "context.projectRoot"
            }
          },
          "to": {
            "type": "string"
          }
        }
      }
    },
    "fileAssociationsProperty": {
      "type": "array",
      "description": "Associate a file type with your Electron app.",
      "items": {
        "type": "object",
        "required": ["ext"],
        "additionalProperties": false,
        "properties": {
          "ext": {
            "oneOf": [
              {
                "type": "string",
                "minLength": 1
              },
              {
                "type": "array",
                "items": {
                  "type": "string",
                  "minLength": 1
                }
              }
            ],
            "description": "The extension (minus the leading period). e.g. png."
          },
          "description": {
            "type": "string",
            "minLength": 1,
            "description": "windows-only. The description."
          },
          "name": {
            "type": "string",
            "minLength": 1,
            "description": "The name. e.g. PNG. Defaults to value of `ext`."
          },
          "mimeType": {
            "type": "string",
            "minLength": 1,
            "description": "linux-only. The mime-type."
          },
          "icon": {
            "type": "string",
            "minLength": 1,
            "description": "macOS and windows. Icon file name without extension. It points to ico file for Windows and icns for macOS. For example, if the `icon` value is `\"icons/py\"` then it will look for both `\"icons/py.ico\"` and `\"icons/py.icns\"` in your project directory."
          },
          "role": {
            "type": "string",
            "minLength": 1,
            "description": "macOS-only. The app's role with respect to the type. The value can be `Editor`, `Viewer`, `Shell`, or `None`. Corresponds to `CFBundleTypeRole`.",
            "default": "Editor"
          },
          "isPackage": {
            "type": "boolean",
            "description": "macOS-only. Whether the document is distributed as a bundle. If set to true, the bundle directory is treated as a file. Corresponds to `LSTypeIsPackage`."
          },
          "rank": {
            "type": "string",
            "enum": ["Owner", "Default", "Alternate", "None"],
            "description": "macOS-only. Determines how Launch Services ranks this app among the apps that declare themselves editors or viewers of files of this type. The possible values are: `Owner` (this app is the primary creator of files of this type), `Default` (this app is an opener of files of this type; this value is also used if no rank is specified), `Alternate` (this app is a secondary viewer of files of this type), and `None` (this app is never selected to open files of this type, but it accepts drops of files of this type).",
            "default": "Default"
          }
        }
      },
      "minItems": 1
    },
    "updateUrlBaseProperty": {
      "type": "string",
      "format": "uri",
      "description": "The URL to check for updates. You should only set this if you want to use your own self-hosted update server instead of ToDesktop's built-in update service. See https://www.github.com/ToDesktop/self-hosted for more information.",
      "examples": ["https://example.com/updates"],
      "default": "ToDesktop's auto-update URL."
    },
    "filesForDistributionProperty": {
      "type": "array",
      "description": "This option allows you to explicitly exclude or include certain files in the packaged version of your app. These files are filtered _after_ the build step which happens on the ToDesktop servers.",
      "examples": [
        "[\"!**/node_modules/realm/android/**\", \"!**/design/**\"]"
      ],
      "items": {
        "type": "string",
        "minLength": 1
      },
      "minItems": 1
    },
    "linuxConfigProperty": {
      "type": "object",
      "description": "This object contains some options that only apply to the building & releasing for Linux.",
      "examples": ["{ \"category\": \"Utility\"}"],
      "additionalProperties": false,
      "properties": {
        "category": {
          "type": "string",
          "minLength": 1,
          "description": "The [application category](https://specifications.freedesktop.org/menu-spec/latest/apa.html#main-category-registry).",
          "examples": ["Utility"]
        },
        "icon": {
          "type": "string",
          "description": "The path to your application's Linux desktop icon. It must be an ICNS or PNG.",
          "examples": ["./linux-icon.png"],
          "file": {
            "extensions": ["icns", "png"],
            "mustBeFile": true
          },
          "minLength": 3
        },
        "imageVersion": {
          "type": "string",
          "minLength": 1,
          "description": "The version of the Linux image that ToDesktop should use to build your app.",
          "examples": ["0.1.0"],
          "default": "0.0.12"
        },
        "executableArgs": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "Additional command-line arguments to pass to the executable in the Linux .desktop file Exec line.",
          "examples": [
            ["--enable-features=UseOzonePlatform", "--ozone-platform=x11"]
          ]
        },
        "deb": {
          "type": "object",
          "description": "Configuration for Debian (.deb) packaging.",
          "additionalProperties": false,
          "properties": {
            "additionalDepends": {
              "type": "array",
              "items": {
                "type": "string"
              },
              "description": "Additional package dependencies to append to ToDesktop's default .deb dependencies."
            },
            "depends": {
              "type": "array",
              "items": {
                "type": "string"
              },
              "description": "The list of package dependencies for the .deb package. This overwrites ToDesktop's default dependency list and linux.deb.additionalDepends."
            }
          }
        },
        "noSandbox": {
          "oneOf": [
            { "type": "boolean" },
            { "type": "string", "enum": ["probe"] }
          ],
          "description": "Controls whether `--no-sandbox` is passed to the Electron app on Linux. `true` always passes it; `false` never passes it; `\"probe\"` (default) detects at runtime whether user namespaces are supported and only passes it when they are not.",
          "default": "probe"
        }
      }
    },
    "includeSubNodeModulesProperty": {
      "type": "boolean",
      "default": false,
      "description": "Whether to include **all** of the submodules node_modules directories"
    },
    "macConfigProperty": {
      "type": "object",
      "description": "This object contains some options that only apply to the building & releasing for MacOS.",
      "examples": ["{ \"entitlements\": \"./entitlements.mac.plist\" }"],
      "additionalProperties": false,
      "properties": {
        "category": {
          "type": "string",
          "minLength": 1,
          "description": "The application category type, as shown in the Finder via _View -> Arrange by Application Category_ when viewing the Applications directory.",
          "examples": ["public.app-category.productivity"]
        },
        "additionalBinariesToSign": {
          "type": "array",
          "description": "Paths of any extra binaries that need to be signed. These could be files in your own app code or `node_modules`.",
          "examples": ["[\"./node_modules/example-package/example-file\"]"],
          "default": [],
          "items": {
            "type": "string",
            "minLength": 1
          }
        },
        "entitlements": {
          "type": "string",
          "description": "The path to an entitlements file for signing your application. It must be a plist file.",
          "examples": ["./entitlements.mac.plist"],
          "default": "A sane minimal entitlements file we've put together.",
          "file": {
            "extensions": ["plist"],
            "mustBeFile": true
          },
          "minLength": 1
        },
        "entitlementsInherit": {
          "type": "string",
          "description": "The path to a child entitlements file for signing your application. It must be a plist file.",
          "examples": ["./entitlementsInherit.mac.plist"],
          "default": "No entitlements file is provided by default.",
          "file": {
            "extensions": ["plist"],
            "mustBeFile": true
          },
          "minLength": 1
        },
        "extendInfo": {
          "type": "object",
          "description": "Extra entries for `Info.plist`.",
          "examples": ["{ \"NSUserNotificationAlertStyle\": \"alert\" }"],
          "default": {}
        },
        "icon": {
          "type": "string",
          "description": "The path to your application's Mac desktop icon. It must be an ICNS, PNG, or Apple `.icon` package directory.",
          "examples": ["./mac-icon.png"],
          "file": {
            "extensions": ["icns", "png", "icon"],
            "mustBeFile": true,
            "allowDirectoryExtensions": ["icon"],
            "mustBeDirectoryExtensions": ["icon"]
          },
          "minLength": 3
        },
        "requirements": {
          "type": "string",
          "description": "The path to the [requirements file](https://developer.apple.com/library/archive/documentation/Security/Conceptual/CodeSigningGuide/RequirementLang/RequirementLang.html) used when signing your application.",
          "examples": ["./requirements.txt"],
          "default": "No requirements file is used by default.",
          "file": {
            "extensions": ["txt"],
            "mustBeFile": true
          },
          "minLength": 1
        }
      }
    },
    "masConfigProperty": {
      "type": "object",
      "description": "This object contains options that only apply to building the application for Mac App Store.",
      "examples": ["{ \"type\": \"development\" }"],
      "additionalProperties": false,
      "properties": {
        "entitlements": {
          "type": "string",
          "description": "The path to an entitlements file for signing your application. It must be a plist file.",
          "examples": ["./entitlements.mas.plist"],
          "default": "No entitlements file is provided by default.",
          "file": {
            "extensions": ["plist"],
            "mustBeFile": true
          },
          "minLength": 1
        },
        "entitlementsInherit": {
          "type": "string",
          "description": "The path to a child entitlements file for signing your application. It must be a plist file.",
          "examples": ["./entitlementsInherit.mas.plist"],
          "default": "No entitlements file is provided by default.",
          "file": {
            "extensions": ["plist"],
            "mustBeFile": true
          },
          "minLength": 1
        },
        "provisioningProfile": {
          "type": "string",
          "description": "The path to a provisioning profile for authorizing your application.",
          "examples": ["./mas.provisionprofile"],
          "default": "No provisioning profile is used by default.",
          "file": {
            "extensions": ["provisionprofile"],
            "mustBeFile": true
          },
          "minLength": 1
        },
        "type": {
          "type": "string",
          "enum": ["development", "distribution"],
          "description": "Whether to sign app for development or for distribution.",
          "examples": ["distribution"],
          "default": "development"
        },
        "minimumSystemVersion": {
          "type": "string",
          "description": "The minimum macOS version required to run the app. Set to '12.0' or higher for arm64-only Mac App Store submissions.",
          "examples": ["12.0", "11.0", "10.15"],
          "pattern": "^[0-9]+\\.[0-9]+(\\.[0-9]+)?$"
        },
        "x64ArchFiles": {
          "type": "string",
          "description": "Minimatch pattern of paths that are allowed to be x64 binaries in both ASAR files.",
          "examples": ["Contents/Resources/foobar/**"],
          "default": "not defined"
        }
      }
    },
    "dmgConfigProperty": {
      "type": "object",
      "description": "Options for customizing the macOS DMG (disk image) installer.",
      "additionalProperties": false,
      "properties": {
        "background": {
          "type": "string",
          "description": "The path to the DMG installer's background image. It must be a `.tiff` file. The resolution of this file determines the resolution of the installer window. Typically, backgrounds are 540x380.",
          "examples": ["./mac-dmg-background.tiff"],
          "default": "undefined",
          "file": {
            "extensions": ["tiff"],
            "mustBeFile": true
          },
          "minLength": 1
        },
        "artifactName": {
          "type": "string",
          "minLength": 1,
          "description": "The artifact name of the DMG file. Macros ${productName}, ${version}, ${name} are supported."
        },
        "backgroundColor": {
          "type": "string",
          "minLength": 1,
          "description": "The background color (accepts css colors). Defaults to \"`#ffffff`\" (white) if no background image.",
          "default": "#ffffff"
        },
        "iconSize": {
          "type": "number",
          "description": "The size of all the icons inside the DMG. Defaults to `80`.",
          "default": 80
        },
        "iconTextSize": {
          "type": "number",
          "description": "The size of all the icon texts inside the DMG. Defaults to `12`.",
          "default": 12
        },
        "title": {
          "type": "string",
          "minLength": 1,
          "description": "The title of the produced DMG, which will be shown when mounted (volume name). Macro `${productName}`, `${version}` and `${name}` are supported.",
          "default": "${productName} ${version}"
        },
        "contents": {
          "type": "array",
          "description": "Customize icon locations. The x and y coordinates refer to the position of the center of the icon (at 1x scale), and do not take the label into account.",
          "items": {
            "type": "object",
            "additionalProperties": false,
            "properties": {
              "x": {
                "type": "number",
                "description": "The device-independent pixel offset from the left of the window to the center of the icon."
              },
              "y": {
                "type": "number",
                "description": "The device-independent pixel offset from the top of the window to the center of the icon."
              }
            }
          }
        },
        "window": {
          "type": "object",
          "description": "The DMG windows position and size. In most cases, you will only want to specify a `height` and `width` value but not `x` and `y`.",
          "additionalProperties": false,
          "properties": {
            "x": {
              "type": "number",
              "description": "The X position relative to left of the screen."
            },
            "y": {
              "type": "number",
              "description": "The Y position relative to top of the screen."
            },
            "width": {
              "type": "number",
              "description": "The width. Defaults to background image width or 540."
            },
            "height": {
              "type": "number",
              "description": "The height. Defaults to background image height or 380."
            }
          }
        }
      }
    },
    "nodeVersionProperty": {
      "type": "string",
      "validSemver": {},
      "minLength": 1,
      "description": "The version of Node.js that ToDesktop should use to build your app.",
      "examples": ["18.12.1"]
    },
    "npmVersionProperty": {
      "type": "string",
      "validSemver": {},
      "minLength": 1,
      "description": "The version of NPM that ToDesktop should use for installation.",
      "examples": ["9.8.1"]
    },
    "pnpmVersionProperty": {
      "type": "string",
      "validSemver": {},
      "minLength": 1,
      "description": "The version of pnpm that ToDesktop should use for installation.",
      "examples": ["8.10.5"]
    },
    "bunVersionProperty": {
      "type": "string",
      "validSemver": {},
      "minLength": 1,
      "description": "The version of Bun that ToDesktop should use for installation.",
      "examples": ["1.3.6"]
    },
    "packageJsonProperty": {
      "type": "object",
      "description": "If you want to override the default `package.json` configuration, use the `packageJson` property. For example, you can use this to override the `productName` or `version` properties.",
      "default": {}
    },
    "packageManagerProperty": {
      "type": "string",
      "enum": ["npm", "yarn", "pnpm", "bun"],
      "description": "The package manager to use when installing dependencies. Valid values are `npm`, `yarn`, `pnpm` or `bun`.",
      "examples": ["yarn"],
      "default": "If `bun.lockb` or `bun.lock` exists, `bun` is used. If `yarn.lock` exists, `yarn` is used. If `pnpm-lock.yaml` or `shrinkwrap.yaml` exists, `pnpm` is used. Otherwise, `npm` is used."
    },
    "rebuildLibraryProperty": {
      "type": "string",
      "enum": ["app-builder", "@electron/rebuild"],
      "description": "The library that ToDesktop should use for rebuilding native modules. Valid values are `app-builder` or `@electron/rebuild`.",
      "default": "app-builder"
    },
    "snapConfigProperty": {
      "type": "object",
      "description": "This object contains some options that only apply to the building for the [Snap Store](https://snapcraft.io/store).",
      "examples": ["{ \"confinement\": \"classic\", \"grade\": \"devel\" }"],
      "additionalProperties": false,
      "properties": {
        "after": {
          "type": "array",
          "description": "Ensures that all the part names listed are staged before the app part begins its [lifecycle](https://snapcraft.io/docs/parts-lifecycle#heading--steps).",
          "default": ["desktop-gtk2"],
          "examples": ["[\"launch-scripts\"]"],
          "items": {
            "type": "string",
            "minLength": 1
          }
        },
        "appPartStage": {
          "type": "array",
          "description": "Specifies which files from the app part to stage and which to exclude. Individual files, directories, wildcards, globstars, and exclusions are accepted. See [Snapcraft filesets](https://snapcraft.io/docs/snapcraft-filesets) to learn more about the format.",
          "examples": ["[\"-usr/lib/python*\"]"],
          "default": "See [snap.ts](https://github.com/electron-userland/electron-builder/blob/master/packages/app-builder-lib/templates/snap/snapcraft.yaml#L29).",
          "items": {
            "type": "string",
            "minLength": 1
          }
        },
        "assumes": {
          "oneOf": [
            {
              "type": "string",
              "minLength": 1
            },
            {
              "type": "array",
              "items": {
                "type": "string",
                "minLength": 1
              }
            }
          ],
          "description": "The list of features that must be supported by the core in order for this snap to install. To learn more, see the [Snapcraft docs](https://snapcraft.io/docs/snapcraft-top-level-metadata#heading--assumes).",
          "examples": ["snapd2.38"],
          "default": "undefined"
        },
        "autoStart": {
          "type": "boolean",
          "description": "Whether or not the snap should automatically start on login.",
          "default": false,
          "examples": [true]
        },
        "base": {
          "type": "string",
          "description": "The base snap to use for building this snap.",
          "default": "core18",
          "examples": ["core20"]
        },
        "buildPackages": {
          "type": "array",
          "description": "The list of debian packages needs to be installed for building this snap.",
          "default": [],
          "examples": [
            "[\"libssl-dev\", \"libssh-dev\", \"libncursesw5-dev\"]"
          ],
          "items": {
            "type": "string",
            "minLength": 1
          }
        },
        "confinement": {
          "type": "string",
          "enum": ["classic", "devmode", "strict"],
          "description": "The type of [confinement](https://snapcraft.io/docs/reference/confinement) supported by the snap. `devmode`, `strict`, or `classic`.",
          "default": "strict",
          "examples": ["classic"]
        },
        "environment": {
          "type": "object",
          "description": "The custom environment. If you set this, it will be merged with the default.",
          "default": { "TMPDIR": "$XDG_RUNTIME_DIR" },
          "examples": ["{\"TMPDIR\": \"$XDG_RUNTIME_DIR\"}"]
        },
        "grade": {
          "type": "string",
          "enum": ["devel", "stable"],
          "description": "The quality grade of the snap. It can be either `devel` (i.e. a development version of the snap, so not to be published to the \"stable\" or \"candidate\" channels) or `stable` (i.e. a stable release or release candidate, which can be released to all channels).",
          "default": "stable",
          "examples": ["devel"]
        },
        "layout": {
          "type": "object",
          "description": "Specifies any files to make accessible from locations such as `/usr`, `/var`, and `/etc`. See [snap layouts](https://snapcraft.io/docs/snap-layouts) to learn more.",
          "default": "undefined",
          "examples": [
            "{ \"/var/lib/foo\": { \"bind\": \"$SNAP_DATA/var/lib/foo\" } }"
          ]
        },
        "plugs": {
          "type": "array",
          "description": "The list of [plugs](https://snapcraft.io/docs/reference/interfaces). If list contains `default`, it will be replaced with the default list, so, `[\"default\", \"foo\"]` can be used to add a custom plug `foo` in addition to the default list.",
          "default": [
            "desktop",
            "desktop-legacy",
            "home",
            "x11",
            "unity7",
            "browser-support",
            "network",
            "gsettings",
            "pulseaudio",
            "opengl"
          ],
          "examples": [
            "[ \"default\", { \"browser-sandbox\": { \"interface\": \"browser-support\", \"allow-sandbox\": true } }, \"another-simple-plug-name\" ]"
          ],
          "items": {
            "anyOf": [
              {
                "type": "string",
                "minLength": 1
              },
              {
                "type": "object"
              }
            ]
          }
        },
        "stagePackages": {
          "type": "array",
          "description": "The list of Ubuntu packages to use that are needed to support the app part creation. Like `depends` for deb. If list contains `default`, it will be replaced with the default list, so, `[\"default\", \"foo\"]` can be used to add custom package `foo` in addition to the defaults.",
          "default": [
            "libasound2",
            "libgconf2-4",
            "libnotify4",
            "libnspr4",
            "libnss3",
            "libpcre3",
            "libpulse0",
            "libxss1",
            "libxtst6"
          ],
          "examples": ["[\"default\", \"depends\"]"],
          "items": {
            "type": "string",
            "minLength": 1
          }
        },
        "summary": {
          "type": "string",
          "maxLength": 78,
          "description": "A sentence summarising the snap. Max len. 78 characters, describing the snap in short and simple terms.",
          "default": "The [productName](#recommendations-for-app-packagejson).",
          "examples": ["The super cat generator"]
        },
        "useTemplateApp": {
          "type": "boolean",
          "description": "Whether to use a template snap.",
          "default": "true if `stagePackages` is not specified.",
          "examples": [false]
        }
      }
    },
    "uploadSizeLimitProperty": {
      "type": "number",
      "description": "The max upload size (in MB). Before uploading your files to our servers, we check that the total file size is less than this number. If you are accidentally including unneccesary files in your app, check out the `appPath` and `appFiles` options.",
      "default": 20,
      "examples": [35]
    },
    "windowsConfigProperty": {
      "type": "object",
      "description": "This object contains some options that only apply to the building & releasing for Windows.",
      "examples": ["{ \"icon\": \"./icon.ico\" }"],
      "additionalProperties": false,
      "properties": {
        "icon": {
          "type": "string",
          "description": "The path to your application's Windows desktop icon. It must be an ICO, ICNS, or PNG.",
          "examples": ["./icon.ico"],
          "file": {
            "extensions": ["icns", "png", "ico"],
            "mustBeFile": true
          },
          "minLength": 3
        },
        "nsisCustomBinary": {
          "type": "object",
          "description": "Allows you to provide your own makensis, such as one with support for debug logging via LogSet and LogText. (Logging also requires option debugLogging = true). It's not recommended to use it for production build.",
          "default": "undefined",
          "additionalProperties": false,
          "properties": {
            "checksum": {
              "type": "string",
              "description": "Checksum for the custom NSIS binary."
            },
            "debugLogging": {
              "type": "boolean",
              "description": "Enable debug logging with the custom NSIS binary."
            },
            "url": {
              "type": "string",
              "description": "URL to download the custom NSIS binary (e.g., a .7z archive)."
            },
            "version": {
              "type": "string",
              "description": "Version of the custom NSIS binary."
            }
          }
        },
        "nsisInclude": {
          "type": "string",
          "description": "The path to NSIS script to customize installer.",
          "examples": ["build/installer.nsh"],
          "default": "undefined",
          "file": {
            "extensions": ["nsh"],
            "mustBeFile": true
          }
        },
        "publisherName": {
          "type": "array",
          "description": "The publisher name, exactly as in your code signing certificate. Several names can be provided. Defaults to common name from your code signing certificate. You should typically not include this property in your configuration unless you wish to transition to a new certificate in the future.",
          "examples": ["[\"ABC Limited\"]"],
          "default": "Default to the common name from your code signing certificate.",
          "items": {
            "type": "string",
            "minLength": 1
          }
        }
      }
    },
    "platformOverridableProperties": {
      "type": "object",
      "additionalProperties": false,
      "description": "Defines properties that can be overridden on a per-platform basis under the 'platformOverrides' field.",
      "properties": {
        "appBuilderLibVersion": {
          "$ref": "#/definitions/appBuilderLibVersionProperty"
        },
        "appId": { "$ref": "#/definitions/appIdProperty" },
        "appFiles": { "$ref": "#/definitions/appFilesProperty" },
        "appProtocolScheme": {
          "$ref": "#/definitions/appProtocolSchemeProperty"
        },
        "appPath": { "$ref": "#/definitions/appPathProperty" },
        "bytenode": { "$ref": "#/definitions/bytenodeConfigProperty" },
        "fuses": { "$ref": "#/definitions/fusesConfigProperty" },
        "asar": { "$ref": "#/definitions/asarProperty" },
        "asarUnpack": { "$ref": "#/definitions/asarUnpackProperty" },
        "buildVersion": { "$ref": "#/definitions/buildVersionProperty" },
        "copyright": { "$ref": "#/definitions/copyrightProperty" },
        "electronMirror": { "$ref": "#/definitions/electronMirrorProperty" },
        "electronVersion": { "$ref": "#/definitions/electronVersionProperty" },
        "extraContentFiles": {
          "$ref": "#/definitions/extraContentFilesProperty"
        },
        "extraResources": { "$ref": "#/definitions/extraResourcesProperty" },
        "fileAssociations": {
          "$ref": "#/definitions/fileAssociationsProperty"
        },
        "updateUrlBase": { "$ref": "#/definitions/updateUrlBaseProperty" },
        "filesForDistribution": {
          "$ref": "#/definitions/filesForDistributionProperty"
        },
        "linux": { "$ref": "#/definitions/linuxConfigProperty" },
        "includeSubNodeModules": {
          "$ref": "#/definitions/includeSubNodeModulesProperty"
        },
        "mac": { "$ref": "#/definitions/macConfigProperty" },
        "mas": { "$ref": "#/definitions/masConfigProperty" },
        "dmg": { "$ref": "#/definitions/dmgConfigProperty" },
        "nodeVersion": { "$ref": "#/definitions/nodeVersionProperty" },
        "npmVersion": { "$ref": "#/definitions/npmVersionProperty" },
        "pnpmVersion": { "$ref": "#/definitions/pnpmVersionProperty" },
        "bunVersion": { "$ref": "#/definitions/bunVersionProperty" },
        "packageJson": { "$ref": "#/definitions/packageJsonProperty" },
        "packageManager": { "$ref": "#/definitions/packageManagerProperty" },
        "rebuildLibrary": { "$ref": "#/definitions/rebuildLibraryProperty" },
        "snap": { "$ref": "#/definitions/snapConfigProperty" },
        "uploadSizeLimit": { "$ref": "#/definitions/uploadSizeLimitProperty" },
        "windows": { "$ref": "#/definitions/windowsConfigProperty" }
      }
    }
  }
}
