@todesktop/cli 1.12.5 → 1.13.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 CHANGED
@@ -26,19 +26,6 @@ npm install --location=global @todesktop/cli
26
26
  yarn global add @todesktop/cli
27
27
  ```
28
28
 
29
- Once installed, you can enable JSON validation and IntelliSense for your configuration files. To do so, please add the following to your VSCode/Cursor workspace settings:
30
-
31
- ```json
32
- {
33
- "json.schemas": [
34
- {
35
- "fileMatch": ["todesktop.json", "todesktop.*.json"],
36
- "url": "./node_modules/@todesktop/cli/schemas/schema.json"
37
- }
38
- ]
39
- }
40
- ```
41
-
42
29
  ## Get started
43
30
 
44
31
  You can use the ToDesktop CLI to work with an Electron application in 4 steps:
@@ -55,9 +42,10 @@ Create a `todesktop.json` file in the root of your Electron project.
55
42
 
56
43
  ```json
57
44
  {
45
+ "$schema": "https://unpkg.com/@todesktop/cli@1.13.0-0/schemas/schema.json",
46
+ "schemaVersion": 1
58
47
  "id": "your-todesktop-id",
59
48
  "icon": "./desktop-icon.png",
60
- "schemaVersion": 1
61
49
  }
62
50
  ```
63
51
 
@@ -227,6 +215,29 @@ To avoid confusion, the following terms will be used throughout this file:
227
215
 
228
216
  - "Project root": this is the parent directory of your `todesktop.json`.
229
217
 
218
+ ### `$schema` - (optional) string
219
+
220
+
221
+
222
+ Example: `https://unpkg.com/@todesktop/cli@1.12.5/schemas/schema.json`, `./node_modules/@todesktop/cli/schemas/schema.json`
223
+
224
+ To enable JSON validation and IntelliSense for your `todesktop.json` file in compatible code editors, your editor needs to know where the schema file is located. You can add a `$schema` property to the top of your `todesktop.json` file, pointing to a version of the schema. This can be a local path or a hosted URL.
225
+
226
+ - For example, if using a hosted version of the schema:
227
+ ```json
228
+ {
229
+ "$schema": "https://unpkg.com/@todesktop/cli@1.13.0-0/schemas/schema.json",
230
+ "id": "your-todesktop-id"
231
+ }
232
+ ```
233
+ - Or if ToDesktop CLI is installed locally, you can use a local path:
234
+ ```json
235
+ {
236
+ "$schema": "./node_modules/@todesktop/cli/schemas/schema.json",
237
+ "id": "your-todesktop-id"
238
+ }
239
+ ```
240
+
230
241
  ### `appFiles` - (optional) array of glob patterns
231
242
 
232
243
  Default: `["**"]`
