Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions messages/project.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,8 @@ The standard template provides a complete force-app directory structure so you k

The analytics template provides similar files and the force-app/main/default/waveTemplates directory.

The reactb2e and reactb2x templates provide React-based project scaffolding for B2E and B2X web application use cases.

Comment on lines +61 to +62
Copy link
Collaborator Author

@k-j-kim k-j-kim Feb 26, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@iowillhoit @Shinoni do you know if we have to hide this message until TDX?

# flags.namespace.summary

Namespace associated with this project and any connected scratch orgs.
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"dependencies": {
"@salesforce/core": "^8.26.2",
"@salesforce/sf-plugins-core": "^12",
"@salesforce/templates": "^65.5.11"
"@salesforce/templates": "^66.2.0"
},
"devDependencies": {
"@oclif/plugin-command-snapshot": "^5.3.9",
Expand Down
2 changes: 1 addition & 1 deletion src/commands/template/generate/project/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ export default class Project extends SfCommand<CreateOutput> {
summary: messages.getMessage('flags.template.summary'),
description: messages.getMessage('flags.template.description'),
default: 'standard',
options: ['standard', 'empty', 'analytics'] as const,
options: ['standard', 'empty', 'analytics', 'reactb2e', 'reactb2x'] as const,
})(),
'output-dir': outputDirFlag,
namespace: Flags.string({
Expand Down
44 changes: 44 additions & 0 deletions test/commands/template/generate/project/index.nut.ts
Original file line number Diff line number Diff line change
Expand Up @@ -231,6 +231,50 @@ describe('template generate project:', () => {
assert.file([path.join(session.project.dir, 'analytics1', 'eslint.config.js')]);
assert.file([path.join(session.project.dir, 'analytics1', 'eslint.config.js')]);
});

it('should create project with reactb2e template', () => {
const projectName = 'react-b2e-test';
const alphanumericName = 'reactb2etest';
execCmd(`template generate project --projectname ${projectName} --template reactb2e`, {
ensureExitCode: 0,
});
const projectDir = path.join(session.project.dir, projectName);
assert.file([path.join(projectDir, 'sfdx-project.json')]);
assert.fileContent(path.join(projectDir, 'sfdx-project.json'), 'sourceApiVersion');
const webappMetaPath = path.join(
projectDir,
'force-app',
'main',
'default',
'webapplications',
alphanumericName,
`${alphanumericName}.webapplication-meta.xml`
);
assert.file([webappMetaPath]);
assert.fileContent(webappMetaPath, alphanumericName);
});

it('should create project with reactb2x template', () => {
const projectName = 'react-b2x-test';
const alphanumericName = 'reactb2xtest';
execCmd(`template generate project --projectname ${projectName} --template reactb2x`, {
ensureExitCode: 0,
});
const projectDir = path.join(session.project.dir, projectName);
assert.file([path.join(projectDir, 'sfdx-project.json')]);
assert.fileContent(path.join(projectDir, 'sfdx-project.json'), 'sourceApiVersion');
const webappMetaPath = path.join(
projectDir,
'force-app',
'main',
'default',
'webapplications',
alphanumericName,
`${alphanumericName}.webapplication-meta.xml`
);
assert.file([webappMetaPath]);
assert.fileContent(webappMetaPath, alphanumericName);
});
});

describe('project creation failures', () => {
Expand Down
12 changes: 6 additions & 6 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1953,18 +1953,18 @@
cli-progress "^3.12.0"
terminal-link "^3.0.0"

"@salesforce/templates@^65.5.11":
version "65.5.11"
resolved "https://registry.yarnpkg.com/@salesforce/templates/-/templates-65.5.11.tgz#cdc4cce1e4dcab0c8884d0711d10644bd0a9d007"
integrity sha512-dBw3MCnzCrpQNIXaxkFj8ZYU+4yx+uxpoWiDnCS/wqN3I9GaHOOni0UgtrCFTdHIhQP2a4EW+mcbwF9DLQAU4Q==
"@salesforce/templates@^66.2.0":
version "66.2.0"
resolved "https://registry.yarnpkg.com/@salesforce/templates/-/templates-66.2.0.tgz#8959b18a89a9b5679f0e5eb1e36cbddd25924da5"
integrity sha512-hOZZUQ2NDR+Z3Ew8m+l21z2zI3yj1rC3WIO4sx4ici8ZXoCNLUEzC0ea6NkJ8g9hIUB1CNBswZizGRjafNN8jA==
dependencies:
"@salesforce/kit" "^3.2.4"
ejs "^3.1.10"
got "^11.8.6"
hpagent "^1.2.0"
mime-types "^3.0.2"
proxy-from-env "^1.1.0"
tar "^7.5.8"
tar "^7.5.9"
tslib "^2.8.1"

"@salesforce/ts-types@^2.0.11", "@salesforce/ts-types@^2.0.12":
Expand Down Expand Up @@ -7738,7 +7738,7 @@ supports-preserve-symlinks-flag@^1.0.0:
resolved "https://registry.yarnpkg.com/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz"
integrity sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==

tar@^7.5.8:
tar@^7.5.9:
version "7.5.9"
resolved "https://registry.yarnpkg.com/tar/-/tar-7.5.9.tgz#817ac12a54bc4362c51340875b8985d7dc9724b8"
integrity sha512-BTLcK0xsDh2+PUe9F6c2TlRp4zOOBMTkoQHQIWSIzI0R7KG46uEwq4OPk2W7bZcprBMsuaeFsqwYr7pjh6CuHg==
Expand Down
Loading