Skip to content

Commit 166183c

Browse files
committed
rename createBucketNamePrompter
1 parent 726d3e5 commit 166183c

File tree

4 files changed

+12
-12
lines changed

4 files changed

+12
-12
lines changed

packages/core/src/shared/sam/deploy.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ import { CancellationError } from '../utilities/timeoutUtils'
2222
import { Wizard } from '../wizards/wizard'
2323
import { addTelemetryEnvVar } from './cli/samCliInvokerUtils'
2424
import { validateSamDeployConfig, SamConfig, writeSamconfigGlobal } from './config'
25-
import { BucketSource, createBucketSourcePrompter, createBucketPrompter } from '../ui/sam/bucketPrompter'
25+
import { BucketSource, createBucketSourcePrompter, createBucketNamePrompter } from '../ui/sam/bucketPrompter'
2626
import { createStackPrompter } from '../ui/sam/stackPrompter'
2727
import { TemplateItem, createTemplatePrompter } from '../ui/sam/templatePrompter'
2828
import { getProjectRoot, getRecentResponse, getSamCliPathAndVersion, getSource, updateRecentResponse } from './utils'
@@ -109,7 +109,7 @@ export class DeployWizard extends Wizard<DeployParams> {
109109
paramsSource === ParamsSource.Specify || paramsSource === ParamsSource.SpecifyAndSave,
110110
})
111111
this.form.bucketName.bindPrompter(
112-
({ region }) => createBucketPrompter(new DefaultS3Client(region!), deployMementoRootKey),
112+
({ region }) => createBucketNamePrompter(new DefaultS3Client(region!), deployMementoRootKey),
113113
{
114114
showWhen: ({ bucketSource }) => bucketSource === BucketSource.UserProvided,
115115
}
@@ -135,7 +135,7 @@ export class DeployWizard extends Wizard<DeployParams> {
135135
paramsSource === ParamsSource.Specify || paramsSource === ParamsSource.SpecifyAndSave,
136136
})
137137
this.form.bucketName.bindPrompter(
138-
({ region }) => createBucketPrompter(new DefaultS3Client(region!), deployMementoRootKey),
138+
({ region }) => createBucketNamePrompter(new DefaultS3Client(region!), deployMementoRootKey),
139139
{
140140
showWhen: ({ bucketSource }) => bucketSource === BucketSource.UserProvided,
141141
}
@@ -168,7 +168,7 @@ export class DeployWizard extends Wizard<DeployParams> {
168168
paramsSource === ParamsSource.Specify || paramsSource === ParamsSource.SpecifyAndSave,
169169
})
170170
this.form.bucketName.bindPrompter(
171-
({ region }) => createBucketPrompter(new DefaultS3Client(region!), deployMementoRootKey),
171+
({ region }) => createBucketNamePrompter(new DefaultS3Client(region!), deployMementoRootKey),
172172
{
173173
showWhen: ({ bucketSource }) => bucketSource === BucketSource.UserProvided,
174174
}
@@ -198,7 +198,7 @@ export class DeployWizard extends Wizard<DeployParams> {
198198
paramsSource === ParamsSource.Specify || paramsSource === ParamsSource.SpecifyAndSave,
199199
})
200200
this.form.bucketName.bindPrompter(
201-
({ region }) => createBucketPrompter(new DefaultS3Client(region!), deployMementoRootKey),
201+
({ region }) => createBucketNamePrompter(new DefaultS3Client(region!), deployMementoRootKey),
202202
{
203203
showWhen: ({ bucketSource }) => bucketSource === BucketSource.UserProvided,
204204
}

packages/core/src/shared/sam/sync.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ import { TemplateItem, createTemplatePrompter } from '../ui/sam/templatePrompter
4949
import { createStackPrompter } from '../ui/sam/stackPrompter'
5050
import { ParamsSource, createSyncParamsSourcePrompter } from '../ui/sam/paramsSourcePrompter'
5151
import { createEcrPrompter } from '../ui/sam/ecrPrompter'
52-
import { BucketSource, createBucketPrompter } from '../ui/sam/bucketPrompter'
52+
import { BucketSource, createBucketNamePrompter } from '../ui/sam/bucketPrompter'
5353
import { runInTerminal } from './processTerminal'
5454

5555
export interface SyncParams {
@@ -175,7 +175,7 @@ export class SyncWizard extends Wizard<SyncParams> {
175175
)
176176

177177
this.form.bucketName.bindPrompter(
178-
({ region }) => createBucketPrompter(new DefaultS3Client(region!), syncMementoRootKey),
178+
({ region }) => createBucketNamePrompter(new DefaultS3Client(region!), syncMementoRootKey),
179179
{
180180
showWhen: ({ paramsSource }) =>
181181
paramsSource === ParamsSource.Specify || paramsSource === ParamsSource.SpecifyAndSave,

packages/core/src/shared/ui/sam/bucketPrompter.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ export function createBucketSourcePrompter() {
3737
})
3838
}
3939

40-
export function createBucketPrompter(client: DefaultS3Client, mementoRootKey: string) {
40+
export function createBucketNamePrompter(client: DefaultS3Client, mementoRootKey: string) {
4141
const recentBucket = getRecentResponse(mementoRootKey, client.regionCode, 'bucketName')
4242
const items = client.listBucketsIterable().map((b) => [
4343
{

packages/core/src/test/shared/ui/sam/bucketPrompter.test.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,11 @@ import { S3 } from 'aws-sdk'
88
import sinon from 'sinon'
99
import { DefaultS3Client } from '../../../../shared/clients/s3Client'
1010
import * as SamUtilsModule from '../../../../shared/sam/utils'
11-
import { createBucketPrompter } from '../../../../shared/ui/sam/bucketPrompter'
11+
import { createBucketNamePrompter } from '../../../../shared/ui/sam/bucketPrompter'
1212
import { AsyncCollection } from '../../../../shared/utilities/asyncCollection'
1313
import { RequiredProps } from '../../../../shared/utilities/tsUtils'
1414

15-
describe('createBucketPrompter', () => {
15+
describe('createBucketNamePrompter', () => {
1616
let sandbox: sinon.SinonSandbox
1717
const s3Client = new DefaultS3Client('us-east-1', 'aws')
1818
const mementoRootKey = 'samcli.deploy.params'
@@ -39,7 +39,7 @@ describe('createBucketPrompter', () => {
3939
sandbox.stub(SamUtilsModule, 'getRecentResponse').returns(undefined) // Mock recent bucket
4040

4141
// Act
42-
const prompter = createBucketPrompter(s3Client, mementoRootKey)
42+
const prompter = createBucketNamePrompter(s3Client, mementoRootKey)
4343

4444
// Assert
4545
assert.ok(stub.calledOnce)
@@ -63,7 +63,7 @@ describe('createBucketPrompter', () => {
6363
sandbox.stub(SamUtilsModule, 'getRecentResponse').returns(undefined) // Mock recent bucket
6464

6565
// Act
66-
const prompter = createBucketPrompter(s3Client, mementoRootKey)
66+
const prompter = createBucketNamePrompter(s3Client, mementoRootKey)
6767

6868
// Assert
6969
assert.ok(stub.calledOnce)

0 commit comments

Comments
 (0)