diff --git a/packages/core/src/awsService/appBuilder/explorer/openTemplate.ts b/packages/core/src/awsService/appBuilder/explorer/openTemplate.ts index 00ed697f6d3..4bc9b5e5b0c 100644 --- a/packages/core/src/awsService/appBuilder/explorer/openTemplate.ts +++ b/packages/core/src/awsService/appBuilder/explorer/openTemplate.ts @@ -7,7 +7,7 @@ import { CloudFormationTemplateRegistry } from '../../../shared/fs/templateRegis import { syncMementoRootKey } from '../../../shared/sam/sync' import { createExitPrompter } from '../../../shared/ui/common/exitPrompter' -import { createTemplatePrompter, TemplateItem } from '../../../shared/ui/sam/samTemplate' +import { createTemplatePrompter, TemplateItem } from '../../../shared/ui/sam/templatePrompter' import { Wizard } from '../../../shared/wizards/wizard' export interface OpenTemplateParams { diff --git a/packages/core/src/shared/sam/build.ts b/packages/core/src/shared/sam/build.ts index 21558394546..572d9a2f3f2 100644 --- a/packages/core/src/shared/sam/build.ts +++ b/packages/core/src/shared/sam/build.ts @@ -4,7 +4,7 @@ */ import * as vscode from 'vscode' -import { TemplateItem, createTemplatePrompter } from '../ui/sam/samTemplate' +import { TemplateItem, createTemplatePrompter } from '../ui/sam/templatePrompter' import { ChildProcess } from '../utilities/processUtils' import { addTelemetryEnvVar } from './cli/samCliInvokerUtils' import { Wizard } from '../wizards/wizard' diff --git a/packages/core/src/shared/sam/deploy.ts b/packages/core/src/shared/sam/deploy.ts index c3bb48c99b2..59997296ed1 100644 --- a/packages/core/src/shared/sam/deploy.ts +++ b/packages/core/src/shared/sam/deploy.ts @@ -22,11 +22,11 @@ import { CancellationError } from '../utilities/timeoutUtils' import { Wizard } from '../wizards/wizard' import { addTelemetryEnvVar } from './cli/samCliInvokerUtils' import { validateSamDeployConfig, SamConfig, writeSamconfigGlobal } from './config' -import { BucketSource, createBucketSourcePrompter, createBucketPrompter } from '../ui/sam/bucket' -import { createStackPrompter } from '../ui/sam/stack' -import { TemplateItem, createTemplatePrompter } from '../ui/sam/samTemplate' +import { BucketSource, createBucketSourcePrompter, createBucketPrompter } from '../ui/sam/bucketPrompter' +import { createStackPrompter } from '../ui/sam/stackPrompter' +import { TemplateItem, createTemplatePrompter } from '../ui/sam/templatePrompter' import { getProjectRoot, getRecentResponse, getSamCliPathAndVersion, getSource, updateRecentResponse } from './utils' -import { createDeployParamsSourcePrompter, ParamsSource } from '../ui/sam/paramsSource' +import { createDeployParamsSourcePrompter, ParamsSource } from '../ui/sam/paramsSourcePrompter' import { runInTerminal } from './processTerminal' export interface DeployParams { diff --git a/packages/core/src/shared/sam/sync.ts b/packages/core/src/shared/sam/sync.ts index 192492ea3d2..f5ecb567b36 100644 --- a/packages/core/src/shared/sam/sync.ts +++ b/packages/core/src/shared/sam/sync.ts @@ -45,11 +45,11 @@ import { getSource, updateRecentResponse, } from './utils' -import { TemplateItem, createTemplatePrompter } from '../ui/sam/samTemplate' -import { createStackPrompter } from '../ui/sam/stack' -import { ParamsSource, createSyncParamsSourcePrompter } from '../ui/sam/paramsSource' -import { createEcrPrompter } from '../ui/sam/ecr' -import { BucketSource, createBucketPrompter } from '../ui/sam/bucket' +import { TemplateItem, createTemplatePrompter } from '../ui/sam/templatePrompter' +import { createStackPrompter } from '../ui/sam/stackPrompter' +import { ParamsSource, createSyncParamsSourcePrompter } from '../ui/sam/paramsSourcePrompter' +import { createEcrPrompter } from '../ui/sam/ecrPrompter' +import { BucketSource, createBucketPrompter } from '../ui/sam/bucketPrompter' import { runInTerminal } from './processTerminal' export interface SyncParams { diff --git a/packages/core/src/shared/sam/utils.ts b/packages/core/src/shared/sam/utils.ts index 74bb3101e66..d45ecc260e1 100644 --- a/packages/core/src/shared/sam/utils.ts +++ b/packages/core/src/shared/sam/utils.ts @@ -8,7 +8,7 @@ import * as path from 'path' import { AWSTreeNodeBase } from '../treeview/nodes/awsTreeNodeBase' import { TreeNode, isTreeNode } from '../treeview/resourceTreeDataProvider' import * as CloudFormation from '../cloudformation/cloudformation' -import { TemplateItem } from '../ui/sam/samTemplate' +import { TemplateItem } from '../ui/sam/templatePrompter' import { RuntimeFamily, getFamily } from '../../lambda/models/samLambdaRuntime' import { SamCliSettings } from './cli/samCliSettings' import { ToolkitError } from '../errors' diff --git a/packages/core/src/shared/ui/sam/bucket.ts b/packages/core/src/shared/ui/sam/bucketPrompter.ts similarity index 100% rename from packages/core/src/shared/ui/sam/bucket.ts rename to packages/core/src/shared/ui/sam/bucketPrompter.ts diff --git a/packages/core/src/shared/ui/sam/ecr.ts b/packages/core/src/shared/ui/sam/ecrPrompter.ts similarity index 100% rename from packages/core/src/shared/ui/sam/ecr.ts rename to packages/core/src/shared/ui/sam/ecrPrompter.ts diff --git a/packages/core/src/shared/ui/sam/paramsSource.ts b/packages/core/src/shared/ui/sam/paramsSourcePrompter.ts similarity index 100% rename from packages/core/src/shared/ui/sam/paramsSource.ts rename to packages/core/src/shared/ui/sam/paramsSourcePrompter.ts diff --git a/packages/core/src/shared/ui/sam/stack.ts b/packages/core/src/shared/ui/sam/stackPrompter.ts similarity index 100% rename from packages/core/src/shared/ui/sam/stack.ts rename to packages/core/src/shared/ui/sam/stackPrompter.ts diff --git a/packages/core/src/shared/ui/sam/samTemplate.ts b/packages/core/src/shared/ui/sam/templatePrompter.ts similarity index 100% rename from packages/core/src/shared/ui/sam/samTemplate.ts rename to packages/core/src/shared/ui/sam/templatePrompter.ts diff --git a/packages/core/src/test/shared/sam/deploy.test.ts b/packages/core/src/test/shared/sam/deploy.test.ts index 0b54c462e9d..df9420e1dbc 100644 --- a/packages/core/src/test/shared/sam/deploy.test.ts +++ b/packages/core/src/test/shared/sam/deploy.test.ts @@ -30,9 +30,9 @@ import { UserAgent as __UserAgent } from '@smithy/types' import { SamAppLocation } from '../../../awsService/appBuilder/explorer/samProject' import { CancellationError } from '../../../shared/utilities/timeoutUtils' -import { TemplateItem } from '../../../shared/ui/sam/samTemplate' -import { ParamsSource } from '../../../shared/ui/sam/paramsSource' -import { BucketSource } from '../../../shared/ui/sam/bucket' +import { TemplateItem } from '../../../shared/ui/sam/templatePrompter' +import { ParamsSource } from '../../../shared/ui/sam/paramsSourcePrompter' +import { BucketSource } from '../../../shared/ui/sam/bucketPrompter' describe('DeployWizard', async function () { let sandbox: sinon.SinonSandbox diff --git a/packages/core/src/test/shared/sam/sync.test.ts b/packages/core/src/test/shared/sam/sync.test.ts index 44830c920cb..6b80a9b273e 100644 --- a/packages/core/src/test/shared/sam/sync.test.ts +++ b/packages/core/src/test/shared/sam/sync.test.ts @@ -54,14 +54,12 @@ import { RegionNode } from '../../../awsexplorer/regionNode' import { getProjectRootUri } from '../../../shared/sam/utils' import { AppNode } from '../../../awsService/appBuilder/explorer/nodes/appNode' import * as Cfn from '../../../shared/cloudformation/cloudformation' -//import { beforeEach } from 'mocha' import { getWorkspaceFolder, TestFolder } from '../../testUtil' -import { TemplateItem } from '../../../shared/ui/sam/samTemplate' -import { ParamsSource } from '../../../shared/ui/sam/paramsSource' +import { TemplateItem } from '../../../shared/ui/sam/templatePrompter' +import { ParamsSource } from '../../../shared/ui/sam/paramsSourcePrompter' import { CloudFormationTemplateRegistry } from '../../../shared/fs/templateRegistry' import { samconfigCompleteData, samconfigInvalidData, validTemplateData } from '../../shared/sam/samTestUtils' -//import { beforeEach } from 'mocha' import { assertTelemetry, assertTelemetryCurried } from '../../testUtil' import { PrompterTester } from '../wizards/prompterTester' import { createTestRegionProvider } from '../regions/testUtil' diff --git a/packages/core/src/test/shared/sam/utils.test.ts b/packages/core/src/test/shared/sam/utils.test.ts index 71a26998534..a4c7056a64f 100644 --- a/packages/core/src/test/shared/sam/utils.test.ts +++ b/packages/core/src/test/shared/sam/utils.test.ts @@ -20,7 +20,7 @@ import { RegionNode } from '../../../awsexplorer/regionNode' import { Region } from '../../../shared/regions/endpoints' import { RegionProvider, ToolkitError } from '../../../shared' import { DeployedResource, DeployedResourceNode } from '../../../awsService/appBuilder/explorer/nodes/deployedNode' -import { TemplateItem } from '../../../shared/ui/sam/samTemplate' +import { TemplateItem } from '../../../shared/ui/sam/templatePrompter' import { SamCliInfoInvocation } from '../../../shared/sam/cli/samCliInfo' import { SamCliSettings } from '../../../shared/sam/cli/samCliSettings' import { telemetry } from '../../../shared/telemetry' diff --git a/packages/core/src/test/shared/ui/sam/bucket.test.ts b/packages/core/src/test/shared/ui/sam/bucketPrompter.test.ts similarity index 99% rename from packages/core/src/test/shared/ui/sam/bucket.test.ts rename to packages/core/src/test/shared/ui/sam/bucketPrompter.test.ts index e140b3312f7..b141f928057 100644 --- a/packages/core/src/test/shared/ui/sam/bucket.test.ts +++ b/packages/core/src/test/shared/ui/sam/bucketPrompter.test.ts @@ -8,7 +8,7 @@ import { S3 } from 'aws-sdk' import sinon from 'sinon' import { DefaultS3Client } from '../../../../shared/clients/s3Client' import * as SamUtilsModule from '../../../../shared/sam/utils' -import { createBucketPrompter } from '../../../../shared/ui/sam/bucket' +import { createBucketPrompter } from '../../../../shared/ui/sam/bucketPrompter' import { AsyncCollection } from '../../../../shared/utilities/asyncCollection' import { RequiredProps } from '../../../../shared/utilities/tsUtils' diff --git a/packages/core/src/test/shared/ui/sam/ecr.test.ts b/packages/core/src/test/shared/ui/sam/ecrPrompter.test.ts similarity index 99% rename from packages/core/src/test/shared/ui/sam/ecr.test.ts rename to packages/core/src/test/shared/ui/sam/ecrPrompter.test.ts index afb795bc50d..61cc57675f4 100644 --- a/packages/core/src/test/shared/ui/sam/ecr.test.ts +++ b/packages/core/src/test/shared/ui/sam/ecrPrompter.test.ts @@ -10,7 +10,7 @@ import { DefaultEcrClient, EcrRepository } from '../../../../shared/clients/ecrC import { samSyncUrl } from '../../../../shared/constants' import * as SamUtilsModule from '../../../../shared/sam/utils' import * as ButtonsModule from '../../../../shared/ui/buttons' -import { createEcrPrompter } from '../../../../shared/ui/sam/ecr' +import { createEcrPrompter } from '../../../../shared/ui/sam/ecrPrompter' import { intoCollection } from '../../../../shared/utilities/collectionUtils' describe('createEcrPrompter', () => { diff --git a/packages/core/src/test/shared/ui/sam/paramSource.test.ts b/packages/core/src/test/shared/ui/sam/paramsSourcePrompter.test.ts similarity index 98% rename from packages/core/src/test/shared/ui/sam/paramSource.test.ts rename to packages/core/src/test/shared/ui/sam/paramsSourcePrompter.test.ts index 7ab6bd44c3b..e935e59acca 100644 --- a/packages/core/src/test/shared/ui/sam/paramSource.test.ts +++ b/packages/core/src/test/shared/ui/sam/paramsSourcePrompter.test.ts @@ -8,7 +8,7 @@ import { createDeployParamsSourcePrompter, createSyncParamsSourcePrompter, ParamsSource, -} from '../../../../shared/ui/sam/paramsSource' +} from '../../../../shared/ui/sam/paramsSourcePrompter' import { DataQuickPickItem } from '../../../../shared/ui/pickerPrompter' describe('createSyncParamsSourcePrompter', () => { diff --git a/packages/core/src/test/shared/ui/sam/stack.test.ts b/packages/core/src/test/shared/ui/sam/stackPrompter.test.ts similarity index 99% rename from packages/core/src/test/shared/ui/sam/stack.test.ts rename to packages/core/src/test/shared/ui/sam/stackPrompter.test.ts index 1b962c2cb6e..9b7470902a9 100644 --- a/packages/core/src/test/shared/ui/sam/stack.test.ts +++ b/packages/core/src/test/shared/ui/sam/stackPrompter.test.ts @@ -12,7 +12,7 @@ import * as SamUtilsModule from '../../../../shared/sam/utils' import * as ButtonsModule from '../../../../shared/ui/buttons' import { DefaultCloudFormationClient } from '../../../../shared/clients/cloudFormationClient' import { samSyncUrl } from '../../../../shared/constants' -import { createStackPrompter } from '../../../../shared/ui/sam/stack' +import { createStackPrompter } from '../../../../shared/ui/sam/stackPrompter' import { intoCollection } from '../../../../shared/utilities/collectionUtils' describe('createStackPrompter', () => { diff --git a/packages/core/src/test/shared/ui/sam/samTemplate.test.ts b/packages/core/src/test/shared/ui/sam/templatePrompter.test.ts similarity index 94% rename from packages/core/src/test/shared/ui/sam/samTemplate.test.ts rename to packages/core/src/test/shared/ui/sam/templatePrompter.test.ts index 3667c48161b..8b9fe0a59ba 100644 --- a/packages/core/src/test/shared/ui/sam/samTemplate.test.ts +++ b/packages/core/src/test/shared/ui/sam/templatePrompter.test.ts @@ -11,7 +11,7 @@ import * as Cfn from '../../../../shared/cloudformation/cloudformation' import { CloudFormationTemplateRegistry } from '../../../../shared/fs/templateRegistry' import { WatchedItem } from '../../../../shared/fs/watchedFiles' import * as SamUtilsModule from '../../../../shared/sam/utils' -import { createTemplatePrompter } from '../../../../shared/ui/sam/samTemplate' +import { createTemplatePrompter } from '../../../../shared/ui/sam/templatePrompter' import { assertEqualPaths } from '../../../testUtil' describe('createTemplatePrompter', () => { @@ -43,10 +43,8 @@ describe('createTemplatePrompter', () => { const prompter = createTemplatePrompter(registry, mementoRootKey) - // Assert assert.strictEqual(prompter.quickPick.items.length, 2) assertEqualPaths(prompter.quickPick.items[0].label, '/path/to/template1.yaml') - //assert.strictEqual(prompter.quickPick.items[0].label, '/path/to/template1.yaml') assertEqualPaths(prompter.quickPick.items[1].label, '/path/to/template2.yaml') assert.strictEqual(prompter.quickPick.title, 'Select a SAM/CloudFormation Template') assert.strictEqual(prompter.quickPick.placeholder, 'Select a SAM/CloudFormation Template')