@gtkx/config 2.0.0-beta.13 → 2.0.0-beta.15

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/src/deploy.ts CHANGED
@@ -61,9 +61,17 @@ const minimumLibraryVersionsSchema = z.record(girLibrary(LIBRARY_ID_ERROR), mini
61
61
 
62
62
  /** Package relations of one kind, such as dependencies, in Debian and RPM dependency syntax. */
63
63
  type DeployPackageRelationOptions = {
64
- /** Package relations expressed in Debian dependency syntax. */
64
+ /**
65
+ * Package relations expressed in Debian dependency syntax.
66
+ *
67
+ * @defaultValue `[]`
68
+ */
65
69
  deb?: string[] | undefined;
66
- /** Package relations expressed in RPM dependency syntax. */
70
+ /**
71
+ * Package relations expressed in RPM dependency syntax.
72
+ *
73
+ * @defaultValue `[]`
74
+ */
67
75
  rpm?: string[] | undefined;
68
76
  };
69
77
 
@@ -74,7 +82,11 @@ const relationsSchema = z.strictObject({
74
82
 
75
83
  /** Package relations of a kind only Debian packages have, in Debian dependency syntax. */
76
84
  type DeployDebPackageRelationOptions = {
77
- /** Package relations expressed in Debian dependency syntax. RPM has no equivalent relation. */
85
+ /**
86
+ * Package relations expressed in Debian dependency syntax. RPM has no equivalent relation.
87
+ *
88
+ * @defaultValue `[]`
89
+ */
78
90
  deb?: string[] | undefined;
79
91
  };
80
92
 
@@ -84,11 +96,24 @@ const debRelationsSchema = z.strictObject({
84
96
 
85
97
  /** The `deploy.developer` options: who develops and maintains the application. */
86
98
  type DeployDeveloperOptions = {
87
- /** Reverse-DNS developer identifier, derived from the application ID when omitted. */
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
+ */
88
105
  id?: string | undefined;
89
- /** Developer or organization name. Defaults to the author in package.json. */
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
+ */
90
111
  name?: string | undefined;
91
- /** Maintainer email address. Defaults to the author's email in package.json. */
112
+ /**
113
+ * Maintainer email address.
114
+ *
115
+ * @defaultValue The `author` email in `package.json`, if it has one
116
+ */
92
117
  email?: string | undefined;
93
118
  };
94
119
 
@@ -100,13 +125,29 @@ const developerSchema = z.strictObject({
100
125
 
101
126
  /** One software-center screenshot in `deploy.screenshots`. Either `url` or `file` must be set. */
102
127
  type DeployScreenshotOptions = {
103
- /** Absolute URL of a PNG or JPEG screenshot. Takes precedence over `file`. */
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
+ */
104
133
  url?: string | undefined;
105
- /** Screenshot path relative to the project root, resolved against `screenshotBaseUrl`. */
134
+ /**
135
+ * Screenshot path relative to the project root, resolved against `screenshotBaseUrl`.
136
+ *
137
+ * @defaultValue None; each entry sets `url` or `file`
138
+ */
106
139
  file?: string | undefined;
107
- /** Caption displayed with the screenshot in software centers. */
140
+ /**
141
+ * Caption displayed with the screenshot in software centers.
142
+ *
143
+ * @defaultValue None: the screenshot has no `caption`
144
+ */
108
145
  caption?: string | undefined;
109
- /** Marks the primary screenshot. Only the first entry set to `true` is used. */
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
+ */
110
151
  isDefault?: boolean | undefined;
111
152
  };
112
153
 
@@ -127,13 +168,29 @@ type DeployReleaseOptions = {
127
168
  version: string;
128
169
  /** Release date in `YYYY-MM-DD` format. */
129
170
  date: string;
130
- /** AppStream release classification. */
171
+ /**
172
+ * AppStream release classification.
173
+ *
174
+ * @defaultValue None: the release has no `type` attribute, which AppStream reads as `stable`
175
+ */
131
176
  type?: "development" | "snapshot" | "stable" | undefined;
132
- /** AppStream update urgency. */
177
+ /**
178
+ * AppStream update urgency.
179
+ *
180
+ * @defaultValue None: the release has no `urgency` attribute
181
+ */
133
182
  urgency?: "critical" | "high" | "low" | "medium" | undefined;
134
- /** Release notes, with each entry rendered as a paragraph. */
183
+ /**
184
+ * Release notes, with each entry rendered as a paragraph.
185
+ *
186
+ * @defaultValue `[]`
187
+ */
135
188
  notes?: string[] | undefined;
136
- /** Absolute URL containing further details about the release. */
189
+ /**
190
+ * Absolute URL containing further details about the release.
191
+ *
192
+ * @defaultValue None: the release has no `url` element
193
+ */
137
194
  url?: string | undefined;
138
195
  };
139
196
 
@@ -152,7 +209,11 @@ type DeployFileAssociationOptions = {
152
209
  extension: string;
153
210
  /** MIME type registered for the file extension. */
154
211
  mimeType: string;
155
- /** Human-readable description of the file type. */
212
+ /**
213
+ * Human-readable description of the file type.
214
+ *
215
+ * @defaultValue None: the MIME type has no `comment`
216
+ */
156
217
  description?: string | undefined;
157
218
  };
158
219
 
@@ -169,9 +230,15 @@ type DeployDesktopActionOptions = {
169
230
  /**
170
231
  * Arguments appended to the launch command when the action is chosen. Launchers activate the `app.<id>`
171
232
  * application action of a D-Bus-activatable application instead of running this command.
233
+ *
234
+ * @defaultValue `[]`
172
235
  */
173
236
  args?: string[] | undefined;
174
- /** Icon theme name used for the action. */
237
+ /**
238
+ * Icon theme name used for the action.
239
+ *
240
+ * @defaultValue None: the action has no `Icon` key
241
+ */
175
242
  icon?: string | undefined;
176
243
  };
177
244
 
@@ -201,7 +268,11 @@ const brandingSchema = z.strictObject({
201
268
  type DeployExtraFileOptions = {
202
269
  /** Source file or directory path, resolved relative to the project root. */
203
270
  source: string;
204
- /** Octal file mode, applied to every file of a directory source. Setuid and setgid bits are rejected. */
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
+ */
205
276
  mode?: string | undefined;
206
277
  };
207
278
 
@@ -236,15 +307,35 @@ const nodeFlagsSchema = z.array(
236
307
  * is expected to be, whether its binary is stripped, and whether the launcher enables the compile cache.
237
308
  */
238
309
  type DeployNodeOptions = {
239
- /** Runtime source: an official download, the running Node.js executable, or `path`. Defaults to `download`. */
310
+ /**
311
+ * Runtime source: an official download, the running Node.js executable, or `path`.
312
+ *
313
+ * @defaultValue `"download"`
314
+ */
240
315
  source?: "download" | "host" | "path" | undefined;
241
- /** Expected Node.js version. Downloaded runtimes default to exactly 26.8.2 when omitted. */
316
+ /**
317
+ * Expected Node.js version. Only a downloaded runtime uses it.
318
+ *
319
+ * @defaultValue `"26.8.2"` for a downloaded runtime
320
+ */
242
321
  version?: string | undefined;
243
- /** Node.js executable path relative to the project root, required when `source` is `path`. */
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
+ */
244
327
  path?: string | undefined;
245
- /** Strip the runtime when its architecture matches the host and `strip` is available. Defaults to `true`. */
328
+ /**
329
+ * Strip the runtime when its architecture matches the host and `strip` is available.
330
+ *
331
+ * @defaultValue `true`
332
+ */
246
333
  shouldStrip?: boolean | undefined;
247
- /** Enable Node.js compile caching in the generated launcher. Defaults to `true`. */
334
+ /**
335
+ * Enable Node.js compile caching in the generated launcher.
336
+ *
337
+ * @defaultValue `true`
338
+ */
248
339
  shouldUseCompileCache?: boolean | undefined;
249
340
  };
250
341
 
@@ -261,13 +352,29 @@ const nodeRuntimeSchema = z.strictObject({
261
352
  * shell script file, not inline shell; the package carries the file's content.
262
353
  */
263
354
  type DeployScriptsOptions = {
264
- /** Path to a shell script, relative to the project root, run before installing a Debian or RPM package. */
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
+ */
265
360
  preInstall?: string | undefined;
266
- /** Path to a shell script, relative to the project root, run after installing a Debian or RPM package. */
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
+ */
267
366
  postInstall?: string | undefined;
268
- /** Path to a shell script, relative to the project root, run before removing a Debian or RPM package. */
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
+ */
269
372
  preRemove?: string | undefined;
270
- /** Path to a shell script, relative to the project root, run after removing a Debian or RPM package. */
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
+ */
271
378
  postRemove?: string | undefined;
272
379
  };
273
380
 
@@ -280,7 +387,11 @@ const scriptsSchema = z.strictObject({
280
387
 
281
388
  /** The `deploy.tools` options: executables `gtkx deploy` runs instead of the ones it downloads. */
282
389
  type DeployToolsOptions = {
283
- /** nFPM executable name or path relative to the project root. Defaults to a verified pinned download. */
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
+ */
284
395
  nfpm?: string | undefined;
285
396
  };
286
397
 
@@ -290,15 +401,36 @@ const toolsSchema = z.strictObject({
290
401
 
291
402
  /** The `deploy.deb` options: Debian package metadata and compression. */
292
403
  type DeployDebOptions = {
293
- /** Debian package name. Defaults to `deploy.binaryName`. */
404
+ /**
405
+ * Debian package name.
406
+ *
407
+ * @defaultValue `deploy.binaryName`
408
+ */
294
409
  packageName?: string | undefined;
295
- /** Debian archive section, derived from the application categories when omitted. */
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
+ */
296
416
  section?: string | undefined;
297
- /** Debian package priority. Defaults to `optional`. */
417
+ /**
418
+ * Debian package priority.
419
+ *
420
+ * @defaultValue `"optional"`
421
+ */
298
422
  priority?: string | undefined;
299
- /** Compression used for the Debian package payload. */
423
+ /**
424
+ * Compression used for the Debian package payload.
425
+ *
426
+ * @defaultValue nFPM's default, `gzip`
427
+ */
300
428
  compression?: "gzip" | "none" | "xz" | "zstd" | undefined;
301
- /** Additional Debian control fields, keyed by field name. */
429
+ /**
430
+ * Additional Debian control fields, keyed by field name.
431
+ *
432
+ * @defaultValue `{}`
433
+ */
302
434
  fields?: Record<string, string> | undefined;
303
435
  };
304
436
 
@@ -312,13 +444,29 @@ const debSchema = z.strictObject({
312
444
 
313
445
  /** The `deploy.rpm` options: RPM package metadata and compression. */
314
446
  type DeployRpmOptions = {
315
- /** RPM package name. Defaults to `deploy.binaryName`. */
447
+ /**
448
+ * RPM package name.
449
+ *
450
+ * @defaultValue `deploy.binaryName`
451
+ */
316
452
  packageName?: string | undefined;
317
- /** RPM package group, derived from the application categories when omitted. */
453
+ /**
454
+ * RPM package group.
455
+ *
456
+ * @defaultValue Derived from `deploy.categories`, or `Applications/System` when no category matches
457
+ */
318
458
  group?: string | undefined;
319
- /** Compression used for the RPM package payload. */
459
+ /**
460
+ * Compression used for the RPM package payload.
461
+ *
462
+ * @defaultValue nFPM's default, `gzip`
463
+ */
320
464
  compression?: "gzip" | "lzma" | "xz" | "zstd" | undefined;
321
- /** Installation prefixes that the RPM package allows users to relocate. */
465
+ /**
466
+ * Installation prefixes that the RPM package allows users to relocate.
467
+ *
468
+ * @defaultValue `[]`: the package is not relocatable
469
+ */
322
470
  prefixes?: string[] | undefined;
323
471
  };
324
472
 
@@ -331,13 +479,31 @@ const rpmSchema = z.strictObject({
331
479
 
332
480
  /** The `deploy.appimage` options: AppImage file name, compression, update information and runtime. */
333
481
  type DeployAppImageOptions = {
334
- /** Output file name, derived from the application name, version, and architecture when omitted. */
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
+ */
335
488
  fileName?: string | undefined;
336
- /** Compression explicitly requested from appimagetool. */
489
+ /**
490
+ * Compression explicitly requested from appimagetool.
491
+ *
492
+ * @defaultValue None: appimagetool's own default, as GTKX passes no `--comp`
493
+ */
337
494
  compression?: "zstd" | undefined;
338
- /** AppImage update information string embedded in the executable. */
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
+ */
339
500
  updateInformation?: string | undefined;
340
- /** Custom AppImage runtime file path, resolved relative to the project root. */
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
+ */
341
507
  runtimeFile?: string | undefined;
342
508
  };
343
509
 
@@ -350,11 +516,23 @@ const appimageSchema = z.strictObject({
350
516
 
351
517
  /** The `deploy.flatpak.source` options: the Git revision a source-mode Flatpak builds. */
352
518
  type DeployFlatpakSourceOptions = {
353
- /** Public HTTP or HTTPS Git repository URL. Defaults to the project's Git remote. */
519
+ /**
520
+ * Public HTTP or HTTPS Git repository URL.
521
+ *
522
+ * @defaultValue The URL of the project's `origin` Git remote
523
+ */
354
524
  url?: string | undefined;
355
- /** Git tag to build, pinned to its commit when `commit` is omitted. */
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
+ */
356
530
  tag?: string | undefined;
357
- /** Git commit to build. Defaults to the configured tag's commit or the current HEAD. */
531
+ /**
532
+ * Git commit to build.
533
+ *
534
+ * @defaultValue The commit of `tag`, or the current `HEAD` without one
535
+ */
358
536
  commit?: string | undefined;
359
537
  };
360
538
 
@@ -366,45 +544,132 @@ const flatpakSourceSchema = z.strictObject({
366
544
 
367
545
  /** The `deploy.flatpak` options: runtime, sandbox permissions, build and distribution of the Flatpak. */
368
546
  type DeployFlatpakOptions = {
369
- /** Package local build output or build from a pinned Git source inside the SDK. Defaults to `prebuilt`. */
547
+ /**
548
+ * Package local build output or build from a pinned Git source inside the SDK.
549
+ *
550
+ * @defaultValue `"prebuilt"`
551
+ */
370
552
  mode?: "prebuilt" | "source" | undefined;
371
- /** Flatpak runtime ID. Defaults to `org.gnome.Platform`. */
553
+ /**
554
+ * Flatpak runtime ID.
555
+ *
556
+ * @defaultValue `"org.gnome.Platform"`
557
+ */
372
558
  runtime?: string | undefined;
373
- /** Flatpak runtime branch. Defaults to `51`. */
559
+ /**
560
+ * Flatpak runtime branch.
561
+ *
562
+ * @defaultValue `"51"`
563
+ */
374
564
  runtimeVersion?: string | undefined;
375
- /** Build SDK ID. Defaults to `org.gnome.Sdk`. */
565
+ /**
566
+ * Build SDK ID.
567
+ *
568
+ * @defaultValue `"org.gnome.Sdk"`
569
+ */
376
570
  sdk?: string | undefined;
377
- /** Node.js SDK extension used in source mode. Defaults to `org.freedesktop.Sdk.Extension.node26`. */
571
+ /**
572
+ * Node.js SDK extension used in source mode.
573
+ *
574
+ * @defaultValue `"org.freedesktop.Sdk.Extension.node26"`
575
+ */
378
576
  nodeExtension?: string | undefined;
379
- /** Additional SDK extension IDs included in the build environment. */
577
+ /**
578
+ * Additional SDK extension IDs included in the build environment.
579
+ *
580
+ * @defaultValue `[]`
581
+ */
380
582
  sdkExtensions?: string[] | undefined;
381
- /** Optional Flatpak base application ID. */
583
+ /**
584
+ * Optional Flatpak base application ID.
585
+ *
586
+ * @defaultValue None: the manifest has no `base`
587
+ */
382
588
  base?: string | undefined;
383
- /** Branch of the base application. */
589
+ /**
590
+ * Branch of the base application.
591
+ *
592
+ * @defaultValue None: the manifest has no `base-version`
593
+ */
384
594
  baseVersion?: string | undefined;
385
- /** Exported application branch. Defaults to `stable`. */
595
+ /**
596
+ * Exported application branch.
597
+ *
598
+ * @defaultValue `"stable"`
599
+ */
386
600
  branch?: string | undefined;
387
- /** Sandbox permissions added to display, IPC, and GPU defaults. Negations remove matching defaults. */
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
+ */
388
612
  finishArgs?: string[] | undefined;
389
- /** Patterns added to header, pkg-config, and static-library cleanup defaults. An empty array disables cleanup. */
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
+ */
390
618
  cleanup?: string[] | undefined;
391
- /** Additional shell commands appended to the application's Flatpak build commands. */
619
+ /**
620
+ * Additional shell commands appended to the application's Flatpak build commands.
621
+ *
622
+ * @defaultValue `[]`
623
+ */
392
624
  buildCommands?: string[] | undefined;
393
- /** Additional Flatpak manifest modules built before the application module. */
625
+ /**
626
+ * Additional Flatpak manifest modules built before the application module.
627
+ *
628
+ * @defaultValue `[]`
629
+ */
394
630
  modules?: unknown[] | undefined;
395
- /** Git repository and revision used for source builds. */
631
+ /**
632
+ * Git repository and revision used for source builds.
633
+ *
634
+ * @defaultValue `{}`: the `origin` remote at the tagged or current commit
635
+ */
396
636
  source?: DeployFlatpakSourceOptions | undefined;
397
- /** Package manager used for offline source builds, detected from the project's lockfiles when omitted. */
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
+ */
398
643
  packageManager?: "npm" | "pnpm" | "yarn" | undefined;
399
- /** Lockfile path relative to the project root. Defaults to the selected package manager's standard lockfile. */
644
+ /**
645
+ * Lockfile path relative to the project root.
646
+ *
647
+ * @defaultValue The package manager's standard lockfile, such as `pnpm-lock.yaml`
648
+ */
400
649
  lockfile?: string | undefined;
401
- /** Runtime repository URL embedded in the bundle. Defaults to Flathub's `.flatpakrepo` URL. */
650
+ /**
651
+ * Runtime repository URL embedded in the bundle.
652
+ *
653
+ * @defaultValue `"https://dl.flathub.org/repo/flathub.flatpakrepo"`
654
+ */
402
655
  runtimeRepo?: string | undefined;
403
- /** Emit a `.flatpak` bundle in addition to the local repository. Defaults to `true`. */
656
+ /**
657
+ * Emit a `.flatpak` bundle in addition to the local repository.
658
+ *
659
+ * @defaultValue `true`
660
+ */
404
661
  shouldEmitBundle?: boolean | undefined;
405
- /** Install the built application into the current user's Flatpak installation. Defaults to `false`. */
662
+ /**
663
+ * Install the built application into the current user's Flatpak installation.
664
+ *
665
+ * @defaultValue `false`
666
+ */
406
667
  shouldInstall?: boolean | undefined;
407
- /** Allow flatpak-builder to use rofiles-fuse. Set to `false` where FUSE is unavailable. */
668
+ /**
669
+ * Allow flatpak-builder to use rofiles-fuse. Set to `false` where FUSE is unavailable.
670
+ *
671
+ * @defaultValue `true`
672
+ */
408
673
  shouldUseRofilesFuse?: boolean | undefined;
409
674
  };
410
675
 
@@ -435,13 +700,29 @@ const flatpakSchema = z.strictObject({
435
700
  type DeployDebSigningOptions = {
436
701
  /** PGP private key file used to sign the Debian package. */
437
702
  keyFile: string;
438
- /** PGP signing key ID. */
703
+ /**
704
+ * PGP signing key ID.
705
+ *
706
+ * @defaultValue nFPM's choice: the first subkey of `keyFile` that can sign
707
+ */
439
708
  keyId?: string | undefined;
440
- /** Debian package signing method. */
709
+ /**
710
+ * Debian package signing method.
711
+ *
712
+ * @defaultValue nFPM's default, `"debsign"`
713
+ */
441
714
  method?: "debsign" | "dpkg-sig" | undefined;
442
- /** Debian signature role. */
715
+ /**
716
+ * Debian signature role.
717
+ *
718
+ * @defaultValue nFPM's default, `"origin"`
719
+ */
443
720
  type?: "archive" | "maint" | "origin" | undefined;
444
- /** Name and email address recorded as the signer. */
721
+ /**
722
+ * Name and email address recorded as the signer.
723
+ *
724
+ * @defaultValue None: GTKX passes no `signer` to nFPM
725
+ */
445
726
  signer?: string | undefined;
446
727
  };
447
728
 
@@ -457,7 +738,11 @@ const debSigningSchema = z.strictObject({
457
738
  type DeployRpmSigningOptions = {
458
739
  /** PGP private key file used to sign the RPM package. */
459
740
  keyFile: string;
460
- /** PGP signing key ID. */
741
+ /**
742
+ * PGP signing key ID.
743
+ *
744
+ * @defaultValue nFPM's choice: the first subkey of `keyFile` that can sign
745
+ */
461
746
  keyId?: string | undefined;
462
747
  };
463
748
 
@@ -473,7 +758,11 @@ type DeployFlatpakSigningOptions = {
473
758
  * `flatpak install --bundle` verifies the signature.
474
759
  */
475
760
  gpgKeyId: string;
476
- /** GPG home directory containing the signing key. */
761
+ /**
762
+ * GPG home directory containing the signing key, passed to GPG as given.
763
+ *
764
+ * @defaultValue GPG's default, `$GNUPGHOME` or `~/.gnupg`
765
+ */
477
766
  gpgHomeDir?: string | undefined;
478
767
  };
479
768
 
@@ -494,13 +783,29 @@ const appimageSigningSchema = z.strictObject({
494
783
 
495
784
  /** The `deploy.signing` options: how each package format is signed. Formats without an entry stay unsigned. */
496
785
  type DeploySigningOptions = {
497
- /** AppImage signing options. */
786
+ /**
787
+ * AppImage signing options.
788
+ *
789
+ * @defaultValue None: `gtkx deploy` leaves this format unsigned
790
+ */
498
791
  appimage?: DeployAppImageSigningOptions | undefined;
499
- /** Debian package signing options. */
792
+ /**
793
+ * Debian package signing options.
794
+ *
795
+ * @defaultValue None: `gtkx deploy` leaves this format unsigned
796
+ */
500
797
  deb?: DeployDebSigningOptions | undefined;
501
- /** Flatpak bundle signing options. */
798
+ /**
799
+ * Flatpak bundle signing options.
800
+ *
801
+ * @defaultValue None: `gtkx deploy` leaves this format unsigned
802
+ */
502
803
  flatpak?: DeployFlatpakSigningOptions | undefined;
503
- /** RPM package signing options. */
804
+ /**
805
+ * RPM package signing options.
806
+ *
807
+ * @defaultValue None: `gtkx deploy` leaves this format unsigned
808
+ */
504
809
  rpm?: DeployRpmSigningOptions | undefined;
505
810
  };
506
811
 
@@ -513,19 +818,47 @@ const signingSchema = z.strictObject({
513
818
 
514
819
  /** The `deploy.relations` options: package relationships besides dependencies, for Debian and RPM. */
515
820
  type DeployRelationsOptions = {
516
- /** Recommended packages that extend the application's functionality. */
821
+ /**
822
+ * Recommended packages that extend the application's functionality.
823
+ *
824
+ * @defaultValue `{}`
825
+ */
517
826
  recommends?: DeployPackageRelationOptions | undefined;
518
- /** Suggested companion packages. */
827
+ /**
828
+ * Suggested companion packages.
829
+ *
830
+ * @defaultValue `{}`
831
+ */
519
832
  suggests?: DeployPackageRelationOptions | undefined;
520
- /** Package names or capabilities supplied by this package. */
833
+ /**
834
+ * Package names or capabilities supplied by this package.
835
+ *
836
+ * @defaultValue `{}`
837
+ */
521
838
  provides?: DeployPackageRelationOptions | undefined;
522
- /** Packages that cannot be installed alongside this package. */
839
+ /**
840
+ * Packages that cannot be installed alongside this package.
841
+ *
842
+ * @defaultValue `{}`
843
+ */
523
844
  conflicts?: DeployPackageRelationOptions | undefined;
524
- /** Packages whose files this package may replace. */
845
+ /**
846
+ * Packages whose files this package may replace.
847
+ *
848
+ * @defaultValue `{}`
849
+ */
525
850
  replaces?: DeployPackageRelationOptions | undefined;
526
- /** Debian packages made incompatible by installing this package. Debian packages only. */
851
+ /**
852
+ * Debian packages made incompatible by installing this package. Debian packages only.
853
+ *
854
+ * @defaultValue `{}`
855
+ */
527
856
  breaks?: DeployDebPackageRelationOptions | undefined;
528
- /** Debian dependencies required before unpacking this package. Debian packages only. */
857
+ /**
858
+ * Debian dependencies required before unpacking this package. Debian packages only.
859
+ *
860
+ * @defaultValue `{}`
861
+ */
529
862
  preDepends?: DeployDebPackageRelationOptions | undefined;
530
863
  };
531
864
 
@@ -541,47 +874,146 @@ const extraRelationsSchema = z.strictObject({
541
874
 
542
875
  /** The `deploy` options: application metadata, bundled runtime settings, and packaging options for `gtkx deploy`. */
543
876
  type DeployOptions = {
544
- /** Package formats to build. Defaults to `["flatpak"]`; overridden by `gtkx deploy --target`. */
877
+ /**
878
+ * Package formats to build. `gtkx deploy --target` overrides it.
879
+ *
880
+ * @defaultValue `["flatpak"]`
881
+ */
545
882
  targets?: ("appimage" | "deb" | "flatpak" | "rpm")[] | undefined;
546
- /** Target CPU architectures. Defaults to the host architecture; overridden by `gtkx deploy --arch`. */
883
+ /**
884
+ * Target CPU architectures. `gtkx deploy --arch` overrides it.
885
+ *
886
+ * @defaultValue The host architecture, `arm64` or `x64`
887
+ */
547
888
  architectures?: ("arm64" | "x64")[] | undefined;
548
- /** Deployment directory relative to the project root. Defaults to `build`, with packages in its `out` directory. */
889
+ /**
890
+ * Deployment directory relative to the project root, with packages in its `out` directory. `gtkx deploy
891
+ * --out` overrides it.
892
+ *
893
+ * @defaultValue `"build"`
894
+ */
549
895
  outDir?: string | undefined;
550
- /** Display name, derived from package.json's name or the application ID when omitted. */
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
+ */
551
902
  name?: string | undefined;
552
- /** Generic application description shown by desktop launchers, such as `Text Editor`. */
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
+ */
553
908
  genericName?: string | undefined;
554
- /** Launcher command name, derived from package.json's name or the application ID when omitted. */
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
+ */
555
916
  binaryName?: string | undefined;
556
- /** Application version. Defaults to the version in package.json. */
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
+ */
557
922
  version?: string | undefined;
558
- /** Debian packaging revision and RPM release. Defaults to `1`. */
923
+ /**
924
+ * Debian packaging revision and RPM release.
925
+ *
926
+ * @defaultValue `"1"`
927
+ */
559
928
  release?: string | undefined;
560
- /** Non-negative Debian and RPM version epoch, omitted from package metadata unless configured. */
929
+ /**
930
+ * Non-negative Debian and RPM version epoch.
931
+ *
932
+ * @defaultValue None: package metadata has no `epoch`
933
+ */
561
934
  epoch?: number | undefined;
562
- /** Single-line summary without a trailing period. Defaults to the first line of package.json's description. */
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
+ */
563
941
  summary?: string | undefined;
564
- /** Long description as paragraphs. Defaults to the summary when omitted or empty. */
942
+ /**
943
+ * Long description as paragraphs.
944
+ *
945
+ * @defaultValue `deploy.summary` as the only paragraph, also when the array is empty
946
+ */
565
947
  description?: string[] | undefined;
566
- /** Search keywords included in the desktop entry and AppStream metadata. */
948
+ /**
949
+ * Search keywords included in the desktop entry and AppStream metadata.
950
+ *
951
+ * @defaultValue `[]`
952
+ */
567
953
  keywords?: string[] | undefined;
568
- /** Freedesktop application categories used by launchers, software centers, and package metadata. */
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
+ */
569
963
  categories?: string[] | undefined;
570
- /** Supported MIME types, combined with types from file associations and URL protocols. */
964
+ /**
965
+ * Supported MIME types, combined with types from file associations and URL protocols.
966
+ *
967
+ * @defaultValue `[]`
968
+ */
571
969
  mimeTypes?: string[] | undefined;
572
- /** Developer identity and package maintainer details. */
970
+ /**
971
+ * Developer identity and package maintainer details.
972
+ *
973
+ * @defaultValue `{}`: the details come from the `author` in `package.json`
974
+ */
573
975
  developer?: DeployDeveloperOptions | undefined;
574
- /** Application license as an SPDX expression. Defaults to the license in package.json. */
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
+ */
575
982
  license?: string | undefined;
576
- /** License file path relative to the project root, detected from common LICENSE or COPYING names when omitted. */
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
+ */
577
989
  licenseFile?: string | undefined;
578
- /** SPDX license expression for the AppStream metadata. Defaults to `CC0-1.0`. */
990
+ /**
991
+ * SPDX license expression for the AppStream metadata.
992
+ *
993
+ * @defaultValue `"CC0-1.0"`
994
+ */
579
995
  metadataLicense?: string | undefined;
580
- /** Copyright notice. Defaults to the build year and developer name. */
996
+ /**
997
+ * Copyright notice.
998
+ *
999
+ * @defaultValue `Copyright © <year> <developer name>`, with the year of the build date
1000
+ */
581
1001
  copyright?: string | undefined;
582
- /** Application homepage URL. Defaults to the homepage in package.json. */
1002
+ /**
1003
+ * Application homepage URL.
1004
+ *
1005
+ * @defaultValue The `homepage` in `package.json`, if set
1006
+ */
583
1007
  homepage?: string | undefined;
584
- /** Additional AppStream links keyed by their purpose, such as `bugtracker` or `help`. */
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
+ */
585
1017
  urls?:
586
1018
  | Partial<
587
1019
  Record<
@@ -590,39 +1022,108 @@ type DeployOptions = {
590
1022
  >
591
1023
  >
592
1024
  | undefined;
593
- /** Screenshots for software centers. Each entry requires a `url` or `file`. */
1025
+ /**
1026
+ * Screenshots for software centers. Each entry requires a `url` or `file`.
1027
+ *
1028
+ * @defaultValue `[]`
1029
+ */
594
1030
  screenshots?: DeployScreenshotOptions[] | undefined;
595
- /** Base URL for screenshot files, inferred from a GitHub or GitLab remote when omitted. */
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
+ */
596
1037
  screenshotBaseUrl?: string | undefined;
597
- /** Primary branding colors included in AppStream metadata. */
1038
+ /**
1039
+ * Primary branding colors included in AppStream metadata.
1040
+ *
1041
+ * @defaultValue None: the metadata has no `branding` element
1042
+ */
598
1043
  branding?: DeployBrandingOptions | undefined;
599
- /** OARS 1.1 content-rating attributes mapped to their intensities. */
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
+ */
600
1053
  contentRating?: Record<string, "intense" | "mild" | "moderate" | "none"> | undefined;
601
- /** AppStream release history, sorted newest first. Defaults to the application version and build date. */
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
+ */
602
1059
  releases?: DeployReleaseOptions[] | undefined;
603
- /** Application arguments included in the desktop entry's launch command. */
1060
+ /**
1061
+ * Application arguments included in the desktop entry's launch command.
1062
+ *
1063
+ * @defaultValue `[]`
1064
+ */
604
1065
  execArgs?: string[] | undefined;
605
- /** Environment variables exported by the generated launcher. Keys must be POSIX environment names. */
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
+ */
606
1075
  launcherEnv?: Record<string, string> | undefined;
607
- /** Node.js flags placed before the application bundle in the generated launcher. */
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
+ */
608
1085
  nodeFlags?: string[] | undefined;
609
- /** File extensions and MIME types registered for the application. */
1086
+ /**
1087
+ * File extensions and MIME types registered for the application.
1088
+ *
1089
+ * @defaultValue `[]`
1090
+ */
610
1091
  fileAssociations?: DeployFileAssociationOptions[] | undefined;
611
- /** URL schemes handled by the application, registered as `x-scheme-handler` MIME types. */
1092
+ /**
1093
+ * URL schemes handled by the application, registered as `x-scheme-handler` MIME types.
1094
+ *
1095
+ * @defaultValue `[]`
1096
+ */
612
1097
  protocols?: string[] | undefined;
613
1098
  /**
614
1099
  * Desktop launcher actions keyed by action ID. With `isDbusActivatable`, the application must register an
615
1100
  * `app.<id>` action for each one.
1101
+ *
1102
+ * @defaultValue `{}`
1103
+ * @example
1104
+ * ```ts
1105
+ * desktopActions: { today: { name: "Today", args: ["tasks://today"] } },
1106
+ * ```
616
1107
  */
617
1108
  desktopActions?: Record<string, DeployDesktopActionOptions> | undefined;
618
1109
  /**
619
- * Additional desktop entry keys, overriding non-reserved generated values.
620
- * `DBusActivatable` and `Version` are rejected; use `deploy.isDbusActivatable` for D-Bus activation.
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 `{}`
621
1114
  */
622
1115
  desktopEntry?: Record<string, string> | undefined;
623
- /** Additional XML fragments appended to the AppStream component. */
1116
+ /**
1117
+ * Additional XML fragments appended to the AppStream component.
1118
+ *
1119
+ * @defaultValue `[]`
1120
+ */
624
1121
  metainfoExtra?: string[] | undefined;
625
- /** Enable D-Bus activation in the desktop entry and generate a session bus service file. Defaults to `false`. */
1122
+ /**
1123
+ * Enable D-Bus activation in the desktop entry and generate a session bus service file.
1124
+ *
1125
+ * @defaultValue `false`
1126
+ */
626
1127
  isDbusActivatable?: boolean | undefined;
627
1128
  /**
628
1129
  * Extra files keyed by destination inside the install prefix, without a leading slash or a `..` segment.
@@ -631,29 +1132,83 @@ type DeployOptions = {
631
1132
  * destination; without a mode, each file is executable when its source is. Scripts installed this way, such
632
1133
  * as a helper command's launcher, can run the bundled Node.js runtime at `lib/<binaryName>/node` in every
633
1134
  * prebuilt target and in source Flatpaks.
1135
+ *
1136
+ * @defaultValue `{}`
1137
+ * @example
1138
+ * ```ts
1139
+ * extraFiles: { "share/tasks/templates": "data/templates" },
1140
+ * ```
634
1141
  */
635
1142
  extraFiles?: Record<string, string | DeployExtraFileOptions> | undefined;
636
- /** Minimum runtime library versions keyed by GIR library ID, used when deriving package dependencies. */
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
+ */
637
1152
  minimumLibraryVersions?: Record<string, string> | undefined;
638
- /** Additional Debian and RPM dependencies merged with automatically detected dependencies. */
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
+ */
639
1158
  depends?: DeployPackageRelationOptions | undefined;
640
- /** Additional package relationships for Debian and RPM. */
1159
+ /**
1160
+ * Additional package relationships for Debian and RPM.
1161
+ *
1162
+ * @defaultValue `{}`: no relations besides `depends`
1163
+ */
641
1164
  relations?: DeployRelationsOptions | undefined;
642
- /** Installation and removal scripts for Debian and RPM packages. */
1165
+ /**
1166
+ * Installation and removal scripts for Debian and RPM packages.
1167
+ *
1168
+ * @defaultValue `{}`: no maintainer scripts
1169
+ */
643
1170
  scripts?: DeployScriptsOptions | undefined;
644
- /** Node.js runtime bundled with prebuilt packages and launcher compile-cache settings. */
1171
+ /**
1172
+ * Node.js runtime bundled with prebuilt packages and launcher compile-cache settings.
1173
+ *
1174
+ * @defaultValue `{}`: a downloaded Node.js `26.8.2`, stripped, with the compile cache on
1175
+ */
645
1176
  node?: DeployNodeOptions | undefined;
646
- /** Overrides for executables used to build packages. */
1177
+ /**
1178
+ * Overrides for executables used to build packages.
1179
+ *
1180
+ * @defaultValue `{}`: `gtkx deploy` downloads the pinned tools it needs
1181
+ */
647
1182
  tools?: DeployToolsOptions | undefined;
648
- /** Per-format package signing options. */
1183
+ /**
1184
+ * Per-format package signing options.
1185
+ *
1186
+ * @defaultValue `{}`: every package is unsigned
1187
+ */
649
1188
  signing?: DeploySigningOptions | undefined;
650
- /** AppImage packaging options. */
1189
+ /**
1190
+ * AppImage packaging options.
1191
+ *
1192
+ * @defaultValue `{}`
1193
+ */
651
1194
  appimage?: DeployAppImageOptions | undefined;
652
- /** Debian package metadata and compression options. */
1195
+ /**
1196
+ * Debian package metadata and compression options.
1197
+ *
1198
+ * @defaultValue `{}`
1199
+ */
653
1200
  deb?: DeployDebOptions | undefined;
654
- /** Flatpak runtime, sandbox, build, and distribution options. */
1201
+ /**
1202
+ * Flatpak runtime, sandbox, build, and distribution options.
1203
+ *
1204
+ * @defaultValue `{}`
1205
+ */
655
1206
  flatpak?: DeployFlatpakOptions | undefined;
656
- /** RPM package metadata and compression options. */
1207
+ /**
1208
+ * RPM package metadata and compression options.
1209
+ *
1210
+ * @defaultValue `{}`
1211
+ */
657
1212
  rpm?: DeployRpmOptions | undefined;
658
1213
  };
659
1214