Skip to content

Commit ce30734

Browse files
author
Vieltojarvi
committed
chore: removed comments
1 parent 2d95220 commit ce30734

8 files changed

Lines changed: 0 additions & 89 deletions

File tree

packages/amplify-category-auth/provider-utils/awscloudformation/triggers/CustomMessage/assets/verify.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,6 @@ function confirm() {
3737
Username: userName,
3838
};
3939

40-
// AWS.config.region = region;
41-
4240
var cognitoidentityserviceprovider = new AWS.CognitoIdentityServiceProvider({ region: region });
4341

4442
cognitoidentityserviceprovider.confirmSignUp(params, function (err, data) {

packages/amplify-category-hosting/__mocks__/mockAwsProviderModule.js

Lines changed: 0 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,3 @@
1-
// async function getConfiguredAWSClient() {
2-
// return {
3-
// S3,
4-
// IAM,
5-
// Pinpoint,
6-
// CloudFront,
7-
// };
8-
// }
9-
101
async function getConfiguredAWSClient() {
112
return {
123
credentials: 'some credentials',
@@ -18,31 +9,6 @@ async function getConfiguredPinpointClient() {
189
return new Pinpoint();
1910
}
2011

21-
class S3 {
22-
upload() {
23-
return {
24-
promise: () => Promise.resolve({}),
25-
};
26-
}
27-
}
28-
29-
class IAM {
30-
createPolicy() {
31-
return {
32-
promise: () =>
33-
Promise.resolve({
34-
Policy: {},
35-
}),
36-
};
37-
}
38-
39-
attachRolePolicy() {
40-
return {
41-
promise: () => Promise.resolve({}),
42-
};
43-
}
44-
}
45-
4612
class Pinpoint {
4713
constructor() {
4814
this.config = {};
@@ -78,14 +44,6 @@ class Pinpoint {
7844
}
7945
}
8046

81-
class CloudFront {
82-
createInvalidation() {
83-
return {
84-
promise: () => Promise.resolve({}),
85-
};
86-
}
87-
}
88-
8947
module.exports = {
9048
getConfiguredAWSClient,
9149
getConfiguredPinpointClient,

packages/amplify-category-notifications/src/pinpoint-helper.ts

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -548,11 +548,6 @@ export const getPinpointClient = async (
548548
// HTTP_PROXY & HTTPS_PROXY env vars are read automatically by ProxyAgent, but we check to see if they are set before using the proxy
549549
if (httpProxy) {
550550
httpAgent = new ProxyAgent();
551-
// aws.config.update({
552-
// httpOptions: {
553-
// agent: new ProxyAgent(),
554-
// },
555-
// });
556551
}
557552

558553
return new aws.Pinpoint({ ...cred, ...defaultOptions, httpOptions: { agent: httpAgent } });

packages/amplify-e2e-tests/src/__tests__/storage-simulator/S3server.test.ts

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -17,12 +17,6 @@ let simulator;
1717
jest.setTimeout(2000000);
1818

1919
beforeAll(async () => {
20-
// AWS.config.update({
21-
// accessKeyId: 'fakeaccesskeyidfortesting',
22-
// secretAccessKey: 'fakeaccesssecretkeyfortesting',
23-
// region: 'eu-west-2',
24-
// });
25-
2620
const ep = new AWS.Endpoint('http://localhost:20005');
2721
s3client = new AWS.S3({
2822
accessKeyId: fakeAccessId,

packages/amplify-e2e-tests/src/import-helpers/utilities.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -296,7 +296,6 @@ const addAppClient = async (
296296
const projectDetails = getProjectMeta(projectRoot);
297297
const authDetails = getAuthProjectDetails(projectRoot);
298298
const creds = new aws.SharedIniFileCredentials({ profile: profileName });
299-
//aws.config.credentials = creds;
300299

301300
const cognitoClient = new aws.CognitoIdentityServiceProvider({
302301
credentials: creds,
@@ -335,7 +334,6 @@ export const deleteAppClient = async (profileName: string, projectRoot: string,
335334
const authDetails = getAuthProjectDetails(projectRoot);
336335
const projectDetails = getProjectMeta(projectRoot);
337336
const creds = new aws.SharedIniFileCredentials({ profile: profileName });
338-
//aws.config.credentials = creds;
339337

340338
const cognitoClient = new aws.CognitoIdentityServiceProvider({
341339
credentials: creds,

packages/amplify-provider-awscloudformation/src/aws-utils/aws-amplify.js

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,11 @@
11
const aws = require('aws-sdk');
2-
// const { ProxyAgent } = require('proxy-agent');
32
const configurationManager = require('../configuration-manager');
43
const { regions: amplifyServiceRegions } = require('../aws-regions');
54
const { proxyAgent } = require('./aws-globals');
65

76
async function getConfiguredAmplifyClient(context, options = {}) {
87
let cred = {};
98
let defaultOptions = {};
10-
// const httpProxy = process.env.HTTP_PROXY || process.env.HTTPS_PROXY;
119
const envVarEndpoint = process.env.AWS_AMPLIFY_ENDPOINT;
1210

1311
try {
@@ -22,15 +20,6 @@ async function getConfiguredAmplifyClient(context, options = {}) {
2220
};
2321
}
2422

25-
// **affected by SDK migrations
26-
// if (httpProxy) {
27-
// aws.config.update({
28-
// httpOptions: {
29-
// agent: new ProxyAgent(),
30-
// },
31-
// });
32-
// }
33-
3423
const config = {
3524
...cred,
3625
...defaultOptions,

packages/amplify-provider-awscloudformation/src/aws-utils/aws.js

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,6 @@ const configFilePath = path.join(dotAWSDirPath, 'config');
88

99
let aws;
1010

11-
// **affected by SDK migrations
12-
// this may need to be entirely gutted
1311
try {
1412
delete require.cache[require.resolve('aws-sdk')];
1513
if (fs.existsSync(credentialsFilePath) && fs.existsSync(configFilePath)) {
@@ -24,24 +22,7 @@ try {
2422
aws = require('aws-sdk');
2523
}
2624

27-
const { ProxyAgent } = require('proxy-agent');
28-
const configurationManager = require('../configuration-manager');
29-
3025
aws.configureWithCreds = async (context) => {
31-
// const httpProxy = process.env.HTTP_PROXY || process.env.HTTPS_PROXY;
32-
// const config = await configurationManager.loadConfiguration(context, aws);
33-
// if (config) {
34-
// aws.config.update(config);
35-
// }
36-
37-
// if (httpProxy) {
38-
// aws.config.update({
39-
// httpOptions: {
40-
// agent: new ProxyAgent(httpProxy),
41-
// },
42-
// });
43-
// }
44-
4526
return aws;
4627
};
4728

packages/amplify-provider-awscloudformation/src/utils/admin-helpers.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,8 +73,6 @@ export async function getTempCredsWithAdminTokens(context: $TSContext, appId: st
7373
// use tokens to get creds and assign to config
7474
const awsConfigInfo = await getAdminCognitoCredentials(idToken, IdentityId, region);
7575

76-
// aws.config.update(awsConfigInfo);
77-
7876
// need to use Cognito creds to get STS creds - otherwise
7977
// users will not be able to provision Cognito resources
8078
const sts = new aws.STS({

0 commit comments

Comments
 (0)