@salesforce/ui-bundle-template-app-react-sample-b2e 1.118.0 → 1.118.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/AGENT.md +3 -3
- package/dist/CHANGELOG.md +19 -0
- package/dist/README.md +5 -5
- package/dist/force-app/main/default/uiBundles/propertymanagementapp/package.json +3 -3
- package/dist/force-app/main/default/uiBundles/propertymanagementapp/src/components/layout/FilterRow.tsx +1 -1
- package/dist/package-lock.json +2 -2
- package/dist/package.json +2 -2
- package/dist/scripts/gitignore-templates.json +4 -0
- package/dist/scripts/{setup-cli.mjs → org-setup.mjs} +45 -6
- package/dist/scripts/sf-project-setup.mjs +40 -1
- package/package.json +2 -2
package/dist/AGENT.md
CHANGED
|
@@ -19,7 +19,7 @@ Replace `<appName>` with the actual folder name found under `uiBundles/`. The so
|
|
|
19
19
|
├── sfdx-project.json
|
|
20
20
|
├── package.json # SFDX root scripts
|
|
21
21
|
├── scripts/
|
|
22
|
-
│ ├── setup
|
|
22
|
+
│ ├── org-setup.mjs # One-time org setup (deploy, schema, build)
|
|
23
23
|
│ └── graphql-search.sh # Schema entity lookup
|
|
24
24
|
├── config/
|
|
25
25
|
│ └── project-scratch-def.json
|
|
@@ -93,7 +93,7 @@ Used for SFDX metadata tooling. Scripts here target LWC/Aura, not the React app.
|
|
|
93
93
|
| `npm run prettier` | Format metadata files |
|
|
94
94
|
| `npm run prettier:verify` | Check Prettier |
|
|
95
95
|
|
|
96
|
-
**One-
|
|
96
|
+
**One-time org setup:** `node scripts/org-setup.mjs --target-org <alias>` runs login, deploy, permset assignment, data import, GraphQL schema/codegen, UI Bundle build, and optionally the dev server. Use `--help` for all flags.
|
|
97
97
|
|
|
98
98
|
### 2. Web app directory (primary workspace)
|
|
99
99
|
|
|
@@ -167,7 +167,7 @@ Any external domain the app calls (APIs, CDNs, fonts) must have a `.cspTrustedSi
|
|
|
167
167
|
6. Fetch GraphQL schema + run codegen (`npm run graphql:schema && npm run graphql:codegen`)
|
|
168
168
|
7. Rebuild the UI Bundle (schema changes may affect generated types)
|
|
169
169
|
|
|
170
|
-
**Or use the one-
|
|
170
|
+
**Or use the one-time org setup:** `node scripts/org-setup.mjs --target-org <alias>`
|
|
171
171
|
|
|
172
172
|
```bash
|
|
173
173
|
# Deploy UI Bundle only
|
package/dist/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,25 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
## [1.118.2](https://github.com/salesforce-experience-platform-emu/webapps/compare/v1.118.1...v1.118.2) (2026-03-31)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Bug Fixes
|
|
10
|
+
|
|
11
|
+
* (@W-21734559) addresses missing .gitignore within template apps for vibes welcome experience ([#383](https://github.com/salesforce-experience-platform-emu/webapps/issues/383)) ([b8a35cf](https://github.com/salesforce-experience-platform-emu/webapps/commit/b8a35cf5352c231ccaa0797df88e64ee1c20a02a))
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
## [1.118.1](https://github.com/salesforce-experience-platform-emu/webapps/compare/v1.118.0...v1.118.1) (2026-03-31)
|
|
18
|
+
|
|
19
|
+
**Note:** Version bump only for package @salesforce/ui-bundle-template-base-sfdx-project
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
|
|
6
25
|
# [1.118.0](https://github.com/salesforce-experience-platform-emu/webapps/compare/v1.117.5...v1.118.0) (2026-03-30)
|
|
7
26
|
|
|
8
27
|
**Note:** Version bump only for package @salesforce/ui-bundle-template-base-sfdx-project
|
package/dist/README.md
CHANGED
|
@@ -68,14 +68,14 @@ Replace `<alias>` with your target org alias.
|
|
|
68
68
|
sf data import tree --plan force-app/main/default/data/data-plan.json --target-org <alias>
|
|
69
69
|
```
|
|
70
70
|
|
|
71
|
-
## Using setup
|
|
71
|
+
## Using org-setup.mjs
|
|
72
72
|
|
|
73
|
-
When this app is built (e.g. from the monorepo or from a published package),
|
|
73
|
+
When this app is built (e.g. from the monorepo or from a published package), an `org-setup.mjs` script is included at the project root. It runs the full setup in one go: login (if needed), deploy metadata, assign the `Property_Management_Access` permission set, prepare and import sample data, fetch GraphQL schema and run codegen, build the UI Bundle, and optionally start the dev server.
|
|
74
74
|
|
|
75
|
-
Run from the **project root** (the directory that contains `force-app/`, `sfdx-project.json`, and `setup
|
|
75
|
+
Run from the **project root** (the directory that contains `force-app/`, `sfdx-project.json`, and `org-setup.mjs`):
|
|
76
76
|
|
|
77
77
|
```bash
|
|
78
|
-
node setup
|
|
78
|
+
node org-setup.mjs --target-org <alias>
|
|
79
79
|
```
|
|
80
80
|
|
|
81
81
|
Common options:
|
|
@@ -90,7 +90,7 @@ Common options:
|
|
|
90
90
|
| `--permset <name>` | Permission set to assign (default: `Property_Management_Access`) |
|
|
91
91
|
| `--app <name>` | Web app folder name when multiple exist |
|
|
92
92
|
|
|
93
|
-
For all options: `node setup
|
|
93
|
+
For all options: `node org-setup.mjs --help`.
|
|
94
94
|
|
|
95
95
|
## Configure Your Salesforce DX Project
|
|
96
96
|
|
|
@@ -15,8 +15,8 @@
|
|
|
15
15
|
"graphql:schema": "node scripts/get-graphql-schema.mjs"
|
|
16
16
|
},
|
|
17
17
|
"dependencies": {
|
|
18
|
-
"@salesforce/sdk-data": "^1.118.
|
|
19
|
-
"@salesforce/ui-bundle": "^1.118.
|
|
18
|
+
"@salesforce/sdk-data": "^1.118.2",
|
|
19
|
+
"@salesforce/ui-bundle": "^1.118.2",
|
|
20
20
|
"@tailwindcss/vite": "^4.1.17",
|
|
21
21
|
"class-variance-authority": "^0.7.1",
|
|
22
22
|
"clsx": "^2.1.1",
|
|
@@ -43,7 +43,7 @@
|
|
|
43
43
|
"@graphql-eslint/eslint-plugin": "^4.1.0",
|
|
44
44
|
"@graphql-tools/utils": "^11.0.0",
|
|
45
45
|
"@playwright/test": "^1.49.0",
|
|
46
|
-
"@salesforce/vite-plugin-ui-bundle": "^1.118.
|
|
46
|
+
"@salesforce/vite-plugin-ui-bundle": "^1.118.2",
|
|
47
47
|
"@testing-library/jest-dom": "^6.6.3",
|
|
48
48
|
"@testing-library/react": "^16.1.0",
|
|
49
49
|
"@testing-library/user-event": "^14.5.2",
|
package/dist/package-lock.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@salesforce/webapp-template-base-sfdx-project-experimental",
|
|
3
|
-
"version": "1.118.
|
|
3
|
+
"version": "1.118.2",
|
|
4
4
|
"lockfileVersion": 3,
|
|
5
5
|
"requires": true,
|
|
6
6
|
"packages": {
|
|
7
7
|
"": {
|
|
8
8
|
"name": "@salesforce/webapp-template-base-sfdx-project-experimental",
|
|
9
|
-
"version": "1.118.
|
|
9
|
+
"version": "1.118.2",
|
|
10
10
|
"license": "SEE LICENSE IN LICENSE.txt",
|
|
11
11
|
"devDependencies": {
|
|
12
12
|
"@lwc/eslint-plugin-lwc": "^3.3.0",
|
package/dist/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@salesforce/ui-bundle-template-base-sfdx-project",
|
|
3
|
-
"version": "1.118.
|
|
3
|
+
"version": "1.118.2",
|
|
4
4
|
"description": "Base SFDX project template",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE.txt",
|
|
6
6
|
"publishConfig": {
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
"prettier": "prettier --write \"**/*.{cls,cmp,component,css,html,js,json,md,page,trigger,xml,yaml,yml}\"",
|
|
21
21
|
"prettier:verify": "prettier --check \"**/*.{cls,cmp,component,css,html,js,json,md,page,trigger,xml,yaml,yml}\"",
|
|
22
22
|
"precommit": "lint-staged",
|
|
23
|
-
"setup": "node scripts/setup
|
|
23
|
+
"setup": "node scripts/org-setup.mjs"
|
|
24
24
|
},
|
|
25
25
|
"devDependencies": {
|
|
26
26
|
"@lwc/eslint-plugin-lwc": "^3.3.0",
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
{
|
|
2
|
+
"sfdx": "# This file is used for Git repositories to specify intentionally untracked files that Git should ignore. \n# If you are not using git, you can delete this file. For more information see: https://git-scm.com/docs/gitignore\n# For useful gitignore templates see: https://github.com/github/gitignore\n\n# Salesforce cache\n.sf/\n.sfdx/\n.localdevserver/\ndeploy-options.json\n\n# LWC VSCode autocomplete\n**/lwc/jsconfig.json\n\n# LWC Jest coverage reports\ncoverage/\n\n# Logs\nlogs\n*.log\nnpm-debug.log*\nyarn-debug.log*\nyarn-error.log*\n\n# Dependency directories\nnode_modules/\n\n# Eslint cache\n.eslintcache\n\n# MacOS system files\n.DS_Store\n\n# Windows system files\nThumbs.db\nehthumbs.db\n[Dd]esktop.ini\n$RECYCLE.BIN/\n\n# Local environment variables\n.env\n\n# Python Salesforce Functions\n**/__pycache__/\n**/.venv/\n**/venv/\n",
|
|
3
|
+
"webapp": "# Logs\nlogs\n*.log\nnpm-debug.log*\nyarn-debug.log*\nyarn-error.log*\npnpm-debug.log*\nlerna-debug.log*\n\nnode_modules\ndist\ndist-ssr\nbuild\npackage-lock.json\n*.local\n\n# Playwright\n/test-results/\n/playwright-report/\n/blob-report/\n/playwright/.cache/\n\n# Editor directories and files\n.vscode/*\n!.vscode/extensions.json\n.idea\n.DS_Store\n*.suo\n*.ntvs*\n*.njsproj\n*.sln\n*.sw?\n\n# Un-exclude Cursor AI rules for this SFDX project\n!.a4drules/\n!.cursor/\n"
|
|
4
|
+
}
|
|
@@ -4,11 +4,11 @@
|
|
|
4
4
|
* Use this script to make setup easier for each app generated from this template.
|
|
5
5
|
*
|
|
6
6
|
* Usage:
|
|
7
|
-
* node scripts/setup
|
|
8
|
-
* node scripts/setup
|
|
9
|
-
* node scripts/setup
|
|
10
|
-
* node scripts/setup
|
|
11
|
-
* node scripts/setup
|
|
7
|
+
* node scripts/org-setup.mjs --target-org <alias> # interactive step picker (all selected)
|
|
8
|
+
* node scripts/org-setup.mjs --target-org <alias> --yes # skip picker, run all steps
|
|
9
|
+
* node scripts/org-setup.mjs --target-org afv5 --skip-login
|
|
10
|
+
* node scripts/org-setup.mjs --target-org afv5 --skip-data --skip-ui-bundle-build
|
|
11
|
+
* node scripts/org-setup.mjs --target-org myorg --ui-bundle-name my-app
|
|
12
12
|
*
|
|
13
13
|
* Steps (in order):
|
|
14
14
|
* 1. login — sf org login web only if org not already connected (skip with --skip-login)
|
|
@@ -28,6 +28,32 @@ import { readdirSync, existsSync, readFileSync, writeFileSync, unlinkSync } from
|
|
|
28
28
|
const __dirname = dirname(fileURLToPath(import.meta.url));
|
|
29
29
|
const ROOT = resolve(__dirname, '..');
|
|
30
30
|
|
|
31
|
+
/**
|
|
32
|
+
* npm strips .gitignore from published packages — generate them on first run.
|
|
33
|
+
* Templates are stored in scripts/gitignore-templates.json (generated at build
|
|
34
|
+
* time from the actual .gitignore files) so the content lives in one place.
|
|
35
|
+
* The JSON may not exist in git-cloned distributions where .gitignore is
|
|
36
|
+
* already present, so loading is best-effort.
|
|
37
|
+
*/
|
|
38
|
+
function loadGitignoreTemplates() {
|
|
39
|
+
const templatesPath = resolve(__dirname, 'gitignore-templates.json');
|
|
40
|
+
if (!existsSync(templatesPath)) return null;
|
|
41
|
+
try {
|
|
42
|
+
return JSON.parse(readFileSync(templatesPath, 'utf8'));
|
|
43
|
+
} catch {
|
|
44
|
+
return null;
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
function ensureGitignore(dir, content) {
|
|
49
|
+
if (!content) return;
|
|
50
|
+
const gitignorePath = resolve(dir, '.gitignore');
|
|
51
|
+
if (!existsSync(gitignorePath)) {
|
|
52
|
+
writeFileSync(gitignorePath, content, 'utf8');
|
|
53
|
+
console.log(`Created .gitignore in ${dir}`);
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
|
|
31
57
|
function resolveSfdxSource() {
|
|
32
58
|
const sfdxPath = resolve(ROOT, 'sfdx-project.json');
|
|
33
59
|
if (!existsSync(sfdxPath)) {
|
|
@@ -84,7 +110,7 @@ function parseArgs() {
|
|
|
84
110
|
Setup CLI — one-command setup for apps in this project
|
|
85
111
|
|
|
86
112
|
Usage:
|
|
87
|
-
node scripts/setup
|
|
113
|
+
node scripts/org-setup.mjs --target-org <alias> [options]
|
|
88
114
|
|
|
89
115
|
Required:
|
|
90
116
|
--target-org <alias> Target Salesforce org alias (e.g. myorg)
|
|
@@ -292,6 +318,19 @@ function run(name, cmd, args, opts = {}) {
|
|
|
292
318
|
}
|
|
293
319
|
|
|
294
320
|
async function main() {
|
|
321
|
+
// Ensure .gitignore files exist (npm strips them from published packages).
|
|
322
|
+
const gitignoreTemplates = loadGitignoreTemplates();
|
|
323
|
+
if (gitignoreTemplates) {
|
|
324
|
+
ensureGitignore(ROOT, gitignoreTemplates.sfdx);
|
|
325
|
+
if (existsSync(WEBAPPLICATIONS_DIR)) {
|
|
326
|
+
for (const entry of readdirSync(WEBAPPLICATIONS_DIR, { withFileTypes: true })) {
|
|
327
|
+
if (entry.isDirectory() && !entry.name.startsWith('.')) {
|
|
328
|
+
ensureGitignore(resolve(WEBAPPLICATIONS_DIR, entry.name), gitignoreTemplates.webapp);
|
|
329
|
+
}
|
|
330
|
+
}
|
|
331
|
+
}
|
|
332
|
+
}
|
|
333
|
+
|
|
295
334
|
const {
|
|
296
335
|
targetOrg,
|
|
297
336
|
uiBundleName,
|
|
@@ -10,11 +10,36 @@
|
|
|
10
10
|
import { spawnSync } from 'node:child_process';
|
|
11
11
|
import { resolve, dirname } from 'node:path';
|
|
12
12
|
import { fileURLToPath } from 'node:url';
|
|
13
|
-
import { readdirSync, existsSync, readFileSync } from 'node:fs';
|
|
13
|
+
import { readdirSync, existsSync, readFileSync, writeFileSync } from 'node:fs';
|
|
14
14
|
|
|
15
15
|
const __dirname = dirname(fileURLToPath(import.meta.url));
|
|
16
16
|
const ROOT = resolve(__dirname, '..');
|
|
17
17
|
|
|
18
|
+
/**
|
|
19
|
+
* npm strips .gitignore from published packages — generate them on first run.
|
|
20
|
+
* Templates are stored in scripts/gitignore-templates.json (generated at build
|
|
21
|
+
* time from the actual .gitignore files). The JSON may not exist in git-cloned
|
|
22
|
+
* distributions where .gitignore is already present, so loading is best-effort.
|
|
23
|
+
*/
|
|
24
|
+
function loadGitignoreTemplates() {
|
|
25
|
+
const templatesPath = resolve(__dirname, 'gitignore-templates.json');
|
|
26
|
+
if (!existsSync(templatesPath)) return null;
|
|
27
|
+
try {
|
|
28
|
+
return JSON.parse(readFileSync(templatesPath, 'utf8'));
|
|
29
|
+
} catch {
|
|
30
|
+
return null;
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
function ensureGitignore(dir, content) {
|
|
35
|
+
if (!content) return;
|
|
36
|
+
const gitignorePath = resolve(dir, '.gitignore');
|
|
37
|
+
if (!existsSync(gitignorePath)) {
|
|
38
|
+
writeFileSync(gitignorePath, content, 'utf8');
|
|
39
|
+
console.log(`Created .gitignore in ${dir}`);
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
|
|
18
43
|
function resolveUIBundlesDir() {
|
|
19
44
|
const sfdxPath = resolve(ROOT, 'sfdx-project.json');
|
|
20
45
|
if (!existsSync(sfdxPath)) {
|
|
@@ -56,6 +81,20 @@ function run(label, cmd, args, opts) {
|
|
|
56
81
|
}
|
|
57
82
|
}
|
|
58
83
|
|
|
84
|
+
// Ensure .gitignore files exist (npm strips them from published packages).
|
|
85
|
+
const gitignoreTemplates = loadGitignoreTemplates();
|
|
86
|
+
if (gitignoreTemplates) {
|
|
87
|
+
ensureGitignore(ROOT, gitignoreTemplates.sfdx);
|
|
88
|
+
const bundlesDir = resolveUIBundlesDir();
|
|
89
|
+
if (existsSync(bundlesDir)) {
|
|
90
|
+
for (const entry of readdirSync(bundlesDir, { withFileTypes: true })) {
|
|
91
|
+
if (entry.isDirectory() && !entry.name.startsWith('.')) {
|
|
92
|
+
ensureGitignore(resolve(bundlesDir, entry.name), gitignoreTemplates.webapp);
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
|
|
59
98
|
const uiBundleDir = discoverUIBundleDir();
|
|
60
99
|
console.log('SFDX project root:', ROOT);
|
|
61
100
|
console.log('UI bundle directory:', uiBundleDir);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@salesforce/ui-bundle-template-app-react-sample-b2e",
|
|
3
|
-
"version": "1.118.
|
|
3
|
+
"version": "1.118.2",
|
|
4
4
|
"description": "Salesforce sample property rental React app",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE.txt",
|
|
6
6
|
"author": "",
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
"clean": "rm -rf dist"
|
|
17
17
|
},
|
|
18
18
|
"dependencies": {
|
|
19
|
-
"@salesforce/ui-bundle": "^1.118.
|
|
19
|
+
"@salesforce/ui-bundle": "^1.118.2",
|
|
20
20
|
"sonner": "^1.7.0"
|
|
21
21
|
},
|
|
22
22
|
"devDependencies": {
|