Skip to content

Commit 1a2bd6d

Browse files
authored
chore: Corrected typos (#24794)
Spelling updates, no logic changes. ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
1 parent 20d0881 commit 1a2bd6d

31 files changed

+48
-48
lines changed

packages/@aws-cdk/core/lib/app.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,7 @@ export class App extends Stage {
181181

182182
const autoSynth = props.autoSynth ?? cxapi.OUTDIR_ENV in process.env;
183183
if (autoSynth) {
184-
// synth() guarantuees it will only execute once, so a default of 'true'
184+
// synth() guarantees it will only execute once, so a default of 'true'
185185
// doesn't bite manual calling of the function.
186186
process.once('beforeExit', () => this.synth());
187187
}

packages/@aws-cdk/core/lib/assets.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -330,7 +330,7 @@ export interface FileAssetLocation {
330330
/**
331331
* Like `s3ObjectUrl`, but not suitable for CloudFormation consumption
332332
*
333-
* If there are placeholders in the S3 URL, they will be returned unreplaced
333+
* If there are placeholders in the S3 URL, they will be returned un-replaced
334334
* and un-evaluated.
335335
*
336336
* @default - This feature cannot be used

packages/@aws-cdk/core/lib/bundling.ts

+5-5
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ export enum BundlingOutput {
155155

156156
/**
157157
* If the bundling output directory contains a single archive file (zip or jar)
158-
* it will be used as the bundle output as-is. Otherwise all the files in the bundling output directory will be zipped.
158+
* it will be used as the bundle output as-is. Otherwise, all the files in the bundling output directory will be zipped.
159159
*/
160160
AUTO_DISCOVER = 'auto-discover',
161161
}
@@ -362,7 +362,7 @@ export class DockerImage extends BundlingDockerImage {
362362
public readonly image: string;
363363

364364
constructor(image: string, _imageHash?: string) {
365-
// It is preferrable for the deprecated class to inherit a non-deprecated class.
365+
// It is preferable for the deprecated class to inherit a non-deprecated class.
366366
// However, in this case, the opposite has occurred which is incompatible with
367367
// a deprecation feature. See https://github.com/aws/jsii/issues/3102.
368368
const deprecated = quiet();
@@ -379,7 +379,7 @@ export class DockerImage extends BundlingDockerImage {
379379
* @return The overridden image name if set or image hash name in that order
380380
*/
381381
public toJSON() {
382-
// It is preferrable for the deprecated class to inherit a non-deprecated class.
382+
// It is preferable for the deprecated class to inherit a non-deprecated class.
383383
// However, in this case, the opposite has occurred which is incompatible with
384384
// a deprecation feature. See https://github.com/aws/jsii/issues/3102.
385385
const deprecated = quiet();
@@ -394,7 +394,7 @@ export class DockerImage extends BundlingDockerImage {
394394
* Runs a Docker image
395395
*/
396396
public run(options: DockerRunOptions = {}) {
397-
// It is preferrable for the deprecated class to inherit a non-deprecated class.
397+
// It is preferable for the deprecated class to inherit a non-deprecated class.
398398
// However, in this case, the opposite has occurred which is incompatible with
399399
// a deprecation feature. See https://github.com/aws/jsii/issues/3102.
400400
const deprecated = quiet();
@@ -415,7 +415,7 @@ export class DockerImage extends BundlingDockerImage {
415415
* @returns the destination path
416416
*/
417417
public cp(imagePath: string, outputPath?: string): string {
418-
// It is preferrable for the deprecated class to inherit a non-deprecated class.
418+
// It is preferable for the deprecated class to inherit a non-deprecated class.
419419
// However, in this case, the opposite has occurred which is incompatible with
420420
// a deprecation feature. See https://github.com/aws/jsii/issues/3102.
421421
const deprecated = quiet();

packages/@aws-cdk/core/lib/cfn-condition.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ export class CfnCondition extends CfnElement implements ICfnConditionExpression,
8989
export interface ICfnConditionExpression extends IResolvable {}
9090

9191
/**
92-
* Interface to specify certain functions as Service Catalog rule-specifc.
92+
* Interface to specify certain functions as Service Catalog rule-specific.
9393
* These functions can only be used in ``Rules`` section of template.
9494
*/
9595
export interface ICfnRuleConditionExpression extends ICfnConditionExpression {

packages/@aws-cdk/core/lib/cfn-element.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -177,14 +177,14 @@ export abstract class CfnElement extends Construct {
177177
}
178178

179179
/**
180-
* Base class for referenceable CloudFormation constructs which are not Resources
180+
* Base class for referencable CloudFormation constructs which are not Resources
181181
*
182182
* These constructs are things like Conditions and Parameters, can be
183183
* referenced by taking the `.ref` attribute.
184184
*
185185
* Resource constructs do not inherit from CfnRefElement because they have their
186186
* own, more specific types returned from the .ref attribute. Also, some
187-
* resources aren't referenceable at all (such as BucketPolicies or GatewayAttachments).
187+
* resources aren't referencable at all (such as BucketPolicies or GatewayAttachments).
188188
*/
189189
export abstract class CfnRefElement extends CfnElement {
190190
/**

packages/@aws-cdk/core/lib/cfn-fn.ts

+6-6
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ import { Token } from './token';
1616
export class Fn {
1717
/**
1818
* The ``Ref`` intrinsic function returns the value of the specified parameter or resource.
19-
* Note that it doesn't validate the logicalName, it mainly serves paremeter/resource reference defined in a ``CfnInclude`` template.
19+
* Note that it doesn't validate the logicalName, it mainly serves parameter/resource reference defined in a ``CfnInclude`` template.
2020
* @param logicalName The logical name of a parameter/resource for which you want to retrieve its value.
2121
*/
2222
public static ref(logicalName: string): string {
@@ -99,7 +99,7 @@ export class Fn {
9999
* @returns a token represented as a string array
100100
*/
101101
public static split(delimiter: string, source: string, assumedLength?: number): string[] {
102-
// short-circut if source is not a token
102+
// short-circuit if source is not a token
103103
if (!Token.isUnresolved(source)) {
104104
return source.split(delimiter);
105105
}
@@ -420,7 +420,7 @@ export class Fn {
420420
* @param object The object or array to stringify
421421
*/
422422
public static toJsonString(object: any): string {
423-
// short-circut if object is not a token
423+
// short-circuit if object is not a token
424424
if (!Token.isUnresolved(object)) {
425425
return JSON.stringify(object);
426426
}
@@ -434,7 +434,7 @@ export class Fn {
434434
* @param array The array you want to return the number of elements from
435435
*/
436436
public static len(array: any): number {
437-
// short-circut if array is not a token
437+
// short-circuit if array is not a token
438438
if (!Token.isUnresolved(array)) {
439439
if (!Array.isArray(array)) {
440440
throw new Error('Fn.length() needs an array');
@@ -630,7 +630,7 @@ class FnCidr extends FnBase {
630630
*/
631631
constructor(ipBlock: any, count: any, sizeMask?: any) {
632632
if (count < 1 || count > 256) {
633-
throw new Error(`Fn::Cidr's count attribute must be betwen 1 and 256, ${count} was provided.`);
633+
throw new Error(`Fn::Cidr's count attribute must be between 1 and 256, ${count} was provided.`);
634634
}
635635
super('Fn::Cidr', [ipBlock, count, sizeMask]);
636636
}
@@ -851,7 +851,7 @@ class FnJoin implements IResolvable {
851851
}
852852

853853
/**
854-
* Optimization: if an Fn::Join is nested in another one and they share the same delimiter, then flatten it up. Also,
854+
* Optimization: if a Fn::Join is nested in another one and they share the same delimiter, then flatten it up. Also,
855855
* if two concatenated elements are literal strings (not tokens), then pre-concatenate them with the delimiter, to
856856
* generate shorter output.
857857
*/

packages/@aws-cdk/core/lib/cfn-json.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ export class CfnJson extends Construct implements IResolvable {
6363
}
6464

6565
/**
66-
* This is required in case someone JSON.stringifys an object which refrences
66+
* This is required in case someone JSON.stringifys an object which references
6767
* this object. Otherwise, we'll get a cyclic JSON reference.
6868
*/
6969
public toJSON() {

packages/@aws-cdk/core/lib/cfn-resource.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -221,7 +221,7 @@ export class CfnResource extends CfnRefElement {
221221
* template.
222222
*
223223
* @param path - The path of the property, you can use dot notation to
224-
* override values in complex types. Any intermdediate keys
224+
* override values in complex types. Any intermediate keys
225225
* will be created as needed.
226226
* @param value - The value. Could be primitive or complex.
227227
*/

packages/@aws-cdk/core/lib/duration.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ export class Duration {
6363
* Parse a period formatted according to the ISO 8601 standard
6464
*
6565
* @see https://www.iso.org/standard/70907.html
66-
* @param duration an ISO-formtted duration to be parsed.
66+
* @param duration an ISO-formatted duration to be parsed.
6767
* @returns the parsed `Duration`.
6868
*/
6969
public static parse(duration: string): Duration {

packages/@aws-cdk/core/lib/expiration.ts

+3-3
Original file line numberDiff line numberDiff line change
@@ -40,21 +40,21 @@ export class Expiration {
4040
}
4141

4242
/**
43-
* Exipration Value in a formatted Unix Epoch Time in seconds
43+
* Expiration Value in a formatted Unix Epoch Time in seconds
4444
*/
4545
public toEpoch(): number {
4646
return Math.round(this.date.getTime() / 1000);
4747
}
4848
/**
49-
* Check if Exipiration expires before input
49+
* Check if Expiration expires before input
5050
* @param t the duration to check against
5151
*/
5252
public isBefore(t: Duration): boolean {
5353
return this.date < new Date(Date.now() + t.toMilliseconds());
5454
}
5555

5656
/**
57-
* Check if Exipiration expires after input
57+
* Check if Expiration expires after input
5858
* @param t the duration to check against
5959
*/
6060
public isAfter( t: Duration ): boolean {

packages/@aws-cdk/core/lib/lazy.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -336,7 +336,7 @@ abstract class LazyBase<A> implements IResolvable {
336336
private _cached?: A;
337337

338338
constructor(private readonly producer: ILazyProducer<A>, private readonly cache: boolean) {
339-
// Stack trace capture is conditionned to `debugModeEnabled()`, because
339+
// Stack trace capture is conditioned to `debugModeEnabled()`, because
340340
// lazies can be created in a fairly thrashy way, and the stack traces are
341341
// large and slow to obtain; but are mostly useful only when debugging a
342342
// resolution issue.

packages/@aws-cdk/core/lib/nested-stack.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -211,9 +211,9 @@ export class NestedStack extends Stack {
211211
}
212212

213213
// When adding tags to nested stack, the tags need to be added to all the resources in
214-
// in nested stack, which is handled by the `tags` property, But to tag the
214+
// nested stack, which is handled by the `tags` property, But to tag the
215215
// tags have to be added in the parent stack CfnStack resource. The CfnStack resource created
216-
// by this class dont share the same TagManager as that of the one exposed by the `tag` property of the
216+
// by this class don't share the same TagManager as that of the one exposed by the `tag` property of the
217217
// class, all the tags need to be copied to the CfnStack resource before synthesizing the resource.
218218
// See https://github.com/aws/aws-cdk/pull/19128
219219
Object.entries(this.tags.tagValues()).forEach(([key, value]) => {

packages/@aws-cdk/core/lib/physical-name.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ export class PhysicalName {
1313
* If you are certain that a resource will be referenced across environments,
1414
* you may also specify an explicit physical name for it. This option is
1515
* mostly designed for reusable constructs which may or may not be referenced
16-
* acrossed environments.
16+
* across environments.
1717
*/
1818
public static readonly GENERATE_IF_NEEDED = Token.asString(new GeneratedWhenNeededMarker());
1919

packages/@aws-cdk/core/lib/private/cfn-reference.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ export class CfnReference extends Reference {
7171
}
7272

7373
/**
74-
* Return a CfnReference that references a pseudo referencd
74+
* Return a CfnReference that references a pseudo referenced
7575
*/
7676
public static forPseudo(pseudoName: string, scope: Construct) {
7777
return CfnReference.singletonReference(scope, `Pseudo:${pseudoName}`, undefined, () => {

packages/@aws-cdk/core/lib/private/cfn-utils-provider.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ export abstract class CfnUtils {
2222
/**
2323
* Encode a structure to JSON at CloudFormation deployment time
2424
*
25-
* This would have been suitable for the JSON-encoding of abitrary structures, however:
25+
* This would have been suitable for the JSON-encoding of arbitrary structures, however:
2626
*
2727
* - It uses a custom resource to do the encoding, and we'd rather not use a custom
2828
* resource if we can avoid it.

packages/@aws-cdk/core/lib/private/cloudformation-lang.ts

+3-3
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ export class CloudFormationLang {
5555
}
5656

5757
/**
58-
* Return a CFN intrinsic mass concatting any number of CloudFormation expressions
58+
* Return a CFN intrinsic mass concatenating any number of CloudFormation expressions
5959
*/
6060
function fnJoinConcat(parts: any[]) {
6161
return { 'Fn::Join': ['', minimalCloudFormationJoin('', parts)] };
@@ -110,7 +110,7 @@ function fnJoinConcat(parts: any[]) {
110110
* values is lost).
111111
*
112112
* To fix this, "type hints" have been added to the `resolve()` function,
113-
* giving an idea of the type of the source value for compplex result values.
113+
* giving an idea of the type of the source value for complex result values.
114114
* This only works for objects (not strings and numbers) but fortunately
115115
* we only care about the types of intrinsics, which are always complex values.
116116
*
@@ -163,7 +163,7 @@ function tokenAwareStringify(root: any, space: number, ctx: IResolveContext) {
163163
if (obj === undefined) { return; }
164164

165165
if (Token.isUnresolved(obj)) {
166-
throw new Error('This shouldnt happen anymore');
166+
throw new Error("This shouldn't happen anymore");
167167
}
168168
if (Array.isArray(obj)) {
169169
return renderCollection('[', ']', obj, recurse);

packages/@aws-cdk/core/lib/private/logical-id.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ export class LogicalIDs {
5252
/**
5353
* Throw an error if not all renames have been used
5454
*
55-
* This is to assure that users didn't make typoes when registering renames.
55+
* This is to assure that users didn't make typos when registering renames.
5656
*/
5757
public assertAllRenamesApplied() {
5858
const keys = new Set<string>();

packages/@aws-cdk/core/lib/private/prepare-app.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ export function prepareApp(root: IConstruct) {
4444

4545
// ▷[ Given the legacy synthesizer and a 3-or-deeper nesting of nested stacks ]
4646
//
47-
// Adding nested stack assets may haved added CfnParameters to the top-level
47+
// Adding nested stack assets may have added CfnParameters to the top-level
4848
// stack which are referenced in a deeper-level stack. The values of these
4949
// parameters need to be carried through to the right location via Nested
5050
// Stack parameters, which `resolveReferences()` will do.

packages/@aws-cdk/core/lib/removal-policy.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ export interface RemovalPolicyOptions {
5454
/**
5555
* The default policy to apply in case the removal policy is not defined.
5656
*
57-
* @default - Default value is resource specific. To determine the default value for a resoure,
57+
* @default - Default value is resource specific. To determine the default value for a resource,
5858
* please consult that specific resource's documentation.
5959
*/
6060
readonly default?: RemovalPolicy;

packages/@aws-cdk/core/lib/resource.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,7 @@ export abstract class Resource extends Construct implements IResource {
165165
this.stack = Stack.of(this);
166166

167167
const parsedArn = props.environmentFromArn ?
168-
// Since we only want the region and account, NO_RESOURE_NAME is good enough
168+
// Since we only want the region and account, NO_RESOURCE_NAME is good enough
169169
this.stack.splitArn(props.environmentFromArn, ArnFormat.NO_RESOURCE_NAME)
170170
: undefined;
171171
this.env = {
@@ -201,7 +201,7 @@ export abstract class Resource extends Construct implements IResource {
201201
* Called when this resource is referenced across environments
202202
* (account/region) to order to request that a physical name will be generated
203203
* for this resource during synthesis, so the resource can be referenced
204-
* through it's absolute name/arn.
204+
* through its absolute name/arn.
205205
*
206206
* @internal
207207
*/

packages/@aws-cdk/core/lib/runtime.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -344,7 +344,7 @@ export function requireProperty(props: { [name: string]: any }, name: string, co
344344
/**
345345
* Validates if any of the given validators matches
346346
*
347-
* We add either/or words to the front of the error mesages so that they read
347+
* We add either/or words to the front of the error messages so that they read
348348
* more nicely. Example:
349349
*
350350
* Properties not correct for 'FunctionProps'

packages/@aws-cdk/core/lib/secret-value.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ export class SecretValue extends Intrinsic {
104104
}
105105

106106
if (options.versionStage && options.versionId) {
107-
throw new Error(`verionStage: '${options.versionStage}' and versionId: '${options.versionId}' were both provided but only one is allowed`);
107+
throw new Error(`versionStage: '${options.versionStage}' and versionId: '${options.versionId}' were both provided but only one is allowed`);
108108
}
109109

110110
const parts = [

packages/@aws-cdk/core/lib/stack-synthesizers/asset-manifest-builder.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import { Stack } from '../stack';
99
/**
1010
* Build an asset manifest from assets added to a stack
1111
*
12-
* This class does not need to be used by app builders; it is only nessary for building Stack Synthesizers.
12+
* This class does not need to be used by app builders; it is only necessary for building Stack Synthesizers.
1313
*/
1414
export class AssetManifestBuilder {
1515
private readonly files: NonNullable<cxschema.AssetManifest['files']> = {};

packages/@aws-cdk/core/lib/stack-synthesizers/cli-credentials-synthesizer.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ export interface CliCredentialsStackSynthesizerProps {
4242
* Qualifier to disambiguate multiple environments in the same account
4343
*
4444
* You can use this and leave the other naming properties empty if you have deployed
45-
* the bootstrap environment with standard names but only differnet qualifiers.
45+
* the bootstrap environment with standard names but only different qualifiers.
4646
*
4747
* @default - Value of context key '@aws-cdk/core:bootstrapQualifier' if set, otherwise `DefaultStackSynthesizer.DEFAULT_QUALIFIER`
4848
*/

packages/@aws-cdk/core/lib/stack-synthesizers/default-synthesizer.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,7 @@ export interface DefaultStackSynthesizerProps {
169169
* Qualifier to disambiguate multiple environments in the same account
170170
*
171171
* You can use this and leave the other naming properties empty if you have deployed
172-
* the bootstrap environment with standard names but only differnet qualifiers.
172+
* the bootstrap environment with standard names but only different qualifiers.
173173
*
174174
* @default - Value of context key '@aws-cdk/core:bootstrapQualifier' if set, otherwise `DefaultStackSynthesizer.DEFAULT_QUALIFIER`
175175
*/

packages/@aws-cdk/core/lib/stack-synthesizers/legacy.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ const ASSETS_ECR_REPOSITORY_NAME_OVERRIDE_CONTEXT_KEY = 'assets-ecr-repository-n
3636
* you must use the `DefaultStackSynthesizer`.
3737
* - Each asset will take up a CloudFormation Parameter in your template. Keep in
3838
* mind that there is a maximum of 200 parameters in a CloudFormation template.
39-
* To use determinstic asset locations instead, use `CliCredentialsStackSynthesizer`.
39+
* To use deterministic asset locations instead, use `CliCredentialsStackSynthesizer`.
4040
*
4141
* Be aware that your CLI credentials must be valid for the duration of the
4242
* entire deployment. If you are using session credentials, make sure the

packages/@aws-cdk/core/lib/stack-synthesizers/stack-synthesizer.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ export abstract class StackSynthesizer implements IStackSynthesizer {
4949
*
5050
* The synthesizer must rely on some out-of-band mechanism to make sure the given files
5151
* are actually placed in the returned location before the deployment happens. This can
52-
* be by writing the intructions to the asset manifest (for use by the `cdk-assets` tool),
52+
* be by writing the instructions to the asset manifest (for use by the `cdk-assets` tool),
5353
* by relying on the CLI to upload files (legacy behavior), or some other operator controlled
5454
* mechanism.
5555
*/
@@ -62,7 +62,7 @@ export abstract class StackSynthesizer implements IStackSynthesizer {
6262
*
6363
* The synthesizer must rely on some out-of-band mechanism to make sure the given files
6464
* are actually placed in the returned location before the deployment happens. This can
65-
* be by writing the intructions to the asset manifest (for use by the `cdk-assets` tool),
65+
* be by writing the instructions to the asset manifest (for use by the `cdk-assets` tool),
6666
* by relying on the CLI to upload files (legacy behavior), or some other operator controlled
6767
* mechanism.
6868
*/

packages/@aws-cdk/core/lib/stack-trace.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import { debugModeEnabled } from './debug';
55
*
66
* Stack traces are often invaluable tools to help diagnose problems, however
77
* their capture is a rather expensive operation, and the stack traces can be
8-
* large. Consequently, users are stronly advised to condition capturing stack
8+
* large. Consequently, users are strongly advised to condition capturing stack
99
* traces to specific user opt-in.
1010
*
1111
* Stack traces will only be captured if the `CDK_DEBUG` environment variable

0 commit comments

Comments
 (0)