Skip to content

Commit 020bf18

Browse files
authored
chore(gamelift): fix some horrible formatting errors (#28296)
Truly ugly errors that weren't even consistent, just consistently off. ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
1 parent a8c2fd0 commit 020bf18

13 files changed

+456
-456
lines changed

packages/@aws-cdk/aws-gamelift-alpha/lib/alias.ts

+30-31
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,11 @@ import { CfnAlias } from 'aws-cdk-lib/aws-gamelift';
88
* Represents a Gamelift Alias for a Gamelift fleet destination.
99
*/
1010
export interface IAlias extends cdk.IResource, IGameSessionQueueDestination {
11-
1211
/**
13-
* The Identifier of the alias.
14-
*
15-
* @attribute
16-
*/
12+
* The Identifier of the alias.
13+
*
14+
* @attribute
15+
*/
1716
readonly aliasId: string;
1817

1918
/**
@@ -29,10 +28,10 @@ export interface IAlias extends cdk.IResource, IGameSessionQueueDestination {
2928
*/
3029
export interface AliasOptions {
3130
/**
32-
* Description for the alias
33-
*
34-
* @default No description
35-
*/
31+
* Description for the alias
32+
*
33+
* @default No description
34+
*/
3635
readonly description?: string;
3736
}
3837

@@ -41,21 +40,21 @@ export interface AliasOptions {
4140
*/
4241
export interface AliasAttributes {
4342
/**
44-
* The ARN of the alias
45-
*
46-
* At least one of `aliasArn` and `aliasId` must be provided.
47-
*
48-
* @default derived from `aliasId`.
49-
*/
43+
* The ARN of the alias
44+
*
45+
* At least one of `aliasArn` and `aliasId` must be provided.
46+
*
47+
* @default derived from `aliasId`.
48+
*/
5049
readonly aliasArn?: string;
5150

5251
/**
53-
* The identifier of the alias
54-
*
55-
* At least one of `aliasId` and `aliasArn` must be provided.
56-
*
57-
* @default derived from `aliasArn`.
58-
*/
52+
* The identifier of the alias
53+
*
54+
* At least one of `aliasId` and `aliasArn` must be provided.
55+
*
56+
* @default derived from `aliasArn`.
57+
*/
5958
readonly aliasId?: string;
6059
}
6160

@@ -64,15 +63,15 @@ export interface AliasAttributes {
6463
*/
6564
export interface AliasProps {
6665
/**
67-
* Name of this alias
68-
*/
66+
* Name of this alias
67+
*/
6968
readonly aliasName: string;
7069

7170
/**
72-
* A human-readable description of the alias
73-
*
74-
* @default no description
75-
*/
71+
* A human-readable description of the alias
72+
*
73+
* @default no description
74+
*/
7675
readonly description?: string;
7776

7877
/**
@@ -100,13 +99,15 @@ export interface AliasProps {
10099
*/
101100
export abstract class AliasBase extends cdk.Resource implements IAlias {
102101
/**
103-
* The Identifier of the alias.
104-
*/
102+
* The Identifier of the alias.
103+
*/
105104
public abstract readonly aliasId: string;
105+
106106
/**
107107
* The ARN of the alias
108108
*/
109109
public abstract readonly aliasArn: string;
110+
110111
/**
111112
* The ARN to put into the destination field of a game session queue
112113
*/
@@ -132,7 +133,6 @@ export abstract class AliasBase extends cdk.Resource implements IAlias {
132133
* @resource AWS::GameLift::Alias
133134
*/
134135
export class Alias extends AliasBase {
135-
136136
/**
137137
* Import an existing alias from its identifier.
138138
*/
@@ -248,4 +248,3 @@ export class Alias extends AliasBase {
248248
};
249249
}
250250
}
251-

packages/@aws-cdk/aws-gamelift-alpha/lib/build-fleet.ts

+6-7
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,12 @@ export interface IBuildFleet extends IFleet {}
1515
* Properties for a new Gamelift build fleet
1616
*/
1717
export interface BuildFleetProps extends FleetProps {
18-
1918
/**
20-
* A build to be deployed on the fleet.
21-
* The build must have been successfully uploaded to Amazon GameLift and be in a `READY` status.
22-
*
23-
* This fleet setting cannot be changed once the fleet is created.
24-
*/
19+
* A build to be deployed on the fleet.
20+
* The build must have been successfully uploaded to Amazon GameLift and be in a `READY` status.
21+
*
22+
* This fleet setting cannot be changed once the fleet is created.
23+
*/
2524
readonly content: IBuild;
2625

2726
/**
@@ -201,4 +200,4 @@ export class BuildFleet extends FleetBase implements IBuildFleet {
201200
};
202201
}
203202
}
204-
}
203+
}

packages/@aws-cdk/aws-gamelift-alpha/lib/build.ts

+55-56
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ import { CfnBuild } from 'aws-cdk-lib/aws-gamelift';
1616
* @see https://docs.aws.amazon.com/gamelift/latest/developerguide/gamelift-build-cli-uploading.html
1717
*/
1818
export interface IBuild extends cdk.IResource, iam.IGrantable {
19-
2019
/**
2120
* The Identifier of the build.
2221
*
@@ -37,12 +36,13 @@ export interface IBuild extends cdk.IResource, iam.IGrantable {
3736
*/
3837
export abstract class BuildBase extends cdk.Resource implements IBuild {
3938
/**
40-
* The Identifier of the build.
41-
*/
39+
* The Identifier of the build.
40+
*/
4241
public abstract readonly buildId: string;
42+
4343
/**
44-
* The ARN of the build.
45-
*/
44+
* The ARN of the build.
45+
*/
4646
public abstract readonly buildArn: string;
4747

4848
public abstract readonly grantPrincipal: iam.IPrincipal;
@@ -87,21 +87,21 @@ export enum OperatingSystem {
8787
*/
8888
export interface BuildAttributes {
8989
/**
90-
* The ARN of the build
91-
*
92-
* At least one of `buildArn` and `buildId` must be provided.
93-
*
94-
* @default derived from `buildId`.
95-
*/
90+
* The ARN of the build
91+
*
92+
* At least one of `buildArn` and `buildId` must be provided.
93+
*
94+
* @default derived from `buildId`.
95+
*/
9696
readonly buildArn?: string;
9797

9898
/**
99-
* The identifier of the build
100-
*
101-
* At least one of `buildId` and `buildArn` must be provided.
102-
*
103-
* @default derived from `buildArn`.
104-
*/
99+
* The identifier of the build
100+
*
101+
* At least one of `buildId` and `buildArn` must be provided.
102+
*
103+
* @default derived from `buildArn`.
104+
*/
105105
readonly buildId?: string;
106106
/**
107107
* The IAM role assumed by GameLift to access server build in S3.
@@ -115,52 +115,52 @@ export interface BuildAttributes {
115115
*/
116116
export interface BuildProps {
117117
/**
118-
* Name of this build
119-
*
120-
* @default No name
121-
*/
118+
* Name of this build
119+
*
120+
* @default No name
121+
*/
122122
readonly buildName?: string;
123123

124124
/**
125-
* Version of this build
126-
*
127-
* @default No version
128-
*/
125+
* Version of this build
126+
*
127+
* @default No version
128+
*/
129129
readonly buildVersion?: string;
130130

131131
/**
132-
* The operating system that the game server binaries are built to run on.
133-
*
134-
* @default No version
135-
*/
132+
* The operating system that the game server binaries are built to run on.
133+
*
134+
* @default No version
135+
*/
136136
readonly operatingSystem?: OperatingSystem;
137137

138138
/**
139-
* The game build file storage
140-
*/
139+
* The game build file storage
140+
*/
141141
readonly content: Content;
142142

143143
/**
144-
* The IAM role assumed by GameLift to access server build in S3.
145-
* If providing a custom role, it needs to trust the GameLift service principal (gamelift.amazonaws.com) and be granted sufficient permissions
146-
* to have Read access to a specific key content into a specific S3 bucket.
147-
* Below an example of required permission:
148-
* {
149-
* "Version": "2012-10-17",
150-
* "Statement": [{
151-
* "Effect": "Allow",
152-
* "Action": [
153-
* "s3:GetObject",
154-
* "s3:GetObjectVersion"
155-
* ],
156-
* "Resource": "arn:aws:s3:::bucket-name/object-name"
157-
* }]
158-
*}
159-
*
160-
* @see https://docs.aws.amazon.com/gamelift/latest/developerguide/security_iam_id-based-policy-examples.html#security_iam_id-based-policy-examples-access-storage-loc
161-
*
162-
* @default - a role will be created with default permissions.
163-
*/
144+
* The IAM role assumed by GameLift to access server build in S3.
145+
* If providing a custom role, it needs to trust the GameLift service principal (gamelift.amazonaws.com) and be granted sufficient permissions
146+
* to have Read access to a specific key content into a specific S3 bucket.
147+
* Below an example of required permission:
148+
* {
149+
* "Version": "2012-10-17",
150+
* "Statement": [{
151+
* "Effect": "Allow",
152+
* "Action": [
153+
* "s3:GetObject",
154+
* "s3:GetObjectVersion"
155+
* ],
156+
* "Resource": "arn:aws:s3:::bucket-name/object-name"
157+
* }]
158+
* }
159+
*
160+
* @see https://docs.aws.amazon.com/gamelift/latest/developerguide/security_iam_id-based-policy-examples.html#security_iam_id-based-policy-examples-access-storage-loc
161+
*
162+
* @default - a role will be created with default permissions.
163+
*/
164164
readonly role?: iam.IRole;
165165

166166
/**
@@ -182,7 +182,6 @@ export interface BuildProps {
182182
* @resource AWS::GameLift::Build
183183
*/
184184
export class Build extends BuildBase {
185-
186185
/**
187186
* Create a new Build from s3 content
188187
*/
@@ -202,15 +201,15 @@ export class Build extends BuildBase {
202201
}
203202

204203
/**
205-
* Import a build into CDK using its identifier
206-
*/
204+
* Import a build into CDK using its identifier
205+
*/
207206
static fromBuildId(scope: Construct, id: string, buildId: string): IBuild {
208207
return this.fromBuildAttributes(scope, id, { buildId });
209208
}
210209

211210
/**
212-
* Import a build into CDK using its ARN
213-
*/
211+
* Import a build into CDK using its ARN
212+
*/
214213
static fromBuildArn(scope: Construct, id: string, buildArn: string): IBuild {
215214
return this.fromBuildAttributes(scope, id, { buildArn });
216215
}

packages/@aws-cdk/aws-gamelift-alpha/lib/content.ts

+11-13
Original file line numberDiff line numberDiff line change
@@ -10,29 +10,28 @@ import { Construct } from 'constructs';
1010
*/
1111
export abstract class Content {
1212
/**
13-
* Game content as an S3 object.
14-
* @param bucket The S3 bucket
15-
* @param key The object key
16-
* @param objectVersion Optional S3 ob ject version
17-
*/
13+
* Game content as an S3 object.
14+
* @param bucket The S3 bucket
15+
* @param key The object key
16+
* @param objectVersion Optional S3 ob ject version
17+
*/
1818
public static fromBucket(bucket: s3.IBucket, key: string, objectVersion?: string): S3Content {
1919
return new S3Content(bucket, key, objectVersion);
2020
}
2121

2222
/**
23-
* Loads the game content from a local disk path.
24-
*
25-
* @param path Either a directory with the game content bundle or a .zip file
26-
*/
23+
* Loads the game content from a local disk path.
24+
*
25+
* @param path Either a directory with the game content bundle or a .zip file
26+
*/
2727
public static fromAsset(path: string, options?: s3_assets.AssetOptions): AssetContent {
2828
return new AssetContent(path, options);
2929
}
3030

3131
/**
32-
* Called when the Build is initialized to allow this object to bind
33-
*/
32+
* Called when the Build is initialized to allow this object to bind
33+
*/
3434
public abstract bind(scope: Construct, role: iam.IRole): ContentConfig;
35-
3635
}
3736

3837
/**
@@ -49,7 +48,6 @@ export interface ContentConfig {
4948
* Game content from an S3 archive.
5049
*/
5150
export class S3Content extends Content {
52-
5351
constructor(private readonly bucket: s3.IBucket, private key: string, private objectVersion?: string) {
5452
super();
5553
if (!bucket.bucketName) {

0 commit comments

Comments
 (0)