@gtkx/config 2.0.0-beta.9 → 2.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +11 -169
- package/dist/builtin-elements.d.ts +24 -0
- package/dist/builtin-elements.d.ts.map +1 -0
- package/dist/builtin-elements.js +376 -0
- package/dist/builtin-elements.js.map +1 -0
- package/dist/config-dependencies.d.ts +5 -3
- package/dist/config-dependencies.d.ts.map +1 -1
- package/dist/config-dependencies.js +57 -24
- package/dist/config-dependencies.js.map +1 -1
- package/dist/config-error.d.ts.map +1 -1
- package/dist/config-error.js.map +1 -1
- package/dist/config-reloader.d.ts +8 -0
- package/dist/config-reloader.d.ts.map +1 -0
- package/dist/config-reloader.js +32 -0
- package/dist/config-reloader.js.map +1 -0
- package/dist/config-source.d.ts +9 -0
- package/dist/config-source.d.ts.map +1 -0
- package/dist/config-source.js +35 -0
- package/dist/config-source.js.map +1 -0
- package/dist/config.d.ts +310 -53
- package/dist/config.d.ts.map +1 -1
- package/dist/config.js +52 -32
- package/dist/config.js.map +1 -1
- package/dist/controlled-props.d.ts +69 -0
- package/dist/controlled-props.d.ts.map +1 -0
- package/dist/controlled-props.js +57 -0
- package/dist/controlled-props.js.map +1 -0
- package/dist/deploy.d.ts +949 -20
- package/dist/deploy.d.ts.map +1 -1
- package/dist/deploy.js +17 -15
- package/dist/deploy.js.map +1 -1
- package/dist/index.d.ts +8 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +6 -1
- package/dist/index.js.map +1 -1
- package/dist/internal.d.ts +5 -3
- package/dist/internal.d.ts.map +1 -1
- package/dist/internal.js +5 -3
- package/dist/internal.js.map +1 -1
- package/dist/loader.d.ts +23 -5
- package/dist/loader.d.ts.map +1 -1
- package/dist/loader.js +58 -42
- package/dist/loader.js.map +1 -1
- package/dist/node-version.d.ts +2 -1
- package/dist/node-version.d.ts.map +1 -1
- package/dist/node-version.js +2 -1
- package/dist/node-version.js.map +1 -1
- package/dist/resource-base-path.d.ts.map +1 -1
- package/dist/schema-text.d.ts.map +1 -1
- package/dist/user-event-signals.d.ts.map +1 -1
- package/dist/user-event-signals.js +2 -0
- package/dist/user-event-signals.js.map +1 -1
- package/dist/virtual.d.ts +1 -1
- package/dist/virtual.d.ts.map +1 -1
- package/dist/virtual.js +5 -4
- package/dist/virtual.js.map +1 -1
- package/dist/vite-plugin.d.ts +7 -0
- package/dist/vite-plugin.d.ts.map +1 -1
- package/dist/vite-plugin.js +13 -4
- package/dist/vite-plugin.js.map +1 -1
- package/dist/vite-root.d.ts.map +1 -1
- package/package.json +15 -16
- package/src/builtin-elements.ts +388 -0
- package/src/config-dependencies.ts +65 -29
- package/src/config-error.ts +5 -3
- package/src/config-reloader.ts +45 -0
- package/src/config-source.ts +52 -0
- package/src/config.ts +355 -61
- package/src/controlled-props.ts +116 -0
- package/src/deploy.ts +1029 -59
- package/src/index.ts +48 -3
- package/src/internal.ts +6 -2
- package/src/loader.ts +103 -54
- package/src/node-version.ts +2 -1
- package/src/user-event-signals.ts +2 -0
- package/src/virtual.ts +7 -6
- package/src/vite-plugin.ts +24 -5
package/src/deploy.ts
CHANGED
|
@@ -1,16 +1,6 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
flag,
|
|
5
|
-
girLibrary,
|
|
6
|
-
relativePathRecord,
|
|
7
|
-
text,
|
|
8
|
-
textList,
|
|
9
|
-
textRecord,
|
|
10
|
-
url,
|
|
11
|
-
} from "./schema-text.ts";
|
|
12
|
-
|
|
13
|
-
const APPIMAGE_COMPRESSIONS = ["gzip", "xz", "zstd"] as const;
|
|
2
|
+
import { fileExtension, flag, girLibrary, relativePathRecord, text, textList, textRecord, url } from "./schema-text.ts";
|
|
3
|
+
|
|
14
4
|
const DEB_COMPRESSIONS = ["gzip", "none", "xz", "zstd"] as const;
|
|
15
5
|
const DEB_SIGN_METHODS = ["debsign", "dpkg-sig"] as const;
|
|
16
6
|
const DEB_SIGN_TYPES = ["archive", "maint", "origin"] as const;
|
|
@@ -69,16 +59,97 @@ const minimumLibraryVersionsSchema = z.record(girLibrary(LIBRARY_ID_ERROR), mini
|
|
|
69
59
|
error: MINIMUM_LIBRARY_VERSIONS_ERROR,
|
|
70
60
|
});
|
|
71
61
|
|
|
62
|
+
/** Package relations of one kind, such as dependencies, in Debian and RPM dependency syntax. */
|
|
63
|
+
type DeployPackageRelationOptions = {
|
|
64
|
+
/**
|
|
65
|
+
* Package relations expressed in Debian dependency syntax.
|
|
66
|
+
*
|
|
67
|
+
* @defaultValue `[]`
|
|
68
|
+
*/
|
|
69
|
+
deb?: string[] | undefined;
|
|
70
|
+
/**
|
|
71
|
+
* Package relations expressed in RPM dependency syntax.
|
|
72
|
+
*
|
|
73
|
+
* @defaultValue `[]`
|
|
74
|
+
*/
|
|
75
|
+
rpm?: string[] | undefined;
|
|
76
|
+
};
|
|
77
|
+
|
|
72
78
|
const relationsSchema = z.strictObject({
|
|
73
79
|
deb: textList("Debian package relation", "must be an array of Debian package relations").optional(),
|
|
74
80
|
rpm: textList("RPM package relation", "must be an array of RPM package relations").optional(),
|
|
75
|
-
})
|
|
81
|
+
}) satisfies z.ZodType<DeployPackageRelationOptions>;
|
|
82
|
+
|
|
83
|
+
/** Package relations of a kind only Debian packages have, in Debian dependency syntax. */
|
|
84
|
+
type DeployDebPackageRelationOptions = {
|
|
85
|
+
/**
|
|
86
|
+
* Package relations expressed in Debian dependency syntax. RPM has no equivalent relation.
|
|
87
|
+
*
|
|
88
|
+
* @defaultValue `[]`
|
|
89
|
+
*/
|
|
90
|
+
deb?: string[] | undefined;
|
|
91
|
+
};
|
|
92
|
+
|
|
93
|
+
const debRelationsSchema = z.strictObject({
|
|
94
|
+
deb: textList("Debian package relation", "must be an array of Debian package relations").optional(),
|
|
95
|
+
}) satisfies z.ZodType<DeployDebPackageRelationOptions>;
|
|
96
|
+
|
|
97
|
+
/** The `deploy.developer` options: who develops and maintains the application. */
|
|
98
|
+
type DeployDeveloperOptions = {
|
|
99
|
+
/**
|
|
100
|
+
* Reverse-DNS developer identifier.
|
|
101
|
+
*
|
|
102
|
+
* @defaultValue The application ID without its last segment, such as `com.example` for `com.example.Tasks`;
|
|
103
|
+
* none when the application ID has only two segments
|
|
104
|
+
*/
|
|
105
|
+
id?: string | undefined;
|
|
106
|
+
/**
|
|
107
|
+
* Developer or organization name. Deployment fails when neither this nor the `package.json` author is set.
|
|
108
|
+
*
|
|
109
|
+
* @defaultValue The `author` name in `package.json`
|
|
110
|
+
*/
|
|
111
|
+
name?: string | undefined;
|
|
112
|
+
/**
|
|
113
|
+
* Maintainer email address.
|
|
114
|
+
*
|
|
115
|
+
* @defaultValue The `author` email in `package.json`, if it has one
|
|
116
|
+
*/
|
|
117
|
+
email?: string | undefined;
|
|
118
|
+
};
|
|
76
119
|
|
|
77
120
|
const developerSchema = z.strictObject({
|
|
78
121
|
id: text("must be a reverse-DNS developer id").optional(),
|
|
79
122
|
name: text("must be a developer or organization name").optional(),
|
|
80
123
|
email: text("must be an email address").optional(),
|
|
81
|
-
})
|
|
124
|
+
}) satisfies z.ZodType<DeployDeveloperOptions>;
|
|
125
|
+
|
|
126
|
+
/** One software-center screenshot in `deploy.screenshots`. Either `url` or `file` must be set. */
|
|
127
|
+
type DeployScreenshotOptions = {
|
|
128
|
+
/**
|
|
129
|
+
* Absolute URL of a PNG or JPEG screenshot. Takes precedence over `file`.
|
|
130
|
+
*
|
|
131
|
+
* @defaultValue None; each entry sets `url` or `file`
|
|
132
|
+
*/
|
|
133
|
+
url?: string | undefined;
|
|
134
|
+
/**
|
|
135
|
+
* Screenshot path relative to the project root, resolved against `screenshotBaseUrl`.
|
|
136
|
+
*
|
|
137
|
+
* @defaultValue None; each entry sets `url` or `file`
|
|
138
|
+
*/
|
|
139
|
+
file?: string | undefined;
|
|
140
|
+
/**
|
|
141
|
+
* Caption displayed with the screenshot in software centers.
|
|
142
|
+
*
|
|
143
|
+
* @defaultValue None: the screenshot has no `caption`
|
|
144
|
+
*/
|
|
145
|
+
caption?: string | undefined;
|
|
146
|
+
/**
|
|
147
|
+
* Marks the primary screenshot. Only the first entry set to `true` is used.
|
|
148
|
+
*
|
|
149
|
+
* @defaultValue `false`; when no entry sets it, no screenshot is marked primary
|
|
150
|
+
*/
|
|
151
|
+
isDefault?: boolean | undefined;
|
|
152
|
+
};
|
|
82
153
|
|
|
83
154
|
const screenshotSchema = z
|
|
84
155
|
.strictObject({
|
|
@@ -89,7 +160,39 @@ const screenshotSchema = z
|
|
|
89
160
|
})
|
|
90
161
|
.refine((entry) => entry.url !== undefined || entry.file !== undefined, {
|
|
91
162
|
error: "must have either a `url` or a `file`",
|
|
92
|
-
})
|
|
163
|
+
}) satisfies z.ZodType<DeployScreenshotOptions>;
|
|
164
|
+
|
|
165
|
+
/** One AppStream release-history entry in `deploy.releases`. */
|
|
166
|
+
type DeployReleaseOptions = {
|
|
167
|
+
/** Application version described by this release. */
|
|
168
|
+
version: string;
|
|
169
|
+
/** Release date in `YYYY-MM-DD` format. */
|
|
170
|
+
date: string;
|
|
171
|
+
/**
|
|
172
|
+
* AppStream release classification.
|
|
173
|
+
*
|
|
174
|
+
* @defaultValue None: the release has no `type` attribute, which AppStream reads as `stable`
|
|
175
|
+
*/
|
|
176
|
+
type?: "development" | "snapshot" | "stable" | undefined;
|
|
177
|
+
/**
|
|
178
|
+
* AppStream update urgency.
|
|
179
|
+
*
|
|
180
|
+
* @defaultValue None: the release has no `urgency` attribute
|
|
181
|
+
*/
|
|
182
|
+
urgency?: "critical" | "high" | "low" | "medium" | undefined;
|
|
183
|
+
/**
|
|
184
|
+
* Release notes, with each entry rendered as a paragraph.
|
|
185
|
+
*
|
|
186
|
+
* @defaultValue `[]`
|
|
187
|
+
*/
|
|
188
|
+
notes?: string[] | undefined;
|
|
189
|
+
/**
|
|
190
|
+
* Absolute URL containing further details about the release.
|
|
191
|
+
*
|
|
192
|
+
* @defaultValue None: the release has no `url` element
|
|
193
|
+
*/
|
|
194
|
+
url?: string | undefined;
|
|
195
|
+
};
|
|
93
196
|
|
|
94
197
|
const releaseSchema = z.strictObject({
|
|
95
198
|
version: text(VERSION_ERROR),
|
|
@@ -98,34 +201,82 @@ const releaseSchema = z.strictObject({
|
|
|
98
201
|
urgency: z.enum(RELEASE_URGENCIES, { error: "must be one of critical, high, low, medium" }).optional(),
|
|
99
202
|
notes: textList("release note paragraph", "must be an array of release note paragraphs").optional(),
|
|
100
203
|
url: url(URL_ERROR).optional(),
|
|
101
|
-
})
|
|
204
|
+
}) satisfies z.ZodType<DeployReleaseOptions>;
|
|
205
|
+
|
|
206
|
+
/** One file extension and MIME type registered through `deploy.fileAssociations`. */
|
|
207
|
+
type DeployFileAssociationOptions = {
|
|
208
|
+
/** File extension to associate with the application, without a leading dot. */
|
|
209
|
+
extension: string;
|
|
210
|
+
/** MIME type registered for the file extension. */
|
|
211
|
+
mimeType: string;
|
|
212
|
+
/**
|
|
213
|
+
* Human-readable description of the file type.
|
|
214
|
+
*
|
|
215
|
+
* @defaultValue None: the MIME type has no `comment`
|
|
216
|
+
*/
|
|
217
|
+
description?: string | undefined;
|
|
218
|
+
};
|
|
102
219
|
|
|
103
220
|
const fileAssociationSchema = z.strictObject({
|
|
104
221
|
extension: fileExtension("must be a file extension without a leading dot"),
|
|
105
222
|
mimeType: text("must be a MIME type such as text/plain"),
|
|
106
223
|
description: text("must be a description of the file type").optional(),
|
|
107
|
-
})
|
|
224
|
+
}) satisfies z.ZodType<DeployFileAssociationOptions>;
|
|
225
|
+
|
|
226
|
+
/** One desktop launcher action in `deploy.desktopActions`, keyed by its action ID. */
|
|
227
|
+
type DeployDesktopActionOptions = {
|
|
228
|
+
/** Action label shown in the desktop launcher menu. */
|
|
229
|
+
name: string;
|
|
230
|
+
/**
|
|
231
|
+
* Arguments appended to the launch command when the action is chosen. Launchers activate the `app.<id>`
|
|
232
|
+
* application action of a D-Bus-activatable application instead of running this command.
|
|
233
|
+
*
|
|
234
|
+
* @defaultValue `[]`
|
|
235
|
+
*/
|
|
236
|
+
args?: string[] | undefined;
|
|
237
|
+
/**
|
|
238
|
+
* Icon theme name used for the action.
|
|
239
|
+
*
|
|
240
|
+
* @defaultValue None: the action has no `Icon` key
|
|
241
|
+
*/
|
|
242
|
+
icon?: string | undefined;
|
|
243
|
+
};
|
|
108
244
|
|
|
109
245
|
const desktopActionSchema = z.strictObject({
|
|
110
246
|
name: text("must be an action name"),
|
|
111
247
|
args: textList("argument", "must be an array of arguments appended to Exec").optional(),
|
|
112
248
|
icon: text("must be an icon name").optional(),
|
|
113
|
-
})
|
|
249
|
+
}) satisfies z.ZodType<DeployDesktopActionOptions>;
|
|
250
|
+
|
|
251
|
+
/** The `deploy.branding` colors software centers use around the application's listing. */
|
|
252
|
+
type DeployBrandingOptions = {
|
|
253
|
+
/** Primary AppStream branding color for light mode, in `#rrggbb` format. */
|
|
254
|
+
light: string;
|
|
255
|
+
/** Primary AppStream branding color for dark mode, in `#rrggbb` format. */
|
|
256
|
+
dark: string;
|
|
257
|
+
};
|
|
114
258
|
|
|
115
259
|
const brandingSchema = z.strictObject({
|
|
116
260
|
light: hexColorSchema,
|
|
117
261
|
dark: hexColorSchema,
|
|
118
|
-
})
|
|
262
|
+
}) satisfies z.ZodType<DeployBrandingOptions>;
|
|
119
263
|
|
|
120
264
|
/**
|
|
121
|
-
* A `deploy.extraFiles` entry in object form: the source file, resolved against the project root,
|
|
122
|
-
* installed at the entry's prefix-relative destination, and the octal mode it is installed with.
|
|
265
|
+
* A `deploy.extraFiles` entry in object form: the source file or directory, resolved against the project root,
|
|
266
|
+
* that is installed at the entry's prefix-relative destination, and the octal mode it is installed with.
|
|
123
267
|
*/
|
|
124
|
-
type DeployExtraFileOptions =
|
|
125
|
-
/**
|
|
268
|
+
type DeployExtraFileOptions = {
|
|
269
|
+
/** Source file or directory path, resolved relative to the project root. */
|
|
270
|
+
source: string;
|
|
271
|
+
/**
|
|
272
|
+
* Octal file mode, applied to every file of a directory source. Setuid and setgid bits are rejected.
|
|
273
|
+
*
|
|
274
|
+
* @defaultValue `"0755"` for a file whose source is executable, `"0644"` otherwise
|
|
275
|
+
*/
|
|
126
276
|
mode?: string | undefined;
|
|
127
277
|
};
|
|
128
|
-
|
|
278
|
+
|
|
279
|
+
const extraFileSchema = z.strictObject({
|
|
129
280
|
source: text(SOURCE_PATH_ERROR),
|
|
130
281
|
mode: z
|
|
131
282
|
.string({ error: FILE_MODE_ERROR })
|
|
@@ -134,14 +285,14 @@ const extraFileSchema: z.ZodType<DeployExtraFileOptions> = z.strictObject({
|
|
|
134
285
|
error: FILE_MODE_ERROR,
|
|
135
286
|
})
|
|
136
287
|
.optional(),
|
|
137
|
-
})
|
|
288
|
+
}) satisfies z.ZodType<DeployExtraFileOptions>;
|
|
138
289
|
|
|
139
290
|
const extraFileEntrySchema = z.union([text(SOURCE_PATH_ERROR), extraFileSchema], { error: EXTRA_FILE_ERROR });
|
|
140
291
|
|
|
141
292
|
const launcherEnvSchema = z.record(
|
|
142
293
|
z.string({ error: LAUNCHER_ENV_NAME_ERROR }).regex(LAUNCHER_ENV_NAME_PATTERN, { error: LAUNCHER_ENV_NAME_ERROR }),
|
|
143
294
|
z.string({ error: LAUNCHER_ENV_ERROR }).refine((value) => !value.includes("\0"), { error: LAUNCHER_ENV_ERROR }),
|
|
144
|
-
{ error: (issue) => issue.code === "invalid_key" ? LAUNCHER_ENV_NAME_ERROR : LAUNCHER_ENV_ERROR },
|
|
295
|
+
{ error: (issue) => (issue.code === "invalid_key" ? LAUNCHER_ENV_NAME_ERROR : LAUNCHER_ENV_ERROR) },
|
|
145
296
|
);
|
|
146
297
|
|
|
147
298
|
const nodeFlagsSchema = z.array(
|
|
@@ -155,62 +306,377 @@ const nodeFlagsSchema = z.array(
|
|
|
155
306
|
* The `deploy.node` options: where the Node.js runtime bundled with the application comes from, the version it
|
|
156
307
|
* is expected to be, whether its binary is stripped, and whether the launcher enables the compile cache.
|
|
157
308
|
*/
|
|
158
|
-
type DeployNodeOptions =
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
309
|
+
type DeployNodeOptions = {
|
|
310
|
+
/**
|
|
311
|
+
* Runtime source: an official download, the running Node.js executable, or `path`.
|
|
312
|
+
*
|
|
313
|
+
* @defaultValue `"download"`
|
|
314
|
+
*/
|
|
315
|
+
source?: "download" | "host" | "path" | undefined;
|
|
316
|
+
/**
|
|
317
|
+
* Expected Node.js version. Only a downloaded runtime uses it.
|
|
318
|
+
*
|
|
319
|
+
* @defaultValue `"26.13.1"` for a downloaded runtime
|
|
320
|
+
*/
|
|
164
321
|
version?: string | undefined;
|
|
322
|
+
/**
|
|
323
|
+
* Node.js executable path relative to the project root, required when `source` is `path`.
|
|
324
|
+
*
|
|
325
|
+
* @defaultValue None; required when `source` is `"path"`
|
|
326
|
+
*/
|
|
327
|
+
path?: string | undefined;
|
|
328
|
+
/**
|
|
329
|
+
* Strip the runtime when its architecture matches the host and `strip` is available.
|
|
330
|
+
*
|
|
331
|
+
* @defaultValue `true`
|
|
332
|
+
*/
|
|
333
|
+
shouldStrip?: boolean | undefined;
|
|
334
|
+
/**
|
|
335
|
+
* Enable Node.js compile caching in the generated launcher.
|
|
336
|
+
*
|
|
337
|
+
* @defaultValue `true`
|
|
338
|
+
*/
|
|
339
|
+
shouldUseCompileCache?: boolean | undefined;
|
|
165
340
|
};
|
|
166
|
-
|
|
341
|
+
|
|
342
|
+
const nodeRuntimeSchema = z.strictObject({
|
|
167
343
|
source: z.enum(NODE_SOURCES, { error: "must be one of download, host, path" }).optional(),
|
|
168
344
|
version: text("must be a Node.js version such as 26.7.0").optional(),
|
|
169
345
|
path: text("must be a path to a node binary").optional(),
|
|
170
346
|
shouldStrip: flag(BOOLEAN_ERROR).optional(),
|
|
171
347
|
shouldUseCompileCache: flag(BOOLEAN_ERROR).optional(),
|
|
172
|
-
})
|
|
348
|
+
}) satisfies z.ZodType<DeployNodeOptions>;
|
|
349
|
+
|
|
350
|
+
/**
|
|
351
|
+
* The `deploy.scripts` options: maintainer scripts for Debian and RPM packages. Each value is a path to a
|
|
352
|
+
* shell script file, not inline shell; the package carries the file's content.
|
|
353
|
+
*/
|
|
354
|
+
type DeployScriptsOptions = {
|
|
355
|
+
/**
|
|
356
|
+
* Path to a shell script, relative to the project root, run before installing a Debian or RPM package.
|
|
357
|
+
*
|
|
358
|
+
* @defaultValue None: `gtkx deploy` adds no script for this step
|
|
359
|
+
*/
|
|
360
|
+
preInstall?: string | undefined;
|
|
361
|
+
/**
|
|
362
|
+
* Path to a shell script, relative to the project root, run after installing a Debian or RPM package.
|
|
363
|
+
*
|
|
364
|
+
* @defaultValue None: `gtkx deploy` adds no script for this step
|
|
365
|
+
*/
|
|
366
|
+
postInstall?: string | undefined;
|
|
367
|
+
/**
|
|
368
|
+
* Path to a shell script, relative to the project root, run before removing a Debian or RPM package.
|
|
369
|
+
*
|
|
370
|
+
* @defaultValue None: `gtkx deploy` adds no script for this step
|
|
371
|
+
*/
|
|
372
|
+
preRemove?: string | undefined;
|
|
373
|
+
/**
|
|
374
|
+
* Path to a shell script, relative to the project root, run after removing a Debian or RPM package.
|
|
375
|
+
*
|
|
376
|
+
* @defaultValue None: `gtkx deploy` adds no script for this step
|
|
377
|
+
*/
|
|
378
|
+
postRemove?: string | undefined;
|
|
379
|
+
};
|
|
173
380
|
|
|
174
381
|
const scriptsSchema = z.strictObject({
|
|
175
382
|
preInstall: text(SCRIPT_ERROR).optional(),
|
|
176
383
|
postInstall: text(SCRIPT_ERROR).optional(),
|
|
177
384
|
preRemove: text(SCRIPT_ERROR).optional(),
|
|
178
385
|
postRemove: text(SCRIPT_ERROR).optional(),
|
|
179
|
-
})
|
|
386
|
+
}) satisfies z.ZodType<DeployScriptsOptions>;
|
|
387
|
+
|
|
388
|
+
/** The `deploy.tools` options: executables `gtkx deploy` runs instead of the ones it downloads. */
|
|
389
|
+
type DeployToolsOptions = {
|
|
390
|
+
/**
|
|
391
|
+
* nFPM executable name or path relative to the project root.
|
|
392
|
+
*
|
|
393
|
+
* @defaultValue A pinned nFPM release that `gtkx deploy` downloads and verifies against its `sha256`
|
|
394
|
+
*/
|
|
395
|
+
nfpm?: string | undefined;
|
|
396
|
+
};
|
|
397
|
+
|
|
398
|
+
const toolsSchema = z.strictObject({
|
|
399
|
+
nfpm: text("must be an nFPM executable name or path").optional(),
|
|
400
|
+
}) satisfies z.ZodType<DeployToolsOptions>;
|
|
401
|
+
|
|
402
|
+
/** The `deploy.deb` options: Debian package metadata and compression. */
|
|
403
|
+
type DeployDebOptions = {
|
|
404
|
+
/**
|
|
405
|
+
* Debian package name.
|
|
406
|
+
*
|
|
407
|
+
* @defaultValue `deploy.binaryName`
|
|
408
|
+
*/
|
|
409
|
+
packageName?: string | undefined;
|
|
410
|
+
/**
|
|
411
|
+
* Debian archive section.
|
|
412
|
+
*
|
|
413
|
+
* @defaultValue Derived from `deploy.categories`, such as `devel` for `Development`, or `misc` when no
|
|
414
|
+
* category matches
|
|
415
|
+
*/
|
|
416
|
+
section?: string | undefined;
|
|
417
|
+
/**
|
|
418
|
+
* Debian package priority.
|
|
419
|
+
*
|
|
420
|
+
* @defaultValue `"optional"`
|
|
421
|
+
*/
|
|
422
|
+
priority?: string | undefined;
|
|
423
|
+
/**
|
|
424
|
+
* Compression used for the Debian package payload.
|
|
425
|
+
*
|
|
426
|
+
* @defaultValue nFPM's default, `gzip`
|
|
427
|
+
*/
|
|
428
|
+
compression?: "gzip" | "none" | "xz" | "zstd" | undefined;
|
|
429
|
+
/**
|
|
430
|
+
* Additional Debian control fields, keyed by field name.
|
|
431
|
+
*
|
|
432
|
+
* @defaultValue `{}`
|
|
433
|
+
*/
|
|
434
|
+
fields?: Record<string, string> | undefined;
|
|
435
|
+
};
|
|
180
436
|
|
|
181
437
|
const debSchema = z.strictObject({
|
|
182
438
|
packageName: text("must be a Debian package name").optional(),
|
|
183
439
|
section: text("must be a Debian archive section").optional(),
|
|
184
440
|
priority: text("must be a Debian priority").optional(),
|
|
185
441
|
compression: z.enum(DEB_COMPRESSIONS, { error: "must be one of gzip, none, xz, zstd" }).optional(),
|
|
186
|
-
fields: textRecord("must be a control field value", "must be a record of control field names to values")
|
|
187
|
-
|
|
188
|
-
|
|
442
|
+
fields: textRecord("must be a control field value", "must be a record of control field names to values").optional(),
|
|
443
|
+
}) satisfies z.ZodType<DeployDebOptions>;
|
|
444
|
+
|
|
445
|
+
/** The `deploy.rpm` options: RPM package metadata and compression. */
|
|
446
|
+
type DeployRpmOptions = {
|
|
447
|
+
/**
|
|
448
|
+
* RPM package name.
|
|
449
|
+
*
|
|
450
|
+
* @defaultValue `deploy.binaryName`
|
|
451
|
+
*/
|
|
452
|
+
packageName?: string | undefined;
|
|
453
|
+
/**
|
|
454
|
+
* RPM package group.
|
|
455
|
+
*
|
|
456
|
+
* @defaultValue Derived from `deploy.categories`, or `Applications/System` when no category matches
|
|
457
|
+
*/
|
|
458
|
+
group?: string | undefined;
|
|
459
|
+
/**
|
|
460
|
+
* Compression used for the RPM package payload.
|
|
461
|
+
*
|
|
462
|
+
* @defaultValue nFPM's default, `gzip`
|
|
463
|
+
*/
|
|
464
|
+
compression?: "gzip" | "lzma" | "xz" | "zstd" | undefined;
|
|
465
|
+
/**
|
|
466
|
+
* Installation prefixes that the RPM package allows users to relocate.
|
|
467
|
+
*
|
|
468
|
+
* @defaultValue `[]`: the package is not relocatable
|
|
469
|
+
*/
|
|
470
|
+
prefixes?: string[] | undefined;
|
|
471
|
+
};
|
|
189
472
|
|
|
190
473
|
const rpmSchema = z.strictObject({
|
|
191
474
|
packageName: text("must be an RPM package name").optional(),
|
|
192
475
|
group: text("must be an RPM group").optional(),
|
|
193
476
|
compression: z.enum(RPM_COMPRESSIONS, { error: "must be one of gzip, lzma, xz, zstd" }).optional(),
|
|
194
477
|
prefixes: textList("prefix", "must be an array of relocation prefixes").optional(),
|
|
195
|
-
})
|
|
478
|
+
}) satisfies z.ZodType<DeployRpmOptions>;
|
|
479
|
+
|
|
480
|
+
/** The `deploy.appimage` options: AppImage file name, compression, update information and runtime. */
|
|
481
|
+
type DeployAppImageOptions = {
|
|
482
|
+
/**
|
|
483
|
+
* Output file name.
|
|
484
|
+
*
|
|
485
|
+
* @defaultValue `<name>-<version>-<arch>.AppImage`, with spaces in the display name replaced by underscores,
|
|
486
|
+
* such as `My_App-1.2.0-x86_64.AppImage`
|
|
487
|
+
*/
|
|
488
|
+
fileName?: string | undefined;
|
|
489
|
+
/**
|
|
490
|
+
* Compression explicitly requested from appimagetool.
|
|
491
|
+
*
|
|
492
|
+
* @defaultValue None: appimagetool's own default, as GTKX passes no `--comp`
|
|
493
|
+
*/
|
|
494
|
+
compression?: "zstd" | undefined;
|
|
495
|
+
/**
|
|
496
|
+
* AppImage update information string embedded in the executable.
|
|
497
|
+
*
|
|
498
|
+
* @defaultValue None: the AppImage embeds no update information, as GTKX passes no `-u`
|
|
499
|
+
*/
|
|
500
|
+
updateInformation?: string | undefined;
|
|
501
|
+
/**
|
|
502
|
+
* Custom AppImage runtime file path, resolved relative to the project root.
|
|
503
|
+
*
|
|
504
|
+
* @defaultValue A pinned `type2-runtime` release that `gtkx deploy` downloads and verifies against its
|
|
505
|
+
* `sha256`
|
|
506
|
+
*/
|
|
507
|
+
runtimeFile?: string | undefined;
|
|
508
|
+
};
|
|
196
509
|
|
|
197
510
|
const appimageSchema = z.strictObject({
|
|
198
511
|
fileName: text("must be an output file name").optional(),
|
|
199
|
-
compression: z.
|
|
512
|
+
compression: z.literal("zstd", { error: "must be zstd" }).optional(),
|
|
200
513
|
updateInformation: text("must be an AppImage update information string").optional(),
|
|
201
514
|
runtimeFile: text("must be a path to an AppImage runtime file").optional(),
|
|
202
|
-
})
|
|
515
|
+
}) satisfies z.ZodType<DeployAppImageOptions>;
|
|
516
|
+
|
|
517
|
+
/** The `deploy.flatpak.source` options: the Git revision a source-mode Flatpak builds. */
|
|
518
|
+
type DeployFlatpakSourceOptions = {
|
|
519
|
+
/**
|
|
520
|
+
* Public HTTP or HTTPS Git repository URL.
|
|
521
|
+
*
|
|
522
|
+
* @defaultValue The URL of the project's `origin` Git remote
|
|
523
|
+
*/
|
|
524
|
+
url?: string | undefined;
|
|
525
|
+
/**
|
|
526
|
+
* Git tag to build, pinned to its commit when `commit` is omitted.
|
|
527
|
+
*
|
|
528
|
+
* @defaultValue The tag that points at `HEAD`, if any, when `commit` is also omitted
|
|
529
|
+
*/
|
|
530
|
+
tag?: string | undefined;
|
|
531
|
+
/**
|
|
532
|
+
* Git commit to build.
|
|
533
|
+
*
|
|
534
|
+
* @defaultValue The commit of `tag`, or the current `HEAD` without one
|
|
535
|
+
*/
|
|
536
|
+
commit?: string | undefined;
|
|
537
|
+
};
|
|
203
538
|
|
|
204
539
|
const flatpakSourceSchema = z.strictObject({
|
|
205
540
|
url: url("must be an absolute git URL").optional(),
|
|
206
541
|
tag: text("must be a git tag").optional(),
|
|
207
542
|
commit: text("must be a git commit sha").optional(),
|
|
208
|
-
})
|
|
543
|
+
}) satisfies z.ZodType<DeployFlatpakSourceOptions>;
|
|
544
|
+
|
|
545
|
+
/** The `deploy.flatpak` options: runtime, sandbox permissions, build and distribution of the Flatpak. */
|
|
546
|
+
type DeployFlatpakOptions = {
|
|
547
|
+
/**
|
|
548
|
+
* Package local build output or build from a pinned Git source inside the SDK.
|
|
549
|
+
*
|
|
550
|
+
* @defaultValue `"prebuilt"`
|
|
551
|
+
*/
|
|
552
|
+
mode?: "prebuilt" | "source" | undefined;
|
|
553
|
+
/**
|
|
554
|
+
* Flatpak runtime ID.
|
|
555
|
+
*
|
|
556
|
+
* @defaultValue `"org.gnome.Platform"`
|
|
557
|
+
*/
|
|
558
|
+
runtime?: string | undefined;
|
|
559
|
+
/**
|
|
560
|
+
* Flatpak runtime branch.
|
|
561
|
+
*
|
|
562
|
+
* @defaultValue `"51"`
|
|
563
|
+
*/
|
|
564
|
+
runtimeVersion?: string | undefined;
|
|
565
|
+
/**
|
|
566
|
+
* Build SDK ID.
|
|
567
|
+
*
|
|
568
|
+
* @defaultValue `"org.gnome.Sdk"`
|
|
569
|
+
*/
|
|
570
|
+
sdk?: string | undefined;
|
|
571
|
+
/**
|
|
572
|
+
* Node.js SDK extension used in source mode.
|
|
573
|
+
*
|
|
574
|
+
* @defaultValue `"org.freedesktop.Sdk.Extension.node26"`
|
|
575
|
+
*/
|
|
576
|
+
nodeExtension?: string | undefined;
|
|
577
|
+
/**
|
|
578
|
+
* Additional SDK extension IDs included in the build environment.
|
|
579
|
+
*
|
|
580
|
+
* @defaultValue `[]`
|
|
581
|
+
*/
|
|
582
|
+
sdkExtensions?: string[] | undefined;
|
|
583
|
+
/**
|
|
584
|
+
* Optional Flatpak base application ID.
|
|
585
|
+
*
|
|
586
|
+
* @defaultValue None: the manifest has no `base`
|
|
587
|
+
*/
|
|
588
|
+
base?: string | undefined;
|
|
589
|
+
/**
|
|
590
|
+
* Branch of the base application.
|
|
591
|
+
*
|
|
592
|
+
* @defaultValue None: the manifest has no `base-version`
|
|
593
|
+
*/
|
|
594
|
+
baseVersion?: string | undefined;
|
|
595
|
+
/**
|
|
596
|
+
* Exported application branch.
|
|
597
|
+
*
|
|
598
|
+
* @defaultValue `"stable"`
|
|
599
|
+
*/
|
|
600
|
+
branch?: string | undefined;
|
|
601
|
+
/**
|
|
602
|
+
* Sandbox permissions added to the defaults. A negation such as `--nosocket=fallback-x11` removes the
|
|
603
|
+
* matching default.
|
|
604
|
+
*
|
|
605
|
+
* @defaultValue `[]`, on top of `--share=ipc`, `--socket=wayland`, `--socket=fallback-x11` and
|
|
606
|
+
* `--device=dri`
|
|
607
|
+
* @example
|
|
608
|
+
* ```ts
|
|
609
|
+
* finishArgs: ["--share=network", "--filesystem=xdg-documents"],
|
|
610
|
+
* ```
|
|
611
|
+
*/
|
|
612
|
+
finishArgs?: string[] | undefined;
|
|
613
|
+
/**
|
|
614
|
+
* Patterns added to the cleanup defaults. An empty array disables cleanup.
|
|
615
|
+
*
|
|
616
|
+
* @defaultValue `[]`, on top of `/include`, `/share/pkgconfig`, `*.la` and `*.a`
|
|
617
|
+
*/
|
|
618
|
+
cleanup?: string[] | undefined;
|
|
619
|
+
/**
|
|
620
|
+
* Additional shell commands appended to the application's Flatpak build commands.
|
|
621
|
+
*
|
|
622
|
+
* @defaultValue `[]`
|
|
623
|
+
*/
|
|
624
|
+
buildCommands?: string[] | undefined;
|
|
625
|
+
/**
|
|
626
|
+
* Additional Flatpak manifest modules built before the application module.
|
|
627
|
+
*
|
|
628
|
+
* @defaultValue `[]`
|
|
629
|
+
*/
|
|
630
|
+
modules?: unknown[] | undefined;
|
|
631
|
+
/**
|
|
632
|
+
* Git repository and revision used for source builds.
|
|
633
|
+
*
|
|
634
|
+
* @defaultValue `{}`: the `origin` remote at the tagged or current commit
|
|
635
|
+
*/
|
|
636
|
+
source?: DeployFlatpakSourceOptions | undefined;
|
|
637
|
+
/**
|
|
638
|
+
* Package manager used for offline source builds.
|
|
639
|
+
*
|
|
640
|
+
* @defaultValue Detected from the first lockfile found: `pnpm-lock.yaml`, `yarn.lock`, then
|
|
641
|
+
* `package-lock.json`
|
|
642
|
+
*/
|
|
643
|
+
packageManager?: "npm" | "pnpm" | "yarn" | undefined;
|
|
644
|
+
/**
|
|
645
|
+
* Lockfile path relative to the project root.
|
|
646
|
+
*
|
|
647
|
+
* @defaultValue The package manager's standard lockfile, such as `pnpm-lock.yaml`
|
|
648
|
+
*/
|
|
649
|
+
lockfile?: string | undefined;
|
|
650
|
+
/**
|
|
651
|
+
* Runtime repository URL embedded in the bundle.
|
|
652
|
+
*
|
|
653
|
+
* @defaultValue `"https://dl.flathub.org/repo/flathub.flatpakrepo"`
|
|
654
|
+
*/
|
|
655
|
+
runtimeRepo?: string | undefined;
|
|
656
|
+
/**
|
|
657
|
+
* Emit a `.flatpak` bundle in addition to the local repository.
|
|
658
|
+
*
|
|
659
|
+
* @defaultValue `true`
|
|
660
|
+
*/
|
|
661
|
+
shouldEmitBundle?: boolean | undefined;
|
|
662
|
+
/**
|
|
663
|
+
* Install the built application into the current user's Flatpak installation.
|
|
664
|
+
*
|
|
665
|
+
* @defaultValue `false`
|
|
666
|
+
*/
|
|
667
|
+
shouldInstall?: boolean | undefined;
|
|
668
|
+
/**
|
|
669
|
+
* Allow flatpak-builder to use rofiles-fuse. Set to `false` where FUSE is unavailable.
|
|
670
|
+
*
|
|
671
|
+
* @defaultValue `true`
|
|
672
|
+
*/
|
|
673
|
+
shouldUseRofilesFuse?: boolean | undefined;
|
|
674
|
+
};
|
|
209
675
|
|
|
210
676
|
const flatpakSchema = z.strictObject({
|
|
211
677
|
mode: z.enum(FLATPAK_MODES, { error: 'must be "prebuilt" or "source"' }).optional(),
|
|
212
678
|
runtime: text("must be a runtime id").optional(),
|
|
213
|
-
runtimeVersion: text('must be a runtime branch such as "
|
|
679
|
+
runtimeVersion: text('must be a runtime branch such as "51"').optional(),
|
|
214
680
|
sdk: text("must be an SDK id").optional(),
|
|
215
681
|
nodeExtension: text("must be a Node SDK extension id").optional(),
|
|
216
682
|
sdkExtensions: textList("SDK extension id", "must be an array of SDK extension ids").optional(),
|
|
@@ -228,7 +694,37 @@ const flatpakSchema = z.strictObject({
|
|
|
228
694
|
shouldEmitBundle: flag(BOOLEAN_ERROR).optional(),
|
|
229
695
|
shouldInstall: flag(BOOLEAN_ERROR).optional(),
|
|
230
696
|
shouldUseRofilesFuse: flag(BOOLEAN_ERROR).optional(),
|
|
231
|
-
})
|
|
697
|
+
}) satisfies z.ZodType<DeployFlatpakOptions>;
|
|
698
|
+
|
|
699
|
+
/** The `deploy.signing.deb` options: the key and method that sign the Debian package. */
|
|
700
|
+
type DeployDebSigningOptions = {
|
|
701
|
+
/** PGP private key file used to sign the Debian package. */
|
|
702
|
+
keyFile: string;
|
|
703
|
+
/**
|
|
704
|
+
* PGP signing key ID.
|
|
705
|
+
*
|
|
706
|
+
* @defaultValue nFPM's choice: the first subkey of `keyFile` that can sign
|
|
707
|
+
*/
|
|
708
|
+
keyId?: string | undefined;
|
|
709
|
+
/**
|
|
710
|
+
* Debian package signing method.
|
|
711
|
+
*
|
|
712
|
+
* @defaultValue nFPM's default, `"debsign"`
|
|
713
|
+
*/
|
|
714
|
+
method?: "debsign" | "dpkg-sig" | undefined;
|
|
715
|
+
/**
|
|
716
|
+
* Debian signature role.
|
|
717
|
+
*
|
|
718
|
+
* @defaultValue nFPM's default, `"origin"`
|
|
719
|
+
*/
|
|
720
|
+
type?: "archive" | "maint" | "origin" | undefined;
|
|
721
|
+
/**
|
|
722
|
+
* Name and email address recorded as the signer.
|
|
723
|
+
*
|
|
724
|
+
* @defaultValue None: GTKX passes no `signer` to nFPM
|
|
725
|
+
*/
|
|
726
|
+
signer?: string | undefined;
|
|
727
|
+
};
|
|
232
728
|
|
|
233
729
|
const debSigningSchema = z.strictObject({
|
|
234
730
|
keyFile: text(KEY_FILE_ERROR),
|
|
@@ -236,28 +732,135 @@ const debSigningSchema = z.strictObject({
|
|
|
236
732
|
method: z.enum(DEB_SIGN_METHODS, { error: 'must be "debsign" or "dpkg-sig"' }).optional(),
|
|
237
733
|
type: z.enum(DEB_SIGN_TYPES, { error: "must be one of archive, maint, origin" }).optional(),
|
|
238
734
|
signer: text("must be a signer name and email").optional(),
|
|
239
|
-
})
|
|
735
|
+
}) satisfies z.ZodType<DeployDebSigningOptions>;
|
|
736
|
+
|
|
737
|
+
/** The `deploy.signing.rpm` options: the key that signs the RPM package. */
|
|
738
|
+
type DeployRpmSigningOptions = {
|
|
739
|
+
/** PGP private key file used to sign the RPM package. */
|
|
740
|
+
keyFile: string;
|
|
741
|
+
/**
|
|
742
|
+
* PGP signing key ID.
|
|
743
|
+
*
|
|
744
|
+
* @defaultValue nFPM's choice: the first subkey of `keyFile` that can sign
|
|
745
|
+
*/
|
|
746
|
+
keyId?: string | undefined;
|
|
747
|
+
};
|
|
240
748
|
|
|
241
749
|
const rpmSigningSchema = z.strictObject({
|
|
242
750
|
keyFile: text(KEY_FILE_ERROR),
|
|
243
751
|
keyId: text(KEY_ID_ERROR).optional(),
|
|
244
|
-
})
|
|
752
|
+
}) satisfies z.ZodType<DeployRpmSigningOptions>;
|
|
753
|
+
|
|
754
|
+
/** The `deploy.signing.flatpak` options: the GPG key that signs the Flatpak repository commit. */
|
|
755
|
+
type DeployFlatpakSigningOptions = {
|
|
756
|
+
/**
|
|
757
|
+
* GPG key ID that signs the Flatpak repository commit. The bundle embeds its public key, so
|
|
758
|
+
* `flatpak install --bundle` verifies the signature.
|
|
759
|
+
*/
|
|
760
|
+
gpgKeyId: string;
|
|
761
|
+
/**
|
|
762
|
+
* GPG home directory containing the signing key, passed to GPG as given.
|
|
763
|
+
*
|
|
764
|
+
* @defaultValue GPG's default, `$GNUPGHOME` or `~/.gnupg`
|
|
765
|
+
*/
|
|
766
|
+
gpgHomeDir?: string | undefined;
|
|
767
|
+
};
|
|
245
768
|
|
|
246
769
|
const flatpakSigningSchema = z.strictObject({
|
|
247
770
|
gpgKeyId: text("must be a GPG key id"),
|
|
248
771
|
gpgHomeDir: text("must be a path to a GPG home directory").optional(),
|
|
249
|
-
})
|
|
772
|
+
}) satisfies z.ZodType<DeployFlatpakSigningOptions>;
|
|
773
|
+
|
|
774
|
+
/** The `deploy.signing.appimage` options: the GPG key that signs the AppImage. */
|
|
775
|
+
type DeployAppImageSigningOptions = {
|
|
776
|
+
/** GPG key ID used by appimagetool to sign the AppImage. */
|
|
777
|
+
gpgKeyId: string;
|
|
778
|
+
};
|
|
250
779
|
|
|
251
780
|
const appimageSigningSchema = z.strictObject({
|
|
252
781
|
gpgKeyId: text("must be a GPG key id"),
|
|
253
|
-
})
|
|
782
|
+
}) satisfies z.ZodType<DeployAppImageSigningOptions>;
|
|
783
|
+
|
|
784
|
+
/** The `deploy.signing` options: how each package format is signed. Formats without an entry stay unsigned. */
|
|
785
|
+
type DeploySigningOptions = {
|
|
786
|
+
/**
|
|
787
|
+
* AppImage signing options.
|
|
788
|
+
*
|
|
789
|
+
* @defaultValue None: `gtkx deploy` leaves this format unsigned
|
|
790
|
+
*/
|
|
791
|
+
appimage?: DeployAppImageSigningOptions | undefined;
|
|
792
|
+
/**
|
|
793
|
+
* Debian package signing options.
|
|
794
|
+
*
|
|
795
|
+
* @defaultValue None: `gtkx deploy` leaves this format unsigned
|
|
796
|
+
*/
|
|
797
|
+
deb?: DeployDebSigningOptions | undefined;
|
|
798
|
+
/**
|
|
799
|
+
* Flatpak bundle signing options.
|
|
800
|
+
*
|
|
801
|
+
* @defaultValue None: `gtkx deploy` leaves this format unsigned
|
|
802
|
+
*/
|
|
803
|
+
flatpak?: DeployFlatpakSigningOptions | undefined;
|
|
804
|
+
/**
|
|
805
|
+
* RPM package signing options.
|
|
806
|
+
*
|
|
807
|
+
* @defaultValue None: `gtkx deploy` leaves this format unsigned
|
|
808
|
+
*/
|
|
809
|
+
rpm?: DeployRpmSigningOptions | undefined;
|
|
810
|
+
};
|
|
254
811
|
|
|
255
812
|
const signingSchema = z.strictObject({
|
|
256
813
|
appimage: appimageSigningSchema.optional(),
|
|
257
814
|
deb: debSigningSchema.optional(),
|
|
258
815
|
flatpak: flatpakSigningSchema.optional(),
|
|
259
816
|
rpm: rpmSigningSchema.optional(),
|
|
260
|
-
})
|
|
817
|
+
}) satisfies z.ZodType<DeploySigningOptions>;
|
|
818
|
+
|
|
819
|
+
/** The `deploy.relations` options: package relationships besides dependencies, for Debian and RPM. */
|
|
820
|
+
type DeployRelationsOptions = {
|
|
821
|
+
/**
|
|
822
|
+
* Recommended packages that extend the application's functionality.
|
|
823
|
+
*
|
|
824
|
+
* @defaultValue `{}`
|
|
825
|
+
*/
|
|
826
|
+
recommends?: DeployPackageRelationOptions | undefined;
|
|
827
|
+
/**
|
|
828
|
+
* Suggested companion packages.
|
|
829
|
+
*
|
|
830
|
+
* @defaultValue `{}`
|
|
831
|
+
*/
|
|
832
|
+
suggests?: DeployPackageRelationOptions | undefined;
|
|
833
|
+
/**
|
|
834
|
+
* Package names or capabilities supplied by this package.
|
|
835
|
+
*
|
|
836
|
+
* @defaultValue `{}`
|
|
837
|
+
*/
|
|
838
|
+
provides?: DeployPackageRelationOptions | undefined;
|
|
839
|
+
/**
|
|
840
|
+
* Packages that cannot be installed alongside this package.
|
|
841
|
+
*
|
|
842
|
+
* @defaultValue `{}`
|
|
843
|
+
*/
|
|
844
|
+
conflicts?: DeployPackageRelationOptions | undefined;
|
|
845
|
+
/**
|
|
846
|
+
* Packages whose files this package may replace.
|
|
847
|
+
*
|
|
848
|
+
* @defaultValue `{}`
|
|
849
|
+
*/
|
|
850
|
+
replaces?: DeployPackageRelationOptions | undefined;
|
|
851
|
+
/**
|
|
852
|
+
* Debian packages made incompatible by installing this package. Debian packages only.
|
|
853
|
+
*
|
|
854
|
+
* @defaultValue `{}`
|
|
855
|
+
*/
|
|
856
|
+
breaks?: DeployDebPackageRelationOptions | undefined;
|
|
857
|
+
/**
|
|
858
|
+
* Debian dependencies required before unpacking this package. Debian packages only.
|
|
859
|
+
*
|
|
860
|
+
* @defaultValue `{}`
|
|
861
|
+
*/
|
|
862
|
+
preDepends?: DeployDebPackageRelationOptions | undefined;
|
|
863
|
+
};
|
|
261
864
|
|
|
262
865
|
const extraRelationsSchema = z.strictObject({
|
|
263
866
|
recommends: relationsSchema.optional(),
|
|
@@ -265,9 +868,349 @@ const extraRelationsSchema = z.strictObject({
|
|
|
265
868
|
provides: relationsSchema.optional(),
|
|
266
869
|
conflicts: relationsSchema.optional(),
|
|
267
870
|
replaces: relationsSchema.optional(),
|
|
268
|
-
breaks:
|
|
269
|
-
preDepends:
|
|
270
|
-
})
|
|
871
|
+
breaks: debRelationsSchema.optional(),
|
|
872
|
+
preDepends: debRelationsSchema.optional(),
|
|
873
|
+
}) satisfies z.ZodType<DeployRelationsOptions>;
|
|
874
|
+
|
|
875
|
+
/** The `deploy` options: application metadata, bundled runtime settings, and packaging options for `gtkx deploy`. */
|
|
876
|
+
type DeployOptions = {
|
|
877
|
+
/**
|
|
878
|
+
* Package formats to build. `gtkx deploy --target` overrides it.
|
|
879
|
+
*
|
|
880
|
+
* @defaultValue `["flatpak"]`
|
|
881
|
+
*/
|
|
882
|
+
targets?: ("appimage" | "deb" | "flatpak" | "rpm")[] | undefined;
|
|
883
|
+
/**
|
|
884
|
+
* Target CPU architectures. `gtkx deploy --arch` overrides it.
|
|
885
|
+
*
|
|
886
|
+
* @defaultValue The host architecture, `arm64` or `x64`
|
|
887
|
+
*/
|
|
888
|
+
architectures?: ("arm64" | "x64")[] | undefined;
|
|
889
|
+
/**
|
|
890
|
+
* Deployment directory relative to the project root, with packages in its `out` directory. It must be below
|
|
891
|
+
* the project root and outside `.gtkx`, which GTKX reserves for generated files. `gtkx deploy --out` overrides it.
|
|
892
|
+
*
|
|
893
|
+
* @defaultValue `"build"`
|
|
894
|
+
*/
|
|
895
|
+
outDir?: string | undefined;
|
|
896
|
+
/**
|
|
897
|
+
* Display name.
|
|
898
|
+
*
|
|
899
|
+
* @defaultValue The `package.json` name without its scope, title-cased with spaces for hyphens and
|
|
900
|
+
* underscores, such as `Tasks App` for `@example/tasks-app`; or the last segment of the application ID
|
|
901
|
+
*/
|
|
902
|
+
name?: string | undefined;
|
|
903
|
+
/**
|
|
904
|
+
* Generic application description shown by desktop launchers, such as `Text Editor`.
|
|
905
|
+
*
|
|
906
|
+
* @defaultValue None: the desktop entry has no `GenericName` key
|
|
907
|
+
*/
|
|
908
|
+
genericName?: string | undefined;
|
|
909
|
+
/**
|
|
910
|
+
* Launcher command name, also used as the package name. A configured value is normalized the same way as the
|
|
911
|
+
* default.
|
|
912
|
+
*
|
|
913
|
+
* @defaultValue The `package.json` name without its scope, lowercased with hyphens for other characters; or
|
|
914
|
+
* the last segment of the application ID
|
|
915
|
+
*/
|
|
916
|
+
binaryName?: string | undefined;
|
|
917
|
+
/**
|
|
918
|
+
* Application version. Deployment fails when neither this nor the `package.json` version is set.
|
|
919
|
+
*
|
|
920
|
+
* @defaultValue The `version` in `package.json`
|
|
921
|
+
*/
|
|
922
|
+
version?: string | undefined;
|
|
923
|
+
/**
|
|
924
|
+
* Debian packaging revision and RPM release.
|
|
925
|
+
*
|
|
926
|
+
* @defaultValue `"1"`
|
|
927
|
+
*/
|
|
928
|
+
release?: string | undefined;
|
|
929
|
+
/**
|
|
930
|
+
* Non-negative Debian and RPM version epoch.
|
|
931
|
+
*
|
|
932
|
+
* @defaultValue None: package metadata has no `epoch`
|
|
933
|
+
*/
|
|
934
|
+
epoch?: number | undefined;
|
|
935
|
+
/**
|
|
936
|
+
* Single-line summary without a trailing period. Deployment fails when neither this nor the `package.json`
|
|
937
|
+
* description is set.
|
|
938
|
+
*
|
|
939
|
+
* @defaultValue The first line of the `description` in `package.json`
|
|
940
|
+
*/
|
|
941
|
+
summary?: string | undefined;
|
|
942
|
+
/**
|
|
943
|
+
* Long description as paragraphs.
|
|
944
|
+
*
|
|
945
|
+
* @defaultValue `deploy.summary` as the only paragraph, also when the array is empty
|
|
946
|
+
*/
|
|
947
|
+
description?: string[] | undefined;
|
|
948
|
+
/**
|
|
949
|
+
* Search keywords included in the desktop entry and AppStream metadata.
|
|
950
|
+
*
|
|
951
|
+
* @defaultValue `[]`
|
|
952
|
+
*/
|
|
953
|
+
keywords?: string[] | undefined;
|
|
954
|
+
/**
|
|
955
|
+
* Freedesktop application categories used by launchers, software centers, and package metadata.
|
|
956
|
+
*
|
|
957
|
+
* @defaultValue `[]`
|
|
958
|
+
* @example
|
|
959
|
+
* ```ts
|
|
960
|
+
* categories: ["Office", "ProjectManagement"],
|
|
961
|
+
* ```
|
|
962
|
+
*/
|
|
963
|
+
categories?: string[] | undefined;
|
|
964
|
+
/**
|
|
965
|
+
* Supported MIME types, combined with types from file associations and URL protocols.
|
|
966
|
+
*
|
|
967
|
+
* @defaultValue `[]`
|
|
968
|
+
*/
|
|
969
|
+
mimeTypes?: string[] | undefined;
|
|
970
|
+
/**
|
|
971
|
+
* Developer identity and package maintainer details.
|
|
972
|
+
*
|
|
973
|
+
* @defaultValue `{}`: the details come from the `author` in `package.json`
|
|
974
|
+
*/
|
|
975
|
+
developer?: DeployDeveloperOptions | undefined;
|
|
976
|
+
/**
|
|
977
|
+
* Application license as an SPDX expression. Deployment fails when neither this nor the `package.json`
|
|
978
|
+
* license is set.
|
|
979
|
+
*
|
|
980
|
+
* @defaultValue The `license` in `package.json`
|
|
981
|
+
*/
|
|
982
|
+
license?: string | undefined;
|
|
983
|
+
/**
|
|
984
|
+
* License file path relative to the project root, installed with the application.
|
|
985
|
+
*
|
|
986
|
+
* @defaultValue The first of `LICENSE`, `LICENSE.md`, `LICENSE.txt`, `COPYING` and `COPYING.md` in the
|
|
987
|
+
* project root; none when no such file exists
|
|
988
|
+
*/
|
|
989
|
+
licenseFile?: string | undefined;
|
|
990
|
+
/**
|
|
991
|
+
* SPDX license expression for the AppStream metadata.
|
|
992
|
+
*
|
|
993
|
+
* @defaultValue `"CC0-1.0"`
|
|
994
|
+
*/
|
|
995
|
+
metadataLicense?: string | undefined;
|
|
996
|
+
/**
|
|
997
|
+
* Copyright notice.
|
|
998
|
+
*
|
|
999
|
+
* @defaultValue `Copyright © <year> <developer name>`, with the year of the build date
|
|
1000
|
+
*/
|
|
1001
|
+
copyright?: string | undefined;
|
|
1002
|
+
/**
|
|
1003
|
+
* Application homepage URL.
|
|
1004
|
+
*
|
|
1005
|
+
* @defaultValue The `homepage` in `package.json`, if set
|
|
1006
|
+
*/
|
|
1007
|
+
homepage?: string | undefined;
|
|
1008
|
+
/**
|
|
1009
|
+
* Additional AppStream links keyed by their purpose, such as `bugtracker` or `help`.
|
|
1010
|
+
*
|
|
1011
|
+
* @defaultValue `{}`
|
|
1012
|
+
* @example
|
|
1013
|
+
* ```ts
|
|
1014
|
+
* urls: { bugtracker: "https://github.com/example/tasks/issues" },
|
|
1015
|
+
* ```
|
|
1016
|
+
*/
|
|
1017
|
+
urls?:
|
|
1018
|
+
| Partial<
|
|
1019
|
+
Record<
|
|
1020
|
+
"bugtracker" | "contact" | "contribute" | "donation" | "faq" | "help" | "translate" | "vcs-browser",
|
|
1021
|
+
string
|
|
1022
|
+
>
|
|
1023
|
+
>
|
|
1024
|
+
| undefined;
|
|
1025
|
+
/**
|
|
1026
|
+
* Screenshots for software centers. Each entry requires a `url` or `file`.
|
|
1027
|
+
*
|
|
1028
|
+
* @defaultValue `[]`
|
|
1029
|
+
*/
|
|
1030
|
+
screenshots?: DeployScreenshotOptions[] | undefined;
|
|
1031
|
+
/**
|
|
1032
|
+
* Base URL for screenshot files.
|
|
1033
|
+
*
|
|
1034
|
+
* @defaultValue The raw file URL of the project's GitHub or GitLab `origin` remote on its default branch;
|
|
1035
|
+
* deployment fails without one when a screenshot sets `file`
|
|
1036
|
+
*/
|
|
1037
|
+
screenshotBaseUrl?: string | undefined;
|
|
1038
|
+
/**
|
|
1039
|
+
* Primary branding colors included in AppStream metadata.
|
|
1040
|
+
*
|
|
1041
|
+
* @defaultValue None: the metadata has no `branding` element
|
|
1042
|
+
*/
|
|
1043
|
+
branding?: DeployBrandingOptions | undefined;
|
|
1044
|
+
/**
|
|
1045
|
+
* OARS 1.1 content-rating attributes mapped to their intensities.
|
|
1046
|
+
*
|
|
1047
|
+
* @defaultValue `{}`: an empty OARS 1.1 rating, which declares no objectionable content
|
|
1048
|
+
* @example
|
|
1049
|
+
* ```ts
|
|
1050
|
+
* contentRating: { "social-chat": "intense" },
|
|
1051
|
+
* ```
|
|
1052
|
+
*/
|
|
1053
|
+
contentRating?: Record<string, "intense" | "mild" | "moderate" | "none"> | undefined;
|
|
1054
|
+
/**
|
|
1055
|
+
* AppStream release history, sorted newest first.
|
|
1056
|
+
*
|
|
1057
|
+
* @defaultValue One release for the application version, dated on the build day or by `SOURCE_DATE_EPOCH`
|
|
1058
|
+
*/
|
|
1059
|
+
releases?: DeployReleaseOptions[] | undefined;
|
|
1060
|
+
/**
|
|
1061
|
+
* Application arguments included in the desktop entry's launch command.
|
|
1062
|
+
*
|
|
1063
|
+
* @defaultValue `[]`
|
|
1064
|
+
*/
|
|
1065
|
+
execArgs?: string[] | undefined;
|
|
1066
|
+
/**
|
|
1067
|
+
* Environment variables exported by the generated launcher. Keys must be POSIX environment names.
|
|
1068
|
+
*
|
|
1069
|
+
* @defaultValue `{}`
|
|
1070
|
+
* @example
|
|
1071
|
+
* ```ts
|
|
1072
|
+
* launcherEnv: { GSK_RENDERER: "ngl" },
|
|
1073
|
+
* ```
|
|
1074
|
+
*/
|
|
1075
|
+
launcherEnv?: Record<string, string> | undefined;
|
|
1076
|
+
/**
|
|
1077
|
+
* Node.js flags placed before the application bundle in the generated launcher.
|
|
1078
|
+
*
|
|
1079
|
+
* @defaultValue `[]`
|
|
1080
|
+
* @example
|
|
1081
|
+
* ```ts
|
|
1082
|
+
* nodeFlags: ["--max-old-space-size=4096"],
|
|
1083
|
+
* ```
|
|
1084
|
+
*/
|
|
1085
|
+
nodeFlags?: string[] | undefined;
|
|
1086
|
+
/**
|
|
1087
|
+
* File extensions and MIME types registered for the application.
|
|
1088
|
+
*
|
|
1089
|
+
* @defaultValue `[]`
|
|
1090
|
+
*/
|
|
1091
|
+
fileAssociations?: DeployFileAssociationOptions[] | undefined;
|
|
1092
|
+
/**
|
|
1093
|
+
* URL schemes handled by the application, registered as `x-scheme-handler` MIME types.
|
|
1094
|
+
*
|
|
1095
|
+
* @defaultValue `[]`
|
|
1096
|
+
*/
|
|
1097
|
+
protocols?: string[] | undefined;
|
|
1098
|
+
/**
|
|
1099
|
+
* Desktop launcher actions keyed by action ID. With `isDbusActivatable`, the application must register an
|
|
1100
|
+
* `app.<id>` action for each one.
|
|
1101
|
+
*
|
|
1102
|
+
* @defaultValue `{}`
|
|
1103
|
+
* @example
|
|
1104
|
+
* ```ts
|
|
1105
|
+
* desktopActions: { today: { name: "Today", args: ["tasks://today"] } },
|
|
1106
|
+
* ```
|
|
1107
|
+
*/
|
|
1108
|
+
desktopActions?: Record<string, DeployDesktopActionOptions> | undefined;
|
|
1109
|
+
/**
|
|
1110
|
+
* Additional desktop entry keys, overriding non-reserved generated values. `DBusActivatable` and `Version`
|
|
1111
|
+
* are rejected; use `deploy.isDbusActivatable` for D-Bus activation.
|
|
1112
|
+
*
|
|
1113
|
+
* @defaultValue `{}`
|
|
1114
|
+
*/
|
|
1115
|
+
desktopEntry?: Record<string, string> | undefined;
|
|
1116
|
+
/**
|
|
1117
|
+
* Additional XML fragments appended to the AppStream component.
|
|
1118
|
+
*
|
|
1119
|
+
* @defaultValue `[]`
|
|
1120
|
+
*/
|
|
1121
|
+
metainfoExtra?: string[] | undefined;
|
|
1122
|
+
/**
|
|
1123
|
+
* Enable D-Bus activation in the desktop entry and generate a session bus service file.
|
|
1124
|
+
*
|
|
1125
|
+
* @defaultValue `false`
|
|
1126
|
+
*/
|
|
1127
|
+
isDbusActivatable?: boolean | undefined;
|
|
1128
|
+
/**
|
|
1129
|
+
* Extra files keyed by destination inside the install prefix, without a leading slash or a `..` segment.
|
|
1130
|
+
* Each value is a source path relative to the project root, or a {@link DeployExtraFileOptions} entry that
|
|
1131
|
+
* also sets the file mode. A directory source installs every file below it at the same path below the
|
|
1132
|
+
* destination; without a mode, each file is executable when its source is. Scripts installed this way, such
|
|
1133
|
+
* as a helper command's launcher, can run the bundled Node.js runtime at `lib/<binaryName>/node` in every
|
|
1134
|
+
* prebuilt target and in source Flatpaks.
|
|
1135
|
+
*
|
|
1136
|
+
* @defaultValue `{}`
|
|
1137
|
+
* @example
|
|
1138
|
+
* ```ts
|
|
1139
|
+
* extraFiles: { "share/tasks/templates": "data/templates" },
|
|
1140
|
+
* ```
|
|
1141
|
+
*/
|
|
1142
|
+
extraFiles?: Record<string, string | DeployExtraFileOptions> | undefined;
|
|
1143
|
+
/**
|
|
1144
|
+
* Minimum runtime library versions keyed by GIR library ID, used when deriving package dependencies.
|
|
1145
|
+
*
|
|
1146
|
+
* @defaultValue `{}`: library dependencies carry no version constraint
|
|
1147
|
+
* @example
|
|
1148
|
+
* ```ts
|
|
1149
|
+
* minimumLibraryVersions: { "Adw-1": "1.8", "Gtk-4.0": "4.20" },
|
|
1150
|
+
* ```
|
|
1151
|
+
*/
|
|
1152
|
+
minimumLibraryVersions?: Record<string, string> | undefined;
|
|
1153
|
+
/**
|
|
1154
|
+
* Additional Debian and RPM dependencies merged with automatically detected dependencies.
|
|
1155
|
+
*
|
|
1156
|
+
* @defaultValue None: only the detected dependencies, such as `libgtk-4-1` on Debian
|
|
1157
|
+
*/
|
|
1158
|
+
depends?: DeployPackageRelationOptions | undefined;
|
|
1159
|
+
/**
|
|
1160
|
+
* Additional package relationships for Debian and RPM.
|
|
1161
|
+
*
|
|
1162
|
+
* @defaultValue `{}`: no relations besides `depends`
|
|
1163
|
+
*/
|
|
1164
|
+
relations?: DeployRelationsOptions | undefined;
|
|
1165
|
+
/**
|
|
1166
|
+
* Installation and removal scripts for Debian and RPM packages.
|
|
1167
|
+
*
|
|
1168
|
+
* @defaultValue `{}`: no maintainer scripts
|
|
1169
|
+
*/
|
|
1170
|
+
scripts?: DeployScriptsOptions | undefined;
|
|
1171
|
+
/**
|
|
1172
|
+
* Node.js runtime bundled with prebuilt packages and launcher compile-cache settings.
|
|
1173
|
+
*
|
|
1174
|
+
* @defaultValue `{}`: a downloaded Node.js `26.13.1`, stripped, with the compile cache on
|
|
1175
|
+
*/
|
|
1176
|
+
node?: DeployNodeOptions | undefined;
|
|
1177
|
+
/**
|
|
1178
|
+
* Overrides for executables used to build packages.
|
|
1179
|
+
*
|
|
1180
|
+
* @defaultValue `{}`: `gtkx deploy` downloads the pinned tools it needs
|
|
1181
|
+
*/
|
|
1182
|
+
tools?: DeployToolsOptions | undefined;
|
|
1183
|
+
/**
|
|
1184
|
+
* Per-format package signing options.
|
|
1185
|
+
*
|
|
1186
|
+
* @defaultValue `{}`: every package is unsigned
|
|
1187
|
+
*/
|
|
1188
|
+
signing?: DeploySigningOptions | undefined;
|
|
1189
|
+
/**
|
|
1190
|
+
* AppImage packaging options.
|
|
1191
|
+
*
|
|
1192
|
+
* @defaultValue `{}`
|
|
1193
|
+
*/
|
|
1194
|
+
appimage?: DeployAppImageOptions | undefined;
|
|
1195
|
+
/**
|
|
1196
|
+
* Debian package metadata and compression options.
|
|
1197
|
+
*
|
|
1198
|
+
* @defaultValue `{}`
|
|
1199
|
+
*/
|
|
1200
|
+
deb?: DeployDebOptions | undefined;
|
|
1201
|
+
/**
|
|
1202
|
+
* Flatpak runtime, sandbox, build, and distribution options.
|
|
1203
|
+
*
|
|
1204
|
+
* @defaultValue `{}`
|
|
1205
|
+
*/
|
|
1206
|
+
flatpak?: DeployFlatpakOptions | undefined;
|
|
1207
|
+
/**
|
|
1208
|
+
* RPM package metadata and compression options.
|
|
1209
|
+
*
|
|
1210
|
+
* @defaultValue `{}`
|
|
1211
|
+
*/
|
|
1212
|
+
rpm?: DeployRpmOptions | undefined;
|
|
1213
|
+
};
|
|
271
1214
|
|
|
272
1215
|
const deploySchema = z.strictObject({
|
|
273
1216
|
targets: z
|
|
@@ -315,15 +1258,15 @@ const deploySchema = z.strictObject({
|
|
|
315
1258
|
execArgs: textList("argument", "must be an array of arguments appended to Exec").optional(),
|
|
316
1259
|
launcherEnv: launcherEnvSchema.optional(),
|
|
317
1260
|
nodeFlags: nodeFlagsSchema.optional(),
|
|
318
|
-
fileAssociations: z
|
|
319
|
-
.array(fileAssociationSchema, { error: "must be an array of file associations" })
|
|
320
|
-
.optional(),
|
|
1261
|
+
fileAssociations: z.array(fileAssociationSchema, { error: "must be an array of file associations" }).optional(),
|
|
321
1262
|
protocols: textList("URL scheme", "must be an array of URL schemes").optional(),
|
|
322
1263
|
desktopActions: z
|
|
323
1264
|
.record(z.string(), desktopActionSchema, { error: "must be a record of action ids to actions" })
|
|
324
1265
|
.optional(),
|
|
325
|
-
desktopEntry: textRecord(
|
|
326
|
-
|
|
1266
|
+
desktopEntry: textRecord(
|
|
1267
|
+
"must be a desktop entry value",
|
|
1268
|
+
"must be a record of desktop entry keys to values",
|
|
1269
|
+
).optional(),
|
|
327
1270
|
metainfoExtra: textList("AppStream XML fragment", "must be an array of AppStream XML fragments").optional(),
|
|
328
1271
|
isDbusActivatable: flag(BOOLEAN_ERROR).optional(),
|
|
329
1272
|
extraFiles: relativePathRecord(
|
|
@@ -336,11 +1279,38 @@ const deploySchema = z.strictObject({
|
|
|
336
1279
|
relations: extraRelationsSchema.optional(),
|
|
337
1280
|
scripts: scriptsSchema.optional(),
|
|
338
1281
|
node: nodeRuntimeSchema.optional(),
|
|
1282
|
+
tools: toolsSchema.optional(),
|
|
339
1283
|
signing: signingSchema.optional(),
|
|
340
1284
|
appimage: appimageSchema.optional(),
|
|
341
1285
|
deb: debSchema.optional(),
|
|
342
1286
|
flatpak: flatpakSchema.optional(),
|
|
343
1287
|
rpm: rpmSchema.optional(),
|
|
344
|
-
})
|
|
1288
|
+
}) satisfies z.ZodType<DeployOptions>;
|
|
345
1289
|
|
|
346
|
-
export {
|
|
1290
|
+
export {
|
|
1291
|
+
deploySchema,
|
|
1292
|
+
type DeployAppImageOptions,
|
|
1293
|
+
type DeployAppImageSigningOptions,
|
|
1294
|
+
type DeployBrandingOptions,
|
|
1295
|
+
type DeployDebOptions,
|
|
1296
|
+
type DeployDebPackageRelationOptions,
|
|
1297
|
+
type DeployDebSigningOptions,
|
|
1298
|
+
type DeployDesktopActionOptions,
|
|
1299
|
+
type DeployDeveloperOptions,
|
|
1300
|
+
type DeployExtraFileOptions,
|
|
1301
|
+
type DeployFileAssociationOptions,
|
|
1302
|
+
type DeployFlatpakOptions,
|
|
1303
|
+
type DeployFlatpakSigningOptions,
|
|
1304
|
+
type DeployFlatpakSourceOptions,
|
|
1305
|
+
type DeployNodeOptions,
|
|
1306
|
+
type DeployOptions,
|
|
1307
|
+
type DeployPackageRelationOptions,
|
|
1308
|
+
type DeployRelationsOptions,
|
|
1309
|
+
type DeployReleaseOptions,
|
|
1310
|
+
type DeployRpmOptions,
|
|
1311
|
+
type DeployRpmSigningOptions,
|
|
1312
|
+
type DeployScreenshotOptions,
|
|
1313
|
+
type DeployScriptsOptions,
|
|
1314
|
+
type DeploySigningOptions,
|
|
1315
|
+
type DeployToolsOptions,
|
|
1316
|
+
};
|