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