@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.
- package/.prettierignore +0 -2
- package/CHANGELOG.md +19 -0
- package/README.md +42 -15
- package/eslint.config.mjs +8 -55
- package/lib/{base.d.ts → cjs/base.d.ts} +82 -75
- package/lib/{desktopify.d.ts → cjs/desktopify.d.ts} +74 -74
- package/lib/{desktopify.js → cjs/desktopify.js} +12 -11
- package/lib/{desktopify2.d.ts → cjs/desktopify2.d.ts} +223 -223
- package/lib/{getSiteInfo.d.ts → cjs/getSiteInfo.d.ts} +6 -6
- package/lib/{hsm.d.ts → cjs/hsm.d.ts} +1 -1
- package/lib/{hsm.js → cjs/hsm.js} +1 -1
- package/lib/{index.d.ts → cjs/index.d.ts} +7 -8
- package/lib/{index.js → cjs/index.js} +11 -9
- package/lib/{invitePermissionLabels.d.ts → cjs/invitePermissionLabels.d.ts} +4 -2
- package/lib/{invitePermissionLabels.js → cjs/invitePermissionLabels.js} +11 -3
- package/lib/{personalAccessTokens.d.ts → cjs/personalAccessTokens.d.ts} +12 -12
- package/lib/{plans.d.ts → cjs/plans.d.ts} +27 -27
- package/lib/{plans.js → cjs/plans.js} +165 -163
- package/lib/{plugin.d.ts → cjs/plugin.d.ts} +18 -18
- package/lib/{toDesktop.d.ts → cjs/toDesktop.d.ts} +66 -66
- package/lib/cjs/translation.d.ts +2 -0
- package/lib/{validations.d.ts → cjs/validations.d.ts} +66 -66
- package/lib/cjs/validations.js +178 -0
- package/lib/esm/base.d.ts +326 -0
- package/lib/esm/base.js +19 -0
- package/lib/esm/desktopify.d.ts +339 -0
- package/lib/esm/desktopify.js +71 -0
- package/lib/esm/desktopify2.d.ts +506 -0
- package/lib/esm/desktopify2.js +77 -0
- package/lib/esm/getSiteInfo.d.ts +24 -0
- package/lib/esm/getSiteInfo.js +1 -0
- package/lib/esm/hsm.d.ts +30 -0
- package/lib/esm/hsm.js +35 -0
- package/lib/esm/index.d.ts +12 -0
- package/lib/esm/index.js +14 -0
- package/lib/esm/invitePermissionLabels.d.ts +13 -0
- package/lib/esm/invitePermissionLabels.js +24 -0
- package/lib/esm/personalAccessTokens.d.ts +24 -0
- package/lib/esm/personalAccessTokens.js +1 -0
- package/lib/esm/plans.d.ts +130 -0
- package/lib/esm/plans.js +626 -0
- package/lib/esm/plugin.d.ts +55 -0
- package/lib/esm/plugin.js +1 -0
- package/lib/esm/toDesktop.d.ts +191 -0
- package/lib/esm/toDesktop.js +1 -0
- package/lib/esm/translation.d.ts +2 -0
- package/lib/esm/translation.js +13 -0
- package/lib/esm/validations.d.ts +102 -0
- package/lib/{validations.js → esm/validations.js} +54 -56
- package/package.json +29 -20
- package/src/base.ts +90 -82
- package/src/desktopify.ts +82 -80
- package/src/desktopify2.ts +240 -240
- package/src/getSiteInfo.ts +6 -6
- package/src/hsm.ts +7 -7
- package/src/index.cjs.ts +19 -0
- package/src/index.ts +14 -14
- package/src/invitePermissionLabels.ts +20 -6
- package/src/personalAccessTokens.ts +12 -12
- package/src/plans.ts +191 -191
- package/src/plugin.ts +19 -19
- package/src/toDesktop.ts +70 -70
- package/src/translation.ts +2 -2
- package/src/validations.ts +51 -49
- package/tsconfig.esm.json +15 -0
- package/tsconfig.json +6 -4
- package/.prettierrc +0 -5
- package/lib/translation.d.ts +0 -2
- package/lib/{base.js → cjs/base.js} +3 -3
- /package/lib/{desktopify2.js → cjs/desktopify2.js} +0 -0
- /package/lib/{getSiteInfo.js → cjs/getSiteInfo.js} +0 -0
- /package/lib/{personalAccessTokens.js → cjs/personalAccessTokens.js} +0 -0
- /package/lib/{plugin.js → cjs/plugin.js} +0 -0
- /package/lib/{toDesktop.js → cjs/toDesktop.js} +0 -0
- /package/lib/{translation.js → cjs/translation.js} +0 -0
package/.prettierignore
CHANGED
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
# @todesktop/shared
|
|
2
|
+
|
|
3
|
+
## 7.191.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 797f9cc: feat(mas): add `mas.minimumSystemVersion` config option
|
|
8
|
+
|
|
9
|
+
## 7.191.0
|
|
10
|
+
|
|
11
|
+
### Minor Changes
|
|
12
|
+
|
|
13
|
+
- a13a5ff: Add `canManageBilling` permission for delegated billing access
|
|
14
|
+
|
|
15
|
+
## 7.190.0
|
|
16
|
+
|
|
17
|
+
### Minor Changes
|
|
18
|
+
|
|
19
|
+
- 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
|
|
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
|
|
6
|
-
|
|
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
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
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
|
|
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,
|
|
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
|
|
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
|
|
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
|
|
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)
|
|
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
|
|
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
|
|
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
|
|
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
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
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
|
-
|
|
19
|
-
|
|
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
|
+
);
|
|
@@ -7,31 +7,31 @@ type CompositeIdFileLocationKey = string;
|
|
|
7
7
|
export type StaticAnalysisItem = {
|
|
8
8
|
hidden: boolean;
|
|
9
9
|
};
|
|
10
|
-
export type ProgressTypes = '
|
|
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
|
-
|
|
72
|
+
linux: IDownloadButtonOptions;
|
|
73
73
|
mac: IDownloadButtonOptions;
|
|
74
|
+
universal: IDownloadButtonOptions;
|
|
74
75
|
windows: IDownloadButtonOptions;
|
|
75
|
-
linux: IDownloadButtonOptions;
|
|
76
76
|
};
|
|
77
77
|
firstSuccessfulBuildEndedAt?: string;
|
|
78
|
-
|
|
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
|
-
|
|
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,25 @@ export interface ToDesktopJson {
|
|
|
144
148
|
dmgBackground?: FilePath;
|
|
145
149
|
entitlements?: FilePath;
|
|
146
150
|
entitlementsInherit?: FilePath;
|
|
147
|
-
|
|
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;
|
|
159
|
+
minimumSystemVersion?: string;
|
|
156
160
|
provisioningProfile?: FilePath;
|
|
161
|
+
type?: 'development' | 'distribution';
|
|
157
162
|
x64ArchFiles?: string;
|
|
158
163
|
};
|
|
159
164
|
nodeVersion?: string;
|
|
160
165
|
npmVersion?: string;
|
|
161
|
-
packageManager?: 'npm' | '
|
|
166
|
+
packageManager?: 'npm' | 'pnpm' | 'yarn';
|
|
162
167
|
pnpmVersion?: string;
|
|
163
168
|
productName?: string;
|
|
164
|
-
rebuildLibrary?: '
|
|
169
|
+
rebuildLibrary?: '@electron/rebuild' | 'app-builder';
|
|
165
170
|
schemaVersion: number;
|
|
166
171
|
snap?: IAppBuilderLib['config']['snap'];
|
|
167
172
|
updateUrlBase?: string;
|
|
@@ -181,43 +186,43 @@ export interface ToDesktopJson {
|
|
|
181
186
|
yarnVersion?: string;
|
|
182
187
|
}
|
|
183
188
|
export declare enum WindowsHSMCertType {
|
|
189
|
+
azureTrustedSigning = "azureTrustedSigning",
|
|
184
190
|
ev = "ev",
|
|
185
|
-
file = "file"
|
|
186
|
-
azureTrustedSigning = "azureTrustedSigning"
|
|
191
|
+
file = "file"
|
|
187
192
|
}
|
|
188
193
|
export interface CustomWindowsCodeSignFile {
|
|
189
194
|
certType: string;
|
|
190
|
-
hsmCertType: WindowsHSMCertType.file;
|
|
191
195
|
hsmCertName: string;
|
|
196
|
+
hsmCertType: WindowsHSMCertType.file;
|
|
192
197
|
}
|
|
193
198
|
export interface CustomWindowsCodeSignEV {
|
|
194
199
|
certType: 'hsm';
|
|
195
|
-
hsmCertType: WindowsHSMCertType.ev;
|
|
196
200
|
hsmCertName: string;
|
|
201
|
+
hsmCertType: WindowsHSMCertType.ev;
|
|
197
202
|
}
|
|
198
203
|
export interface CustomWindowsCodeSignAzureTrustedSigning {
|
|
199
|
-
certType: 'azureTrustedSigning';
|
|
200
|
-
azureCredentialsStored: boolean;
|
|
201
204
|
azureBaseSettings: {
|
|
202
205
|
$azureClientSecretRef: string;
|
|
203
206
|
clientId: string;
|
|
204
|
-
tenantId: string;
|
|
205
207
|
codeSigningAccountName: string;
|
|
206
|
-
subscriptionId: string;
|
|
207
208
|
resourceGroupName: string;
|
|
209
|
+
subscriptionId: string;
|
|
210
|
+
tenantId: string;
|
|
208
211
|
};
|
|
212
|
+
azureCredentialsStored: boolean;
|
|
209
213
|
azureSettings?: {
|
|
210
214
|
accountUri: string;
|
|
211
215
|
certificateProfileId: string;
|
|
212
216
|
certificateProfileName: string;
|
|
213
217
|
publisherName: string;
|
|
214
218
|
};
|
|
219
|
+
certType: 'azureTrustedSigning';
|
|
215
220
|
}
|
|
216
221
|
export type CustomMacCodeSign = {
|
|
217
|
-
type: 'url';
|
|
218
222
|
certName: string;
|
|
219
223
|
certPassword: string;
|
|
220
224
|
certUrl: string;
|
|
225
|
+
type: 'url';
|
|
221
226
|
} | {
|
|
222
227
|
type: 'hsm';
|
|
223
228
|
};
|
|
@@ -227,31 +232,24 @@ export type CustomLinuxPGPKey = {
|
|
|
227
232
|
};
|
|
228
233
|
export type CustomMacNotarization = CustomNotarizationApiKeyAuth | CustomNotarizationPasswordHsmAuth;
|
|
229
234
|
export interface CustomNotarizationApiKeyAuth {
|
|
230
|
-
type: 'hsm-api';
|
|
231
|
-
appleApiKeyId: string;
|
|
232
|
-
appleApiIssuer: string;
|
|
233
235
|
$appleApiKey: string;
|
|
236
|
+
appleApiIssuer: string;
|
|
237
|
+
appleApiKeyId: string;
|
|
238
|
+
type: 'hsm-api';
|
|
234
239
|
}
|
|
235
240
|
export interface CustomNotarizationPasswordHsmAuth {
|
|
236
|
-
|
|
241
|
+
$appSpecificPassword: string;
|
|
237
242
|
appleId: string;
|
|
238
243
|
teamId: string;
|
|
239
|
-
|
|
244
|
+
type: 'hsm';
|
|
240
245
|
}
|
|
241
246
|
export type ReleaseRedirectionRule = {
|
|
242
|
-
appId: string;
|
|
243
|
-
rule: 'app';
|
|
244
|
-
} | {
|
|
245
|
-
feedUrl: string;
|
|
246
|
-
rule: 'app';
|
|
247
|
-
} | {
|
|
248
247
|
appId: string;
|
|
249
248
|
ipList: string[];
|
|
250
249
|
rule: 'appByIp';
|
|
251
250
|
} | {
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
rule: 'appByIp';
|
|
251
|
+
appId: string;
|
|
252
|
+
rule: 'app';
|
|
255
253
|
} | {
|
|
256
254
|
buildId: string;
|
|
257
255
|
ipList: string[];
|
|
@@ -260,25 +258,38 @@ export type ReleaseRedirectionRule = {
|
|
|
260
258
|
buildId: string;
|
|
261
259
|
platforms: PlatformName[];
|
|
262
260
|
rule: 'buildByPlatform';
|
|
261
|
+
} | {
|
|
262
|
+
feedUrl: string;
|
|
263
|
+
ipList: string[];
|
|
264
|
+
rule: 'appByIp';
|
|
265
|
+
} | {
|
|
266
|
+
feedUrl: string;
|
|
267
|
+
rule: 'app';
|
|
263
268
|
};
|
|
264
269
|
export interface BaseApp extends Schemable {
|
|
265
|
-
id: string;
|
|
266
270
|
appModelId?: string;
|
|
271
|
+
appxConfig?: Partial<IAppBuilderLib['config']['appx']>;
|
|
267
272
|
customDomain?: string;
|
|
268
|
-
|
|
273
|
+
customLinuxPgpKey?: CustomLinuxPGPKey;
|
|
269
274
|
customMacCodeSign?: CustomMacCodeSign;
|
|
270
275
|
customNotarization?: CustomMacNotarization;
|
|
271
|
-
|
|
272
|
-
|
|
276
|
+
customWindowsCodeSign?: CustomWindowsCodeSignAzureTrustedSigning | CustomWindowsCodeSignEV | CustomWindowsCodeSignFile;
|
|
277
|
+
domainVerificationCode?: string;
|
|
278
|
+
id: string;
|
|
273
279
|
macHsmCertNames?: Record<MacTarget, string>;
|
|
274
|
-
|
|
280
|
+
macUniversalInstallerConfig?: {
|
|
281
|
+
shouldPinToVersion?: boolean;
|
|
282
|
+
};
|
|
283
|
+
masConfig?: {
|
|
284
|
+
arch?: 'arm64' | 'universal';
|
|
285
|
+
} & Partial<IAppBuilderLib['config']['mas']>;
|
|
275
286
|
meta?: IAppMeta;
|
|
276
|
-
|
|
287
|
+
nsisConfig?: Partial<IAppBuilderLib['config']['nsis']>;
|
|
277
288
|
parent?: {
|
|
278
289
|
id: string;
|
|
279
290
|
relationshipToParent: string;
|
|
280
291
|
} | null;
|
|
281
|
-
|
|
292
|
+
parentApp?: BaseApp;
|
|
282
293
|
shouldCreate32BitWindowsArtifacts?: boolean;
|
|
283
294
|
shouldCreateAppImages?: boolean;
|
|
284
295
|
shouldCreateAppleIntelArtifacts?: boolean;
|
|
@@ -297,23 +308,19 @@ export interface BaseApp extends Schemable {
|
|
|
297
308
|
shouldCreateNSISWebInstaller?: boolean;
|
|
298
309
|
shouldCreateRPMPackages?: boolean;
|
|
299
310
|
shouldCreateSnapFiles?: boolean;
|
|
300
|
-
appxConfig?: Partial<IAppBuilderLib['config']['appx']>;
|
|
301
|
-
masConfig?: Partial<IAppBuilderLib['config']['mas']>;
|
|
302
|
-
nsisConfig?: Partial<IAppBuilderLib['config']['nsis']>;
|
|
303
311
|
snapStore?: {
|
|
304
|
-
login?: string;
|
|
305
312
|
description?: string;
|
|
313
|
+
login?: string;
|
|
306
314
|
};
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
};
|
|
315
|
+
subscription?: Subscription;
|
|
316
|
+
windowsHsmCertNames?: Record<WindowsTarget, string>;
|
|
310
317
|
}
|
|
311
318
|
export type Subscription = {
|
|
312
|
-
status: string;
|
|
313
|
-
subscriptionId: string;
|
|
314
319
|
itemId: string;
|
|
315
320
|
planId: string;
|
|
316
|
-
productId?: string;
|
|
317
321
|
priceId?: string;
|
|
322
|
+
productId?: string;
|
|
323
|
+
status: string;
|
|
324
|
+
subscriptionId: string;
|
|
318
325
|
};
|
|
319
326
|
export {};
|