@todesktop/shared 7.190.0 → 7.191.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.
Files changed (46) hide show
  1. package/.prettierignore +0 -2
  2. package/CHANGELOG.md +13 -0
  3. package/README.md +42 -15
  4. package/eslint.config.mjs +8 -55
  5. package/lib/base.d.ts +81 -75
  6. package/lib/base.js +9 -12
  7. package/lib/desktopify.d.ts +74 -74
  8. package/lib/desktopify.js +28 -35
  9. package/lib/desktopify2.d.ts +223 -223
  10. package/lib/desktopify2.js +2 -5
  11. package/lib/getSiteInfo.d.ts +6 -6
  12. package/lib/getSiteInfo.js +1 -2
  13. package/lib/hsm.d.ts +1 -1
  14. package/lib/hsm.js +5 -12
  15. package/lib/index.d.ts +12 -13
  16. package/lib/index.js +13 -31
  17. package/lib/invitePermissionLabels.d.ts +4 -2
  18. package/lib/invitePermissionLabels.js +14 -11
  19. package/lib/personalAccessTokens.d.ts +12 -12
  20. package/lib/personalAccessTokens.js +1 -2
  21. package/lib/plans.d.ts +27 -27
  22. package/lib/plans.js +181 -185
  23. package/lib/plugin.d.ts +18 -18
  24. package/lib/plugin.js +1 -2
  25. package/lib/toDesktop.d.ts +66 -66
  26. package/lib/toDesktop.js +1 -2
  27. package/lib/translation.d.ts +1 -1
  28. package/lib/translation.js +1 -2
  29. package/lib/validations.d.ts +66 -66
  30. package/lib/validations.js +54 -56
  31. package/package.json +11 -17
  32. package/src/base.ts +89 -82
  33. package/src/desktopify.ts +82 -80
  34. package/src/desktopify2.ts +240 -240
  35. package/src/getSiteInfo.ts +6 -6
  36. package/src/hsm.ts +7 -7
  37. package/src/index.ts +13 -14
  38. package/src/invitePermissionLabels.ts +20 -6
  39. package/src/personalAccessTokens.ts +12 -12
  40. package/src/plans.ts +191 -191
  41. package/src/plugin.ts +19 -19
  42. package/src/toDesktop.ts +70 -70
  43. package/src/translation.ts +2 -2
  44. package/src/validations.ts +51 -49
  45. package/tsconfig.json +6 -3
  46. package/.prettierrc +0 -5
package/.prettierignore CHANGED
@@ -1,3 +1 @@
1
- .vscode
2
1
  lib
3
- node_modules
package/CHANGELOG.md ADDED
@@ -0,0 +1,13 @@
1
+ # @todesktop/shared
2
+
3
+ ## 7.191.0
4
+
5
+ ### Minor Changes
6
+
7
+ - a13a5ff: Add `canManageBilling` permission for delegated billing access
8
+
9
+ ## 7.190.0
10
+
11
+ ### Minor Changes
12
+
13
+ - 302a751: Add support for Apple Silicon only (non-intel) Mac App Store builds
package/README.md CHANGED
@@ -1,22 +1,39 @@
1
1
  ## Stripe Subscriptions
2
2
 
3
- Most of the code for coordinating Stripe subscriptions can be found in `plans.ts`. Conceptually, we organize subscriptions as follows:
3
+ Most of the code for coordinating Stripe subscriptions can be found in
4
+ `plans.ts`. Conceptually, we organize subscriptions as follows:
4
5
 
5
- - A `Price` captures the ID information of a Stripe Price and it's current status:
6
- - `inactive` means that the price should no longer be used (but may have been used previously).
6
+ - A `Price` captures the ID information of a Stripe Price and it's current
7
+ status:
8
+ - `inactive` means that the price should no longer be used (but may have been
9
+ used previously).
7
10
  - `active` means that the price should be used going forward.