@@ -263,9 +274,9 @@ We use the [fast-glob](https://www.npmjs.com/package/fast-glob) library under th
263
274
 
264
275
  ### `appId` - (optional) string
265
276
 
266
- Default: auto-generated.
277
+ Default: auto-generated
267
278
 
268
- Example: `com.microsoft.word`.
279
+ Example: `com.microsoft.word`
269
280
 
270
281
  Your application ID. Omit this unless you know what you're doing. It's used as the [CFBundleIdentifier](https://developer.apple.com/library/ios/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html#//apple_ref/doc/uid/20001431-102070) for MacOS and as the [Application User Model ID](<https://msdn.microsoft.com/en-us/library/windows/desktop/dd378459(v=vs.85).aspx>) for Windows.
271
282
 
@@ -273,9 +284,9 @@ WARNING: if you have deployed an application with ToDesktop and would like to ch
273
284
 
274
285
  ### `appPath` - (optional) string
275
286
 
276
- Default: `.`.
287
+ Default: `.`
277
288
 
278
- Example: `./dist`.
289
+ Example: `./dist`
279
290
 
280
291
  This is the path to your Electron application directory. Omit this unless your project setup is complicated. This is the directory that the CLI uploads.
281
292
 
@@ -289,21 +300,21 @@ Side note: if your `package.json` contains a `postinstall` script which referenc
289
300
 
290
301
  ### `appProtocolScheme` - (optional) string | string[]
291
302
 
292
- Default: no protocol scheme is registered.
303
+ Default: no protocol scheme is registered
293
304
 
294
- Example: `word` or `[word, ...]`.
305
+ Example: `word`, `["word", "excel"]`
295
306
 
296
307
  If you want to register a protocol for your application (e.g. `example://`) and or support deeplinking, you will need to use this option. If your desired protocol is `example://`, you would set `"appProtocolScheme": "example"`. NOTE: these features also require additional application logic.
297
308
 
298
309
  ### `asar` - (optional) boolean
299
310
 
300
- Default: true
311
+ Default: `true`
301
312
 
302
313
  Whether to package your application's source code within an asar archive. You should only turn this off if you have a good reason to.
303
314
 
304
315
  ### `asarUnpack` - (optional) boolean or array of glob patterns
305
316
 
306
- Default: [`**/*.node`]
317
+ Default: `["**/*.node"]`
307
318
 
308
319
  This option allows you to decide which files get unpacked from the asar archive. By default we unpack all native `*.node` files.
309
320
 
@@ -321,18 +332,20 @@ The build version. Maps to the CFBundleVersion on macOS, and FileVersion metadat
321
332
 
322
333
  Default: The `package.json` [productName](#recommendations-for-app-packagejson) / `name`.
323
334
 
324
- Example: `Copyright © 1995 Walt Disney`.
335
+ Example: `Copyright © 1995 Walt Disney`
325
336
 
326
337
  The human-readable copyright line for the app.
327
338
 
328
339
  ### `dmg` - (optional) object
329
340
 
330
- #### `dmg.background` - (optional) string
341
+ Options for customizing the macOS DMG (disk image) installer.
331
342
 
332
- Example: `./mac-dmg-background.tiff`.
343
+ #### `dmg.background` - (optional) string
333
344
 
334
345
  Default: `undefined` (if `undefined` then we use [this template](https://i.imgur.com/PUQIhvv.png)).
335
346
 
347
+ Example: `./mac-dmg-background.tiff`
348
+
336
349
  The path to the DMG installer's background image. It must be a `.tiff` file. The resolution of this file determines the resolution of the installer window. Typically, backgrounds are 540x380.
337
350
 
338
351
  You can generate a retina tiff background from png files using the following command:
@@ -343,21 +356,27 @@ tiffutil -cathidpicheck background.png background@2x.png -out background.tiff
343
356
 
344
357
  #### `dmg.backgroundColor` - (optional) string
345
358
 
359
+ Default: `#ffffff`
360
+
346
361
  The background color (accepts css colors). Defaults to "`#ffffff`" (white) if no background image.
347
362
 
348
363
  #### `dmg.iconSize` - (optional) number
349
364
 
365
+ Default: `80`
366
+
350
367
  The size of all the icons inside the DMG. Defaults to `80`.
351
368
 
352
369
  #### `dmg.iconTextSize` - (optional) number
353
370
 
371
+ Default: `12`
372
+
354
373
  The size of all the icon texts inside the DMG. Defaults to `12`.
355
374
 
356
375
  #### `dmg.title` - (optional) string
357
376
 
358
- The title of the produced DMG, which will be shown when mounted (volume name). Macro `${productName}`, `${version}` and `${name}` are supported.
377
+ Default: ${productName} ${version}
359
378
 
360
- Defaults to "`${productName} ${version}`".
379
+ The title of the produced DMG, which will be shown when mounted (volume name). Macro `${productName}`, `${version}` and `${name}` are supported.
361
380
 
362
381
  #### `dmg.contents` - (optional) Array of objects
363
382
 
@@ -399,9 +418,7 @@ The DMG windows position and size. In most cases, you will only want to specify
399
418
 
400
419
  ### `extends` - (optional) string
401
420
 
402
- Default: `null`.
403
-
404
- Example: `./todesktop.staging.json`.
421
+ Example: `./todesktop.staging.json`
405
422
 
406
423
  This is the path to a base configuration file. This is especially useful for configuration sharing between staging and production builds. The base configuration file can be a relative path from the project root or an absolute path.
407
424
 
@@ -409,7 +426,7 @@ For more information about how to create a staging version of your app see: [How
409
426
 
410
427
  ### `extraContentFiles` - (optional) array of objects
411
428
 
412
- Default: `[]`.
429
+ Default: `[]`
413
430
 
414
431
  This option allows you specify files to be copied into the application's content directory (`Contents` for MacOS, root directory for Linux and Windows).
415
432
 
@@ -447,7 +464,7 @@ The version of Electron to use. In most cases you should not specify an `electro
447
464
 
448
465
  ### `extraResources` - (optional) array of objects
449
466
 
450
- Default: `[]`.
467
+ Default: `[]`
451
468
 
452
469
  Example:
453
470
 
@@ -477,14 +494,13 @@ Example:
477
494
  ```
478
495
 
479
496
  - `ext` String | String[] - The extension (minus the leading period). e.g. png.
480
- - `name` String - The name. e.g. PNG. Defaults to value of `ext`.
497
+ - `name` String - The name. e.g. PNG. Defaults to value of `ext`.
481
498
  - `description` String - windows-only. The description.
482
- - `icon` String - macOS and windows. Icon file name without extension. It points
483
- to ico file for Windows and icns for macOS. For example, if the `icon` value is `"icons/py"` then it will look for both `"icons/py.ico"` and `"icons/py.icns"` in your project directory.
499
+ - `icon` String - macOS and windows. Icon file name without extension. It points to ico file for Windows and icns for macOS. For example, if the `icon` value is `"icons/py"` then it will look for both `"icons/py.ico"` and `"icons/py.icns"` in your project directory.
484
500
  - `mimeType` String - linux-only. The mime-type.
485
- - `role` = `Editor` String - macOS-only. The app's role with respect to the type. The value can be `Editor`, `Viewer`, `Shell`, or `None`. Corresponds to `CFBundleTypeRole`.
501
+ - `role` = `Default: `Editor`` String - macOS-only. The app's role with respect to the type. The value can be `Editor`, `Viewer`, `Shell`, or `None`. Corresponds to `CFBundleTypeRole`.
486
502
  - `isPackage` Boolean - macOS-only. Whether the document is distributed as a bundle. If set to true, the bundle directory is treated as a file. Corresponds to `LSTypeIsPackage`.
487
- - `rank` = `Default` String macOS-only. Determines how Launch Services ranks this app among the apps that declare themselves editors or viewers of files of this type. The possible values are: `Owner` (this app is the primary creator of files of this type), `Default` (this app is an opener of files of this type; this value is also used if no rank is specified), `Alternate` (this app is a secondary viewer of files of this type), and `None` (this app is never selected to open files of this type, but it accepts drops of files of this type).
503
+ - `rank` = `Default: `Default`` String - macOS-only. Determines how Launch Services ranks this app among the apps that declare themselves editors or viewers of files of this type. The possible values are: `Owner` (this app is the primary creator of files of this type), `Default` (this app is an opener of files of this type; this value is also used if no rank is specified), `Alternate` (this app is a secondary viewer of files of this type), and `None` (this app is never selected to open files of this type, but it accepts drops of files of this type).
488
504
 
489
505
  ### `filesForDistribution` - (optional) array of glob patterns
490
506
 
@@ -510,7 +526,7 @@ The following are always excluded if they exist:
510
526
 
511
527
  ### `icon` - string
512
528
 
513
- Example: `./appIcon.png`.
529
+ Example: `./appIcon.png`
514
530
 
515
531
  The path to your application's desktop icon. It must be an ICNS or PNG.
516
532
 
@@ -520,42 +536,42 @@ Note: to ensure the icon is never missing (e.g. this happens sometimes in Ubuntu
520
536
 
521
537
  Example: `2005223bd1nqpl7`
522
538
 
523
- Your ToDesktop application ID. This is used to identify your app. This would have been generated when you first created your ToDesktop application via the web interface:
539
+ Your ToDesktop application ID. This is used to identify your app. This would have been generated when you first created your ToDesktop application via the web interface.
524
540
 
525
541
  ![ToDesktop ID](https://firebasestorage.googleapis.com/v0/b/todesktop-prod1.appspot.com/o/assets%2Ftodesktop-id.png?alt=media&token=5985e731-76c4-43e8-bbfb-bd708b7cfffd)
526
542
 
527
543
  ### `linux` - (optional) object
528
544
 
529
- Default: We have good default settings for Linux.
530
-
531
- Example: `{ "category": "Utility"`.
545
+ Example: `{ "category": "Utility"}`
532
546
 
533
547
  This object contains some options that only apply to the building & releasing for Linux.
534
548
 
535
- #### `linux.category` - (optional) string
549
+ Default: We have good default settings for Linux.
536
550
 
537
- Default: undefined
551
+ #### `linux.category` - (optional) string
538
552
 
539
- Example: `Utility`.
553
+ Example: `Utility`
540
554
 
541
555
  The [application category](https://specifications.freedesktop.org/menu-spec/latest/apa.html#main-category-registry).
542
556
 
543
- #### `linux.icon` - (optional) string
557
+ Default: undefined
544
558
 
545
- Example: `./linux-icon.png`.
559
+ #### `linux.icon` - (optional) string
546
560
 
547
- Default: The root [`icon`](#icon---string) is used.
561
+ Example: `./linux-icon.png`
548
562
 
549
563
  The path to your application's Linux desktop icon. It must be an ICNS or PNG.
550
564
 
565
+ Default: The root [`icon`](#icon---string) is used.
566
+
551
567
  Note: to ensure the icon is never missing (e.g. this happens sometimes in Ubuntu), set the [`icon` option](https://www.electronjs.org/docs/api/browser-window#new-browserwindowoptions) when creating your `BrowserWindow`s.
552
568
 
553
569
  #### `linux.imageVersion` - (optional) string
554
570
 
555
- Example: `0.1.0`
556
-
557
571
  Default: `0.0.11`
558
572
 
573
+ Example: `0.1.0`
574
+
559
575
  The version of the Linux image that ToDesktop should use to build your app.
560
576
 
561
577
  Linux Changelog:
@@ -580,21 +596,24 @@ Whether to include **all** of the submodules node_modules directories
580
596
  ### `mac` - (optional) object
581
597
 
582
598
  Default: We have good default settings for Mac.
583
- Example: `{ "entitlements": "./entitlements.mac.plist" }`.
599
+
600
+ Example: `{ "entitlements": "./entitlements.mac.plist" }`
584
601
 
585
602
  This object contains some options that only apply to the building & releasing for MacOS.
586
603
 
587
604
  #### `mac.additionalBinariesToSign` - (optional) array of strings
588
605
 
589
606
  Default: `[]`
590
- Example: `["./node_modules/example-package/example-file"]`.
607
+
608
+ Example: `["./node_modules/example-package/example-file"]`
591
609
 
592
610
  Paths of any extra binaries that need to be signed. These could be files in your own app code or `node_modules`.
593
611
 
594
612
  #### `mac.category` - (optional) string
595
613
 
596
614
  Default: undefined
597
- Example: `public.app-category.productivity`.
615
+
616
+ Example: `public.app-category.productivity`
598
617
 
599
618
  The application category type, as shown in the Finder via _View -> Arrange by Application Category_ when viewing the Applications directory.
600
619
 
@@ -605,90 +624,100 @@ Valid values are listed in [Apple's documentation](https://developer.apple.com/l
605
624
  #### `mac.entitlements` - (optional) string
606
625
 
607
626
  Default: A sane minimal entitlements file we've put together.
608
- Example: `./entitlements.mac.plist`.
627
+
628
+ Example: `./entitlements.mac.plist`
609
629
 
610
630
  The path to an entitlements file for signing your application. It must be a plist file.
611
631
 
612
632
  #### `mac.entitlementsInherit` - (optional) string
613
633
 
614
634
  Default: No entitlements file is provided by default.
615
- Example: `./entitlementsInherit.mac.plist`.
635
+
636
+ Example: `./entitlementsInherit.mac.plist`
616
637
 
617
638
  The path to a child entitlements file for signing your application. It must be a plist file.
618
639
 
619
640
  #### `mac.extendInfo` - (optional) object
620
641
 
621
- Default: `{}`.
622
- Example: `{ "NSUserNotificationAlertStyle": "alert" }`.
642
+ Default: `{}`
643
+
644
+ Example: `{ "NSUserNotificationAlertStyle": "alert" }`
623
645
 
624
646
  Extra entries for `Info.plist`.
625
647
 
626
648
  #### `mac.icon` - (optional) string
627
649
 
628
- Example: `./mac-icon.png`.
629
-
630
- Default: The root [`icon`](#icon---string) is used.
650
+ Example: `./mac-icon.png`
631
651
 
632
652
  The path to your application's Mac desktop icon. It must be an ICNS or PNG.
633
653
 
654
+ Default: The root [`icon`](#icon---string) is used.
655
+
634
656
  #### `mac.requirements` - (optional) string
635
657
 
636
- Example: `./requirements.txt`.
637
658
  Default: No requirements file is used by default.
638
659
 
660
+ Example: `./requirements.txt`
661
+
639
662
  The path to the [requirements file](https://developer.apple.com/library/archive/documentation/Security/Conceptual/CodeSigningGuide/RequirementLang/RequirementLang.html) used when signing your application.
640
663
 
641
664
  ### `mas` - (optional) object
642
665
 
643
- Default: We use default development settings for Mac App Store.
644
- Example: `{ "type": "development" }`.
666
+ Example: `{ "type": "development" }`
645
667
 
646
668
  This object contains options that only apply to building the application for Mac App Store.
647
669
 
670
+ Default: We use default development settings for Mac App Store.
671
+
648
672
  #### `mas.entitlements` - (optional) string
649
673
 
650
674
  Default: No entitlements file is provided by default.
651
- Example: `./entitlements.mas.plist`.
675
+
676
+ Example: `./entitlements.mas.plist`
652
677
 
653
678
  The path to an entitlements file for signing your application. It must be a plist file.
654
679
 
655
680
  #### `mas.entitlementsInherit` - (optional) string
656
681
 
657
682
  Default: No entitlements file is provided by default.
658
- Example: `./entitlementsInherit.mas.plist`.
683
+
684
+ Example: `./entitlementsInherit.mas.plist`
659
685
 
660
686
  The path to a child entitlements file for signing your application. It must be a plist file.
661
687
 
662
688
  #### `mas.provisioningProfile` - (optional) string
663
689
 
664
690
  Default: No provisioning profile is used by default.
665
- Example: `./mas.provisionprofile`.
691
+
692
+ Example: `./mas.provisionprofile`
666
693
 
667
694
  The path to a provisioning profile for authorizing your application.
668
695
 
669
696
  #### `mas.type` - (optional) string
670
697
 
671
- Default: `"development"`
672
- Example: `"distribution"`.
698
+ Default: `development`
699
+
700
+ Example: `distribution`
673
701
 
674
702
  Whether to sign app for development or for distribution.
675
703
 
676
704
  ### `mas.x64ArchFiles` - (optional) string
677
705
 
678
706
  Default: not defined
679
- Example: `"Contents/Resources/foobar/**"`
707
+
708
+ Example: `Contents/Resources/foobar/**`
680
709
 
681
710
  Minimatch pattern of paths that are allowed to be x64 binaries in both ASAR files.
682
711
 
683
712
  ### `nodeVersion` - string
684
713
 
685
- Example: `18.12.1`.
714
+ Example: `18.12.1`
686
715
 
687
716
  The version of Node.js that ToDesktop should use to build your app.
688
717
 
689
718
  ### `npmVersion` - string
690
719
 
691
- Example: `9.8.1`.
720
+ Example: `9.8.1`
692
721
 
693
722
  The version of NPM that ToDesktop should use for installation.
694
723
 
@@ -696,6 +725,8 @@ The version of NPM that ToDesktop should use for installation.
696
725
 
697
726
  Default: `{}`
698
727
 
728
+ If you want to override the default `package.json` configuration, use the `packageJson` property. For example, you can use this to override the `productName` or `version` properties.
729
+
699
730
  Example:
700
731
 
701
732
  ```js
@@ -709,8 +740,6 @@ Example:
709
740
  }
710
741
  ```
711
742
 
712
- If you want to override the default `package.json` configuration, use the `packageJson` property. For example, you can use this to override the `productName` or `version` properties.
713
-
714
743
  You can also set the version of a `dependency` (or `devDependency`), such as Electron Builder, to `null`. This will remove Electron Builder from the effective `package.json` that ToDesktop will use.
715
744
 
716
745
  ```js
@@ -732,33 +761,33 @@ The package manager to use when installing dependencies. Valid values are `npm`,
732
761
 
733
762
  ### `pnpmVersion` - string
734
763
 
735
- Example: `8.10.5`.
764
+ Example: `8.10.5`
736
765
 
737
766
  The version of pnpm that ToDesktop should use for installation.
738
767
 
739
768
  ### `rebuildLibrary` - (optional) string
740
769
 
741
- Default: `app-builder`.
770
+ Default: `app-builder`
742
771
 
743
772
  The library that ToDesktop should use for rebuilding native modules. Valid values are `app-builder` or `@electron/rebuild`.
744
773
 
745
774
  ### `schemaVersion` - number
746
775
 
747
- Example: `1`.
776
+ Example: `1`
748
777
 
749
778
  This is the `todesktop.json` schema version. This must be `1`.
750
779
 
751
780
  ### `snap` - (optional) object
752
781
 
753
- Example: `{ "confinement": "classic", "grade": "devel" }`.
782
+ Example: `{ "confinement": "classic", "grade": "devel" }`
754
783
 
755
784
  This object contains some options that only apply to the building for the [Snap Store](https://snapcraft.io/store).
756
785
 
757
786
  #### `snap.after` - (optional) array of strings
758
787
 
759
- Default: `["desktop-gtk2"]`.
788
+ Default: `["desktop-gtk2"]`
760
789
 
761
- Example: `["launch-scripts"]`.
790
+ Example: `["launch-scripts"]`
762
791
 
763
792
  Ensures that all the part names listed are staged before the app part begins its [lifecycle](https://snapcraft.io/docs/parts-lifecycle#heading--steps).
764
793
 
@@ -766,79 +795,79 @@ Ensures that all the part names listed are staged before the app part begins its
766
795
 
767
796
  Default: See [snap.ts](https://github.com/electron-userland/electron-builder/blob/master/packages/app-builder-lib/templates/snap/snapcraft.yaml#L29).
768
797
 
769
- Example: `["-usr/lib/python*"]`.
798
+ Example: `["-usr/lib/python*"]`
770
799
 
771
800
  Specifies which files from the app part to stage and which to exclude. Individual files, directories, wildcards, globstars, and exclusions are accepted. See [Snapcraft filesets](https://snapcraft.io/docs/snapcraft-filesets) to learn more about the format.
772
801
 
773
802
  #### `snap.assumes` - (optional) string or array of strings
774
803
 
775
- Default: `undefined`.
804
+ Default: `undefined`
776
805
 
777
- Example: `snapd2.38`.
806
+ Example: `snapd2.38`
778
807
 
779
808
  The list of features that must be supported by the core in order for this snap to install. To learn more, see the [Snapcraft docs](https://snapcraft.io/docs/snapcraft-top-level-metadata#heading--assumes).
780
809
 
781
810
  #### `snap.autoStart` - (optional) boolean
782
811
 
783
- Default: `false`.
812
+ Default: `false`
784
813
 
785
- Example: `true`.
814
+ Example: `true`
786
815
 
787
816
  Whether or not the snap should automatically start on login.
788
817
 
789
818
  #### `snap.base` - (optional) string
790
819
 
791
- Default: `core18`.
820
+ Default: `core18`
792
821
 
793
- Example: `core20`.
822
+ Example: `core20`
794
823
 
795
824
  The base snap to use for building this snap.
796
825
 
797
826
  #### `snap.buildPackages` - (optional) array of strings
798
827
 
799
- Default: `[]`.
828
+ Default: `[]`
800
829
 
801
- Example: `["libssl-dev", "libssh-dev", "libncursesw5-dev"]`.
830
+ Example: `["libssl-dev", "libssh-dev", "libncursesw5-dev"]`
802
831
 
803
832
  The list of debian packages needs to be installed for building this snap.
804
833
 
805
834
  #### `snap.confinement` - (optional) string
806
835
 
807
- Default: `strict`.
836
+ Default: `strict`
808
837
 
809
- Example: `classic`.
838
+ Example: `classic`
810
839
 
811
840
  The type of [confinement](https://snapcraft.io/docs/reference/confinement) supported by the snap. `devmode`, `strict`, or `classic`.
812
841
 
813
842
  #### `snap.environment` - (optional) object
814
843
 
815
- Default: `{"TMPDIR": "$XDG_RUNTIME_DIR"}`.
844
+ Default: `{"TMPDIR":"$XDG_RUNTIME_DIR"}`
816
845
 
817
- Example: `{"TMPDIR": "$XDG_RUNTIME_DIR"}`.
846
+ Example: `{"TMPDIR": "$XDG_RUNTIME_DIR"}`
818
847
 
819
848
  The custom environment. If you set this, it will be merged with the default.
820
849
 
821
850
  #### `snap.grade` - (optional) string
822
851
 
823
- Default: `stable`.
852
+ Default: `stable`
824
853
 
825
- Example: `devel`.
854
+ Example: `devel`
826
855
 
827
856
  The quality grade of the snap. It can be either `devel` (i.e. a development version of the snap, so not to be published to the "stable" or "candidate" channels) or `stable` (i.e. a stable release or release candidate, which can be released to all channels).
828
857
 
829
858
  #### `snap.layout` - (optional) object
830
859
 
831
- Default: `undefined`.
860
+ Default: `undefined`
832
861
 
833
- Example: `{ "/var/lib/foo": { bind: "$SNAP_DATA/var/lib/foo" } }`.
862
+ Example: `{ "/var/lib/foo": { "bind": "$SNAP_DATA/var/lib/foo" } }`
834
863
 
835
864
  Specifies any files to make accessible from locations such as `/usr`, `/var`, and `/etc`. See [snap layouts](https://snapcraft.io/docs/snap-layouts) to learn more.
836
865
 
837
866
  #### `snap.plugs` - (optional) array containing strings and or objects
838
867
 
839
- Default: `["desktop", "desktop-legacy", "home", "x11", "unity7", "browser-support", "network", "gsettings", "pulseaudio", "opengl"]`.
868
+ Default: `["desktop","desktop-legacy","home","x11","unity7","browser-support","network","gsettings","pulseaudio","opengl"]`
840
869
 
841
- Example: `[ "default", { "browser-sandbox": { "interface": "browser-support", "allow-sandbox": true } }, "another-simple-plug-name" ]`.
870
+ Example: `[ "default", { "browser-sandbox": { "interface": "browser-support", "allow-sandbox": true } }, "another-simple-plug-name" ]`
842
871
 
843
872
  The list of [plugs](https://snapcraft.io/docs/reference/interfaces). If list contains `default`, it will be replaced with the default list, so, `["default", "foo"]` can be used to add a custom plug `foo` in addition to the default list.
844
873
 
@@ -858,9 +887,9 @@ Additional attributes can be specified using object instead of just name of plug
858
887
 
859
888
  #### `snap.stagePackages` - (optional) array of strings
860
889
 
861
- Default: `["libasound2", "libgconf2-4", "libnotify4", "libnspr4", "libnss3", "libpcre3", "libpulse0", "libxss1", "libxtst6"]`.
890
+ Default: `["libasound2","libgconf2-4","libnotify4","libnspr4","libnss3","libpcre3","libpulse0","libxss1","libxtst6"]`
862
891
 
863
- Example: `["default", "depends"]`.
892
+ Example: `["default", "depends"]`
864
893
 
865
894
  The list of Ubuntu packages to use that are needed to support the app part creation. Like `depends` for deb. If list contains `default`, it will be replaced with the default list, so, `["default", "foo"]` can be used to add custom package `foo` in addition to the defaults.
866
895
 
@@ -868,50 +897,56 @@ The list of Ubuntu packages to use that are needed to support the app part creat
868
897
 
869
898
  Default: The [productName](#recommendations-for-app-packagejson).
870
899
 
871
- Example: `The super cat generator`.
900
+ Example: `The super cat generator`
872
901
 
873
902
  A sentence summarising the snap. Max len. 78 characters, describing the snap in short and simple terms.
874
903
 
875
904
  #### `snap.useTemplateApp` - (optional) boolean
876
905
 
877
- Default: `true` if `stagePackages` is not specified.
906
+ Default: true if `stagePackages` is not specified.
878
907
 
879
- Example: `false`.
908
+ Example: `false`
880
909
 
881
910
  Whether to use a template snap.
882
911
 
883
912
  ### `updateUrlBase` - (optional) string
884
913
 
885
914
  Default: ToDesktop's auto-update URL.
886
- Example: `https://example.com/updates`.
915
+
916
+ Example: `https://example.com/updates`
887
917
 
888
918
  The URL to check for updates. You should only set this if you want to use your own self-hosted update server instead of ToDesktop's built-in update service. See https://www.github.com/ToDesktop/self-hosted for more information.
889
919
 
890
920
  ### `uploadSizeLimit` - (optional) number
891
921
 
892
- Default: `20`.
893
- Example: `35`.
922
+ Default: `20`
923
+
924
+ Example: `35`
894
925
 
895
926
  The max upload size (in MB). Before uploading your files to our servers, we check that the total file size is less than this number. If you are accidentally including unneccesary files in your app, check out the `appPath` and `appFiles` options.
896
927
 
897
928
  ### `windows` - (optional) object
898
929
 
899
- Default: We have good default settings for Windows.
900
-
901
- Example: `{ "icon": "./icon.ico" }`.
930
+ Example: `{ "icon": "./icon.ico" }`
902
931
 
903
932
  This object contains some options that only apply to the building & releasing for Windows.
904
933
 
905
- #### `windows.icon` - (optional) string
934
+ Default: We have good default settings for Windows.
906
935
 
907
- Example: `./icon.ico`.
936
+ #### `windows.icon` - (optional) string
908
937
 
909
- Default: The root [`icon`](#icon---string) is used.
938
+ Example: `./icon.ico`
910
939
 
911
940
  The path to your application's Windows desktop icon. It must be an ICO, ICNS, or PNG.
912
941
 
942
+ Default: The root [`icon`](#icon---string) is used.
943
+
913
944
  #### `windows.nsisCustomBinary` - (optional) object
914
945
 
946
+ Default: `undefined`
947
+
948
+ Allows you to provide your own makensis, such as one with support for debug logging via LogSet and LogText. (Logging also requires option debugLogging = true). It's not recommended to use it for production build.
949
+
915
950
  Example:
916
951
 
917
952
  ```json
@@ -922,10 +957,6 @@ Example:
922
957
  }
923
958
  ```
924
959
 
925
- Default: `undefined`.
926
-
927
- Allows you to provide your own makensis, such as one with support for debug logging via LogSet and LogText. (Logging also requires option debugLogging = true). It's not recommended to use it for production build.
928
-
929
960
  Example of NSIS script which enables install logging:
930
961
 
931
962
  ```nsis
@@ -937,26 +968,80 @@ Example of NSIS script which enables install logging:
937
968
 
938
969
  #### `windows.nsisInclude` - (optional) string
939
970
 
940
- Example: `build/installer.nsh`.
971
+ Default: `undefined`
941
972
 
942
- Default: `undefined`.
973
+ Example: `build/installer.nsh`
943
974
 
944
975
  The path to NSIS script to customize installer.
945
976
 
946
977
  #### `windows.publisherName` - (optional) array of strings
947
978
 
948
- Example: `["ABC Limited"]`.
949
-
950
979
  Default: Default to the common name from your code signing certificate.
951
980
 
981
+ Example: `["ABC Limited"]`
982
+
952
983
  The publisher name, exactly as in your code signing certificate. Several names can be provided. Defaults to common name from your code signing certificate. You should typically not include this property in your configuration unless you wish to transition to a new certificate in the future.
953
984
 
954
985
  ### `appBuilderLibVersion` - (optional) string
955
986
 
956
- Example: `22.14.13`.
987
+ Example: `22.14.13`
957
988
 
958
989
  The version of app-builder-lib that ToDesktop should use for building your app. This can be useful if you need to use a specific version that includes certain features or fixes.
959
990
 
991
+ ### `platformOverrides` - (optional) object
992
+
993
+ Default: `{}`
994
+
995
+ This option allows you to specify platform-specific configurations for Windows, macOS, and Linux builds. Most top-level configuration fields available in `todesktop.json` can be overridden within the `windows`, `mac`, or `linux` objects under `platformOverrides`.
996
+
997
+ Example:
998
+
999
+ ```json
1000
+ {
1001
+ "appId": "myapp.global.id",
1002
+ "platformOverrides": {
1003
+ "windows": {
1004
+ "appId": "myapp.windows.id",
1005
+ "copyright": "Copyright © My Company (Windows)"
1006
+ },
1007
+ "mac": {
1008
+ "appId": "myapp.mac.id",
1009
+ "mac": {
1010
+ "category": "public.app-category.developer-tools"
1011
+ }
1012
+ },
1013
+ "linux": {
1014
+ "copyright": "Copyright © My Company (Linux)"
1015
+ }
1016
+ }
1017
+ }
1018
+ ```
1019
+
1020
+ When a build is performed for a specific platform (e.g., Windows), the ToDesktop CLI will first take the global configuration value for a field. If that same field is defined within `platformOverrides.windows`, the platform-specific value will be used instead.
1021
+
1022
+ In the example above:
1023
+
1024
+ - For Windows builds:
1025
+ - `appId` will be `myapp.windows.id`.
1026
+ - `copyright` will be `Copyright © My Company (Windows)`.
1027
+ - For macOS builds:
1028
+ - `appId` will be `myapp.mac.id`.
1029
+ - The `mac.category` will be `public.app-category.developer-tools`.
1030
+ - For Linux builds:
1031
+ - `appId` will remain `myapp.global.id` (as it's not overridden for Linux).
1032
+ - `copyright` will be `Copyright © My Company (Linux)`.
1033
+ - For any other properties not specified in the platform override, the global value will be used.
1034
+
1035
+ This is particularly useful for settings like `appId`, `copyright`, or platform-specific configurations within the `windows`, `mac`, or `linux` blocks (e.g., `mac.category`, `windows.icon`).
1036
+
1037
+ The fields that **cannot** be overridden using `platformOverrides` are:
1038
+
1039
+ - `id` (the ToDesktop application ID)
1040
+ - `icon` (the main application icon, though platform-specific icons like `windows.icon` or `mac.icon` _can_ be overridden)
1041
+ - `schemaVersion`
1042
+ - `extends`
1043
+ - `platformOverrides` itself
1044
+
960
1045
  ## Build lifecycle hooks (package.json scripts)
961
1046
 
962
1047
  Sometimes you want to do something before or during the build process. For example, you might want to run a script before the build starts, or you might want to run a script after the files have been packaged. Our lifecycle hooks provide a way to do this.
@@ -1201,6 +1286,11 @@ Now, when we build your app on ToDesktop servers, it will also run your custom `
1201
1286
 
1202
1287
  ## Changelog
1203
1288
 
1289
+ ### v1.13.0
1290
+
1291
+ - Add support for `platformOverrides` in config to specify platform-specific overrides for app configuration
1292
+ - Add support for `$schema` in config to enable JSON schema validation and IDE intellisense
1293
+
1204
1294
  ### v1.12.5
1205
1295
 
1206
1296
  - Fix: Removed invalid React Hook call in `BuildCommand` that caused errors.
@@ -1336,7 +1426,7 @@ Now, when we build your app on ToDesktop servers, it will also run your custom `
1336
1426
 
1337
1427
  ### v1.7.4
1338
1428
 
1339
- - Fix: Linux/Windows platform links no longer have mac/zip/\[arch\] added to the end of the download URL
1429
+ - Fix: Linux/Windows platform links no longer have mac/zip/[arch] added to the end of the download URL
1340
1430
 
1341
1431
  ### v1.7.3
1342
1432