Skip to content

Commit 9949198

Browse files
author
Vieltojarvi
committed
lint fixes from prettier update
1 parent 0f2ae13 commit 9949198

File tree

18 files changed

+141
-141
lines changed

18 files changed

+141
-141
lines changed

packages/cli/src/commands/sandbox/sandbox-seed/sandbox_seed_command.test.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ void describe('sandbox seed command', () => {
4444
const mockHandleProfile = mock.method(
4545
commandMiddleware,
4646
'ensureAwsCredentialAndRegion',
47-
() => null
47+
() => null,
4848
);
4949

5050
let amplifySeedDir: string;
@@ -58,7 +58,7 @@ void describe('sandbox seed command', () => {
5858
const sandboxFactory = new SandboxSingletonFactory(
5959
() => Promise.resolve(testBackendId),
6060
printer,
61-
format
61+
format,
6262
);
6363

6464
const sandboxSeedCommand = new SandboxSeedCommand(sandboxIdResolver, [
@@ -78,7 +78,7 @@ void describe('sandbox seed command', () => {
7878
successfulDeployment: [clientConfigGenerationMock],
7979
successfulDeletion: [clientConfigDeletionMock],
8080
failedDeployment: [],
81-
})
81+
}),
8282
);
8383
const parser = yargs().command(sandboxCommand as unknown as CommandModule);
8484
commandRunner = new TestCommandRunner(parser);
@@ -110,7 +110,7 @@ void describe('sandbox seed command', () => {
110110
assert.strictEqual(
111111
// removes line endings and any output from the spinner from output
112112
output.trimEnd().split('\n')[1].trimStart(),
113-
`${format.success('✔')} seed has successfully completed`
113+
`${format.success('✔')} seed has successfully completed`,
114114
);
115115
assert.strictEqual(mockHandleProfile.mock.callCount(), 1);
116116
});
@@ -140,10 +140,10 @@ void describe('sandbox seed command', () => {
140140
assert.match(err.output, /There is no file that corresponds to/);
141141
assert.match(
142142
err.output,
143-
/Please make a file that corresponds to (.*) and put your seed logic in it/
143+
/Please make a file that corresponds to (.*) and put your seed logic in it/,
144144
);
145145
return true;
146-
}
146+
},
147147
);
148148
});
149149
});

packages/cli/src/commands/sandbox/sandbox-seed/sandbox_seed_command.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ export class SandboxSeedCommand implements CommandModule<object> {
2626
*/
2727
constructor(
2828
private readonly backendIDResolver: SandboxBackendIdResolver,
29-
private readonly seedSubCommands: CommandModule[]
29+
private readonly seedSubCommands: CommandModule[],
3030
) {
3131
this.command = 'seed';
3232
this.describe = 'Seeds sandbox environment';

packages/cli/src/seed-policy-generation/generate_seed_policy_template.test.ts

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -39,20 +39,20 @@ void describe('generate inline policy for seed', () => {
3939
user_pool_id: testUserpoolId,
4040
user_pool_client_id: testUserpoolClient,
4141
},
42-
} as AWSAmplifyBackendOutputs)
42+
} as AWSAmplifyBackendOutputs),
4343
);
4444

4545
const mockStsClient = {
4646
send: mock.fn<
4747
(
48-
input: GetCallerIdentityCommandInput
48+
input: GetCallerIdentityCommandInput,
4949
) => Promise<GetCallerIdentityCommandOutput>
5050
>(async () =>
5151
Promise.resolve({
5252
Account: '123456789012',
5353
Arn: '',
5454
UserId: '',
55-
} as GetCallerIdentityCommandOutput)
55+
} as GetCallerIdentityCommandOutput),
5656
),
5757
};
5858

