Documentation
    Preparing search index...
    interface MakerSnapConfig {
        appConfig?: Record<string, unknown>;
        appPlugs?: string[];
        appSlots?: string[];
        confinement?: "strict" | "devmode" | "classic";
        description?: string;
        desktopTemplate?: string;
        executableName?: string;
        features?: {
            alsa?: true;
            audio?: true;
            browserSandbox?: false;
            mpris?: string;
            passwords?: true;
            webgl?: true;
        };
        grade?: "devel"
        | "stable";
        hookScripts?: Record<string, string>;
        name?: string;
        plugs?: Record<string, Record<string, unknown>>;
        slots?: Record<string, Record<string, unknown>>;
        snapcraft?: string;
        summary?: string;
        version?: string;
        [key: string]: unknown;
    }

    Hierarchy

    Indexable

    • [key: string]: unknown
    Index

    Properties

    appConfig?: Record<string, unknown>

    Additional app-specific Snapcraft configuration for the Electron app. This is different from [[SnapcraftConfig]] in that it is scoped under apps.<app-name>.

    appPlugs?: string[]

    Additional plugs for the Electron app, which are necessary for the app to be a consumer of a feature in the system. Common features can be set via the [[features]] option. To set any attributes for the plugs, set them in the [[plugs]] option.

    For example, if the app uses a DBus interface:

    {
    appPlugs: ['my-dbus-interface'],
    plugs: {
    'my-dbus-interface': {
    interface: 'dbus',
    name: 'com.example.my-interface',
    bus: 'session'
    }
    }
    }

    plugs will be passed through directly to the generated snapcraft.yaml.

    appSlots?: string[]

    Additional slots for the Electron app, which are necessary for the app to be a producer of a feature in the system. Common features can be set via the [[features]] option. To set any attributes for the plugs, set them in the [[slots]] option.

    For example, if the app creates a DBus interface:

    {
    appSlots: ['my-dbus-interface'],
    slots: {
    'my-dbus-interface': {
    interface: 'dbus',
    name: 'com.example.my-interface',
    bus: 'session'
    }
    }
    }

    [[slots]] will be passed through directly to the generated snapcraft.yaml.

    confinement?: "strict" | "devmode" | "classic"

    See the Snapcraft documentation.

    Default: devmode

    description?: string

    The longer description for the snap. Can contain newlines.

    desktopTemplate?: string

    The absolute path to a custom Freedesktop.org desktop file template.

    executableName?: string

    The executable name of the Electron app, sans file extension. Corresponds to the executableName option in Electron Packager.

    Default: either productName or name in package.json

    features?: {
        alsa?: true;
        audio?: true;
        browserSandbox?: false;
        mpris?: string;
        passwords?: true;
        webgl?: true;
    }

    Describes what functionality the Electron app needs, in order to work inside the Snap sandbox.

    Example:

    {
    features: {
    audio: true,
    mpris: 'com.example.mpris',
    webgl: true
    }
    }

    Setting a feature to a false-y value does not disable the feature, only omitting the feature from the Object does that.

    Type Declaration

    • Optionalalsa?: true

      Audio support via ALSA (replaces audio support if both are specified)

    • Optionalaudio?: true

      Audio support via PulseAudio.

    • OptionalbrowserSandbox?: false

      Web browser functionality. This was originally enabled by default when using Electron ≥ 5.0.0, due to the setuid sandbox support. However, Snapcraft allows for use of the snap confined sandbox, particularly within strict confinement. We should encourage but not enforce the browser-sandbox plug.

    • Optionalmpris?: string

      MPRIS support.

      If enabled, the interface name must be specified as the feature value.

    • Optionalpasswords?: true

      Access the secret service (e.g., GNOME Keyring)

    • Optionalwebgl?: true

      WebGL support (requires Mesa, etc.)

    grade?: "devel" | "stable"

    The quality grade of the Snap. See the Snapcraft documentation for valid values.

    Default: devel

    hookScripts?: Record<string, string>

    One or more hook scripts to be installed with the Snap. The format of the Object is { hookName: pathToHookScript, […] }. Hook names can be found in the Snapcraft documentation.

    name?: string

    The name of the Snap package.

    Default: name in package.json

    plugs?: Record<string, Record<string, unknown>>

    See [[appPlugs]] for details.

    slots?: Record<string, Record<string, unknown>>

    See [[appSlots]] for details.

    snapcraft?: string

    The absolute path to the snapcraft executable.

    By default, it searches paths in the PATH environment variable.

    summary?: string

    A 78 character long summary for the Snap.

    Default: description in package.json

    version?: string

    The version of the Snap package.

    Default: version in package.json