@todesktop/shared 7.188.60 → 7.188.62

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
@@ -257,7 +257,6 @@ export interface BaseApp extends Schemable {
257
257
  shouldCreateNSISWebInstaller?: boolean;
258
258
  shouldCreateRPMPackages?: boolean;
259
259
  shouldCreateSnapFiles?: boolean;
260
- shouldMacInstallerBePinnedToSpecificVersion?: boolean;
261
260
  appxConfig?: Partial<IAppBuilderLib['config']['appx']>;
262
261
  masConfig?: Partial<IAppBuilderLib['config']['mas']>;
263
262
  nsisConfig?: Partial<IAppBuilderLib['config']['nsis']>;
@@ -265,5 +264,8 @@ export interface BaseApp extends Schemable {
265
264
  login?: string;
266
265
  description?: string;
267
266
  };
267
+ macUniversalInstallerConfig?: {
268
+ shouldPinToVersion?: boolean;
269
+ };
268
270
  }
269
271
  export {};
@@ -47,13 +47,21 @@ export declare type WindowsArch = 'ia32' | 'x64' | 'arm64' | 'universal';
47
47
  export declare type LinuxArtifactName = 'appImage' | 'deb' | 'rpm' | 'snap';
48
48
  export declare type MacArtifactName = 'dmg' | 'zip' | 'installer' | 'mas' | 'pkg';
49
49
  export declare type WindowsArtifactName = 'msi' | 'nsis' | 'nsis-web' | 'nsis-web-7z' | 'appx';
50
- declare type ArtifactDownload = Record<Arch, {
50
+ declare type ArtifactObject = {
51
51
  size: number;
52
52
  standardUrl: URL;
53
53
  url: URL;
54
- } | null> | null;
54
+ };
55
+ declare type ArtifactDownload = Record<Arch, ArtifactObject | null> | null;
56
+ declare type InstallerArtifact = {
57
+ [K in Arch]: (ArtifactObject & {
58
+ isPinnedToVersion?: boolean;
59
+ }) | null;
60
+ };
55
61
  export declare type LinuxArtifactDownloads = Record<LinuxArtifactName, ArtifactDownload>;
56
- export declare type MacArtifactDownloads = Record<MacArtifactName, ArtifactDownload>;
62
+ export declare type MacArtifactDownloads = {
63
+ [K in MacArtifactName]: K extends 'installer' ? InstallerArtifact : ArtifactDownload;
64
+ };
57
65
  export declare type WindowsArtifactDownloads = Record<WindowsArtifactName, ArtifactDownload>;
58
66
  export declare type CodeSignSkipReason = 'no-cert' | 'user-disabled';
59
67
  export interface PlatformBuild {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@todesktop/shared",
3
- "version": "7.188.60",
3
+ "version": "7.188.62",
4
4
  "description": "",
5
5
  "main": "./lib/index.js",
6
6
  "types": "./lib/index.d.ts",
package/src/base.ts CHANGED
@@ -290,11 +290,12 @@ export interface BaseApp extends Schemable {
290
290
  shouldCreateNSISWebInstaller?: boolean;
291
291
  shouldCreateRPMPackages?: boolean;
292
292
  shouldCreateSnapFiles?: boolean;
293
- shouldMacInstallerBePinnedToSpecificVersion?: boolean;
294
-
295
293
  // artifact configs
296
294
  appxConfig?: Partial<IAppBuilderLib['config']['appx']>;
297
295
  masConfig?: Partial<IAppBuilderLib['config']['mas']>;
298
296
  nsisConfig?: Partial<IAppBuilderLib['config']['nsis']>;
299
297
  snapStore?: { login?: string; description?: string };
298
+ macUniversalInstallerConfig?: {
299
+ shouldPinToVersion?: boolean;
300
+ };
300
301
  }
package/src/desktopify.ts CHANGED
@@ -70,15 +70,24 @@ export type WindowsArtifactName =
70
70
  | 'nsis-web-7z'
71
71
  | 'appx';
72
72
 
73
- type ArtifactDownload = Record<
74
- Arch,
75
- { size: number; standardUrl: URL; url: URL } | null
76
- > | null;
73
+ type ArtifactObject = { size: number; standardUrl: URL; url: URL };
74
+ type ArtifactDownload = Record<Arch, ArtifactObject | null> | null;
75
+
76
+ // The `installer` artifact is special because it has an additional property
77
+ // `isPinnedToVersion` for apps that have `appData.macUniversalInstallerConfig?.shouldPinToVersion` set to true
78
+ type InstallerArtifact = {
79
+ [K in Arch]: (ArtifactObject & { isPinnedToVersion?: boolean }) | null;
80
+ };
81
+
77
82
  export type LinuxArtifactDownloads = Record<
78
83
  LinuxArtifactName,
79
84
  ArtifactDownload
80
85
  >;
81
- export type MacArtifactDownloads = Record<MacArtifactName, ArtifactDownload>;
86
+ export type MacArtifactDownloads = {
87
+ [K in MacArtifactName]: K extends 'installer'
88
+ ? InstallerArtifact
89
+ : ArtifactDownload;
90
+ };
82
91
  export type WindowsArtifactDownloads = Record<
83
92
  WindowsArtifactName,
84
93
  ArtifactDownload