@todesktop/shared 7.190.0 → 7.191.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.
Files changed (75) hide show
  1. package/.prettierignore +0 -2
  2. package/CHANGELOG.md +19 -0
  3. package/README.md +42 -15
  4. package/eslint.config.mjs +8 -55
  5. package/lib/{base.d.ts → cjs/base.d.ts} +82 -75
  6. package/lib/{desktopify.d.ts → cjs/desktopify.d.ts} +74 -74
  7. package/lib/{desktopify.js → cjs/desktopify.js} +12 -11
  8. package/lib/{desktopify2.d.ts → cjs/desktopify2.d.ts} +223 -223
  9. package/lib/{getSiteInfo.d.ts → cjs/getSiteInfo.d.ts} +6 -6
  10. package/lib/{hsm.d.ts → cjs/hsm.d.ts} +1 -1
  11. package/lib/{hsm.js → cjs/hsm.js} +1 -1
  12. package/lib/{index.d.ts → cjs/index.d.ts} +7 -8
  13. package/lib/{index.js → cjs/index.js} +11 -9
  14. package/lib/{invitePermissionLabels.d.ts → cjs/invitePermissionLabels.d.ts} +4 -2
  15. package/lib/{invitePermissionLabels.js → cjs/invitePermissionLabels.js} +11 -3
  16. package/lib/{personalAccessTokens.d.ts → cjs/personalAccessTokens.d.ts} +12 -12
  17. package/lib/{plans.d.ts → cjs/plans.d.ts} +27 -27
  18. package/lib/{plans.js → cjs/plans.js} +165 -163
  19. package/lib/{plugin.d.ts → cjs/plugin.d.ts} +18 -18
  20. package/lib/{toDesktop.d.ts → cjs/toDesktop.d.ts} +66 -66
  21. package/lib/cjs/translation.d.ts +2 -0
  22. package/lib/{validations.d.ts → cjs/validations.d.ts} +66 -66
  23. package/lib/cjs/validations.js +178 -0
  24. package/lib/esm/base.d.ts +326 -0
  25. package/lib/esm/base.js +19 -0
  26. package/lib/esm/desktopify.d.ts +339 -0
  27. package/lib/esm/desktopify.js +71 -0
  28. package/lib/esm/desktopify2.d.ts +506 -0
  29. package/lib/esm/desktopify2.js +77 -0
  30. package/lib/esm/getSiteInfo.d.ts +24 -0
  31. package/lib/esm/getSiteInfo.js +1 -0
  32. package/lib/esm/hsm.d.ts +30 -0
  33. package/lib/esm/hsm.js +35 -0
  34. package/lib/esm/index.d.ts +12 -0
  35. package/lib/esm/index.js +14 -0
  36. package/lib/esm/invitePermissionLabels.d.ts +13 -0
  37. package/lib/esm/invitePermissionLabels.js +24 -0
  38. package/lib/esm/personalAccessTokens.d.ts +24 -0
  39. package/lib/esm/personalAccessTokens.js +1 -0
  40. package/lib/esm/plans.d.ts +130 -0
  41. package/lib/esm/plans.js +626 -0
  42. package/lib/esm/plugin.d.ts +55 -0
  43. package/lib/esm/plugin.js +1 -0
  44. package/lib/esm/toDesktop.d.ts +191 -0
  45. package/lib/esm/toDesktop.js +1 -0
  46. package/lib/esm/translation.d.ts +2 -0
  47. package/lib/esm/translation.js +13 -0
  48. package/lib/esm/validations.d.ts +102 -0
  49. package/lib/{validations.js → esm/validations.js} +54 -56
  50. package/package.json +29 -20
  51. package/src/base.ts +90 -82
  52. package/src/desktopify.ts +82 -80
  53. package/src/desktopify2.ts +240 -240
  54. package/src/getSiteInfo.ts +6 -6
  55. package/src/hsm.ts +7 -7
  56. package/src/index.cjs.ts +19 -0
  57. package/src/index.ts +14 -14
  58. package/src/invitePermissionLabels.ts +20 -6
  59. package/src/personalAccessTokens.ts +12 -12
  60. package/src/plans.ts +191 -191
  61. package/src/plugin.ts +19 -19
  62. package/src/toDesktop.ts +70 -70
  63. package/src/translation.ts +2 -2
  64. package/src/validations.ts +51 -49
  65. package/tsconfig.esm.json +15 -0
  66. package/tsconfig.json +6 -4
  67. package/.prettierrc +0 -5
  68. package/lib/translation.d.ts +0 -2
  69. package/lib/{base.js → cjs/base.js} +3 -3
  70. /package/lib/{desktopify2.js → cjs/desktopify2.js} +0 -0
  71. /package/lib/{getSiteInfo.js → cjs/getSiteInfo.js} +0 -0
  72. /package/lib/{personalAccessTokens.js → cjs/personalAccessTokens.js} +0 -0
  73. /package/lib/{plugin.js → cjs/plugin.js} +0 -0
  74. /package/lib/{toDesktop.js → cjs/toDesktop.js} +0 -0
  75. /package/lib/{translation.js → cjs/translation.js} +0 -0
