@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 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 artifact.
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 artifact the mac artifact type
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, artifact: 'mac' | 'mas' | 'mas-dev') => 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 artifact.
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 artifact the mac artifact type
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, artifact: 'mac' | 'mas' | 'mas-dev') => 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 artifact.
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 artifact the mac artifact type
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, artifact) => {
13
- return `todesktop-${appId}-${artifact}-cert`;
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 artifact.
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 artifact the mac artifact type
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, artifact) => {
24
- return `todesktop-${appId}-${artifact}-api-key`;
23
+ exports.getMacAPIKeyNameFromHSM = (appId, target) => {
24
+ return `todesktop-${appId}-${target}-api-key`;
25
25
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@todesktop/shared",
3
- "version": "7.188.38",
3
+ "version": "7.188.40",
4
4
  "description": "",
5
5
  "main": "./lib/index.js",
6
6
  "types": "./lib/index.d.ts",
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 artifact.
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 artifact the mac artifact type
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
- artifact: 'mac' | 'mas' | 'mas-dev'
12
+ target: MacTarget
12
13
  ) => {
13
- return `todesktop-${appId}-${artifact}-cert`;
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 artifact.
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 artifact the mac artifact type
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: string,
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
  };