UNPKG

3.54 kBTypeScriptView Raw
1import { TargetSpecificOptions } from "../core";
2import { CommonLinuxOptions } from "./linuxOptions";
3export interface SnapOptions extends CommonLinuxOptions, TargetSpecificOptions {
4 /**
5 * The type of [confinement](https://snapcraft.io/docs/reference/confinement) supported by the snap.
6 * @default strict
7 */
8 readonly confinement?: "devmode" | "strict" | "classic" | null;
9 /**
10 * The custom environment. Defaults to `{"TMPDIR: "$XDG_RUNTIME_DIR"}`. If you set custom, it will be merged with default.
11 */
12 readonly environment?: object | null;
13 /**
14 * The 78 character long summary. Defaults to [productName](configuration.md#Configuration-productName).
15 */
16 readonly summary?: string | null;
17 /**
18 * 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).
19 * @default stable
20 */
21 readonly grade?: "devel" | "stable" | null;
22 /**
23 * The list of features that must be supported by the core in order for this snap to install.
24 */
25 readonly assumes?: Array<string> | string | null;
26 /**
27 * The list of debian packages needs to be installed for building this snap.
28 */
29 readonly buildPackages?: Array<string> | null;
30 /**
31 * The list of Ubuntu packages to use that are needed to support the `app` part creation. Like `depends` for `deb`.
32 * Defaults to `["libasound2", "libgconf2-4", "libnotify4", "libnspr4", "libnss3", "libpcre3", "libpulse0", "libxss1", "libxtst6"]`.
33 *
34 * If list contains `default`, it will be replaced to default list, so, `["default", "foo"]` can be used to add custom package `foo` in addition to defaults.
35 */
36 readonly stagePackages?: Array<string> | null;
37 /**
38 * The [hooks](https://docs.snapcraft.io/build-snaps/hooks) directory, relative to `build` (build resources directory).
39 * @default build/snap-hooks
40 */
41 readonly hooks?: string | null;
42 /**
43 * The list of [plugs](https://snapcraft.io/docs/reference/interfaces).
44 * Defaults to `["desktop", "desktop-legacy", "home", "x11", "unity7", "browser-support", "network", "gsettings", "pulseaudio", "opengl"]`.
45 *
46 * If list contains `default`, it will be replaced to default list, so, `["default", "foo"]` can be used to add custom plug `foo` in addition to defaults.
47 *
48 * Additional attributes can be specified using object instead of just name of plug:
49 * ```
50 *[
51 * {
52 * "browser-sandbox": {
53 * "interface": "browser-support",
54 * "allow-sandbox": true
55 * },
56 * },
57 * "another-simple-plug-name"
58 *]
59 * ```
60 */
61 readonly plugs?: Array<string | PlugDescriptor> | PlugDescriptor | null;
62 /**
63 * Specifies any [parts](https://snapcraft.io/docs/reference/parts) that should be built before this part.
64 * Defaults to `["desktop-gtk2""]`.
65 *
66 * If list contains `default`, it will be replaced to default list, so, `["default", "foo"]` can be used to add custom parts `foo` in addition to defaults.
67 */
68 readonly after?: Array<string> | null;
69 /**
70 * Whether to use template snap. Defaults to `true` if `stagePackages` not specified.
71 */
72 readonly useTemplateApp?: boolean;
73}
74export interface PlugDescriptor {
75 [key: string]: {
76 [key: string]: any;
77 } | null;
78}