diff --git a/docs/_articles/en/lwc/linting.md b/docs/_articles/en/lwc/linting.md index baf69b5eb4..39c3756034 100644 --- a/docs/_articles/en/lwc/linting.md +++ b/docs/_articles/en/lwc/linting.md @@ -13,7 +13,7 @@ Linting provides errors about malformed code while you edit. VS Code enforces Sa ### For a New Project -If you create an SFDX project using the `sfdx force:project:create` command, your project contains a `package.json` file with the ESLint plugin already included. +If you create an SFDX project using the `sfdx project:generate` command, your project contains a `package.json` file with the ESLint plugin already included. 1. To install the ESLint plugin and other dependencies, run `npm install` in your project directory. @@ -25,17 +25,17 @@ If you create an SFDX project using the `sfdx force:project:create` command, you 1. Verify that your project has a `package.json` with these configurations. If your `package.json` doesn't have the configurations, run `npm install eslint @salesforce/eslint-config-lwc --save-dev`. - ```json - "scripts": { - "lint": "npm run lint:lwc", - "lint:lwc": "eslint force-app/main/default/lwc" - } + ```json + "scripts": { + "lint": "npm run lint:lwc", + "lint:lwc": "eslint force-app/main/default/lwc" + } - "devDependencies" { - "@salesforce/eslint-config-lwc": "3.4.0", - "eslint": "^5.16.0" - } - ``` + "devDependencies" { + "@salesforce/eslint-config-lwc": "3.4.0", + "eslint": "^5.16.0" + } + ``` 2. If your project doesn't have the [`package.json`](https://github.com/forcedotcom/salesforcedx-templates/blob/master/src/templates/project/package.json) file, copy it and add it to your project directory. @@ -51,22 +51,22 @@ If you create an SFDX project using the `sfdx force:project:create` command, you ESLint includes three configuration levels. The default level is `@salesforce/eslint-config-lwc/recommended`. -To change the configuration level, edit this line in the `.eslintrc.json` +To change the configuration level, edit this line in the `.eslintrc.json` ```json { - "extends": ["@salesforce/eslint-config-lwc/recommended"] + "extends": ["@salesforce/eslint-config-lwc/recommended"] } ``` - `@salesforce/eslint-config-lwc/base` -This configuration prevents common pitfalls with Lightning Web Components and enforces other Salesforce platform restrictions. + This configuration prevents common pitfalls with Lightning Web Components and enforces other Salesforce platform restrictions. - `@salesforce/eslint-config-lwc/recommended` -This configuration prevents common Javascript pitfalls and enforces all best practices. + This configuration prevents common Javascript pitfalls and enforces all best practices. - `@salesforce/eslint-config-lwc/extended` -This configuration restricts the use of some Javascript language features that are sometimes slow in older browsers, such as IE11. To support new Javascript syntax and language features on an older browser, the Lightning Web Components compiler transforms the Lightning Web Components modules. + This configuration restricts the use of some Javascript language features that are sometimes slow in older browsers, such as IE11. To support new Javascript syntax and language features on an older browser, the Lightning Web Components compiler transforms the Lightning Web Components modules. For more details on the linting rules and using them individually, see the [ESLint Plugin](https://github.com/salesforce/eslint-plugin-lwc) Github repository. diff --git a/docs/_articles/en/source-control/source-format.md b/docs/_articles/en/source-control/source-format.md index ef908f7cf7..fae5ff2b8e 100644 --- a/docs/_articles/en/source-control/source-format.md +++ b/docs/_articles/en/source-control/source-format.md @@ -41,7 +41,7 @@ Follow these steps to convert the project from metadata to source format, withou 1. Create a temporary SFDX project outside of the Git repo. This temporary project has the structure and a configuration file as required by a Salesforce project. - `$ sfdx force:project:create -n tempproj` + `$ sfdx project:generate -n tempproj` 1. Convert the project in metadata into a temporary project. diff --git a/docs/_articles/ja/lwc/linting.md b/docs/_articles/ja/lwc/linting.md index 5d4237a4d3..c7e76754ba 100644 --- a/docs/_articles/ja/lwc/linting.md +++ b/docs/_articles/ja/lwc/linting.md @@ -13,7 +13,7 @@ SSL のサポートを含めてビルドされた Node.js の [Active LTS リリ ### 新しいプロジェクト -SFDX プロジェクトを、`sfdx force:project:create (SFDX: プロジェクトを作成)` コマンドで作成した場合、そのプロジェクトに含まれる `package.json` ファイルにはすでに ESLint のプラグインが含まれています。 +SFDX プロジェクトを、`sfdx project:generate (SFDX: プロジェクトを作成)` コマンドで作成した場合、そのプロジェクトに含まれる `package.json` ファイルにはすでに ESLint のプラグインが含まれています。 1. ESLint プラグインと他の依存関係をインストールするには、プロジェクトのディレクトリで `npm install` を実行します。 diff --git a/docs/_articles/ja/source-control/source-format.md b/docs/_articles/ja/source-control/source-format.md index 161cabc00d..adfcd52717 100644 --- a/docs/_articles/ja/source-control/source-format.md +++ b/docs/_articles/ja/source-control/source-format.md @@ -41,7 +41,7 @@ Force.com IDE ではメタデータ形式を使用していたため、VS Code 1. Git リポジトリの外で一時的な SFDX プロジェクトを作成します。この一時的なプロジェクトには Salesforce のプロジェクトで必要とされるディレクトリ構造や設定ファイルがあります。 - `$ sfdx force:project:create -n tempproj` + `$ sfdx project:generate -n tempproj` 2. メタデータ内のプロジェクトを一時的なプロジェクトに変換します。 diff --git a/packages/salesforcedx-apex-debugger/test/integration/adapter.test.ts b/packages/salesforcedx-apex-debugger/test/integration/adapter.test.ts index 602d21551e..ad09ec8e4f 100644 --- a/packages/salesforcedx-apex-debugger/test/integration/adapter.test.ts +++ b/packages/salesforcedx-apex-debugger/test/integration/adapter.test.ts @@ -47,10 +47,10 @@ describe.skip('Interactive debugger adapter - integration', () => { let apexClassUri: string; beforeAll(async () => { - // Create SFDX project + // Generate SF project projectPath = path.join(process.cwd(), PROJECT_NAME); console.log(`projectPath: ${projectPath}`); - await util.createSFDXProject(PROJECT_NAME); + await util.generateSFProject(PROJECT_NAME); // Create scratch org with Debug Apex enabled util.addFeatureToScratchOrgConfig(PROJECT_NAME, 'DebugApex'); apexClassUri = Uri.file( diff --git a/packages/salesforcedx-test-utils-vscode/src/orgUtils.ts b/packages/salesforcedx-test-utils-vscode/src/orgUtils.ts index 966b4c9096..7a0771c229 100644 --- a/packages/salesforcedx-test-utils-vscode/src/orgUtils.ts +++ b/packages/salesforcedx-test-utils-vscode/src/orgUtils.ts @@ -17,11 +17,11 @@ import * as util from 'util'; import { Uri } from 'vscode'; // Used only for CI purposes. Must call delete if you call create -export const createSFDXProject = async (projectName: string): Promise => { +export const generateSFProject = async (projectName: string): Promise => { const execution = new CliCommandExecutor( new SfdxCommandBuilder() - .withArg('force:project:create') - .withFlag('--projectname', projectName) + .withArg('project:generate') + .withFlag('--name', projectName) .withJson() .build(), { cwd: process.cwd() } diff --git a/packages/salesforcedx-vscode-core/package.json b/packages/salesforcedx-vscode-core/package.json index b71eead7f6..cf93cc1602 100644 --- a/packages/salesforcedx-vscode-core/package.json +++ b/packages/salesforcedx-vscode-core/package.json @@ -130,8 +130,8 @@ }, "activationEvents": [ "workspaceContains:sfdx-project.json", - "onCommand:sfdx.force.project.create", - "onCommand:sfdx.force.project.with.manifest.create", + "onCommand:sfdx.project.generate", + "onCommand:sfdx.project.generate.with.manifest", "onCommand:sfdx.debug.isv.bootstrap" ], "main": "./out/src", @@ -456,11 +456,11 @@ "when": "sfdx:project_opened && editorHasSelection" }, { - "command": "sfdx.force.project.create", + "command": "sfdx.project.generate", "when": "!sfdx:internal_dev" }, { - "command": "sfdx.force.project.with.manifest.create", + "command": "sfdx.project.generate.with.manifest", "when": "!sfdx:internal_dev" }, { @@ -779,12 +779,12 @@ "title": "%data_query_selection_text%" }, { - "command": "sfdx.force.project.create", - "title": "%force_project_create_text%" + "command": "sfdx.project.generate", + "title": "%project_generate_text%" }, { - "command": "sfdx.force.project.with.manifest.create", - "title": "%force_project_with_manifest_create_text%" + "command": "sfdx.project.generate.with.manifest", + "title": "%project_generate_with_manifest_text%" }, { "command": "sfdx.force.apex.trigger.create", diff --git a/packages/salesforcedx-vscode-core/package.nls.ja.json b/packages/salesforcedx-vscode-core/package.nls.ja.json index 76dd187a30..49d304bee2 100644 --- a/packages/salesforcedx-vscode-core/package.nls.ja.json +++ b/packages/salesforcedx-vscode-core/package.nls.ja.json @@ -36,8 +36,8 @@ "data_query_selection_text": "SFDX: 現在選択されているテキストを使用して SOQL クエリを実行", "force_package_install_text": "SFDX: パッケージをインストール", "core_settings_title": "Salesforce 機能のプレビュー", - "force_project_create_text": "SFDX: プロジェクトを作成", - "force_project_with_manifest_create_text": "SFDX: マニフェストファイルを使用してプロジェクトを作成", + "project_generate_text": "SFDX: プロジェクトを作成", + "project_generate_with_manifest_text": "SFDX: マニフェストファイルを使用してプロジェクトを作成", "force_apex_trigger_create_text": "SFDX: Apex トリガを作成", "show_cli_success_msg_description": "VS Code のコマンドパレットを使用して実行されたSalesforce CLI コマンドのステータスメッセージを、ポップアップで表示か (true)、ステータスバーに表示か (false) を指定します。", "start_apex_debug_logging": "SFDX: Replay Debugger 用の Apex デバッグログを有効化", diff --git a/packages/salesforcedx-vscode-core/package.nls.json b/packages/salesforcedx-vscode-core/package.nls.json index 5673c82b56..2d523e9eff 100644 --- a/packages/salesforcedx-vscode-core/package.nls.json +++ b/packages/salesforcedx-vscode-core/package.nls.json @@ -39,8 +39,8 @@ "data_query_selection_text": "SFDX: Execute SOQL Query with Currently Selected Text", "force_package_install_text": "SFDX: Install Package", "core_settings_title": "Salesforce Core Configuration", - "force_project_create_text": "SFDX: Create Project", - "force_project_with_manifest_create_text": "SFDX: Create Project with Manifest", + "project_generate_text": "SFDX: Create Project", + "project_generate_with_manifest_text": "SFDX: Create Project with Manifest", "force_apex_trigger_create_text": "SFDX: Create Apex Trigger", "show_cli_success_msg_description": "Specifies whether status messages for Salesforce CLI commands run using the VS Code command palette will appear as pop-up information messages (true) or as status bar messages (false).", "start_apex_debug_logging": "SFDX: Turn On Apex Debug Log for Replay Debugger", diff --git a/packages/salesforcedx-vscode-core/src/commands/index.ts b/packages/salesforcedx-vscode-core/src/commands/index.ts index 972afa4bfe..b2ccebd96f 100644 --- a/packages/salesforcedx-vscode-core/src/commands/index.ts +++ b/packages/salesforcedx-vscode-core/src/commands/index.ts @@ -34,6 +34,8 @@ export { orgLoginWebDevHub } from './auth/orgLoginWebDevHub'; export { OrgLogoutAll, orgLogoutAll, orgLogoutDefault } from './auth/orgLogout'; +export { ConfigList, configList } from './configList'; +export { ConfigSetExecutor, configSet } from './configSet'; export { dataQuery } from './dataQuery'; export { DebuggerSessionDetachExecutor, @@ -48,8 +50,6 @@ export { ManifestChecker, deleteSource } from './deleteSource'; -export { ConfigList, configList } from './configList'; -export { ConfigSetExecutor, configSet } from './configSet'; export { forceCreateManifest } from './forceCreateManifest'; export { ForceDescribeMetadataExecutor, @@ -72,17 +72,6 @@ export { SelectPackageID, forcePackageInstall } from './forcePackageInstall'; -export { - PathExistsChecker, - ProjectNameAndPathAndTemplate, - ProjectTemplateItem, - SelectProjectFolder, - SelectProjectName, - SelectProjectTemplate, - forceProjectWithManifestCreate, - forceSfdxProjectCreate, - projectTemplateEnum -} from './forceProjectCreate'; export { ForceRefreshSObjectsExecutor, checkSObjectsAndRefresh, @@ -123,6 +112,17 @@ export { getExecutor, orgOpen } from './orgOpen'; +export { + PathExistsChecker, + ProjectNameAndPathAndTemplate, + ProjectTemplateItem, + SelectProjectFolder, + SelectProjectName, + SelectProjectTemplate, + projectGenerateWithManifest, + projectTemplateEnum, + sfProjectGenerate +} from './projectGenerate'; export { viewAllChanges, viewLocalChanges, @@ -146,8 +146,8 @@ export { export { forceAnalyticsTemplateCreate, forceApexClassCreate, - forceApexUnitClassCreate, forceApexTriggerCreate, + forceApexUnitClassCreate, forceInternalLightningAppCreate, forceInternalLightningComponentCreate, forceInternalLightningEventCreate, diff --git a/packages/salesforcedx-vscode-core/src/commands/isvdebugging/bootstrapCmd.ts b/packages/salesforcedx-vscode-core/src/commands/isvdebugging/bootstrapCmd.ts index d157ed1e36..dd672d9317 100644 --- a/packages/salesforcedx-vscode-core/src/commands/isvdebugging/bootstrapCmd.ts +++ b/packages/salesforcedx-vscode-core/src/commands/isvdebugging/bootstrapCmd.ts @@ -33,7 +33,7 @@ import { ProjectNameAndPathAndTemplate, SelectProjectFolder, SelectProjectName -} from '../forceProjectCreate'; +} from '../projectGenerate'; import { CompositeParametersGatherer, EmptyPreChecker, @@ -89,9 +89,7 @@ export class IsvDebugBootstrapExecutor extends SfdxCommandletExecutor<{}> { public buildConfigureProjectCommand(data: IsvDebugBootstrapConfig): Command { return new SfdxCommandBuilder() - .withDescription( - nls.localize('isv_debug_bootstrap_configure_project') - ) + .withDescription(nls.localize('isv_debug_bootstrap_configure_project')) .withArg('config:set') .withArg(`org-isv-debugger-sid=${data.sessionId}`) .withArg(`org-isv-debugger-url=${data.loginUrl}`) @@ -105,9 +103,7 @@ export class IsvDebugBootstrapExecutor extends SfdxCommandletExecutor<{}> { ): Command { return new SfdxCommandBuilder() .withDescription( - nls.localize( - 'isv_debug_bootstrap_configure_project_retrieve_namespace' - ) + nls.localize('isv_debug_bootstrap_configure_project_retrieve_namespace') ) .withArg('data:query') .withFlag('--query', 'SELECT NamespacePrefix FROM Organization LIMIT 1') @@ -135,9 +131,7 @@ export class IsvDebugBootstrapExecutor extends SfdxCommandletExecutor<{}> { public buildRetrieveOrgSourceCommand(data: IsvDebugBootstrapConfig): Command { return new SfdxCommandBuilder() - .withDescription( - nls.localize('isv_debug_bootstrap_retrieve_org_source') - ) + .withDescription(nls.localize('isv_debug_bootstrap_retrieve_org_source')) .withArg('project:retrieve:start') .withFlag('--manifest', this.relativeApexPackageXmlPath) .withFlag('--target-org', data.sessionId) @@ -165,10 +159,7 @@ export class IsvDebugBootstrapExecutor extends SfdxCommandletExecutor<{}> { ): Command { return new SfdxCommandBuilder() .withDescription( - nls.localize( - 'isv_debug_bootstrap_retrieve_package_source', - packageName - ) + nls.localize('isv_debug_bootstrap_retrieve_package_source', packageName) ) .withArg('project:retrieve:start') .withFlag('--package-name', packageName) @@ -321,10 +312,7 @@ export class IsvDebugBootstrapExecutor extends SfdxCommandletExecutor<{}> { // TODO: what if packageNames.length is 0? for (const packageName of packageNames) { await this.executeCommand( - this.buildRetrievePackageSourceCommand( - response.data, - packageName - ), + this.buildRetrievePackageSourceCommand(response.data, packageName), { cwd: projectPath }, cancellationTokenSource, cancellationToken @@ -449,13 +437,13 @@ export class IsvDebugBootstrapExecutor extends SfdxCommandletExecutor<{}> { execution: CommandExecution, cancellationTokenSource: vscode.CancellationTokenSource, cancellationToken: vscode.CancellationToken - /* eslint-enable @typescript-eslint/no-unused-vars */ + /* eslint-enable @typescript-eslint/no-unused-vars */ ) { channelService.streamCommandOutput(execution); channelService.showChannelOutput(); notificationService.reportExecutionError( execution.command.toString(), - (execution.stderrSubject as any) as Observable + execution.stderrSubject as any as Observable ); ProgressNotification.show(execution, cancellationTokenSource); taskViewService.addCommandExecution(execution, cancellationTokenSource); diff --git a/packages/salesforcedx-vscode-core/src/commands/forceProjectCreate.ts b/packages/salesforcedx-vscode-core/src/commands/projectGenerate.ts similarity index 80% rename from packages/salesforcedx-vscode-core/src/commands/forceProjectCreate.ts rename to packages/salesforcedx-vscode-core/src/commands/projectGenerate.ts index 0eed255f16..d2722e88e1 100644 --- a/packages/salesforcedx-vscode-core/src/commands/forceProjectCreate.ts +++ b/packages/salesforcedx-vscode-core/src/commands/projectGenerate.ts @@ -31,7 +31,7 @@ export enum projectTemplateEnum { analytics = 'analytics' } -type forceProjectCreateOptions = { +type projectGenerateOptions = { isProjectWithManifest: boolean; }; @@ -44,18 +44,16 @@ export class ProjectTemplateItem implements vscode.QuickPickItem { } } -export class LibraryForceProjectCreateExecutor extends LibraryBaseTemplateCommand< - ProjectNameAndPathAndTemplate -> { - private readonly options: forceProjectCreateOptions; +export class LibraryProjectGenerateExecutor extends LibraryBaseTemplateCommand { + private readonly options: projectGenerateOptions; public constructor(options = { isProjectWithManifest: false }) { super(); this.options = options; } - public executionName = nls.localize('force_project_create_text'); - public telemetryName = 'force_project_create'; + public executionName = nls.localize('project_generate_text'); + public telemetryName = 'project_generate'; public templateType = TemplateType.Project; public getOutputFileName(data: ProjectNameAndPathAndTemplate) { return data.projectName; @@ -102,7 +100,8 @@ export interface ProjectTemplate { } export class SelectProjectTemplate - implements ParametersGatherer { + implements ParametersGatherer +{ private readonly prefillValueProvider?: () => string; constructor(prefillValueProvider?: () => string) { @@ -114,29 +113,29 @@ export class SelectProjectTemplate > { const items: vscode.QuickPickItem[] = [ new ProjectTemplateItem( - 'force_project_create_standard_template_display_text', - 'force_project_create_standard_template' + 'project_generate_standard_template_display_text', + 'project_generate_standard_template' ), new ProjectTemplateItem( - 'force_project_create_empty_template_display_text', - 'force_project_create_empty_template' + 'project_generate_empty_template_display_text', + 'project_generate_empty_template' ), new ProjectTemplateItem( - 'force_project_create_analytics_template_display_text', - 'force_project_create_analytics_template' + 'project_generate_analytics_template_display_text', + 'project_generate_analytics_template' ) ]; const selection = await vscode.window.showQuickPick(items); let projectTemplate: string | undefined; switch (selection && selection.label) { - case nls.localize('force_project_create_standard_template_display_text'): + case nls.localize('project_generate_standard_template_display_text'): projectTemplate = projectTemplateEnum.standard; break; - case nls.localize('force_project_create_empty_template_display_text'): + case nls.localize('project_generate_empty_template_display_text'): projectTemplate = projectTemplateEnum.empty; break; - case nls.localize('force_project_create_analytics_template_display_text'): + case nls.localize('project_generate_analytics_template_display_text'): projectTemplate = projectTemplateEnum.analytics; break; default: @@ -179,7 +178,7 @@ export class SelectProjectFolder implements ParametersGatherer { canSelectFiles: false, canSelectFolders: true, canSelectMany: false, - openLabel: nls.localize('force_project_create_open_dialog_create_label') + openLabel: nls.localize('project_generate_open_dialog_create_label') } as vscode.OpenDialogOptions); return projectUri && projectUri.length === 1 ? { type: 'CONTINUE', data: { projectUri: projectUri[0].fsPath } } @@ -188,7 +187,8 @@ export class SelectProjectFolder implements ParametersGatherer { } export class PathExistsChecker - implements PostconditionChecker { + implements PostconditionChecker +{ public async check( inputs: ContinueResponse | CancelResponse ): Promise | CancelResponse> { @@ -221,26 +221,26 @@ const parameterGatherer = new CompositeParametersGatherer( ); const pathExistsChecker = new PathExistsChecker(); -export async function forceSfdxProjectCreate() { - const createTemplateExecutor = new LibraryForceProjectCreateExecutor(); - const sfdxProjectCreateCommandlet = new SfdxCommandlet( +export async function sfProjectGenerate() { + const createTemplateExecutor = new LibraryProjectGenerateExecutor(); + const sfProjectGenerateCommandlet = new SfdxCommandlet( workspaceChecker, parameterGatherer, createTemplateExecutor, pathExistsChecker ); - await sfdxProjectCreateCommandlet.run(); + await sfProjectGenerateCommandlet.run(); } -export async function forceProjectWithManifestCreate() { - const createTemplateExecutor = new LibraryForceProjectCreateExecutor({ +export async function projectGenerateWithManifest() { + const createTemplateExecutor = new LibraryProjectGenerateExecutor({ isProjectWithManifest: true }); - const projectWithManifestCreateCommandlet = new SfdxCommandlet( + const projectGenerateWithManifestCommandlet = new SfdxCommandlet( workspaceChecker, parameterGatherer, createTemplateExecutor, pathExistsChecker ); - await projectWithManifestCreateCommandlet.run(); + await projectGenerateWithManifestCommandlet.run(); } diff --git a/packages/salesforcedx-vscode-core/src/index.ts b/packages/salesforcedx-vscode-core/src/index.ts index 529e816554..7925c1f056 100644 --- a/packages/salesforcedx-vscode-core/src/index.ts +++ b/packages/salesforcedx-vscode-core/src/index.ts @@ -42,10 +42,8 @@ import { forceOrgCreate, forceOrgDelete, forcePackageInstall, - forceProjectWithManifestCreate, forceRefreshSObjects, forceRenameLightningComponent, - forceSfdxProjectCreate, forceSourceDeployManifest, forceSourceDeploySourcePaths, forceSourceDiff, @@ -66,6 +64,8 @@ import { orgLogoutAll, orgLogoutDefault, orgOpen, + projectGenerateWithManifest, + sfProjectGenerate, startApexDebugLogging, stopApexDebugLogging, turnOffLogging, @@ -321,18 +321,18 @@ function registerCommands( 'sfdx.data.query.selection', dataQuery ); - const forceProjectCreateCmd = vscode.commands.registerCommand( - 'sfdx.force.project.create', - forceSfdxProjectCreate + const projectGenerateCmd = vscode.commands.registerCommand( + 'sfdx.project.generate', + sfProjectGenerate ); const forcePackageInstallCmd = vscode.commands.registerCommand( 'sfdx.force.package.install', forcePackageInstall ); - const forceProjectWithManifestCreateCmd = vscode.commands.registerCommand( - 'sfdx.force.project.with.manifest.create', - forceProjectWithManifestCreate + const projectGenerateWithManifestCmd = vscode.commands.registerCommand( + 'sfdx.project.generate.with.manifest', + projectGenerateWithManifest ); const forceApexTriggerCreateCmd = vscode.commands.registerCommand( @@ -427,9 +427,9 @@ function registerCommands( forceAliasListCmd, orgDisplayDefaultCmd, orgDisplayUsernameCmd, - forceProjectCreateCmd, + projectGenerateCmd, forcePackageInstallCmd, - forceProjectWithManifestCreateCmd, + projectGenerateWithManifestCmd, forceApexTriggerCreateCmd, startApexDebugLoggingCmd, stopApexDebugLoggingCmd, diff --git a/packages/salesforcedx-vscode-core/src/messages/i18n.ja.ts b/packages/salesforcedx-vscode-core/src/messages/i18n.ja.ts index 7c579904f3..a5955c3755 100644 --- a/packages/salesforcedx-vscode-core/src/messages/i18n.ja.ts +++ b/packages/salesforcedx-vscode-core/src/messages/i18n.ja.ts @@ -158,16 +158,15 @@ export const messages = { 'SFDX: エディタの内容で匿名 Apex コードを実行', force_anon_apex_execute_selection_text: 'SFDX: 現在選択されているテキストで匿名 Apex コードを実行', - force_project_create_text: 'SFDX: プロジェクトを作成', - force_project_create_open_dialog_create_label: 'プロジェクトを作成', - force_project_create_standard_template: + project_generate_text: 'SFDX: プロジェクトを作成', + project_generate_open_dialog_create_label: 'プロジェクトを作成', + project_generate_standard_template: '標準のプロジェクトテンプレート (デフォルト)', - force_project_create_standard_template_display_text: '標準', - force_project_create_empty_template_display_text: '空', - force_project_create_analytics_template_display_text: 'Analytics', - force_project_create_empty_template: '空のプロジェクトテンプレート', - force_project_create_analytics_template: - 'Analytics のプロジェクトテンプレート', + project_generate_standard_template_display_text: '標準', + project_generate_empty_template_display_text: '空', + project_generate_analytics_template_display_text: 'Analytics', + project_generate_empty_template: '空のプロジェクトテンプレート', + project_generate_analytics_template: 'Analytics のプロジェクトテンプレート', force_apex_trigger_create_text: 'SFDX: Apex トリガを作成', start_apex_debug_logging: 'SFDX: Replay Debugger 用に Apex デバッグログを有効化', diff --git a/packages/salesforcedx-vscode-core/src/messages/i18n.ts b/packages/salesforcedx-vscode-core/src/messages/i18n.ts index a034ae1eec..9130f16056 100644 --- a/packages/salesforcedx-vscode-core/src/messages/i18n.ts +++ b/packages/salesforcedx-vscode-core/src/messages/i18n.ts @@ -196,14 +196,14 @@ export const messages = { force_anon_apex_execute_selection_text: 'SFDX: Execute Anonymous Apex with Currently Selected Text', force_package_install_text: 'SFDX: Install Package', - force_project_create_text: 'SFDX: Create Project', - force_project_create_open_dialog_create_label: 'Create Project', - force_project_create_standard_template: 'Standard project template (default)', - force_project_create_standard_template_display_text: 'Standard', - force_project_create_empty_template_display_text: 'Empty', - force_project_create_analytics_template_display_text: 'Analytics', - force_project_create_empty_template: 'Empty project template', - force_project_create_analytics_template: 'Analytics project template', + project_generate_text: 'SFDX: Create Project', + project_generate_open_dialog_create_label: 'Create Project', + project_generate_standard_template: 'Standard project template (default)', + project_generate_standard_template_display_text: 'Standard', + project_generate_empty_template_display_text: 'Empty', + project_generate_analytics_template_display_text: 'Analytics', + project_generate_empty_template: 'Empty project template', + project_generate_analytics_template: 'Analytics project template', force_apex_trigger_create_text: 'SFDX: Create Apex Trigger', start_apex_debug_logging: 'SFDX: Turn On Apex Debug Log for Replay Debugger', apex_debug_log_status_bar_text: diff --git a/packages/salesforcedx-vscode-core/test/vscode-integration/commands/isvdebugger/bootstrapCmd.test.ts b/packages/salesforcedx-vscode-core/test/vscode-integration/commands/isvdebugger/bootstrapCmd.test.ts index edcad0e020..8cf5b81951 100644 --- a/packages/salesforcedx-vscode-core/test/vscode-integration/commands/isvdebugger/bootstrapCmd.test.ts +++ b/packages/salesforcedx-vscode-core/test/vscode-integration/commands/isvdebugger/bootstrapCmd.test.ts @@ -12,12 +12,12 @@ import * as path from 'path'; import * as shell from 'shelljs'; import * as sinon from 'sinon'; import * as vscode from 'vscode'; -import { projectTemplateEnum } from '../../../../src/commands/forceProjectCreate'; import { EnterForceIdeUri, IsvDebugBootstrapConfig, IsvDebugBootstrapExecutor } from '../../../../src/commands/isvdebugging'; +import { projectTemplateEnum } from '../../../../src/commands/projectGenerate'; import { nls } from '../../../../src/messages'; import { workspaceUtils } from '../../../../src/util'; @@ -156,17 +156,15 @@ describe('ISV Debugging Project Bootstrap Command', () => { describe('CLI Builder', () => { it('Verify buildCreateProjectCommand', async () => { - const forceProjectCreateBuilder = new IsvDebugBootstrapExecutor(); - const createCommand = forceProjectCreateBuilder.buildCreateProjectCommand( - { - loginUrl: LOGIN_URL, - sessionId: SESSION_ID, - orgName: PROJECT_NAME, - projectName: PROJECT_NAME, - projectUri: PROJECT_DIR[0].fsPath, - projectTemplate: projectTemplateEnum.standard - } - ); + const projectGenerateBuilder = new IsvDebugBootstrapExecutor(); + const createCommand = projectGenerateBuilder.buildCreateProjectCommand({ + loginUrl: LOGIN_URL, + sessionId: SESSION_ID, + orgName: PROJECT_NAME, + projectName: PROJECT_NAME, + projectUri: PROJECT_DIR[0].fsPath, + projectTemplate: projectTemplateEnum.standard + }); expect(createCommand.toCommand()).to.equal( `sfdx project:generate --name ${PROJECT_NAME} --output-dir ${PROJECT_DIR[0].fsPath} --template standard` ); @@ -177,16 +175,15 @@ describe('ISV Debugging Project Bootstrap Command', () => { it('Verify buildConfigureProjectCommand', async () => { const forceProjectConfigBuilder = new IsvDebugBootstrapExecutor(); - const configureCommand = forceProjectConfigBuilder.buildConfigureProjectCommand( - { + const configureCommand = + forceProjectConfigBuilder.buildConfigureProjectCommand({ loginUrl: LOGIN_URL, sessionId: SESSION_ID, orgName: PROJECT_NAME, projectName: PROJECT_NAME, projectUri: PROJECT_DIR[0].fsPath, projectTemplate: projectTemplateEnum.standard - } - ); + }); expect(configureCommand.toCommand()).to.equal( `sfdx config:set org-isv-debugger-sid=${SESSION_ID} org-isv-debugger-url=${LOGIN_URL} org-instance-url=${LOGIN_URL}` ); @@ -197,23 +194,20 @@ describe('ISV Debugging Project Bootstrap Command', () => { it('Verify buildQueryForOrgNamespacePrefixCommand', async () => { const forceProjectConfigBuilder = new IsvDebugBootstrapExecutor(); - const command = forceProjectConfigBuilder.buildQueryForOrgNamespacePrefixCommand( - { + const command = + forceProjectConfigBuilder.buildQueryForOrgNamespacePrefixCommand({ loginUrl: LOGIN_URL, sessionId: SESSION_ID, orgName: PROJECT_NAME, projectName: PROJECT_NAME, projectUri: PROJECT_DIR[0].fsPath, projectTemplate: projectTemplateEnum.standard - } - ); + }); expect(command.toCommand()).to.equal( `sfdx data:query --query SELECT NamespacePrefix FROM Organization LIMIT 1 --target-org ${SESSION_ID} --json --loglevel fatal` ); expect(command.description).to.equal( - nls.localize( - 'isv_debug_bootstrap_configure_project_retrieve_namespace' - ) + nls.localize('isv_debug_bootstrap_configure_project_retrieve_namespace') ); }); diff --git a/packages/salesforcedx-vscode-core/test/vscode-integration/commands/forceProjectCreate.test.ts b/packages/salesforcedx-vscode-core/test/vscode-integration/commands/projectGenerate.test.ts similarity index 94% rename from packages/salesforcedx-vscode-core/test/vscode-integration/commands/forceProjectCreate.test.ts rename to packages/salesforcedx-vscode-core/test/vscode-integration/commands/projectGenerate.test.ts index 341de3449e..4b871bc8fc 100644 --- a/packages/salesforcedx-vscode-core/test/vscode-integration/commands/forceProjectCreate.test.ts +++ b/packages/salesforcedx-vscode-core/test/vscode-integration/commands/projectGenerate.test.ts @@ -18,24 +18,24 @@ import * as vscode from 'vscode'; import * as assert from 'yeoman-assert'; import { channelService } from '../../../src/channels'; import { - forceProjectWithManifestCreate, - forceSfdxProjectCreate, PathExistsChecker, ProjectNameAndPathAndTemplate, - projectTemplateEnum, ProjectTemplateItem, SelectProjectFolder, SelectProjectName, - SelectProjectTemplate + SelectProjectTemplate, + projectGenerateWithManifest, + projectTemplateEnum, + sfProjectGenerate } from '../../../src/commands'; -import { ProjectName } from '../../../src/commands/forceProjectCreate'; +import { ProjectName } from '../../../src/commands/projectGenerate'; import { nls } from '../../../src/messages'; import { notificationService } from '../../../src/notifications'; import { telemetryService } from '../../../src/telemetry'; import { workspaceUtils } from '../../../src/util'; // tslint:disable:no-unused-expression -describe('Force Project Create', () => { +describe('Project Generate', () => { const PROJECT_NAME = 'sfdx-simple'; const rootWorkspacePath = workspaceUtils.getRootWorkspacePath(); const PROJECT_NAME_WITH_LEADING_TRAILING_SPACES = ` ${PROJECT_NAME} `; @@ -53,8 +53,8 @@ describe('Force Project Create', () => { .onCall(2) .returns( new ProjectTemplateItem( - 'force_project_create_analytics_template_display_text', - 'force_project_create_analytics_template' + 'project_generate_analytics_template_display_text', + 'project_generate_analytics_template' ) ); }); @@ -253,7 +253,7 @@ describe('Force Project Create', () => { }); }); - describe('Project Create', () => { + describe('Project Generate', () => { let showInputBoxStub: SinonStub; let quickPickStub: SinonStub; let openDialogStub: SinonStub; @@ -295,22 +295,20 @@ describe('Force Project Create', () => { showWarningStub.restore(); }); - it('Should Create Project', async () => { + it('Should Generate Project', async () => { // arrange const projectPath = path.join(rootWorkspacePath, 'TestProject'); shell.rm('-rf', projectPath); assert.noFile(projectPath); quickPickStub.returns({ - label: nls.localize( - 'force_project_create_standard_template_display_text' - ) + label: nls.localize('project_generate_standard_template_display_text') }); showInputBoxStub.returns('TestProject'); openDialogStub.returns([vscode.Uri.file(path.join(rootWorkspacePath))]); // act - await forceSfdxProjectCreate(); + await sfProjectGenerate(); const standardfolderarray = [ 'aura', @@ -427,22 +425,20 @@ describe('Force Project Create', () => { shell.rm('-rf', projectPath); }); - it('Should Create Project with manifest', async () => { + it('Should Generate Project with manifest', async () => { // arrange const projectPath = path.join(rootWorkspacePath, 'TestProject'); shell.rm('-rf', projectPath); assert.noFile(projectPath); quickPickStub.returns({ - label: nls.localize( - 'force_project_create_standard_template_display_text' - ) + label: nls.localize('project_generate_standard_template_display_text') }); showInputBoxStub.returns('TestProject'); openDialogStub.returns([vscode.Uri.file(path.join(rootWorkspacePath))]); // act - await forceProjectWithManifestCreate(); + await projectGenerateWithManifest(); assert.file([ path.join(rootWorkspacePath, 'TestProject', 'manifest', 'package.xml') diff --git a/packages/system-tests/scenarios/forceApexExecuteUi.test.ts b/packages/system-tests/scenarios/forceApexExecuteUi.test.ts index 4e9f7fbedd..d4e91534bd 100644 --- a/packages/system-tests/scenarios/forceApexExecuteUi.test.ts +++ b/packages/system-tests/scenarios/forceApexExecuteUi.test.ts @@ -29,7 +29,7 @@ describe(TITLE, () => { let username: string; before(async () => { - await util.createSFDXProject(PROJECT_NAME); + await util.generateSFProject(PROJECT_NAME); username = await util.createScratchOrg(PROJECT_NAME); app = new SpectronApplication(VSCODE_BINARY_PATH, TITLE, 2, [PROJECT_DIR]); common = new CommonActions(app); diff --git a/packages/system-tests/scenarios/forceSoqlQueryUi.test.ts b/packages/system-tests/scenarios/forceSoqlQueryUi.test.ts index c7bc72551a..44f86e809e 100644 --- a/packages/system-tests/scenarios/forceSoqlQueryUi.test.ts +++ b/packages/system-tests/scenarios/forceSoqlQueryUi.test.ts @@ -28,7 +28,7 @@ describe(TITLE, () => { let username: string; beforeEach(async () => { - await util.createSFDXProject(PROJECT_NAME); + await util.generateSFProject(PROJECT_NAME); username = await util.createScratchOrg(PROJECT_NAME); app = new SpectronApplication(VSCODE_BINARY_PATH, TITLE, 2, [PROJECT_DIR]); common = new CommonActions(app);