@@ -68,13 +68,13 @@ void describe('generate inline policy for seed', () => {
6868
const policyDoc = await generateSeedPolicyTemplate(
6969
testBackendIdentifier,
7070
mockConfigGenerator as unknown as typeof generateClientConfig,
71-
mockStsClient as unknown as STSClient
71+
mockStsClient as unknown as STSClient,
7272
);
7373

7474
const policy = new Policy(stack, 'testSeedPolicy', { document: policyDoc });
7575
// we have to attach the policy to a role, otherwise CDK erases the policy from the stack
7676
policy.attachToRole(
77-
new Role(stack, 'testRole', { assumedBy: new AccountPrincipal('1234') })
77+
new Role(stack, 'testRole', { assumedBy: new AccountPrincipal('1234') }),
7878
);
7979

8080
assert.ok(policy instanceof Policy);
@@ -111,7 +111,7 @@ void describe('generate inline policy for seed', () => {
111111
aws_region: testRegion,
112112
bucket_name: 'my-cool-bucket',
113113
},
114-
} as AWSAmplifyBackendOutputs)
114+
} as AWSAmplifyBackendOutputs),
115115
);
116116

117117
const expectedErr = new AmplifyUserError('MissingAuthError', {
@@ -124,14 +124,14 @@ void describe('generate inline policy for seed', () => {
124124
async () =>
125125
generateSeedPolicyTemplate(
126126
testBackendIdentifier,
127-
mockConfigGenerator as unknown as typeof generateClientConfig
127+
mockConfigGenerator as unknown as typeof generateClientConfig,
128128
),
129129
(err: AmplifyUserError) => {
130130
assert.strictEqual(err.name, expectedErr.name);
131131
assert.strictEqual(err.message, expectedErr.message);
132132
assert.strictEqual(err.resolution, expectedErr.resolution);
133133
return true;
134-
}
134+
},
135135
);
136136
});
137137
});

packages/cli/src/seed-policy-generation/generate_seed_policy_template.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ import { GetCallerIdentityCommand, STSClient } from '@aws-sdk/client-sts';
1515
export const generateSeedPolicyTemplate = async (
1616
backendId: BackendIdentifier,
1717
generateClientConfiguration = generateClientConfig,
18-
stsClient = new STSClient()
18+
stsClient = new STSClient(),
1919
): Promise<PolicyDocument> => {
2020
const seedPolicy = new PolicyDocument();
2121
const clientConfig = await generateClientConfiguration(backendId, '1.3');
@@ -40,7 +40,7 @@ export const generateSeedPolicyTemplate = async (
4040
const backendParamPrefix =
4141
ParameterPathConversions.toParameterPrefix(backendId);
4242
const sharedParamPrefix = ParameterPathConversions.toParameterPrefix(
43-
backendId.namespace
43+
backendId.namespace,
4444
);
4545

4646
const secretsGrant = new PolicyStatement({

packages/integration-tests/src/test-project-setup/seed_test_project.ts

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -46,17 +46,17 @@ export class SeedTestProjectCreator implements TestProjectCreator {
4646
*/
4747
constructor(
4848
private readonly cfnClient: CloudFormationClient = new CloudFormationClient(
49-
e2eToolingClientConfig
49+
e2eToolingClientConfig,
5050
),
5151
private readonly amplifyClient: AmplifyClient = new AmplifyClient(
52-
e2eToolingClientConfig
52+
e2eToolingClientConfig,
5353
),
5454
private readonly cognitoIdentityProviderClient: CognitoIdentityProviderClient = new CognitoIdentityProviderClient(
55-
e2eToolingClientConfig
55+
e2eToolingClientConfig,
5656
),
5757
private readonly stsClient: STSClient = new STSClient(
58-
e2eToolingClientConfig
59-
)
58+
e2eToolingClientConfig,
59+
),
6060
) {}
6161

6262
createProject = async (e2eProjectDir: string): Promise<TestProjectBase> => {
@@ -70,14 +70,14 @@ export class SeedTestProjectCreator implements TestProjectCreator {
7070
this.cfnClient,
7171
this.amplifyClient,
7272
this.cognitoIdentityProviderClient,
73-
this.stsClient
73+
this.stsClient,
7474
);
7575
await fsp.cp(
7676
project.sourceProjectAmplifyDirURL,
7777
project.projectAmplifyDirPath,
7878
{
7979
recursive: true,
80-
}
80+
},
8181
);
8282
return project;
8383
};
@@ -90,7 +90,7 @@ class SeedTestProject extends TestProjectBase {
9090

9191
readonly sourceProjectAmplifyDirURL: URL = new URL(
9292
this.sourceProjectAmplifyDirSuffix,
93-
import.meta.url
93+
import.meta.url,
9494
);
9595

9696
constructor(
@@ -100,20 +100,20 @@ class SeedTestProject extends TestProjectBase {
100100
cfnClient: CloudFormationClient,
101101
amplifyClient: AmplifyClient,
102102
private readonly cognitoIdentityProviderClient: CognitoIdentityProviderClient,
103-
private readonly stsClient: STSClient
103+
private readonly stsClient: STSClient,
104104
) {
105105
super(
106106
name,
107107
projectDirPath,
108108
projectAmplifyDirPath,
109109
cfnClient,
110-
amplifyClient
110+
amplifyClient,
111111
);
112112
}
113113

114114
override async deploy(
115115
backendIdentifier: BackendIdentifier,
116-
environment?: Record<string, string>
116+
environment?: Record<string, string>,
117117
) {
118118
await super.deploy(backendIdentifier, environment);
119119

@@ -126,7 +126,7 @@ class SeedTestProject extends TestProjectBase {
126126
{
127127
cwd: this.projectDirPath,
128128
env: environment,
129-
}
129+
},
130130
);
131131

132132
const startingInd = seedPolicyProcess.stdout.indexOf('{');
@@ -148,7 +148,7 @@ class SeedTestProject extends TestProjectBase {
148148
arn: 'arn:aws:iam::aws:policy/service-role/AmplifyBackendDeployFullAccess',
149149
},
150150
],
151-
})
151+
}),
152152
);
153153