8
- - A `Product` maps to what is shown in Stripe's [Product Catalogue](https://dashboard.stripe.com/products?active=true) UI. These help use organize the dev and prod versions of a `Product`, as well as their underlying `productId` and `priceIds`.
9
- - A `Plan` is a collection of `Product`s, organized by their tier (basic, legacy_pro, pro, scale).
10
-
11
- Each Plan also specifies the `eligiblePlanTiers` that it accepts for validation purposes. E.g. the basic plan specifies `['basic', 'legacy_pro', 'pro', 'scale']` in its `eligiblePlanTiers` field, meaning that Products belonging within any of those tiers would satisfy validation requirements. Similarly, the basic plan specifies `['scale']` in its tiers field, meaning that only **Products** belonging to the scale **Plans** would satisfy validation.
11
+ - A `Product` maps to what is shown in Stripe's
12
+ [Product Catalogue](https://dashboard.stripe.com/products?active=true) UI.
13
+ These help use organize the dev and prod versions of a `Product`, as well as
14
+ their underlying `productId` and `priceIds`.
15
+ - A `Plan` is a collection of `Product`s, organized by their tier (basic,
16
+ legacy_pro, pro, scale).
17
+
18
+ Each Plan also specifies the `eligiblePlanTiers` that it accepts for validation
19
+ purposes. E.g. the basic plan specifies
20
+ `['basic', 'legacy_pro', 'pro', 'scale']` in its `eligiblePlanTiers` field,
21
+ meaning that Products belonging within any of those tiers would satisfy
22
+ validation requirements. Similarly, the basic plan specifies `['scale']` in its
23
+ tiers field, meaning that only **Products** belonging to the scale **Plans**
24
+ would satisfy validation.
12
25
 
13
26
  ### Adding a new subscription price
14
27
 
15
- Before adding a new price, you'll first need to identify the Stripe [Stripe Product](https://dashboard.stripe.com/products?active=true) that the price should be added to.
28
+ Before adding a new price, you'll first need to identify the Stripe
29
+ [Stripe Product](https://dashboard.stripe.com/products?active=true) that the
30
+ price should be added to.
16
31
 
17
- Once you've added a new price to the product in Stripe's `live` and `test` mode, then you can come back and add it to the relevant product in `plans.ts`.
32
+ Once you've added a new price to the product in Stripe's `live` and `test` mode,
33
+ then you can come back and add it to the relevant product in `plans.ts`.
18
34
 
19
- For example, these are the dev and prod records for the legacy enterprise product:
35
+ For example, these are the dev and prod records for the legacy enterprise
36
+ product:
20
37
 
21
38
  ```ts
22
39
  const legacyEnterpriseDev = createProduct('prod_Hc9PMnHUmHvOlw', {
@@ -28,7 +45,8 @@ const legacyEnterpriseProd = createProduct('prod_GuGGWeMQ3SCuE9', {
28
45
  });
29
46
  ```
30
47
 
31
- If you added a new Stripe price to this product that is billed yearly for $10,000, then you would add update the products as follows:
48
+ If you added a new Stripe price to this product that is billed yearly for
49
+ $10,000, then you would add update the products as follows:
32
50
 
33
51
  ```ts
34
52
  const legacyEnterpriseDev = createProduct('prod_Hc9PMnHUmHvOlw', {
@@ -44,7 +62,11 @@ const legacyEnterpriseProd = createProduct('prod_GuGGWeMQ3SCuE9', {
44
62
 
45
63
  ### Rebuilding the Stripe Customer Portals
46
64
 
47
- ToDesktop's subscription flow needs to support both **CLI** and **ToDesktop Builder** customers. To achieve this, we dynamically create/load billing portals based on whether the customer is a **CLI** or **ToDesktop Builder** user, whether the customer needs to **Upgrade** or **Update** their plan, and whether the environment is in prod or dev.
65
+ ToDesktop's subscription flow needs to support both **CLI** and **ToDesktop
66
+ Builder** customers. To achieve this, we dynamically create/load billing portals
67
+ based on whether the customer is a **CLI** or **ToDesktop Builder** user,
68
+ whether the customer needs to **Upgrade** or **Update** their plan, and whether
69
+ the environment is in prod or dev.
48
70
 
49
71
  This leaves us with 8 unique customer portal configurations:
50
72
 
@@ -57,9 +79,11 @@ This leaves us with 8 unique customer portal configurations:
57
79
  - _builderUpgradeConfigurationDev_
58
80
  - _builderUpgradeConfigurationProd_
59
81
 
60
- Each configuration specifies the products and prices (with an `active` status) that should be displayed when a user navigates to the customer billing portal.
82
+ Each configuration specifies the products and prices (with an `active` status)
83
+ that should be displayed when a user navigates to the customer billing portal.
61
84
 
62
- The web app and desktop app then only need to specify the `PortalConfigKey` when creating a checkout session from the client:
85
+ The web app and desktop app then only need to specify the `PortalConfigKey` when
86
+ creating a checkout session from the client:
63
87
 
64
88
  ```ts
65
89
  // begin a CLI upgrade customer portal session
@@ -72,4 +96,7 @@ await createCustomerPortalSession({
72
96
  });
73
97
  ```
74
98
 
75
- If you have updated the products that are used by any of the portal configurations, then you'll also need to increase the `PORTAL_VERSION` constant by 1. This will ensure that the portals are rebuilt to use the latest products and prices. This happens in `createCustomerPortalSession` in the web app.
99
+ If you have updated the products that are used by any of the portal
100
+ configurations, then you'll also need to increase the `PORTAL_VERSION` constant
101
+ by 1. This will ensure that the portals are rebuilt to use the latest products
102
+ and prices. This happens in `createCustomerPortalSession` in the web app.
package/eslint.config.mjs CHANGED
@@ -1,57 +1,10 @@
1
- import typescriptEslint from '@typescript-eslint/eslint-plugin';
2
- import prettier from 'eslint-plugin-prettier';
3
- import globals from 'globals';
4
- import tsParser from '@typescript-eslint/parser';
5
- import path from 'node:path';
6
- import { fileURLToPath } from 'node:url';
7
- import js from '@eslint/js';
8
- import { FlatCompat } from '@eslint/eslintrc';
1
+ import { configs, defineConfig } from '@todesktop/dev-config/eslint';
9
2
 
10
- const __filename = fileURLToPath(import.meta.url);
11
- const __dirname = path.dirname(__filename);
12
- const compat = new FlatCompat({
13
- baseDirectory: __dirname,
14
- recommendedConfig: js.configs.recommended,
15
- allConfig: js.configs.all,
16
- });
3
+ export default defineConfig(
4
+ configs.base,
5
+ configs.strict,
6
+ configs.ts,
7
+ configs.prettier,
17
8
 
18
- export default [
19
- ...compat.extends(
20
- 'eslint:recommended',
21
- 'plugin:@typescript-eslint/recommended',
22
- 'prettier'
23
- ),
24
- {
25
- plugins: {
26
- '@typescript-eslint': typescriptEslint,
27
- prettier,
28
- },
29
-
30
- languageOptions: {
31
- globals: {
32
- ...globals.node,
33
- },
34
-
35
- parser: tsParser,
36
- ecmaVersion: 2020,
37
- sourceType: 'module',
38
-
39
- parserOptions: {
40
- project: './tsconfig.json',
41
- },
42
- },
43
-
44
- rules: {
45
- 'prettier/prettier': 'error',
46
-
47
- '@typescript-eslint/no-misused-promises': [
48
- 'error',
49
- {
50
- checksVoidReturn: false,
51
- },
52
- ],
53
-
54
- '@typescript-eslint/no-explicit-any': 'warn',
55
- },
56
- },
57
- ];
9
+ { ignores: ['lib'] },
10
+ );
package/lib/base.d.ts CHANGED
@@ -7,31 +7,31 @@ type CompositeIdFileLocationKey = string;
7
7
  export type StaticAnalysisItem = {
8
8
  hidden: boolean;
9
9
  };
10
- export type ProgressTypes = 'queued' | 'progress' | 'done' | 'error';
10
+ export type ProgressTypes = 'done' | 'error' | 'progress' | 'queued';
11
11
  export interface IChecklistItem {
12
12
  [id: string]: boolean;
13
13
  }
14
14
  export interface IDownloadButtonOptions {
15
- buttonSize: 'small' | 'medium' | 'large';
16
- fontFamily: 'serif' | 'sans-serif';
17
15
  bgColor: string;
18
- fgColor: string;
19
16
  borderRadius: number;
17
+ btnText: string;
18
+ buttonSize: 'large' | 'medium' | 'small';
19
+ fgColor: string;
20
+ fontFamily: 'sans-serif' | 'serif';
20
21
  showAppIcon: {
22
+ alignment: 'left' | 'right';
21
23
  enabled: boolean;
22
- alignment: 'right' | 'left';
23
24
  };
24
25
  showDownloadIcon: {
26
+ alignment: 'left' | 'right';
25
27
  enabled: boolean;
26
- alignment: 'right' | 'left';
27
28
  };
28
- btnText: string;
29
29
  }
30
30
  export declare enum WindowsEVOnboardingSteps {
31
- 'hasChosenProvider' = "hasChosenProvider",
32
- 'hasOrderedCert' = "hasOrderedCert",
33
31
  'hasBeenVerified' = "hasBeenVerified",
32
+ 'hasChosenProvider' = "hasChosenProvider",
34
33
  'hasGeneratedCert' = "hasGeneratedCert",
34
+ 'hasOrderedCert' = "hasOrderedCert",
35
35
  'hasUploadedCert' = "hasUploadedCert"
36
36
  }
37
37
  export declare enum WindowsEVOnboardingProvider {
@@ -42,8 +42,8 @@ export interface IAppBuildProgress {
42
42
  isBuilding: boolean;
43
43
  message: string;
44
44
  percent: number;
45
- type: ProgressTypes;
46
45
  shouldSkip: boolean;
46
+ type: ProgressTypes;
47
47
  }
48
48
  export interface IAppMeta {
49
49
  appIterations?: number;
@@ -53,79 +53,83 @@ export interface IAppMeta {
53
53
  currentBuildProgress?: {
54
54
  channel?: string;
55
55
  id?: string;
56
- releaseId?: Release['id'];
57
56
  linux?: IAppBuildProgress;
58
57
  mac?: IAppBuildProgress;
59
58
  projectConfig?: ToDesktopJson;
59
+ releaseId?: Release['id'];
60
60
  shouldCodeSign?: boolean;
61
61
  shouldRelease?: boolean;
62
62
  shouldSendCompletionEmail?: boolean;
63
63
  sourceArchiveDetails?: {
64
64
  bucket: string;
65
+ hash?: string;
65
66
  key: string;
66
67
  url: string;
67
- hash?: string;
68
68
  };
69
69
  windows?: IAppBuildProgress;
70
70
  };
71
71
  downloadButtons?: {
72
- universal: IDownloadButtonOptions;
72
+ linux: IDownloadButtonOptions;
73
73
  mac: IDownloadButtonOptions;
74
+ universal: IDownloadButtonOptions;
74
75
  windows: IDownloadButtonOptions;
75
- linux: IDownloadButtonOptions;
76
76
  };
77
77
  firstSuccessfulBuildEndedAt?: string;
78
- staticAnalysis?: Record<CompositeIdFileLocationKey, StaticAnalysisItem>;
78
+ forceVersionNumber?: string;
79
79
  isAppChanged?: boolean;
80
80
  isFrameBlocked?: boolean;
81
81
  isHttps?: boolean;
82
82
  latestReleaseBuildId?: string;
83
+ previousInstallLockSha?: string;
83
84
  publishedVersions: {
84
85
  desktopify?: string;
85
86
  electron?: string;
86
87
  version?: string;
87
88
  };
88
- previousInstallLockSha?: string;
89
89
  releaseRedirections?: ReleaseRedirectionRule[];
90
+ staticAnalysis?: Record<CompositeIdFileLocationKey, StaticAnalysisItem>;
91
+ webhookHMACKey?: string;
92
+ webhooks?: {
93
+ release?: string;
94
+ };
90
95
  windowsEVOnboarding?: {
91
- provider: WindowsEVOnboardingProvider;
92
- tempHSMCertName: string;
93
- [WindowsEVOnboardingSteps.hasChosenProvider]: boolean;
94
- [WindowsEVOnboardingSteps.hasOrderedCert]: boolean;
95
96
  [WindowsEVOnboardingSteps.hasBeenVerified]: boolean;
97
+ [WindowsEVOnboardingSteps.hasChosenProvider]: boolean;
96
98
  [WindowsEVOnboardingSteps.hasGeneratedCert]: boolean;
99
+ [WindowsEVOnboardingSteps.hasOrderedCert]: boolean;
97
100
  [WindowsEVOnboardingSteps.hasUploadedCert]: boolean;
101
+ provider: WindowsEVOnboardingProvider;
102
+ tempHSMCertName: string;
98
103
  };
99
- forceVersionNumber?: string;
100
- webhooks?: {
101
- release?: string;
102
- };
103
- webhookHMACKey?: string;
104
104
  }
105
105
  export interface ToDesktopJson {
106
106
  appBuilderLibVersion?: string;
107
- appId?: string;
108
107
  appFiles?: string[];
108
+ appId?: string;
109
109
  appPath?: FilePath;
110
110
  appProtocolScheme?: string | string[];
111
111
  asar?: boolean;
112
112
  asarUnpack?: boolean | string[];
113
113
  bucket?: string;
114
114
  buildVersion?: string;
115
+ bytenode?: {
116
+ enabled?: boolean;
117
+ files?: string[];
118
+ };
115
119
  copyright?: string;
116
120
  dmg?: {
117
- background?: FilePath;
118
121
  artifactName?: string;
122
+ background?: FilePath;
119
123
  backgroundColor?: string;
124
+ contents?: NonNullable<IAppBuilderLib['config']['dmg']>['contents'];
120
125
  iconSize?: number;
121
126
  iconTextSize?: number;
122
127
  title?: string;
123
- contents?: IAppBuilderLib['config']['dmg']['contents'];
124
- window?: IAppBuilderLib['config']['dmg']['window'];
128
+ window?: NonNullable<IAppBuilderLib['config']['dmg']>['window'];
125
129
  };
126
- extraContentFiles?: ExtraFileReference[];
127
130
  electronMirror?: string;
128
131
  electronVersion?: string;
132
+ extraContentFiles?: ExtraFileReference[];
129
133
  extraResources?: ExtraFileReference[];
130
134
  fileAssociations?: IAppBuilderLib['config']['fileAssociations'];
131
135
  filesForDistribution?: string[];
@@ -144,24 +148,24 @@ export interface ToDesktopJson {
144
148
  dmgBackground?: FilePath;
145
149
  entitlements?: FilePath;
146
150
  entitlementsInherit?: FilePath;
147
- provisioningProfile?: FilePath;
148
- extendInfo?: IAppBuilderLib['config']['mac']['extendInfo'];
151
+ extendInfo?: NonNullable<IAppBuilderLib['config']['mac']>['extendInfo'];
149
152
  icon?: FilePath;
153
+ provisioningProfile?: FilePath;
150
154
  requirements?: FilePath;
151
155
  };
152
156
  mas?: {
153
- type?: 'development' | 'distribution';
154
157
  entitlements?: FilePath;
155
158
  entitlementsInherit?: FilePath;
156
159
  provisioningProfile?: FilePath;
160
+ type?: 'development' | 'distribution';
157
161
  x64ArchFiles?: string;
158
162
  };
159
163
  nodeVersion?: string;
160
164
  npmVersion?: string;
161
- packageManager?: 'npm' | 'yarn' | 'pnpm';
165
+ packageManager?: 'npm' | 'pnpm' | 'yarn';
162
166
  pnpmVersion?: string;
163
167
  productName?: string;
164
- rebuildLibrary?: 'app-builder' | '@electron/rebuild';
168
+ rebuildLibrary?: '@electron/rebuild' | 'app-builder';
165
169
  schemaVersion: number;
166
170
  snap?: IAppBuilderLib['config']['snap'];
167
171
  updateUrlBase?: string;
@@ -181,43 +185,43 @@ export interface ToDesktopJson {
181
185
  yarnVersion?: string;
182
186
  }
183
187
  export declare enum WindowsHSMCertType {
188
+ azureTrustedSigning = "azureTrustedSigning",
184
189
  ev = "ev",
185
- file = "file",
186
- azureTrustedSigning = "azureTrustedSigning"
190
+ file = "file"
187
191
  }
188
192
  export interface CustomWindowsCodeSignFile {
189
193
  certType: string;
190
- hsmCertType: WindowsHSMCertType.file;
191
194
  hsmCertName: string;
195
+ hsmCertType: WindowsHSMCertType.file;
192
196
  }
193
197
  export interface CustomWindowsCodeSignEV {
194
198
  certType: 'hsm';
195
- hsmCertType: WindowsHSMCertType.ev;
196
199
  hsmCertName: string;
200
+ hsmCertType: WindowsHSMCertType.ev;
197
201
  }
198
202
  export interface CustomWindowsCodeSignAzureTrustedSigning {
199
- certType: 'azureTrustedSigning';
200
- azureCredentialsStored: boolean;
201
203
  azureBaseSettings: {
202
204
  $azureClientSecretRef: string;
203
205
  clientId: string;
204
- tenantId: string;
205
206
  codeSigningAccountName: string;
206
- subscriptionId: string;
207
207
  resourceGroupName: string;
208
+ subscriptionId: string;
209
+ tenantId: string;
208
210
  };
211
+ azureCredentialsStored: boolean;
209
212
  azureSettings?: {
210
213
  accountUri: string;
211
214
  certificateProfileId: string;
212
215
  certificateProfileName: string;
213
216
  publisherName: string;
214
217
  };
218
+ certType: 'azureTrustedSigning';
215
219
  }
216
220
  export type CustomMacCodeSign = {
217
- type: 'url';
218
221
  certName: string;
219
222
  certPassword: string;
220
223
  certUrl: string;
224
+ type: 'url';
221
225
  } | {
222
226
  type: 'hsm';
223
227
  };
@@ -227,31 +231,24 @@ export type CustomLinuxPGPKey = {
227
231
  };
228
232
  export type CustomMacNotarization = CustomNotarizationApiKeyAuth | CustomNotarizationPasswordHsmAuth;
229
233
  export interface CustomNotarizationApiKeyAuth {
230
- type: 'hsm-api';
231
- appleApiKeyId: string;
232
- appleApiIssuer: string;
233
234
  $appleApiKey: string;
235
+ appleApiIssuer: string;
236
+ appleApiKeyId: string;
237
+ type: 'hsm-api';
234
238
  }
235
239
  export interface CustomNotarizationPasswordHsmAuth {
236
- type: 'hsm';
240
+ $appSpecificPassword: string;
237
241
  appleId: string;
238
242
  teamId: string;
239
- $appSpecificPassword: string;
243
+ type: 'hsm';
240
244
  }
241
245
  export type ReleaseRedirectionRule = {
242
- appId: string;
243
- rule: 'app';
244
- } | {
245
- feedUrl: string;
246
- rule: 'app';
247
- } | {
248
246
  appId: string;
249
247
  ipList: string[];
250
248
  rule: 'appByIp';
251
249
  } | {
252
- feedUrl: string;
253
- ipList: string[];
254
- rule: 'appByIp';
250
+ appId: string;
251
+ rule: 'app';
255
252
  } | {
256
253
  buildId: string;
257
254
  ipList: string[];
@@ -260,25 +257,38 @@ export type ReleaseRedirectionRule = {
260
257
  buildId: string;
261
258
  platforms: PlatformName[];
262
259
  rule: 'buildByPlatform';
260
+ } | {
261
+ feedUrl: string;
262
+ ipList: string[];
263
+ rule: 'appByIp';
264
+ } | {
265
+ feedUrl: string;
266
+ rule: 'app';
263
267
  };
264
268
  export interface BaseApp extends Schemable {
265
- id: string;
266
269
  appModelId?: string;
270
+ appxConfig?: Partial<IAppBuilderLib['config']['appx']>;
267
271
  customDomain?: string;
268
- domainVerificationCode?: string;
272
+ customLinuxPgpKey?: CustomLinuxPGPKey;
269
273
  customMacCodeSign?: CustomMacCodeSign;
270
274
  customNotarization?: CustomMacNotarization;
271
- customLinuxPgpKey?: CustomLinuxPGPKey;
272
- customWindowsCodeSign?: CustomWindowsCodeSignFile | CustomWindowsCodeSignEV | CustomWindowsCodeSignAzureTrustedSigning;
275
+ customWindowsCodeSign?: CustomWindowsCodeSignAzureTrustedSigning | CustomWindowsCodeSignEV | CustomWindowsCodeSignFile;
276
+ domainVerificationCode?: string;
277
+ id: string;
273
278
  macHsmCertNames?: Record<MacTarget, string>;
274
- windowsHsmCertNames?: Record<WindowsTarget, string>;
279
+ macUniversalInstallerConfig?: {
280
+ shouldPinToVersion?: boolean;
281
+ };
282
+ masConfig?: {
283
+ arch?: 'arm64' | 'universal';
284
+ } & Partial<IAppBuilderLib['config']['mas']>;
275
285
  meta?: IAppMeta;
276
- parentApp?: BaseApp;
286
+ nsisConfig?: Partial<IAppBuilderLib['config']['nsis']>;
277
287
  parent?: {
278
288
  id: string;
279
289
  relationshipToParent: string;
280
290
  } | null;
281
- subscription?: Subscription;
291
+ parentApp?: BaseApp;
282
292
  shouldCreate32BitWindowsArtifacts?: boolean;
283
293
  shouldCreateAppImages?: boolean;
284
294
  shouldCreateAppleIntelArtifacts?: boolean;
@@ -297,23 +307,19 @@ export interface BaseApp extends Schemable {
297
307
  shouldCreateNSISWebInstaller?: boolean;
298
308
  shouldCreateRPMPackages?: boolean;
299
309
  shouldCreateSnapFiles?: boolean;
300
- appxConfig?: Partial<IAppBuilderLib['config']['appx']>;
301
- masConfig?: Partial<IAppBuilderLib['config']['mas']>;
302
- nsisConfig?: Partial<IAppBuilderLib['config']['nsis']>;
303
310
  snapStore?: {
304
- login?: string;
305
311
  description?: string;
312
+ login?: string;
306
313
  };
307
- macUniversalInstallerConfig?: {
308
- shouldPinToVersion?: boolean;
309
- };
314
+ subscription?: Subscription;
315
+ windowsHsmCertNames?: Record<WindowsTarget, string>;
310
316
  }
311
317
  export type Subscription = {
312
- status: string;
313
- subscriptionId: string;
314
318
  itemId: string;
315
319
  planId: string;
316
- productId?: string;
317
320
  priceId?: string;
321
+ productId?: string;
322
+ status: string;
323
+ subscriptionId: string;
318
324
  };
319
325
  export {};
package/lib/base.js CHANGED
@@ -1,22 +1,19 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.WindowsHSMCertType = exports.WindowsEVOnboardingProvider = exports.WindowsEVOnboardingSteps = void 0;
4
- var WindowsEVOnboardingSteps;
1
+ export var WindowsEVOnboardingSteps;
5
2
  (function (WindowsEVOnboardingSteps) {
6
- WindowsEVOnboardingSteps["hasChosenProvider"] = "hasChosenProvider";
7
- WindowsEVOnboardingSteps["hasOrderedCert"] = "hasOrderedCert";
8
3
  WindowsEVOnboardingSteps["hasBeenVerified"] = "hasBeenVerified";
4
+ WindowsEVOnboardingSteps["hasChosenProvider"] = "hasChosenProvider";
9
5
  WindowsEVOnboardingSteps["hasGeneratedCert"] = "hasGeneratedCert";
6
+ WindowsEVOnboardingSteps["hasOrderedCert"] = "hasOrderedCert";
10
7
  WindowsEVOnboardingSteps["hasUploadedCert"] = "hasUploadedCert";
11
- })(WindowsEVOnboardingSteps || (exports.WindowsEVOnboardingSteps = WindowsEVOnboardingSteps = {}));
12
- var WindowsEVOnboardingProvider;
8
+ })(WindowsEVOnboardingSteps || (WindowsEVOnboardingSteps = {}));
9
+ export var WindowsEVOnboardingProvider;
13
10
  (function (WindowsEVOnboardingProvider) {
14
11
  WindowsEVOnboardingProvider["globalsign"] = "globalsign";
15
12
  WindowsEVOnboardingProvider["other"] = "other";
16
- })(WindowsEVOnboardingProvider || (exports.WindowsEVOnboardingProvider = WindowsEVOnboardingProvider = {}));
17
- var WindowsHSMCertType;
13
+ })(WindowsEVOnboardingProvider || (WindowsEVOnboardingProvider = {}));
14
+ export var WindowsHSMCertType;
18
15
  (function (WindowsHSMCertType) {
16
+ WindowsHSMCertType["azureTrustedSigning"] = "azureTrustedSigning";
19
17
  WindowsHSMCertType["ev"] = "ev";
20
18
  WindowsHSMCertType["file"] = "file";
21
- WindowsHSMCertType["azureTrustedSigning"] = "azureTrustedSigning";
22
- })(WindowsHSMCertType || (exports.WindowsHSMCertType = WindowsHSMCertType = {}));
19
+ })(WindowsHSMCertType || (WindowsHSMCertType = {}));