@todesktop/shared 7.188.22 → 7.188.24

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/lib/base.d.ts CHANGED
@@ -139,6 +139,9 @@ export interface ToDesktopJson {
139
139
  icon?: FilePath;
140
140
  requirements?: FilePath;
141
141
  };
142
+ mas?: {
143
+ type?: 'development' | 'distribution';
144
+ };
142
145
  nodeVersion?: string;
143
146
  npmVersion?: string;
144
147
  packageManager?: 'npm' | 'yarn' | 'pnpm';
@@ -186,11 +186,59 @@ export interface SmokeTestProgress {
186
186
  bcState?: SmokeTestState;
187
187
  code?: string;
188
188
  message?: string;
189
+ performance?: SmokeTestPerformance;
189
190
  progress: number;
190
191
  screenshot?: string;
191
192
  state: SmokeTestState;
192
193
  updatedAppHasNoMainErrors?: boolean;
193
194
  }
195
+ export interface SmokeTestPerformance {
196
+ /**
197
+ * Time between process spawning and `process.getCreationTime()`
198
+ */
199
+ appStartedMs: number;
200
+ /**
201
+ * Time between process spawning and `App#redy event`
202
+ */
203
+ appReadyMs: number;
204
+ /**
205
+ * From `process.cpuUsage()` user + system.
206
+ * This value measures time spent in user and system code, and may end up
207
+ * being greater than actual elapsed time if multiple CPU cores are
208
+ * performing work for this process.
209
+ * Under the hood, low-level calls like `getrusage` are used, so this value
210
+ * is calculated from the process start.
211
+ * It measures for the first 10-12 seconds of the app execution.
212
+ */
213
+ cupUsageMainProcessMs: number;
214
+ /**
215
+ * Maximum memory consumption by the main + renders + any other helper
216
+ * processes
217
+ */
218
+ memoryUsageAllProcessesMb: number;
219
+ /**
220
+ * Maximum memory consumption by the main process
221
+ */
222
+ memoryUsageMainProcessMb: number;
223
+ /**
224
+ * Maximum memory consumption by a renderer process (if started)
225
+ */
226
+ memoryUsageRendererProcessMb?: number;
227
+ /**
228
+ * Time between process spawning and `initSmokeTest()` of runtime execution
229
+ */
230
+ runtimeLoadedMs: number;
231
+ /**
232
+ * Time between process spawning and the first firing of WebContents#dom-ready
233
+ * if any window is created
234
+ */
235
+ webContentsDomReadyMs?: number;
236
+ /**
237
+ * Time between process spawning and the first firing of
238
+ * WebContents#did-finish-load if any window is created
239
+ */
240
+ webContentsFinishLoadMs?: number;
241
+ }
194
242
  export declare type SmokeTestState = 'progress' | 'done' | 'error' | 'skipped';
195
243
  export declare const hasBuildKickedOff: (build: Build) => boolean;
196
244
  export declare const isPlatformBuildRunning: (platformBuild: PlatformBuild) => boolean;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@todesktop/shared",
3
- "version": "7.188.22",
3
+ "version": "7.188.24",
4
4
  "description": "",
5
5
  "main": "./lib/index.js",
6
6
  "types": "./lib/index.d.ts",
package/src/base.ts CHANGED
@@ -151,6 +151,9 @@ export interface ToDesktopJson {
151
151
  icon?: FilePath;
152
152
  requirements?: FilePath;
153
153
  };
154
+ mas?: {
155
+ type?: 'development' | 'distribution'; // defaults to development
156
+ };
154
157
  nodeVersion?: string;
155
158
  npmVersion?: string;
156
159
  packageManager?: 'npm' | 'yarn' | 'pnpm';
package/src/desktopify.ts CHANGED
@@ -263,12 +263,61 @@ export interface SmokeTestProgress {
263
263
  bcState?: SmokeTestState;
264
264
  code?: string; // string currently, since it's still a subject to change
265
265
  message?: string;
266
+ performance?: SmokeTestPerformance;
266
267
  progress: number;
267
268
  screenshot?: string;
268
269
  state: SmokeTestState;
269
270
  updatedAppHasNoMainErrors?: boolean;
270
271
  }
271
272
 
273
+ export interface SmokeTestPerformance {
274
+ /**
275
+ * Time between process spawning and `process.getCreationTime()`
276
+ */
277
+ appStartedMs: number;
278
+ /**
279
+ * Time between process spawning and `App#redy event`
280
+ */
281
+ appReadyMs: number;
282
+ /**
283
+ * From `process.cpuUsage()` user + system.
284
+ * This value measures time spent in user and system code, and may end up
285
+ * being greater than actual elapsed time if multiple CPU cores are
286
+ * performing work for this process.
287
+ * Under the hood, low-level calls like `getrusage` are used, so this value
288
+ * is calculated from the process start.
289
+ * It measures for the first 10-12 seconds of the app execution.
290
+ */
291
+ cupUsageMainProcessMs: number;
292
+ /**
293
+ * Maximum memory consumption by the main + renders + any other helper
294
+ * processes
295
+ */
296
+ memoryUsageAllProcessesMb: number;
297
+ /**
298
+ * Maximum memory consumption by the main process
299
+ */
300
+ memoryUsageMainProcessMb: number;
301
+ /**
302
+ * Maximum memory consumption by a renderer process (if started)
303
+ */
304
+ memoryUsageRendererProcessMb?: number;
305
+ /**
306
+ * Time between process spawning and `initSmokeTest()` of runtime execution
307
+ */
308
+ runtimeLoadedMs: number;
309
+ /**
310
+ * Time between process spawning and the first firing of WebContents#dom-ready
311
+ * if any window is created
312
+ */
313
+ webContentsDomReadyMs?: number;
314
+ /**
315
+ * Time between process spawning and the first firing of
316
+ * WebContents#did-finish-load if any window is created
317
+ */
318
+ webContentsFinishLoadMs?: number;
319
+ }
320
+
272
321
  export type SmokeTestState = 'progress' | 'done' | 'error' | 'skipped';
273
322
 
274
323
  export const hasBuildKickedOff = (build: Build): boolean => {