Skip to content

Commit eccc7bd

Browse files
author
Vandita Patidar
committed
Review revision
1 parent cf4928f commit eccc7bd

File tree

5 files changed

+8
-17
lines changed

5 files changed

+8
-17
lines changed

packages/core/src/awsService/appBuilder/activation.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ import { ResourceNode } from './explorer/nodes/resourceNode'
2323
import { getSyncWizard, runSync } from '../../shared/sam/sync'
2424
import { getDeployWizard, runDeploy } from '../../shared/sam/deploy'
2525
import { DeployTypeWizard } from './wizards/deployTypeWizard'
26-
import { createNewServerlessLandProject } from './serverlessLand/serverlessLandMain'
26+
import { createNewServerlessLandProject } from './serverlessLand/main'
2727
export const templateToOpenAppComposer = 'aws.toolkit.appComposer.templateToOpenOnStart'
2828

2929
/**
Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,11 @@ import * as nls from 'vscode-nls'
77
const localize = nls.loadMessageBundle()
88
import * as path from 'path'
99
import { getTelemetryReason, getTelemetryResult } from '../../../shared/errors'
10-
import { RegionProvider } from '../../../shared/regions/regionProvider'
1110
import { getLogger } from '../../../shared/logger/logger'
1211
import globals from '../../../shared/extensionGlobals'
1312
import { checklogs } from '../../../shared/localizedText'
1413
import { Result, telemetry } from '../../../shared/telemetry/telemetry'
15-
import { CreateServerlessLandWizard } from './serverlessLandWizard'
14+
import { CreateServerlessLandWizard } from './wizard'
1615
import { ExtContext } from '../../../shared/extensions'
1716
import { addFolderToWorkspace } from '../../../shared/utilities/workspaceUtils'
1817

@@ -33,21 +32,16 @@ export const readmeFile: string = 'README.md'
3332
*/
3433
export async function createNewServerlessLandProject(extContext: ExtContext): Promise<void> {
3534
const awsContext = extContext.awsContext
36-
const regionProvider: RegionProvider = extContext.regionProvider
3735
let createResult: Result = 'Succeeded'
3836
let reason: string | undefined
3937

4038
try {
4139
const credentials = await awsContext.getCredentials()
42-
const schemaRegions = regionProvider
43-
.getRegions()
44-
.filter((r) => regionProvider.isServiceInRegion('schemas', r.id))
4540
const defaultRegion = awsContext.getCredentialDefaultRegion()
4641

4742
// Launch the project creation wizard
4843
const config = await new CreateServerlessLandWizard({
4944
credentials,
50-
schemaRegions,
5145
defaultRegion,
5246
}).run()
5347
if (!config) {
@@ -72,7 +66,7 @@ export async function createNewServerlessLandProject(extContext: ExtContext): Pr
7266
getLogger().error(
7367
localize(
7468
'AWS.serverlessland.initWizard.general.error',
75-
'Error creating new SAM Application. {0}',
69+
'Error creating new Serverless Land Application. {0}',
7670
checklogs()
7771
)
7872
)
Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,8 @@ import { createInputBox } from '../../../shared/ui/inputPrompter'
1010
import { createCommonButtons } from '../../../shared/ui/buttons'
1111
import { createQuickPick } from '../../../shared/ui/pickerPrompter'
1212
import { createFolderPrompt } from '../../../shared/ui/common/location'
13-
import { Region } from '../../../shared/regions/endpoints'
1413
import { createExitPrompter } from '../../../shared/ui/common/exitPrompter'
15-
import { MetadataManager } from './serverlesslandMetadataManager'
14+
import { MetadataManager } from './metadataManager'
1615
import { ToolkitError } from '../../../shared/errors'
1716

1817
export interface CreateServerlessLandWizardForm {
@@ -21,8 +20,6 @@ export interface CreateServerlessLandWizardForm {
2120
pattern: string
2221
runtime: string
2322
iac: string
24-
region?: string
25-
schemaName?: string
2623
}
2724

2825
/**
@@ -32,7 +29,7 @@ export interface CreateServerlessLandWizardForm {
3229
export class CreateServerlessLandWizard extends Wizard<CreateServerlessLandWizardForm> {
3330
private metadataManager: MetadataManager
3431

35-
public constructor(context: { schemaRegions: Region[]; defaultRegion?: string; credentials?: AWS.Credentials }) {
32+
public constructor(context: { defaultRegion?: string; credentials?: AWS.Credentials }) {
3633
super({
3734
exitPrompterProvider: createExitPrompter,
3835
})
@@ -49,7 +46,7 @@ export class CreateServerlessLandWizard extends Wizard<CreateServerlessLandWizar
4946
'awsService',
5047
'appBuilder',
5148
'serverlessLand',
52-
'serverlessland-metadata.json'
49+
'metadata.json'
5350
)
5451
await this.metadataManager.loadMetadata(metadataPath)
5552

@@ -67,11 +64,11 @@ export class CreateServerlessLandWizard extends Wizard<CreateServerlessLandWizar
6764
buttons: [
6865
{
6966
iconPath: new vscode.ThemeIcon('github'),
70-
tooltip: 'GitHub Button',
67+
tooltip: 'Open in GitHub',
7168
},
7269
{
7370
iconPath: new vscode.ThemeIcon('open-preview'),
74-
tooltip: 'Serverless Land Button',
71+
tooltip: 'Open in Serverless Land',
7572
},
7673
],
7774
})),

0 commit comments

Comments
 (0)