@todesktop/shared 7.188.38 → 7.188.40
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/hsm.d.ts +7 -6
- package/lib/hsm.js +8 -8
- package/package.json +1 -1
- package/src/hsm.ts +9 -11
package/lib/hsm.d.ts
CHANGED
|
@@ -1,18 +1,19 @@
|
|
|
1
|
+
export declare type MacTarget = 'mac' | 'mas' | 'mas-installer' | 'mas-dev';
|
|
1
2
|
/**
|
|
2
|
-
* Files that are uploaded to HSM have a unique secretName that depends on the appId and
|
|
3
|
+
* Files that are uploaded to HSM have a unique secretName that depends on the appId and target.
|
|
3
4
|
* This function returns the key name that is used for certificate files that have a `.p12` postfix.
|
|
4
5
|
*
|
|
5
6
|
* @param appId the application id
|
|
6
|
-
* @param
|
|
7
|
+
* @param target the mac target type
|
|
7
8
|
* @returns the name of the secret that is required for downloading the cert from HSM.
|
|
8
9
|
*/
|
|
9
|
-
export declare const getMacCertificateNameFromHSM: (appId: string,
|
|
10
|
+
export declare const getMacCertificateNameFromHSM: (appId: string, target: MacTarget) => string;
|
|
10
11
|
/**
|
|
11
|
-
* Files that are uploaded to HSM have a unique secretName that depends on the appId and
|
|
12
|
+
* Files that are uploaded to HSM have a unique secretName that depends on the appId and target.
|
|
12
13
|
* This function returns the key name that is used for key files that have a `.p8` postfix.
|
|
13
14
|
*
|
|
14
15
|
* @param appId the application id
|
|
15
|
-
* @param
|
|
16
|
+
* @param target the mac target type
|
|
16
17
|
* @returns the name of the secret that is required for downloading the cert from HSM.
|
|
17
18
|
*/
|
|
18
|
-
export declare const getMacAPIKeyNameFromHSM: (appId: string,
|
|
19
|
+
export declare const getMacAPIKeyNameFromHSM: (appId: string, target: MacTarget) => string;
|
package/lib/hsm.js
CHANGED
|
@@ -2,24 +2,24 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.getMacAPIKeyNameFromHSM = exports.getMacCertificateNameFromHSM = void 0;
|
|
4
4
|
/**
|
|
5
|
-
* Files that are uploaded to HSM have a unique secretName that depends on the appId and
|
|
5
|
+
* Files that are uploaded to HSM have a unique secretName that depends on the appId and target.
|
|
6
6
|
* This function returns the key name that is used for certificate files that have a `.p12` postfix.
|
|
7
7
|
*
|
|
8
8
|
* @param appId the application id
|
|
9
|
-
* @param
|
|
9
|
+
* @param target the mac target type
|
|
10
10
|
* @returns the name of the secret that is required for downloading the cert from HSM.
|
|
11
11
|
*/
|
|
12
|
-
exports.getMacCertificateNameFromHSM = (appId,
|
|
13
|
-
return `todesktop-${appId}-${
|
|
12
|
+
exports.getMacCertificateNameFromHSM = (appId, target) => {
|
|
13
|
+
return `todesktop-${appId}-${target}-cert`;
|
|
14
14
|
};
|
|
15
15
|
/**
|
|
16
|
-
* Files that are uploaded to HSM have a unique secretName that depends on the appId and
|
|
16
|
+
* Files that are uploaded to HSM have a unique secretName that depends on the appId and target.
|
|
17
17
|
* This function returns the key name that is used for key files that have a `.p8` postfix.
|
|
18
18
|
*
|
|
19
19
|
* @param appId the application id
|
|
20
|
-
* @param
|
|
20
|
+
* @param target the mac target type
|
|
21
21
|
* @returns the name of the secret that is required for downloading the cert from HSM.
|
|
22
22
|
*/
|
|
23
|
-
exports.getMacAPIKeyNameFromHSM = (appId,
|
|
24
|
-
return `todesktop-${appId}-${
|
|
23
|
+
exports.getMacAPIKeyNameFromHSM = (appId, target) => {
|
|
24
|
+
return `todesktop-${appId}-${target}-api-key`;
|
|
25
25
|
};
|
package/package.json
CHANGED
package/src/hsm.ts
CHANGED
|
@@ -1,29 +1,27 @@
|
|
|
1
|
+
export type MacTarget = 'mac' | 'mas' | 'mas-installer' | 'mas-dev';
|
|
1
2
|
/**
|
|
2
|
-
* Files that are uploaded to HSM have a unique secretName that depends on the appId and
|
|
3
|
+
* Files that are uploaded to HSM have a unique secretName that depends on the appId and target.
|
|
3
4
|
* This function returns the key name that is used for certificate files that have a `.p12` postfix.
|
|
4
5
|
*
|
|
5
6
|
* @param appId the application id
|
|
6
|
-
* @param
|
|
7
|
+
* @param target the mac target type
|
|
7
8
|
* @returns the name of the secret that is required for downloading the cert from HSM.
|
|
8
9
|
*/
|
|
9
10
|
export const getMacCertificateNameFromHSM = (
|
|
10
11
|
appId: string,
|
|
11
|
-
|
|
12
|
+
target: MacTarget
|
|
12
13
|
) => {
|
|
13
|
-
return `todesktop-${appId}-${
|
|
14
|
+
return `todesktop-${appId}-${target}-cert`;
|
|
14
15
|
};
|
|
15
16
|
|
|
16
17
|
/**
|
|
17
|
-
* Files that are uploaded to HSM have a unique secretName that depends on the appId and
|
|
18
|
+
* Files that are uploaded to HSM have a unique secretName that depends on the appId and target.
|
|
18
19
|
* This function returns the key name that is used for key files that have a `.p8` postfix.
|
|
19
20
|
*
|
|
20
21
|
* @param appId the application id
|
|
21
|
-
* @param
|
|
22
|
+
* @param target the mac target type
|
|
22
23
|
* @returns the name of the secret that is required for downloading the cert from HSM.
|
|
23
24
|
*/
|
|
24
|
-
export const getMacAPIKeyNameFromHSM = (
|
|
25
|
-
appId
|
|
26
|
-
artifact: 'mac' | 'mas' | 'mas-dev'
|
|
27
|
-
) => {
|
|
28
|
-
return `todesktop-${appId}-${artifact}-api-key`;
|
|
25
|
+
export const getMacAPIKeyNameFromHSM = (appId: string, target: MacTarget) => {
|
|
26
|
+
return `todesktop-${appId}-${target}-api-key`;
|
|
29
27
|
};
|