@@ -0,0 +1,326 @@
1
+ import { CIRunner, ExtraFileReference, FilePath, IAppBuilderLib, PlatformName, Release } from './desktopify';
2
+ import { MacTarget, WindowsTarget } from './hsm';
3
+ export interface Schemable {
4
+ schemaVersion?: number;
5
+ }
6
+ type CompositeIdFileLocationKey = string;
7
+ export type StaticAnalysisItem = {
8
+ hidden: boolean;
9
+ };
10
+ export type ProgressTypes = 'done' | 'error' | 'progress' | 'queued';
11
+ export interface IChecklistItem {
12
+ [id: string]: boolean;
13
+ }
14
+ export interface IDownloadButtonOptions {
15
+ bgColor: string;
16
+ borderRadius: number;
17
+ btnText: string;
18
+ buttonSize: 'large' | 'medium' | 'small';
19
+ fgColor: string;
20
+ fontFamily: 'sans-serif' | 'serif';
21
+ showAppIcon: {
22
+ alignment: 'left' | 'right';
23
+ enabled: boolean;
24
+ };
25
+ showDownloadIcon: {
26
+ alignment: 'left' | 'right';
27
+ enabled: boolean;
28
+ };
29
+ }
30
+ export declare enum WindowsEVOnboardingSteps {
31
+ 'hasBeenVerified' = "hasBeenVerified",
32
+ 'hasChosenProvider' = "hasChosenProvider",
33
+ 'hasGeneratedCert' = "hasGeneratedCert",
34
+ 'hasOrderedCert' = "hasOrderedCert",
35
+ 'hasUploadedCert' = "hasUploadedCert"
36
+ }
37
+ export declare enum WindowsEVOnboardingProvider {
38
+ 'globalsign' = "globalsign",
39
+ 'other' = "other"
40
+ }
41
+ export interface IAppBuildProgress {
42
+ isBuilding: boolean;
43
+ message: string;
44
+ percent: number;
45
+ shouldSkip: boolean;
46
+ type: ProgressTypes;
47
+ }
48
+ export interface IAppMeta {
49
+ appIterations?: number;
50
+ autoSecurityUpdatesEnabled?: boolean;
51
+ ciRunner?: CIRunner;
52
+ completedChecklistItems?: IChecklistItem;
53
+ currentBuildProgress?: {
54
+ channel?: string;
55
+ id?: string;
56
+ linux?: IAppBuildProgress;
57
+ mac?: IAppBuildProgress;
58
+ projectConfig?: ToDesktopJson;
59
+ releaseId?: Release['id'];
60
+ shouldCodeSign?: boolean;
61
+ shouldRelease?: boolean;
62
+ shouldSendCompletionEmail?: boolean;
63
+ sourceArchiveDetails?: {
64
+ bucket: string;
65
+ hash?: string;
66
+ key: string;
67
+ url: string;
68
+ };
69
+ windows?: IAppBuildProgress;
70
+ };
71
+ downloadButtons?: {
72
+ linux: IDownloadButtonOptions;
73
+ mac: IDownloadButtonOptions;
74
+ universal: IDownloadButtonOptions;
75
+ windows: IDownloadButtonOptions;
76
+ };
77
+ firstSuccessfulBuildEndedAt?: string;
78
+ forceVersionNumber?: string;
79
+ isAppChanged?: boolean;
80
+ isFrameBlocked?: boolean;
81
+ isHttps?: boolean;
82
+ latestReleaseBuildId?: string;
83
+ previousInstallLockSha?: string;
84
+ publishedVersions: {
85
+ desktopify?: string;
86
+ electron?: string;
87
+ version?: string;
88
+ };
89
+ releaseRedirections?: ReleaseRedirectionRule[];
90
+ staticAnalysis?: Record<CompositeIdFileLocationKey, StaticAnalysisItem>;
91
+ webhookHMACKey?: string;
92
+ webhooks?: {
93
+ release?: string;
94
+ };
95
+ windowsEVOnboarding?: {
96
+ [WindowsEVOnboardingSteps.hasBeenVerified]: boolean;
97
+ [WindowsEVOnboardingSteps.hasChosenProvider]: boolean;
98
+ [WindowsEVOnboardingSteps.hasGeneratedCert]: boolean;
99
+ [WindowsEVOnboardingSteps.hasOrderedCert]: boolean;
100
+ [WindowsEVOnboardingSteps.hasUploadedCert]: boolean;
101
+ provider: WindowsEVOnboardingProvider;
102
+ tempHSMCertName: string;
103
+ };
104
+ }
105
+ export interface ToDesktopJson {
106
+ appBuilderLibVersion?: string;
107
+ appFiles?: string[];
108
+ appId?: string;
109
+ appPath?: FilePath;
110
+ appProtocolScheme?: string | string[];
111
+ asar?: boolean;
112
+ asarUnpack?: boolean | string[];
113
+ bucket?: string;
114
+ buildVersion?: string;
115
+ bytenode?: {
116
+ enabled?: boolean;
117
+ files?: string[];
118
+ };
119
+ copyright?: string;
120
+ dmg?: {
121
+ artifactName?: string;
122
+ background?: FilePath;
123
+ backgroundColor?: string;
124
+ contents?: NonNullable<IAppBuilderLib['config']['dmg']>['contents'];
125
+ iconSize?: number;
126
+ iconTextSize?: number;
127
+ title?: string;
128
+ window?: NonNullable<IAppBuilderLib['config']['dmg']>['window'];
129
+ };
130
+ electronMirror?: string;
131
+ electronVersion?: string;
132
+ extraContentFiles?: ExtraFileReference[];
133
+ extraResources?: ExtraFileReference[];
134
+ fileAssociations?: IAppBuilderLib['config']['fileAssociations'];
135
+ filesForDistribution?: string[];
136
+ icon: FilePath;
137
+ id: string;
138
+ includeSubNodeModules?: boolean;
139
+ linux?: {
140
+ category?: string;
141
+ icon?: FilePath;
142
+ imageVersion?: string;
143
+ noSandbox?: boolean;
144
+ };
145
+ mac?: {
146
+ additionalBinariesToSign?: FilePath[];
147
+ category?: string;
148
+ dmgBackground?: FilePath;
149
+ entitlements?: FilePath;
150
+ entitlementsInherit?: FilePath;
151
+ extendInfo?: NonNullable<IAppBuilderLib['config']['mac']>['extendInfo'];
152
+ icon?: FilePath;
153
+ provisioningProfile?: FilePath;
154
+ requirements?: FilePath;
155
+ };
156
+ mas?: {
157
+ entitlements?: FilePath;
158
+ entitlementsInherit?: FilePath;
159
+ minimumSystemVersion?: string;
160
+ provisioningProfile?: FilePath;
161
+ type?: 'development' | 'distribution';
162
+ x64ArchFiles?: string;
163
+ };
164
+ nodeVersion?: string;
165
+ npmVersion?: string;
166
+ packageManager?: 'npm' | 'pnpm' | 'yarn';
167
+ pnpmVersion?: string;
168
+ productName?: string;
169
+ rebuildLibrary?: '@electron/rebuild' | 'app-builder';
170
+ schemaVersion: number;
171
+ snap?: IAppBuilderLib['config']['snap'];
172
+ updateUrlBase?: string;
173
+ uploadSizeLimit?: number;
174
+ useCachedDependencies?: boolean;
175
+ windows?: {
176
+ icon?: FilePath;
177
+ nsisCustomBinary?: {
178
+ checksum?: string;
179
+ debugLogging?: boolean;
180
+ url: string;
181
+ version?: string;
182
+ };
183
+ nsisInclude?: FilePath;
184
+ publisherName?: string[];
185
+ };
186
+ yarnVersion?: string;
187
+ }
188
+ export declare enum WindowsHSMCertType {
189
+ azureTrustedSigning = "azureTrustedSigning",
190
+ ev = "ev",
191
+ file = "file"
192
+ }
193
+ export interface CustomWindowsCodeSignFile {
194
+ certType: string;
195
+ hsmCertName: string;
196
+ hsmCertType: WindowsHSMCertType.file;
197
+ }
198
+ export interface CustomWindowsCodeSignEV {
199
+ certType: 'hsm';
200
+ hsmCertName: string;
201
+ hsmCertType: WindowsHSMCertType.ev;
202
+ }
203
+ export interface CustomWindowsCodeSignAzureTrustedSigning {
204
+ azureBaseSettings: {
205
+ $azureClientSecretRef: string;
206
+ clientId: string;
207
+ codeSigningAccountName: string;
208
+ resourceGroupName: string;
209
+ subscriptionId: string;
210
+ tenantId: string;
211
+ };
212
+ azureCredentialsStored: boolean;
213
+ azureSettings?: {
214
+ accountUri: string;
215
+ certificateProfileId: string;
216
+ certificateProfileName: string;
217
+ publisherName: string;
218
+ };
219
+ certType: 'azureTrustedSigning';
220
+ }
221
+ export type CustomMacCodeSign = {
222
+ certName: string;
223
+ certPassword: string;
224
+ certUrl: string;
225
+ type: 'url';
226
+ } | {
227
+ type: 'hsm';
228
+ };
229
+ export type CustomLinuxPGPKey = {
230
+ $key: string;
231
+ $password?: string;
232
+ };
233
+ export type CustomMacNotarization = CustomNotarizationApiKeyAuth | CustomNotarizationPasswordHsmAuth;
234
+ export interface CustomNotarizationApiKeyAuth {
235
+ $appleApiKey: string;
236
+ appleApiIssuer: string;
237
+ appleApiKeyId: string;
238
+ type: 'hsm-api';
239
+ }
240
+ export interface CustomNotarizationPasswordHsmAuth {
241
+ $appSpecificPassword: string;
242
+ appleId: string;
243
+ teamId: string;
244
+ type: 'hsm';
245
+ }
246
+ export type ReleaseRedirectionRule = {
247
+ appId: string;
248
+ ipList: string[];
249
+ rule: 'appByIp';
250
+ } | {
251
+ appId: string;
252
+ rule: 'app';
253
+ } | {
254
+ buildId: string;
255
+ ipList: string[];
256
+ rule: 'buildByIp';
257
+ } | {
258
+ buildId: string;
259
+ platforms: PlatformName[];
260
+ rule: 'buildByPlatform';
261
+ } | {
262
+ feedUrl: string;
263
+ ipList: string[];
264
+ rule: 'appByIp';
265
+ } | {
266
+ feedUrl: string;
267
+ rule: 'app';
268
+ };
269
+ export interface BaseApp extends Schemable {
270
+ appModelId?: string;
271
+ appxConfig?: Partial<IAppBuilderLib['config']['appx']>;
272
+ customDomain?: string;
273
+ customLinuxPgpKey?: CustomLinuxPGPKey;
274
+ customMacCodeSign?: CustomMacCodeSign;
275
+ customNotarization?: CustomMacNotarization;
276
+ customWindowsCodeSign?: CustomWindowsCodeSignAzureTrustedSigning | CustomWindowsCodeSignEV | CustomWindowsCodeSignFile;
277
+ domainVerificationCode?: string;
278
+ id: string;
279
+ macHsmCertNames?: Record<MacTarget, string>;
280
+ macUniversalInstallerConfig?: {
281
+ shouldPinToVersion?: boolean;
282
+ };
283
+ masConfig?: {
284
+ arch?: 'arm64' | 'universal';
285
+ } & Partial<IAppBuilderLib['config']['mas']>;
286
+ meta?: IAppMeta;
287
+ nsisConfig?: Partial<IAppBuilderLib['config']['nsis']>;
288
+ parent?: {
289
+ id: string;
290
+ relationshipToParent: string;
291
+ } | null;
292
+ parentApp?: BaseApp;
293
+ shouldCreate32BitWindowsArtifacts?: boolean;
294
+ shouldCreateAppImages?: boolean;
295
+ shouldCreateAppleIntelArtifacts?: boolean;
296
+ shouldCreateAppleSiliconAssets?: boolean;
297
+ shouldCreateAppXFiles?: boolean;
298
+ shouldCreateArm64LinuxArtifacts?: boolean;
299
+ shouldCreateArm64WindowsArtifacts?: boolean;
300
+ shouldCreateDebianPackages?: boolean;
301
+ shouldCreateDMGs?: boolean;
302
+ shouldCreateMacAppStoreFiles?: boolean;
303
+ shouldCreateMacPKG?: boolean;
304
+ shouldCreateMacUniversalInstaller?: boolean;
305
+ shouldCreateMacZipInstallers?: boolean;
306
+ shouldCreateMSIInstallers?: boolean;
307
+ shouldCreateNSISInstallers?: boolean;
308
+ shouldCreateNSISWebInstaller?: boolean;
309
+ shouldCreateRPMPackages?: boolean;
310
+ shouldCreateSnapFiles?: boolean;
311
+ snapStore?: {
312
+ description?: string;
313
+ login?: string;
314
+ };
315
+ subscription?: Subscription;
316
+ windowsHsmCertNames?: Record<WindowsTarget, string>;
317
+ }
318
+ export type Subscription = {
319
+ itemId: string;
320
+ planId: string;
321
+ priceId?: string;
322
+ productId?: string;
323
+ status: string;
324
+ subscriptionId: string;
325
+ };
326
+ export {};
@@ -0,0 +1,19 @@
1
+ export var WindowsEVOnboardingSteps;
2
+ (function (WindowsEVOnboardingSteps) {
3
+ WindowsEVOnboardingSteps["hasBeenVerified"] = "hasBeenVerified";
4
+ WindowsEVOnboardingSteps["hasChosenProvider"] = "hasChosenProvider";
5
+ WindowsEVOnboardingSteps["hasGeneratedCert"] = "hasGeneratedCert";
6
+ WindowsEVOnboardingSteps["hasOrderedCert"] = "hasOrderedCert";
7
+ WindowsEVOnboardingSteps["hasUploadedCert"] = "hasUploadedCert";
8
+ })(WindowsEVOnboardingSteps || (WindowsEVOnboardingSteps = {}));
9
+ export var WindowsEVOnboardingProvider;
10
+ (function (WindowsEVOnboardingProvider) {
11
+ WindowsEVOnboardingProvider["globalsign"] = "globalsign";
12
+ WindowsEVOnboardingProvider["other"] = "other";
13
+ })(WindowsEVOnboardingProvider || (WindowsEVOnboardingProvider = {}));
14
+ export var WindowsHSMCertType;
15
+ (function (WindowsHSMCertType) {
16
+ WindowsHSMCertType["azureTrustedSigning"] = "azureTrustedSigning";
17
+ WindowsHSMCertType["ev"] = "ev";
18
+ WindowsHSMCertType["file"] = "file";
19
+ })(WindowsHSMCertType || (WindowsHSMCertType = {}));
@@ -0,0 +1,339 @@
1
+ import { Configuration, PackagerOptions, PublishOptions } from 'app-builder-lib';
2
+ import { IApp2 } from './desktopify2';
3
+ import { IApp } from './toDesktop';
4
+ type appBuilderLib = PackagerOptions & PublishOptions;
5
+ export interface IAppBuilderLib extends appBuilderLib {
6
+ config: Configuration;
7
+ }
8
+ export interface ExtraFileReference {
9
+ from: FilePath;
10
+ to?: FilePath;
11
+ }
12
+ export type ISODate = string;
13
+ export declare enum PlatformName {
14
+ linux = "linux",
15
+ mac = "mac",
16
+ windows = "windows"
17
+ }
18
+ export type FilePath = string;
19
+ export type SemanticVersion = string;
20
+ export type URL = string;
21
+ export declare enum PackageManager {
22
+ npm = "npm",
23
+ pnpm = "pnpm",
24
+ yarn = "yarn"
25
+ }
26
+ export declare enum BuildStatus {
27
+ building = "building",
28
+ cancelled = "cancelled",
29
+ failed = "failed",
30
+ preparation = "preparation",
31
+ queued = "queued",
32
+ succeeded = "succeeded"
33
+ }
34
+ export declare enum AnalysisStatus {
35
+ analyzing = "analyzing",
36
+ done = "done",
37
+ downloading = "downloading",
38
+ error = "error",
39
+ extracting = "extracting",
40
+ initializing = "initializing",
41
+ notStarted = "notStarted"
42
+ }
43
+ export type Arch = 'arm64' | 'ia32' | 'universal' | 'x64';
44
+ export type MacArch = 'arm64' | 'universal' | 'x64';
45
+ export type LinuxArch = 'arm64' | 'x64';
46
+ export type WindowsArch = 'arm64' | 'ia32' | 'universal' | 'x64';
47
+ export type LinuxArtifactName = 'appImage' | 'deb' | 'rpm' | 'snap';
48
+ export type MacArtifactName = 'dmg' | 'installer' | 'mas' | 'pkg' | 'zip';
49
+ export type WindowsArtifactName = 'appx' | 'msi' | 'nsis-web-7z' | 'nsis-web' | 'nsis';
50
+ type ArtifactObject = {
51
+ size: number;
52
+ standardUrl: URL;
53
+ url: URL;
54
+ };
55
+ type ArtifactDownload = null | Record<Arch, ArtifactObject | null>;
56
+ type InstallerArtifact = {
57
+ [K in Arch]: ({
58
+ isPinnedToVersion?: boolean;
59
+ } & ArtifactObject) | null;
60
+ };
61
+ export type LinuxArtifactDownloads = Record<LinuxArtifactName, ArtifactDownload>;
62
+ export type MacArtifactDownloads = {
63
+ [K in MacArtifactName]: K extends 'installer' ? InstallerArtifact : ArtifactDownload;
64
+ };
65
+ export type WindowsArtifactDownloads = Record<WindowsArtifactName, ArtifactDownload>;
66
+ export type CodeSignSkipReason = 'no-cert' | 'user-disabled';
67
+ export interface PlatformBuild {
68
+ appBuilderLibConfig?: IAppBuilderLib;
69
+ artifactDownloads?: LinuxArtifactDownloads | MacArtifactDownloads | WindowsArtifactDownloads;
70
+ codeSignSkipReason?: CodeSignSkipReason;
71
+ desktopifyVersion?: SemanticVersion;
72
+ didCodeSign: boolean;
73
+ didUseCachedDependencies?: boolean;
74
+ downloadUrl?: URL;
75
+ electronVersionUsed?: SemanticVersion;
76
+ endedAt: ISODate;
77
+ errorMessage?: string;
78
+ isBeingCancelled?: boolean;
79
+ logs?: {
80
+ content: string;
81
+ label: string;
82
+ }[];
83
+ numberOfAttemptedBuilds: number;
84
+ platform: PlatformName;
85
+ progressActivityName: string;
86
+ progressActivityType: string;
87
+ progressPercentage: number;
88
+ screenshotUrl?: URL;
89
+ shouldSkip: boolean;
90
+ standardDownloadUrl?: URL;
91
+ startedAt: ISODate;
92
+ status: BuildStatus;
93
+ }
94
+ export type CIRunner = 'azure' | 'circle';
95
+ export interface Build {
96
+ appCustomDomain?: string;
97
+ appName: string;
98
+ appNotarizaionBundleId: string;
99
+ appVersion?: SemanticVersion;
100
+ buildServerExecutionId?: number;
101
+ bundlePhobiaData?: Record<string, BundlePhobiaItem>;
102
+ ciRunner?: CIRunner;
103
+ cliConfigSchemaVersion: number;
104
+ commitId?: string;
105
+ commitMessage?: string;
106
+ continuousIntegrationServiceName?: string;
107
+ createdAt: ISODate;
108
+ dependencyAnalysis?: {
109
+ result?: string;
110
+ status: AnalysisStatus;
111
+ };
112
+ desktopifyVersion?: SemanticVersion;
113
+ electronVersionSpecified?: SemanticVersion;
114
+ electronVersionUsed?: SemanticVersion;
115
+ endedAt?: ISODate;
116
+ environmentVariables?: IApp['environmentVariables'];
117
+ errorMessage?: string;
118
+ hash?: string;
119
+ icon?: string;
120
+ id: string;
121
+ isArtifactsPruned?: boolean;
122
+ isBeingCancelled?: boolean;
123
+ linux?: PlatformBuild;
124
+ mac?: PlatformBuild;
125
+ onBuildFinishedWebhook?: string;
126
+ partiallyReleasedAt?: ISODate;
127
+ projectConfig?: string;
128
+ releasedAt?: ISODate;
129
+ shouldCodeSign: boolean;
130
+ shouldRelease: boolean;
131
+ shouldRetainForever?: boolean;
132
+ smokeTest?: {
133
+ buildServerExecutionId?: string;
134
+ isCanceled?: boolean;
135
+ linux?: SmokeTestProgress;
136
+ mac?: SmokeTestProgress;
137
+ windows?: SmokeTestProgress;
138
+ };
139
+ sourcePackageManager?: PackageManager;
140
+ standardUniversalDownloadUrl?: URL;
141
+ startedAt: ISODate;
142
+ staticAnalysis?: {
143
+ error?: string;
144
+ result?: string;
145
+ status: AnalysisStatus;
146
+ };
147
+ status: BuildStatus;
148
+ todesktopRuntimeVersionSpecified?: SemanticVersion;
149
+ todesktopRuntimeVersionUsed?: SemanticVersion;
150
+ universalDownloadUrl?: URL;
151
+ url?: URL;
152
+ useCachedDependencies?: boolean;
153
+ versionControlInfo?: {
154
+ branchName: string;
155
+ commitDate: string;
156
+ commitId: string;
157
+ commitMessage: string;
158
+ hasUncommittedChanges: boolean;
159
+ repositoryRemoteUrl: string;
160
+ versionControlSystemName: string;
161
+ };
162
+ windows?: PlatformBuild;
163
+ }
164
+ export type BundlePhobiaItem = {
165
+ error: null | string;
166
+ result: {
167
+ description: string;
168
+ gzip: string;
169
+ name: string;
170
+ size: number;
171
+ } | null;
172
+ };
173
+ export type ComputedBuildProperties = Pick<Build, 'desktopifyVersion' | 'electronVersionUsed' | 'endedAt' | 'errorMessage' | 'releasedAt' | 'standardUniversalDownloadUrl' | 'startedAt' | 'status' | 'universalDownloadUrl'>;
174
+ export declare enum ManifestCategory {
175
+ buildStamped = "build-stamped",
176
+ primary = "primary",
177
+ versioned = "versioned"
178
+ }
179
+ export interface CustomManifestArtifactDetails {
180
+ path: FilePath;
181
+ url: URL;
182
+ }
183
+ export interface CustomManifest {
184
+ artifacts: {
185
+ [propertyName: string]: null | Record<string, CustomManifestArtifactDetails | null>;
186
+ };
187
+ createdAt: ISODate;
188
+ version: SemanticVersion;
189
+ }
190
+ export interface LinuxCustomManifest extends CustomManifest {
191
+ artifacts: Record<LinuxArtifactName, null | Record<LinuxArch, CustomManifestArtifactDetails | null>>;
192
+ }
193
+ export interface MacCustomManifest extends CustomManifest {
194
+ artifacts: Record<MacArtifactName, null | Record<MacArch, CustomManifestArtifactDetails | null>>;
195
+ }
196
+ export interface WindowsCustomManifest extends CustomManifest {
197
+ artifacts: Record<WindowsArtifactName, null | Record<WindowsArch, CustomManifestArtifactDetails | null>>;
198
+ }
199
+ export interface SmokeTestProgress {
200
+ abSkipReason?: string;
201
+ abState?: SmokeTestState;
202
+ appLaunched?: boolean;
203
+ appUpdated?: boolean;
204
+ bcState?: SmokeTestState;
205
+ buildAId?: string;
206
+ code?: string;
207
+ message?: string;
208
+ performance?: {
209
+ ab?: SmokeTestPerformance;
210
+ bc: SmokeTestPerformance;
211
+ };
212
+ progress: number;
213
+ screenshot?: string;
214
+ state: SmokeTestState;
215
+ updatedAppHasNoMainErrors?: boolean;
216
+ vm: {
217
+ agentVersion: string;
218
+ cpu?: string;
219
+ image: string;
220
+ imageVersion: string;
221
+ };
222
+ }
223
+ export interface SmokeTestPerformance {
224
+ /**
225
+ * Time between `process.getCreationTime()` and `App#redy event`
226
+ */
227
+ appReadyMs: number;
228
+ /**
229
+ * Time between `process.getCreationTime()` and app is closed for update
230
+ */
231
+ appReadyToRestartForUpdateMs: number;
232
+ /**
233
+ * Time between `process.getCreationTime()` and connect event received from
234
+ * the restarted app. It can be up to 4 minutes on Windows.
235
+ */
236
+ appRestartedAfterUpdateMs: number;
237
+ /**
238
+ * From `process.cpuUsage()` user + system.
239
+ * This value measures time spent in user and system code, and may end up
240
+ * being greater than actual elapsed time if multiple CPU cores are
241
+ * performing work for this process.
242
+ * Under the hood, low-level calls like `getrusage` are used, so this value
243
+ * is calculated from the process start.
244
+ * It measures for the first 10-12 seconds of the app execution.
245
+ */
246
+ cpuUsageMainProcessMs: number;
247
+ /**
248
+ * Maximum memory consumption by the main + renders + any other helper
249
+ * processes
250
+ */
251
+ memoryUsageAllProcessesMb: number;
252
+ /**
253
+ * Maximum memory consumption by the main process
254
+ */
255
+ memoryUsageMainProcessMb: number;
256
+ /**
257
+ * Maximum memory consumption by a renderer process (if started)
258
+ */
259
+ memoryUsageRendererProcessMb?: number;
260
+ /**
261
+ * Time between `process.getCreationTime()` and `initSmokeTest()` of
262
+ * runtime execution
263
+ */
264
+ runtimeLoadedMs: number;
265
+ /**
266
+ * Time between `process.getCreationTime()` and the update file downloaded
267
+ * from the server.
268
+ */
269
+ updateDownloadedMs: number;
270
+ /**
271
+ * Time between `process.getCreationTime()` and the first firing of
272
+ * WebContents#dom-ready if any window is created
273
+ */
274
+ webContentsDomReadyMs?: number;
275
+ /**
276
+ * Time between `process.getCreationTime()` and the first firing of
277
+ * WebContents#did-finish-load if any window is created
278
+ */
279
+ webContentsFinishLoadMs?: number;
280
+ }
281
+ export type SmokeTestState = 'done' | 'error' | 'progress' | 'skipped';
282
+ export declare const hasBuildKickedOff: (build: Build) => boolean;
283
+ export declare const isPlatformBuildRunning: (platformBuild: PlatformBuild) => boolean;
284
+ export declare const isCiBuildRunning: (build: Build) => boolean;
285
+ export declare const isBuildRunning: (build: Build) => boolean;
286
+ export declare const isBuildCancellable: (build: Build) => boolean;
287
+ export interface DesktopifyApp {
288
+ alwaysOnTop: boolean;
289
+ appId: string;
290
+ appProtocol?: string;
291
+ appType?: string;
292
+ autoHideMenuBar?: boolean;
293
+ companyName?: string;
294
+ crashReporter?: string;
295
+ disableContextMenu: boolean;
296
+ disableDevTools: boolean;
297
+ enablePushNotifications?: boolean;
298
+ extraBrowserWindowOptions?: any;
299
+ fullScreen: boolean;
300
+ googleOAuthIsExternal?: boolean;
301
+ height: number;
302
+ insecure?: boolean;
303
+ internalUrls?: string;
304
+ isFindInPageEnabled?: boolean;
305
+ isNativeWindowOpenDisabled?: boolean;
306
+ isResizable: boolean;
307
+ isTitleStatic?: boolean;
308
+ maxHeight?: number;
309
+ maxWidth?: number;
310
+ menubarIcon?: string;
311
+ minHeight?: number;
312
+ minWidth?: number;
313
+ name: string;
314
+ pollForAppUpdatesEveryXMinutes?: number;
315
+ preventBackgroundThrottling?: boolean;
316
+ runtimeEnvs?: string;
317
+ shouldLaunchAtStartupByDefault?: boolean;
318
+ shouldMakeSameDomainAnExternalLink?: boolean;
319
+ shouldOnlySendAbsolutelyNecessaryRequests?: boolean;
320
+ shouldReuseRendererProcess?: boolean;
321
+ shouldUseRealUserAgent?: boolean;
322
+ singleInstance: boolean;
323
+ targetUrl: string;
324
+ themeSource?: 'dark' | 'light' | 'system';
325
+ themeSourceMac?: 'dark' | 'light' | 'system';
326
+ titleBarStyle?: 'customButtonsOnHover' | 'hidden' | 'hiddenInset';
327
+ toggleVisibilityKeyboardShortcut?: string;
328
+ trayIcon?: string;
329
+ userAgent?: string;
330
+ useSafeInternalUrlMatcher?: boolean;
331
+ width: number;
332
+ }
333
+ export interface Release {
334
+ appReleaseSnapshot?: IApp2;
335
+ id: string;
336
+ releasedAt?: string;
337
+ startedAt?: string;
338
+ }
339
+ export {};