Skip to content

Commit 352eb54

Browse files
style(deployment-dapp): format code
1 parent 09118e5 commit 352eb54

File tree

6 files changed

+59
-19
lines changed

6 files changed

+59
-19
lines changed

deployment-dapp/src/config/config.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,8 @@ export const DOCKER_IMAGE_PROD_TAG = `${dappVersion}-sconify-${SCONIFIER_VERSION
2929
export const DOCKER_IMAGE_DEV_TAG = `dev-${process.env.GITHUB_SHA}-sconify-${SCONIFIER_VERSION}-production`;
3030

3131
//GitHub Actions environment variables
32-
export const GITHUB_DEPLOY_ENVIRONMENT = process.env.DEPLOY_ENVIRONMENT || 'dapp-dev';
32+
export const GITHUB_DEPLOY_ENVIRONMENT =
33+
process.env.DEPLOY_ENVIRONMENT || 'dapp-dev';
3334
export const GITHUB_DEPLOY_TO_DEV = 'dapp-dev';
3435
export const GITHUB_DEPLOY_TO_PROD = 'dapp-prod';
3536

deployment-dapp/src/configureEnsNameScript.ts

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,19 @@ import { configureEnsName } from './singleFunction/configureEnsName.js';
99

1010
const main = async () => {
1111
// get env variables from GitHub Actions
12-
const { DEPLOY_ENVIRONMENT, WALLET_PRIVATE_KEY_DEV, WALLET_PRIVATE_KEY_PROD } =
13-
process.env;
12+
const {
13+
DEPLOY_ENVIRONMENT,
14+
WALLET_PRIVATE_KEY_DEV,
15+
WALLET_PRIVATE_KEY_PROD,
16+
} = process.env;
1417

1518
// Determine deployment environment
1619
const deployEnvironment = DEPLOY_ENVIRONMENT || GITHUB_DEPLOY_TO_DEV;
1720

18-
if (deployEnvironment !== GITHUB_DEPLOY_TO_DEV && deployEnvironment !== GITHUB_DEPLOY_TO_PROD) {
21+
if (
22+
deployEnvironment !== GITHUB_DEPLOY_TO_DEV &&
23+
deployEnvironment !== GITHUB_DEPLOY_TO_PROD
24+
) {
1925
throw Error(`Invalid deployment environment ${deployEnvironment}`);
2026
}
2127

@@ -32,7 +38,9 @@ const main = async () => {
3238
}
3339

3440
if (!privateKey)
35-
throw Error(`Failed to get privateKey for environment ${deployEnvironment}`);
41+
throw Error(
42+
`Failed to get privateKey for environment ${deployEnvironment}`
43+
);
3644

3745
if (!ensName)
3846
throw Error(`Failed to get ens name for environment ${deployEnvironment}`);

deployment-dapp/src/deployScript.ts

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,16 @@ const main = async () => {
1212
const {
1313
DEPLOY_ENVIRONMENT,
1414
WALLET_PRIVATE_KEY_DEV,
15-
WALLET_PRIVATE_KEY_PROD
15+
WALLET_PRIVATE_KEY_PROD,
1616
} = process.env;
1717

1818
// Determine deployment environment
1919
const deployEnvironment = DEPLOY_ENVIRONMENT || GITHUB_DEPLOY_TO_DEV;
2020

21-
if (deployEnvironment !== GITHUB_DEPLOY_TO_DEV && deployEnvironment !== GITHUB_DEPLOY_TO_PROD) {
21+
if (
22+
deployEnvironment !== GITHUB_DEPLOY_TO_DEV &&
23+
deployEnvironment !== GITHUB_DEPLOY_TO_PROD
24+
) {
2225
throw Error(`Invalid deployment environment ${deployEnvironment}`);
2326
}
2427

@@ -30,7 +33,9 @@ const main = async () => {
3033
}
3134

3235
if (!privateKey)
33-
throw Error(`Failed to get privateKey for environment ${deployEnvironment}`);
36+
throw Error(
37+
`Failed to get privateKey for environment ${deployEnvironment}`
38+
);
3439

3540
const iexec = getIExec(privateKey);
3641

deployment-dapp/src/publishSellOrderScript.ts

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,10 @@ const main = async () => {
2727
// Determine deployment environment
2828
const deployEnvironment = DEPLOY_ENVIRONMENT || GITHUB_DEPLOY_TO_DEV;
2929

30-
if (deployEnvironment !== GITHUB_DEPLOY_TO_DEV && deployEnvironment !== GITHUB_DEPLOY_TO_PROD) {
30+
if (
31+
deployEnvironment !== GITHUB_DEPLOY_TO_DEV &&
32+
deployEnvironment !== GITHUB_DEPLOY_TO_PROD
33+
) {
3134
throw Error(`Invalid deployment environment ${deployEnvironment}`);
3235
}
3336

@@ -39,7 +42,9 @@ const main = async () => {
3942
}
4043

4144
if (!privateKey)
42-
throw Error(`Failed to get privateKey for environment ${deployEnvironment}`);
45+
throw Error(
46+
`Failed to get privateKey for environment ${deployEnvironment}`
47+
);
4348

4449
const iexec = getIExec(privateKey);
4550

@@ -52,7 +57,9 @@ const main = async () => {
5257
ensName = WEB3_MAIL_ENS_NAME_PROD;
5358
}
5459
if (!ensName)
55-
throw Error(`Failed to get ens name for environment ${deployEnvironment}`);
60+
throw Error(
61+
`Failed to get ens name for environment ${deployEnvironment}`
62+
);
5663
return resolveName(iexec, ensName);
5764
});
5865

deployment-dapp/src/pushSecretScript.ts

Lines changed: 17 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,10 @@ const main = async () => {
2525
// Determine deployment environment
2626
const deployEnvironment = DEPLOY_ENVIRONMENT || GITHUB_DEPLOY_TO_DEV;
2727

28-
if (deployEnvironment !== GITHUB_DEPLOY_TO_DEV && deployEnvironment !== GITHUB_DEPLOY_TO_PROD) {
28+
if (
29+
deployEnvironment !== GITHUB_DEPLOY_TO_DEV &&
30+
deployEnvironment !== GITHUB_DEPLOY_TO_PROD
31+
) {
2932
throw Error(`Invalid deployment environment ${deployEnvironment}`);
3033
}
3134

@@ -39,14 +42,21 @@ const main = async () => {
3942

4043
if (deployEnvironment === GITHUB_DEPLOY_TO_DEV) {
4144
privateKey = WALLET_PRIVATE_KEY_DEV;
42-
baseWhitelistedApps = JSON.parse(process.env.WEB3MAIL_WHITELISTED_APPS_DEV || WEB3MAIL_WHITELISTED_APPS_DEV);
45+
baseWhitelistedApps = JSON.parse(
46+
process.env.WEB3MAIL_WHITELISTED_APPS_DEV || WEB3MAIL_WHITELISTED_APPS_DEV
47+
);
4348
} else if (deployEnvironment === GITHUB_DEPLOY_TO_PROD) {
4449
privateKey = WALLET_PRIVATE_KEY_PROD;
45-
baseWhitelistedApps = JSON.parse(process.env.WEB3MAIL_WHITELISTED_APPS_PROD || WEB3MAIL_WHITELISTED_APPS_PROD);
50+
baseWhitelistedApps = JSON.parse(
51+
process.env.WEB3MAIL_WHITELISTED_APPS_PROD ||
52+
WEB3MAIL_WHITELISTED_APPS_PROD
53+
);
4654
}
4755

4856
if (!privateKey)
49-
throw Error(`Failed to get privateKey for environment ${deployEnvironment}`);
57+
throw Error(
58+
`Failed to get privateKey for environment ${deployEnvironment}`
59+
);
5060

5161
const iexec = getIExec(privateKey);
5262

@@ -59,7 +69,9 @@ const main = async () => {
5969
ensName = WEB3_MAIL_ENS_NAME_PROD;
6070
}
6171
if (!ensName)
62-
throw Error(`Failed to get ens name for environment ${deployEnvironment}`);
72+
throw Error(
73+
`Failed to get ens name for environment ${deployEnvironment}`
74+
);
6375
return resolveName(iexec, ensName);
6476
});
6577

deployment-dapp/src/revokeSellOrderScript.ts

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,10 @@ const main = async () => {
2121
// Determine deployment environment
2222
const deployEnvironment = DEPLOY_ENVIRONMENT || GITHUB_DEPLOY_TO_DEV;
2323

24-
if (deployEnvironment !== GITHUB_DEPLOY_TO_DEV && deployEnvironment !== GITHUB_DEPLOY_TO_PROD) {
24+
if (
25+
deployEnvironment !== GITHUB_DEPLOY_TO_DEV &&
26+
deployEnvironment !== GITHUB_DEPLOY_TO_PROD
27+
) {
2528
throw Error(`Invalid deployment environment ${deployEnvironment}`);
2629
}
2730

@@ -33,7 +36,9 @@ const main = async () => {
3336
}
3437

3538
if (!privateKey)
36-
throw Error(`Failed to get privateKey for environment ${deployEnvironment}`);
39+
throw Error(
40+
`Failed to get privateKey for environment ${deployEnvironment}`
41+
);
3742

3843
const iexec = getIExec(privateKey);
3944

@@ -46,7 +51,9 @@ const main = async () => {
4651
ensName = WEB3_MAIL_ENS_NAME_PROD;
4752
}
4853
if (!ensName)
49-
throw Error(`Failed to get ens name for environment ${deployEnvironment}`);
54+
throw Error(
55+
`Failed to get ens name for environment ${deployEnvironment}`
56+
);
5057
return resolveName(iexec, ensName);
5158
});
5259

0 commit comments

Comments
 (0)