@todesktop/cli 1.7.6 → 1.8.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 +64 -4
- package/dist/cli.js +1291 -905
- package/dist/cli.js.map +4 -4
- package/package.json +6 -3
package/README.md
CHANGED
|
@@ -135,6 +135,8 @@ We also support:
|
|
|
135
135
|
|
|
136
136
|
- `todesktop build --code-sign=false`. Run a build with code-signing and notarization disabled. This is handy for testing builds quickly.
|
|
137
137
|
- `todesktop build --config=<path.to.another.todesktop.json>`. Run a build with a different configuration file.
|
|
138
|
+
- `todesktop build --async`. Run a build in the background. This is handy for CI environments.
|
|
139
|
+
- `todesktop build --webhook URL`. Send a POST request to the webhook URL when the build is finished. It's especially useful together with the `--async` flag.
|
|
138
140
|
- `todesktop release`. Release a build. This will publish a new download and an auto-update for existing users. By default it shows a list of builds for you to choose from.
|
|
139
141
|
- Use `todesktop release <id>` to release a specific build by ID.
|
|
140
142
|
- `todesktop release --latest` will release the latest build.
|
|
@@ -171,6 +173,38 @@ To build and release in one step, you can execute:
|
|
|
171
173
|
todesktop build && todesktop release --latest --force
|
|
172
174
|
```
|
|
173
175
|
|
|
176
|
+
If you need to run a build in the background, you can use the `--async` flag. To
|
|
177
|
+
get notified when the build is finished you can optionally specify a webhook URL
|
|
178
|
+
which will receive a POST request with the build data:
|
|
179
|
+
|
|
180
|
+
```sh
|
|
181
|
+
todesktop build --async --webhook https://example.com/build-finished-webhook
|
|
182
|
+
```
|
|
183
|
+
|
|
184
|
+
The webhook receives a POST request with the following JSON body:
|
|
185
|
+
|
|
186
|
+
```
|
|
187
|
+
POST https://example.com/build-finished-webhook
|
|
188
|
+
{
|
|
189
|
+
appId: string;
|
|
190
|
+
accountUserEmail: string;
|
|
191
|
+
accountUserId: string;
|
|
192
|
+
artifacts: {
|
|
193
|
+
linux?: LinuxArtifactDownloads;
|
|
194
|
+
mac?: MacArtifactDownloads;
|
|
195
|
+
windows?: WindowsArtifactDownloads;
|
|
196
|
+
};
|
|
197
|
+
buildId: string;
|
|
198
|
+
endedAt: string; // 2023-01-01T00:00:00Z
|
|
199
|
+
errorMessage?: string;
|
|
200
|
+
requesterUserEmail: string;
|
|
201
|
+
requesterUserId: string; // The same as accountUserId or `contextUserId`
|
|
202
|
+
schemaVersion: number; // Currently always `1`
|
|
203
|
+
startedAt: string; // 2023-01-01T00:00:00Z
|
|
204
|
+
status: 'queued' | 'failed' | 'building' | 'preparation' | 'succeeded' | 'cancelled';
|
|
205
|
+
}
|
|
206
|
+
```
|
|
207
|
+
|
|
174
208
|
## Project configuration (todesktop.json)
|
|
175
209
|
|
|
176
210
|
This describes all of the possible configuration options ín your `todesktop.json`.
|
|
@@ -425,9 +459,12 @@ Example:
|
|
|
425
459
|
- `ext` String | Array<String> - The extension (minus the leading period). e.g. png.
|
|
426
460
|
- `name` String - The name. e.g. PNG. Defaults to value of `ext`.
|
|
427
461
|
- `description` String - windows-only. The description.
|
|
462
|
+
- `icon` String - macOS and windows. Icon file name without extension. It points
|
|
463
|
+
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.
|
|
428
464
|
- `mimeType` String - linux-only. The mime-type.
|
|
429
|
-
- `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`.
|
|
430
|
-
- `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`.
|
|
465
|
+
- `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`.
|
|
466
|
+
- `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`.
|
|
467
|
+
- `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).
|
|
431
468
|
|
|
432
469
|
### `filesForDistribution` - (optional) array of glob patterns
|
|
433
470
|
|
|
@@ -605,6 +642,12 @@ Example: `yarn`
|
|
|
605
642
|
|
|
606
643
|
The package manager to use when installing dependencies. Valid values are `npm`, `yarn` or `pnpm`.
|
|
607
644
|
|
|
645
|
+
### `pnpmVersion` - string
|
|
646
|
+
|
|
647
|
+
Example: `8.10.5`.
|
|
648
|
+
|
|
649
|
+
The version of pnpm that ToDesktop should use for installation.
|
|
650
|
+
|
|
608
651
|
### `schemaVersion` - number
|
|
609
652
|
|
|
610
653
|
Example: `1`.
|
|
@@ -791,6 +834,12 @@ Default: `undefined`.
|
|
|
791
834
|
|
|
792
835
|
The path to NSIS script to customize installer.
|
|
793
836
|
|
|
837
|
+
### `yarnVersion` - string
|
|
838
|
+
|
|
839
|
+
Example: `1.22.1`.
|
|
840
|
+
|
|
841
|
+
The version of Yarn that ToDesktop should use for installation.
|
|
842
|
+
|
|
794
843
|
## Build lifecycle hooks (package.json scripts)
|
|
795
844
|
|
|
796
845
|
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.
|
|
@@ -850,8 +899,8 @@ The `afterPack` function also has the following arguments added to it's signatur
|
|
|
850
899
|
- shouldCodeSign - boolean - whether the app will be code signed or not
|
|
851
900
|
- outDir - string - the path to the output directory
|
|
852
901
|
- appOutDir - string - the path to the app output directory
|
|
853
|
-
- arch - string - the architecture of the app
|
|
854
902
|
- packager - object - the packager object
|
|
903
|
+
- arch - number - the architecture of the app. `ia32 = 0`, `x64 = 1`, `armv7l = 2`, `arm64 = 3`, `universal = 4`.
|
|
855
904
|
|
|
856
905
|
Example script:
|
|
857
906
|
|
|
@@ -989,7 +1038,18 @@ Now, when we build your app on ToDesktop servers, it will also run your custom `
|
|
|
989
1038
|
|
|
990
1039
|
## Changelog
|
|
991
1040
|
|
|
992
|
-
###
|
|
1041
|
+
### v1.8.0
|
|
1042
|
+
|
|
1043
|
+
- Add support for `--webhook` flag for `todesktop build` command
|
|
1044
|
+
- Add support for `--async` flag to run a build in the in the background
|
|
1045
|
+
- Add support for specifying custom `yarnVersion` in config
|
|
1046
|
+
- Add support for specifying custom `pnpmVersion` in config
|
|
1047
|
+
|
|
1048
|
+
### v1.7.7
|
|
1049
|
+
|
|
1050
|
+
- Report errors when S3 upload fails and retry 3 times
|
|
1051
|
+
|
|
1052
|
+
### v1.7.6
|
|
993
1053
|
|
|
994
1054
|
- Add support for multiple app protocol schemes
|
|
995
1055
|
|