@todesktop/cli 1.14.0 → 1.15.1
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 +48 -9
- package/dist/cli.js +159 -28
- package/dist/cli.js.map +4 -4
- package/dist/types.d.ts +503 -0
- package/package.json +6 -3
package/dist/types.d.ts
ADDED
|
@@ -0,0 +1,503 @@
|
|
|
1
|
+
/* eslint-disable */
|
|
2
|
+
/**
|
|
3
|
+
* This file was automatically generated from schema.json.
|
|
4
|
+
* DO NOT MODIFY IT BY HAND. Instead, modify the JSON schema and regenerate this file.
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* 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.
|
|
9
|
+
*/
|
|
10
|
+
export type AppBuilderLibVersionProperty = string;
|
|
11
|
+
/**
|
|
12
|
+
* 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.
|
|
13
|
+
*/
|
|
14
|
+
export type AppIdProperty = string;
|
|
15
|
+
/**
|
|
16
|
+
* This option allows you to decide which files get uploaded to be built on the ToDesktop servers. By default, all files in your app path are included in your app, except for `node_modules` and `.git`. Dependencies are installed on our build servers as there could be platform-specific postinstall steps.
|
|
17
|
+
*
|
|
18
|
+
* @minItems 1
|
|
19
|
+
*/
|
|
20
|
+
export type AppFilesProperty = [string, ...string[]];
|
|
21
|
+
/**
|
|
22
|
+
* 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.
|
|
23
|
+
*/
|
|
24
|
+
export type AppProtocolSchemeProperty = string | [string, ...string[]];
|
|
25
|
+
/**
|
|
26
|
+
* 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.
|
|
27
|
+
*/
|
|
28
|
+
export type AppPathProperty = string;
|
|
29
|
+
/**
|
|
30
|
+
* 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.
|
|
31
|
+
*/
|
|
32
|
+
export type AsarProperty = boolean;
|
|
33
|
+
/**
|
|
34
|
+
* This option allows you to decide which files get unpacked from the asar archive. By default we unpack all native `*.node` files.
|
|
35
|
+
*/
|
|
36
|
+
export type AsarUnpackProperty = boolean | [string, ...string[]];
|
|
37
|
+
/**
|
|
38
|
+
* The build version. Maps to the CFBundleVersion on macOS, and FileVersion metadata property on Windows.
|
|
39
|
+
*/
|
|
40
|
+
export type BuildVersionProperty = string;
|
|
41
|
+
/**
|
|
42
|
+
* The human-readable copyright line for the app.
|
|
43
|
+
*/
|
|
44
|
+
export type CopyrightProperty = string;
|
|
45
|
+
/**
|
|
46
|
+
* The base URL of the mirror to download Electron from. This may be a mirror geographically closer to you or even your own mirror which contains custom Electron builds. The version downloaded is the Electron version specified in `devDependencies` in your app's `package.json`. Alternatively you can explicitly specify an `electronVersion` in `todesktop.json` as described below.
|
|
47
|
+
*/
|
|
48
|
+
export type ElectronMirrorProperty = string;
|
|
49
|
+
/**
|
|
50
|
+
* The version of Electron to use. In most cases you should not specify an `electronVersion` property. Only specify this option if you wish to override the version that is specified in `package.json`.
|
|
51
|
+
*/
|
|
52
|
+
export type ElectronVersionProperty = string;
|
|
53
|
+
/**
|
|
54
|
+
* This option allows you specify files to be copied into the application's content directory (`Contents` for MacOS, root directory for Linux and Windows).
|
|
55
|
+
*/
|
|
56
|
+
export type ExtraContentFilesProperty = {
|
|
57
|
+
from: string;
|
|
58
|
+
to?: string;
|
|
59
|
+
}[];
|
|
60
|
+
/**
|
|
61
|
+
* This option allows you to specify files to be copied into the application's resources directory (`Contents/Resources` for MacOS, `resources` for Linux and Windows). It works just like the `extraContentFiles` option, except the files go to a different directory.
|
|
62
|
+
*/
|
|
63
|
+
export type ExtraResourcesProperty = {
|
|
64
|
+
from: string;
|
|
65
|
+
to?: string;
|
|
66
|
+
}[];
|
|
67
|
+
/**
|
|
68
|
+
* Associate a file type with your Electron app.
|
|
69
|
+
*
|
|
70
|
+
* @minItems 1
|
|
71
|
+
*/
|
|
72
|
+
export type FileAssociationsProperty = [
|
|
73
|
+
{
|
|
74
|
+
/**
|
|
75
|
+
* The extension (minus the leading period). e.g. png.
|
|
76
|
+
*/
|
|
77
|
+
ext: string | string[];
|
|
78
|
+
/**
|
|
79
|
+
* windows-only. The description.
|
|
80
|
+
*/
|
|
81
|
+
description?: string;
|
|
82
|
+
/**
|
|
83
|
+
* The name. e.g. PNG. Defaults to value of `ext`.
|
|
84
|
+
*/
|
|
85
|
+
name?: string;
|
|
86
|
+
/**
|
|
87
|
+
* linux-only. The mime-type.
|
|
88
|
+
*/
|
|
89
|
+
mimeType?: string;
|
|
90
|
+
/**
|
|
91
|
+
* 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.
|
|
92
|
+
*/
|
|
93
|
+
icon?: string;
|
|
94
|
+
/**
|
|
95
|
+
* macOS-only. The app's role with respect to the type. The value can be `Editor`, `Viewer`, `Shell`, or `None`. Corresponds to `CFBundleTypeRole`.
|
|
96
|
+
*/
|
|
97
|
+
role?: string;
|
|
98
|
+
/**
|
|
99
|
+
* 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`.
|
|
100
|
+
*/
|
|
101
|
+
isPackage?: boolean;
|
|
102
|
+
/**
|
|
103
|
+
* 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).
|
|
104
|
+
*/
|
|
105
|
+
rank?: 'Owner' | 'Default' | 'Alternate' | 'None';
|
|
106
|
+
},
|
|
107
|
+
...{
|
|
108
|
+
/**
|
|
109
|
+
* The extension (minus the leading period). e.g. png.
|
|
110
|
+
*/
|
|
111
|
+
ext: string | string[];
|
|
112
|
+
/**
|
|
113
|
+
* windows-only. The description.
|
|
114
|
+
*/
|
|
115
|
+
description?: string;
|
|
116
|
+
/**
|
|
117
|
+
* The name. e.g. PNG. Defaults to value of `ext`.
|
|
118
|
+
*/
|
|
119
|
+
name?: string;
|
|
120
|
+
/**
|
|
121
|
+
* linux-only. The mime-type.
|
|
122
|
+
*/
|
|
123
|
+
mimeType?: string;
|
|
124
|
+
/**
|
|
125
|
+
* 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.
|
|
126
|
+
*/
|
|
127
|
+
icon?: string;
|
|
128
|
+
/**
|
|
129
|
+
* macOS-only. The app's role with respect to the type. The value can be `Editor`, `Viewer`, `Shell`, or `None`. Corresponds to `CFBundleTypeRole`.
|
|
130
|
+
*/
|
|
131
|
+
role?: string;
|
|
132
|
+
/**
|
|
133
|
+
* 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`.
|
|
134
|
+
*/
|
|
135
|
+
isPackage?: boolean;
|
|
136
|
+
/**
|
|
137
|
+
* 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).
|
|
138
|
+
*/
|
|
139
|
+
rank?: 'Owner' | 'Default' | 'Alternate' | 'None';
|
|
140
|
+
}[],
|
|
141
|
+
];
|
|
142
|
+
/**
|
|
143
|
+
* 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.
|
|
144
|
+
*/
|
|
145
|
+
export type UpdateUrlBaseProperty = string;
|
|
146
|
+
/**
|
|
147
|
+
* This option allows you to explicitly exclude or include certain files in the packaged version of your app. These files are filtered _after_ the build step which happens on the ToDesktop servers.
|
|
148
|
+
*
|
|
149
|
+
* @minItems 1
|
|
150
|
+
*/
|
|
151
|
+
export type FilesForDistributionProperty = [string, ...string[]];
|
|
152
|
+
/**
|
|
153
|
+
* Whether to include **all** of the submodules node_modules directories
|
|
154
|
+
*/
|
|
155
|
+
export type IncludeSubNodeModulesProperty = boolean;
|
|
156
|
+
/**
|
|
157
|
+
* The version of Node.js that ToDesktop should use to build your app.
|
|
158
|
+
*/
|
|
159
|
+
export type NodeVersionProperty = string;
|
|
160
|
+
/**
|
|
161
|
+
* The version of NPM that ToDesktop should use for installation.
|
|
162
|
+
*/
|
|
163
|
+
export type NpmVersionProperty = string;
|
|
164
|
+
/**
|
|
165
|
+
* The version of pnpm that ToDesktop should use for installation.
|
|
166
|
+
*/
|
|
167
|
+
export type PnpmVersionProperty = string;
|
|
168
|
+
/**
|
|
169
|
+
* The package manager to use when installing dependencies. Valid values are `npm`, `yarn` or `pnpm`.
|
|
170
|
+
*/
|
|
171
|
+
export type PackageManagerProperty = 'npm' | 'yarn' | 'pnpm';
|
|
172
|
+
/**
|
|
173
|
+
* The library that ToDesktop should use for rebuilding native modules. Valid values are `app-builder` or `@electron/rebuild`.
|
|
174
|
+
*/
|
|
175
|
+
export type RebuildLibraryProperty = 'app-builder' | '@electron/rebuild';
|
|
176
|
+
/**
|
|
177
|
+
* 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.
|
|
178
|
+
*/
|
|
179
|
+
export type UploadSizeLimitProperty = number;
|
|
180
|
+
|
|
181
|
+
export interface Schema {
|
|
182
|
+
/**
|
|
183
|
+
* 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.
|
|
184
|
+
*/
|
|
185
|
+
$schema?: string;
|
|
186
|
+
appBuilderLibVersion?: AppBuilderLibVersionProperty;
|
|
187
|
+
appId?: AppIdProperty;
|
|
188
|
+
appFiles?: AppFilesProperty;
|
|
189
|
+
appProtocolScheme?: AppProtocolSchemeProperty;
|
|
190
|
+
appPath?: AppPathProperty;
|
|
191
|
+
asar?: AsarProperty;
|
|
192
|
+
asarUnpack?: AsarUnpackProperty;
|
|
193
|
+
buildVersion?: BuildVersionProperty;
|
|
194
|
+
copyright?: CopyrightProperty;
|
|
195
|
+
electronMirror?: ElectronMirrorProperty;
|
|
196
|
+
electronVersion?: ElectronVersionProperty;
|
|
197
|
+
/**
|
|
198
|
+
* This is the path to a base configuration file (`.json` or `.js`). This is especially useful for configuration sharing between different environments (e.g., staging and production). The base configuration file can be a relative path from the project root or an absolute path.
|
|
199
|
+
*/
|
|
200
|
+
extends?: string;
|
|
201
|
+
extraContentFiles?: ExtraContentFilesProperty;
|
|
202
|
+
extraResources?: ExtraResourcesProperty;
|
|
203
|
+
fileAssociations?: FileAssociationsProperty;
|
|
204
|
+
updateUrlBase?: UpdateUrlBaseProperty;
|
|
205
|
+
filesForDistribution?: FilesForDistributionProperty;
|
|
206
|
+
/**
|
|
207
|
+
* The path to your application's desktop icon. It must be an ICNS or PNG.
|
|
208
|
+
*/
|
|
209
|
+
icon?: string;
|
|
210
|
+
linux?: LinuxConfigProperty;
|
|
211
|
+
/**
|
|
212
|
+
* 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.
|
|
213
|
+
*/
|
|
214
|
+
id?: string;
|
|
215
|
+
includeSubNodeModules?: IncludeSubNodeModulesProperty;
|
|
216
|
+
mac?: MacConfigProperty;
|
|
217
|
+
mas?: MasConfigProperty;
|
|
218
|
+
dmg?: DmgConfigProperty;
|
|
219
|
+
nodeVersion?: NodeVersionProperty;
|
|
220
|
+
npmVersion?: NpmVersionProperty;
|
|
221
|
+
pnpmVersion?: PnpmVersionProperty;
|
|
222
|
+
packageJson?: PackageJsonProperty;
|
|
223
|
+
packageManager?: PackageManagerProperty;
|
|
224
|
+
rebuildLibrary?: RebuildLibraryProperty;
|
|
225
|
+
/**
|
|
226
|
+
* This is the `todesktop.json` schema version. This must be `1`.
|
|
227
|
+
*/
|
|
228
|
+
schemaVersion?: number;
|
|
229
|
+
snap?: SnapConfigProperty;
|
|
230
|
+
uploadSizeLimit?: UploadSizeLimitProperty;
|
|
231
|
+
windows?: WindowsConfigProperty;
|
|
232
|
+
/**
|
|
233
|
+
* 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`.
|
|
234
|
+
*/
|
|
235
|
+
platformOverrides?: {
|
|
236
|
+
windows?: PlatformOverridableProperties;
|
|
237
|
+
mac?: PlatformOverridableProperties;
|
|
238
|
+
linux?: PlatformOverridableProperties;
|
|
239
|
+
};
|
|
240
|
+
}
|
|
241
|
+
/**
|
|
242
|
+
* This object contains some options that only apply to the building & releasing for Linux.
|
|
243
|
+
*/
|
|
244
|
+
export interface LinuxConfigProperty {
|
|
245
|
+
/**
|
|
246
|
+
* The [application category](https://specifications.freedesktop.org/menu-spec/latest/apa.html#main-category-registry).
|
|
247
|
+
*/
|
|
248
|
+
category?: string;
|
|
249
|
+
/**
|
|
250
|
+
* The path to your application's Linux desktop icon. It must be an ICNS or PNG.
|
|
251
|
+
*/
|
|
252
|
+
icon?: string;
|
|
253
|
+
/**
|
|
254
|
+
* The version of the Linux image that ToDesktop should use to build your app.
|
|
255
|
+
*/
|
|
256
|
+
imageVersion?: string;
|
|
257
|
+
/**
|
|
258
|
+
* This option allows you to configure whether your app should run in a sandboxed environment.
|
|
259
|
+
*/
|
|
260
|
+
noSandbox?: boolean;
|
|
261
|
+
}
|
|
262
|
+
/**
|
|
263
|
+
* This object contains some options that only apply to the building & releasing for MacOS.
|
|
264
|
+
*/
|
|
265
|
+
export interface MacConfigProperty {
|
|
266
|
+
/**
|
|
267
|
+
* The application category type, as shown in the Finder via _View -> Arrange by Application Category_ when viewing the Applications directory.
|
|
268
|
+
*/
|
|
269
|
+
category?: string;
|
|
270
|
+
/**
|
|
271
|
+
* Paths of any extra binaries that need to be signed. These could be files in your own app code or `node_modules`.
|
|
272
|
+
*/
|
|
273
|
+
additionalBinariesToSign?: string[];
|
|
274
|
+
/**
|
|
275
|
+
* The path to an entitlements file for signing your application. It must be a plist file.
|
|
276
|
+
*/
|
|
277
|
+
entitlements?: string;
|
|
278
|
+
/**
|
|
279
|
+
* The path to a child entitlements file for signing your application. It must be a plist file.
|
|
280
|
+
*/
|
|
281
|
+
entitlementsInherit?: string;
|
|
282
|
+
/**
|
|
283
|
+
* Extra entries for `Info.plist`.
|
|
284
|
+
*/
|
|
285
|
+
extendInfo?: {};
|
|
286
|
+
/**
|
|
287
|
+
* The path to your application's Mac desktop icon. It must be an ICNS or PNG.
|
|
288
|
+
*/
|
|
289
|
+
icon?: string;
|
|
290
|
+
/**
|
|
291
|
+
* The path to the [requirements file](https://developer.apple.com/library/archive/documentation/Security/Conceptual/CodeSigningGuide/RequirementLang/RequirementLang.html) used when signing your application.
|
|
292
|
+
*/
|
|
293
|
+
requirements?: string;
|
|
294
|
+
}
|
|
295
|
+
/**
|
|
296
|
+
* This object contains options that only apply to building the application for Mac App Store.
|
|
297
|
+
*/
|
|
298
|
+
export interface MasConfigProperty {
|
|
299
|
+
/**
|
|
300
|
+
* The path to an entitlements file for signing your application. It must be a plist file.
|
|
301
|
+
*/
|
|
302
|
+
entitlements?: string;
|
|
303
|
+
/**
|
|
304
|
+
* The path to a child entitlements file for signing your application. It must be a plist file.
|
|
305
|
+
*/
|
|
306
|
+
entitlementsInherit?: string;
|
|
307
|
+
/**
|
|
308
|
+
* The path to a provisioning profile for authorizing your application.
|
|
309
|
+
*/
|
|
310
|
+
provisioningProfile?: string;
|
|
311
|
+
/**
|
|
312
|
+
* Whether to sign app for development or for distribution.
|
|
313
|
+
*/
|
|
314
|
+
type?: 'development' | 'distribution';
|
|
315
|
+
/**
|
|
316
|
+
* Minimatch pattern of paths that are allowed to be x64 binaries in both ASAR files.
|
|
317
|
+
*/
|
|
318
|
+
x64ArchFiles?: string;
|
|
319
|
+
}
|
|
320
|
+
/**
|
|
321
|
+
* Options for customizing the macOS DMG (disk image) installer.
|
|
322
|
+
*/
|
|
323
|
+
export interface DmgConfigProperty {
|
|
324
|
+
/**
|
|
325
|
+
* 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.
|
|
326
|
+
*/
|
|
327
|
+
background?: string;
|
|
328
|
+
/**
|
|
329
|
+
* The artifact name of the DMG file. Macros ${productName}, ${version}, ${name} are supported.
|
|
330
|
+
*/
|
|
331
|
+
artifactName?: string;
|
|
332
|
+
/**
|
|
333
|
+
* The background color (accepts css colors). Defaults to "`#ffffff`" (white) if no background image.
|
|
334
|
+
*/
|
|
335
|
+
backgroundColor?: string;
|
|
336
|
+
/**
|
|
337
|
+
* The size of all the icons inside the DMG. Defaults to `80`.
|
|
338
|
+
*/
|
|
339
|
+
iconSize?: number;
|
|
340
|
+
/**
|
|
341
|
+
* The size of all the icon texts inside the DMG. Defaults to `12`.
|
|
342
|
+
*/
|
|
343
|
+
iconTextSize?: number;
|
|
344
|
+
/**
|
|
345
|
+
* The title of the produced DMG, which will be shown when mounted (volume name). Macro `${productName}`, `${version}` and `${name}` are supported.
|
|
346
|
+
*/
|
|
347
|
+
title?: string;
|
|
348
|
+
/**
|
|
349
|
+
* Customize icon locations. The x and y coordinates refer to the position of the center of the icon (at 1x scale), and do not take the label into account.
|
|
350
|
+
*/
|
|
351
|
+
contents?: {
|
|
352
|
+
/**
|
|
353
|
+
* The device-independent pixel offset from the left of the window to the center of the icon.
|
|
354
|
+
*/
|
|
355
|
+
x?: number;
|
|
356
|
+
/**
|
|
357
|
+
* The device-independent pixel offset from the top of the window to the center of the icon.
|
|
358
|
+
*/
|
|
359
|
+
y?: number;
|
|
360
|
+
}[];
|
|
361
|
+
/**
|
|
362
|
+
* The DMG windows position and size. In most cases, you will only want to specify a `height` and `width` value but not `x` and `y`.
|
|
363
|
+
*/
|
|
364
|
+
window?: {
|
|
365
|
+
/**
|
|
366
|
+
* The X position relative to left of the screen.
|
|
367
|
+
*/
|
|
368
|
+
x?: number;
|
|
369
|
+
/**
|
|
370
|
+
* The Y position relative to top of the screen.
|
|
371
|
+
*/
|
|
372
|
+
y?: number;
|
|
373
|
+
/**
|
|
374
|
+
* The width. Defaults to background image width or 540.
|
|
375
|
+
*/
|
|
376
|
+
width?: number;
|
|
377
|
+
/**
|
|
378
|
+
* The height. Defaults to background image height or 380.
|
|
379
|
+
*/
|
|
380
|
+
height?: number;
|
|
381
|
+
};
|
|
382
|
+
}
|
|
383
|
+
/**
|
|
384
|
+
* 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.
|
|
385
|
+
*/
|
|
386
|
+
export interface PackageJsonProperty {}
|
|
387
|
+
/**
|
|
388
|
+
* This object contains some options that only apply to the building for the [Snap Store](https://snapcraft.io/store).
|
|
389
|
+
*/
|
|
390
|
+
export interface SnapConfigProperty {
|
|
391
|
+
/**
|
|
392
|
+
* Ensures that all the part names listed are staged before the app part begins its [lifecycle](https://snapcraft.io/docs/parts-lifecycle#heading--steps).
|
|
393
|
+
*/
|
|
394
|
+
after?: string[];
|
|
395
|
+
/**
|
|
396
|
+
* 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.
|
|
397
|
+
*/
|
|
398
|
+
appPartStage?: string & string[];
|
|
399
|
+
/**
|
|
400
|
+
* 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).
|
|
401
|
+
*/
|
|
402
|
+
assumes?: string | string[];
|
|
403
|
+
/**
|
|
404
|
+
* Whether or not the snap should automatically start on login.
|
|
405
|
+
*/
|
|
406
|
+
autoStart?: boolean;
|
|
407
|
+
/**
|
|
408
|
+
* The base snap to use for building this snap.
|
|
409
|
+
*/
|
|
410
|
+
base?: string;
|
|
411
|
+
/**
|
|
412
|
+
* The list of debian packages needs to be installed for building this snap.
|
|
413
|
+
*/
|
|
414
|
+
buildPackages?: string[];
|
|
415
|
+
/**
|
|
416
|
+
* The type of [confinement](https://snapcraft.io/docs/reference/confinement) supported by the snap. `devmode`, `strict`, or `classic`.
|
|
417
|
+
*/
|
|
418
|
+
confinement?: 'classic' | 'devmode' | 'strict';
|
|
419
|
+
/**
|
|
420
|
+
* The custom environment. If you set this, it will be merged with the default.
|
|
421
|
+
*/
|
|
422
|
+
environment?: {};
|
|
423
|
+
/**
|
|
424
|
+
* 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).
|
|
425
|
+
*/
|
|
426
|
+
grade?: 'devel' | 'stable';
|
|
427
|
+
/**
|
|
428
|
+
* 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.
|
|
429
|
+
*/
|
|
430
|
+
layout?: string;
|
|
431
|
+
/**
|
|
432
|
+
* 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.
|
|
433
|
+
*/
|
|
434
|
+
plugs?: (string | {})[];
|
|
435
|
+
/**
|
|
436
|
+
* 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.
|
|
437
|
+
*/
|
|
438
|
+
stagePackages?: string[];
|
|
439
|
+
/**
|
|
440
|
+
* A sentence summarising the snap. Max len. 78 characters, describing the snap in short and simple terms.
|
|
441
|
+
*/
|
|
442
|
+
summary?: string;
|
|
443
|
+
/**
|
|
444
|
+
* Whether to use a template snap.
|
|
445
|
+
*/
|
|
446
|
+
useTemplateApp?: boolean & string;
|
|
447
|
+
}
|
|
448
|
+
/**
|
|
449
|
+
* This object contains some options that only apply to the building & releasing for Windows.
|
|
450
|
+
*/
|
|
451
|
+
export interface WindowsConfigProperty {
|
|
452
|
+
/**
|
|
453
|
+
* The path to your application's Windows desktop icon. It must be an ICO, ICNS, or PNG.
|
|
454
|
+
*/
|
|
455
|
+
icon?: string;
|
|
456
|
+
/**
|
|
457
|
+
* 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.
|
|
458
|
+
*/
|
|
459
|
+
nsisCustomBinary?: string;
|
|
460
|
+
/**
|
|
461
|
+
* The path to NSIS script to customize installer.
|
|
462
|
+
*/
|
|
463
|
+
nsisInclude?: string;
|
|
464
|
+
/**
|
|
465
|
+
* 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.
|
|
466
|
+
*/
|
|
467
|
+
publisherName?: string & string[];
|
|
468
|
+
}
|
|
469
|
+
/**
|
|
470
|
+
* Defines properties that can be overridden on a per-platform basis under the 'platformOverrides' field.
|
|
471
|
+
*/
|
|
472
|
+
export interface PlatformOverridableProperties {
|
|
473
|
+
appBuilderLibVersion?: AppBuilderLibVersionProperty;
|
|
474
|
+
appId?: AppIdProperty;
|
|
475
|
+
appFiles?: AppFilesProperty;
|
|
476
|
+
appProtocolScheme?: AppProtocolSchemeProperty;
|
|
477
|
+
appPath?: AppPathProperty;
|
|
478
|
+
asar?: AsarProperty;
|
|
479
|
+
asarUnpack?: AsarUnpackProperty;
|
|
480
|
+
buildVersion?: BuildVersionProperty;
|
|
481
|
+
copyright?: CopyrightProperty;
|
|
482
|
+
electronMirror?: ElectronMirrorProperty;
|
|
483
|
+
electronVersion?: ElectronVersionProperty;
|
|
484
|
+
extraContentFiles?: ExtraContentFilesProperty;
|
|
485
|
+
extraResources?: ExtraResourcesProperty;
|
|
486
|
+
fileAssociations?: FileAssociationsProperty;
|
|
487
|
+
updateUrlBase?: UpdateUrlBaseProperty;
|
|
488
|
+
filesForDistribution?: FilesForDistributionProperty;
|
|
489
|
+
linux?: LinuxConfigProperty;
|
|
490
|
+
includeSubNodeModules?: IncludeSubNodeModulesProperty;
|
|
491
|
+
mac?: MacConfigProperty;
|
|
492
|
+
mas?: MasConfigProperty;
|
|
493
|
+
dmg?: DmgConfigProperty;
|
|
494
|
+
nodeVersion?: NodeVersionProperty;
|
|
495
|
+
npmVersion?: NpmVersionProperty;
|
|
496
|
+
pnpmVersion?: PnpmVersionProperty;
|
|
497
|
+
packageJson?: PackageJsonProperty;
|
|
498
|
+
packageManager?: PackageManagerProperty;
|
|
499
|
+
rebuildLibrary?: RebuildLibraryProperty;
|
|
500
|
+
snap?: SnapConfigProperty;
|
|
501
|
+
uploadSizeLimit?: UploadSizeLimitProperty;
|
|
502
|
+
windows?: WindowsConfigProperty;
|
|
503
|
+
}
|
package/package.json
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
"access": "public"
|
|
5
5
|
},
|
|
6
6
|
"name": "@todesktop/cli",
|
|
7
|
-
"version": "1.
|
|
7
|
+
"version": "1.15.1",
|
|
8
8
|
"license": "MIT",
|
|
9
9
|
"author": "Dave Jeffery <dave@todesktop.com> (http://www.todesktop.com/)",
|
|
10
10
|
"homepage": "https://todesktop.com/cli",
|
|
@@ -14,6 +14,7 @@
|
|
|
14
14
|
"bin": {
|
|
15
15
|
"todesktop": "./dist/cli.js"
|
|
16
16
|
},
|
|
17
|
+
"types": "./dist/types.d.ts",
|
|
17
18
|
"engines": {
|
|
18
19
|
"node": ">=16"
|
|
19
20
|
},
|
|
@@ -21,14 +22,15 @@
|
|
|
21
22
|
"dev": "cp-cli dev.env .env && npm run build:dev && npm link",
|
|
22
23
|
"dev:prod": "cp-cli prod.env .env && npm run build && npm link",
|
|
23
24
|
"dev:local:prod": "cp-cli prod-local.env .env && npm run build && npm link && cp-cli prod-local.env .env",
|
|
24
|
-
"build": "esbuild src/index.ts --packages=external --bundle --sourcemap --platform=node --outfile=dist/cli.js && cp-cli prod.env .env",
|
|
25
|
-
"build:dev": "esbuild src/index.ts --packages=external --bundle --sourcemap --platform=node --outfile=dist/cli.js && cp-cli dev.env .env",
|
|
25
|
+
"build": "npm run types:generate && esbuild src/index.ts --packages=external --bundle --sourcemap --platform=node --outfile=dist/cli.js && cp-cli prod.env .env",
|
|
26
|
+
"build:dev": "npm run types:generate && esbuild src/index.ts --packages=external --bundle --sourcemap --platform=node --outfile=dist/cli.js && cp-cli dev.env .env",
|
|
26
27
|
"lint": "npm run lint:types && npm run lint:styles",
|
|
27
28
|
"lint:styles": "eslint src test .eslintrc.js && prettier --check .",
|
|
28
29
|
"format": "prettier --write .",
|
|
29
30
|
"lint:types": "tsc && tsc-strict",
|
|
30
31
|
"lint--fix": "eslint src test --fix",
|
|
31
32
|
"docs:generate": "node scripts/generate-readme.js",
|
|
33
|
+
"types:generate": "node scripts/generate-types.js",
|
|
32
34
|
"release": "npm run docs:generate && npm run build && npx np --tag=latest",
|
|
33
35
|
"release-beta": "npm run docs:generate && npm run build && npx np --any-branch --no-tests --tag=beta",
|
|
34
36
|
"test": "ava",
|
|
@@ -112,6 +114,7 @@
|
|
|
112
114
|
"fs-extra": "^9.0.1",
|
|
113
115
|
"husky": "^4.3.0",
|
|
114
116
|
"ink-testing-library": "^2.1.0",
|
|
117
|
+
"json-schema-to-typescript": "^15.0.4",
|
|
115
118
|
"lint-staged": "^10.2.11",
|
|
116
119
|
"package-json-type": "^1.0.3",
|
|
117
120
|
"prettier": "^2.8.1",
|