154154
assert.ok(seedCredentials.Credentials);
@@ -167,7 +167,7 @@ class SeedTestProject extends TestProjectBase {
167167
}
168168

169169
override async assertPostDeployment(
170-
backendId: BackendIdentifier
170+
backendId: BackendIdentifier,
171171
): Promise<void> {
172172
await super.assertPostDeployment(backendId);
173173
const testUsername = '[email protected]';
@@ -184,7 +184,7 @@ class SeedTestProject extends TestProjectBase {
184184
const authenticatedUserCredentials =
185185
await new AmplifyAuthCredentialsFactory(
186186
this.cognitoIdentityProviderClient,
187-
clientConfig.auth
187+
clientConfig.auth,
188188
).getNewAuthenticatedUserCredentials();
189189

190190
const httpLink = new HttpLink({ uri: clientConfig.data.url });
@@ -220,7 +220,7 @@ class SeedTestProject extends TestProjectBase {
220220

221221
assert.strictEqual(
222222
content.data.listTodos.items[0].content,
223-
`Todo list item for ${testUsername}`
223+
`Todo list item for ${testUsername}`,
224224
);
225225
}
226226
}

packages/integration-tests/src/test-projects/seed-test-project/amplify/seed/seed.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ let response1 = await dataClient.models.Todo.create(
4545
},
4646
{
4747
authMode: 'userPool',
48-
}
48+
},
4949
);
5050
if (response1.errors && response1.errors.length > 0) {
5151
throw response1.errors;

packages/seed/src/auth-seed/auth_api.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ const authClient = new AuthClient(new ConfigReader());
1717
* @returns - Username and Sign up flow used by the new user
1818
*/
1919
export const createAndSignUpUser = async (
20-
newUser: AuthSignUp
20+
newUser: AuthSignUp,
2121
): Promise<AuthOutputs> => {
2222
return await authClient.createAndSignUpUser(newUser);
2323
};
@@ -30,7 +30,7 @@ export const createAndSignUpUser = async (
3030
*/
3131
export const addToUserGroup = async (
3232
user: AuthUserGroupInput,
33-
group: string
33+
group: string,
3434
): Promise<void> => {
3535
return await authClient.addToUserGroup(user, group);
3636
};

0 commit comments

Comments
 (0)