Skip to content

Commit 768aa1e

Browse files
chore: sync React B2E (1.112.10) & B2X (1.112.10) samples from npm (#103)
Co-authored-by: gbockus-sf <76090802+gbockus-sf@users.noreply.github.com>
1 parent f8799ac commit 768aa1e

146 files changed

Lines changed: 15648 additions & 7257 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

package-lock.json

Lines changed: 22 additions & 22 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@
1111
"registry": "https://registry.npmjs.org"
1212
},
1313
"devDependencies": {
14-
"@salesforce/webapp-template-app-react-sample-b2e-experimental": "^1.112.7",
15-
"@salesforce/webapp-template-app-react-sample-b2x-experimental": "^1.112.7",
14+
"@salesforce/webapp-template-app-react-sample-b2e-experimental": "^1.112.10",
15+
"@salesforce/webapp-template-app-react-sample-b2x-experimental": "^1.112.10",
1616
"@types/js-yaml": "^4.0.9",
1717
"js-yaml": "^4.1.1",
1818
"tsx": "^4.21.0"
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
1.112.7
1+
1.112.10

samples/webapp-template-app-react-sample-b2e-experimental/CHANGELOG.md

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,33 @@
33
All notable changes to this project will be documented in this file.
44
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
55

6+
## [1.112.10](https://github.com/salesforce-experience-platform-emu/webapps/compare/v1.112.9...v1.112.10) (2026-03-24)
7+
8+
**Note:** Version bump only for package @salesforce/webapp-template-base-sfdx-project-experimental
9+
10+
11+
12+
13+
14+
## [1.112.9](https://github.com/salesforce-experience-platform-emu/webapps/compare/v1.112.8...v1.112.9) (2026-03-24)
15+
16+
17+
### Bug Fixes
18+
19+
* address PR [#81](https://github.com/salesforce-experience-platform-emu/webapps/issues/81) review feedback on graphql-search.sh ([#345](https://github.com/salesforce-experience-platform-emu/webapps/issues/345)) ([54a6e59](https://github.com/salesforce-experience-platform-emu/webapps/commit/54a6e590afd1923a12f776eba6b6cc147729c697))
20+
21+
22+
23+
24+
25+
## [1.112.8](https://github.com/salesforce-experience-platform-emu/webapps/compare/v1.112.7...v1.112.8) (2026-03-24)
26+
27+
**Note:** Version bump only for package @salesforce/webapp-template-base-sfdx-project-experimental
28+
29+
30+
31+
32+
633
## [1.112.7](https://github.com/salesforce-experience-platform-emu/webapps/compare/v1.112.6...v1.112.7) (2026-03-23)
734

835
**Note:** Version bump only for package @salesforce/webapp-template-base-sfdx-project-experimental

samples/webapp-template-app-react-sample-b2e-experimental/force-app/main/default/webapplications/appreactsampleb2e/package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@
1515
"graphql:schema": "node scripts/get-graphql-schema.mjs"
1616
},
1717
"dependencies": {
18-
"@salesforce/sdk-data": "^1.112.7",
19-
"@salesforce/webapp-experimental": "^1.112.7",
18+
"@salesforce/sdk-data": "^1.112.10",
19+
"@salesforce/webapp-experimental": "^1.112.10",
2020
"@tailwindcss/vite": "^4.1.17",
2121
"class-variance-authority": "^0.7.1",
2222
"clsx": "^2.1.1",
@@ -43,7 +43,7 @@
4343
"@graphql-eslint/eslint-plugin": "^4.1.0",
4444
"@graphql-tools/utils": "^11.0.0",
4545
"@playwright/test": "^1.49.0",
46-
"@salesforce/vite-plugin-webapp-experimental": "^1.112.7",
46+
"@salesforce/vite-plugin-webapp-experimental": "^1.112.10",
4747
"@testing-library/jest-dom": "^6.6.3",
4848
"@testing-library/react": "^16.1.0",
4949
"@testing-library/user-event": "^14.5.2",

samples/webapp-template-app-react-sample-b2e-experimental/package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

samples/webapp-template-app-react-sample-b2e-experimental/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@salesforce/webapp-template-base-sfdx-project-experimental",
3-
"version": "1.112.7",
3+
"version": "1.112.10",
44
"description": "Base SFDX project template",
55
"license": "SEE LICENSE IN LICENSE.txt",
66
"publishConfig": {

samples/webapp-template-app-react-sample-b2e-experimental/scripts/graphql-search.sh

Lines changed: 69 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
#!/usr/bin/env bash
2+
set -euo pipefail # exit on error (-e), undefined vars (-u), and propagate pipeline failures (-o pipefail)
23
# graphql-search.sh — Look up one or more Salesforce entities in schema.graphql.
34
#
45
# Run from the SFDX project root (where schema.graphql lives):
@@ -10,11 +11,13 @@
1011
# bash scripts/graphql-search.sh --schema ./other/schema.graphql Account Contact
1112
#
1213
# Output sections per entity:
13-
# 1. Type definition — all fields and relationships
14-
# 2. Filter options — <Entity>_Filter input (for `where:`)
15-
# 3. Sort options — <Entity>_OrderBy input (for `orderBy:`)
16-
# 4. Create input — <Entity>CreateRepresentation (for create mutations)
17-
# 5. Update input — <Entity>UpdateRepresentation (for update mutations)
14+
# 1. Type definition — all fields and relationships
15+
# 2. Filter options — <Entity>_Filter input (for `where:`)
16+
# 3. Sort options — <Entity>_OrderBy input (for `orderBy:`)
17+
# 4. Create mutation wrapper — <Entity>CreateInput
18+
# 5. Create mutation fields — <Entity>CreateRepresentation (for create mutations)
19+
# 6. Update mutation wrapper — <Entity>UpdateInput
20+
# 7. Update mutation fields — <Entity>UpdateRepresentation (for update mutations)
1821

1922
SCHEMA="./schema.graphql"
2023

@@ -62,6 +65,19 @@ if [ ! -f "$SCHEMA" ]; then
6265
exit 1
6366
fi
6467

68+
if [ ! -r "$SCHEMA" ]; then
69+
echo "ERROR: schema.graphql is not readable at $SCHEMA"
70+
echo " Check file permissions: ls -la $SCHEMA"
71+
exit 1
72+
fi
73+
74+
if [ ! -s "$SCHEMA" ]; then
75+
echo "ERROR: schema.graphql is empty at $SCHEMA"
76+
echo " Regenerate it from the webapp dir:"
77+
echo " cd force-app/main/default/webapplications/<app-name> && npm run graphql:schema"
78+
exit 1
79+
fi
80+
6581
# ── Helper: extract lines from a grep match through the closing brace ────────
6682
# Prints up to MAX_LINES lines after (and including) the first match of PATTERN.
6783
# Uses a generous line count — blocks are always closed by a "}" line.
@@ -72,68 +88,104 @@ extract_block() {
7288
local max_lines="$3"
7389

7490
local match
75-
match=$(grep -nE "$pattern" "$SCHEMA" | head -1)
91+
local grep_exit=0
92+
match=$(grep -nE "$pattern" "$SCHEMA" | head -1) || grep_exit=$?
93+
94+
if [ "$grep_exit" -eq 2 ]; then
95+
echo " ERROR: grep failed on pattern: $pattern" >&2
96+
return 1
97+
fi
7698

7799
if [ -z "$match" ]; then
78100
echo " (not found: $pattern)"
79-
return
101+
return 3
80102
fi
81103

82104
echo "### $label"
83105
grep -E "$pattern" "$SCHEMA" -A "$max_lines" | \
84106
awk '/^\}$/{print; exit} {print}' | \
85-
head -n "$max_lines"
107+
head -n "$max_lines" || true
86108
echo ""
87109
}
88110

89111
# ── Main loop ────────────────────────────────────────────────────────────────
90112

91113
for ENTITY in "$@"; do
114+
# Validate entity name: must be a valid PascalCase identifier (letters, digits, underscores)
115+
if [[ ! "$ENTITY" =~ ^[A-Za-z_][A-Za-z0-9_]*$ ]]; then
116+
echo "ERROR: Invalid entity name: '$ENTITY'"
117+
echo " Entity names must start with a letter or underscore, followed by letters, digits, or underscores."
118+
echo " Examples: Account, My_Custom_Object__c"
119+
continue
120+
fi
121+
92122
echo ""
93123
echo "======================================================================"
94124
echo " SCHEMA LOOKUP: $ENTITY"
95125
echo "======================================================================"
96126
echo ""
97127

128+
found=0
129+
130+
# Helper: call extract_block, track matches, surface errors
131+
try_extract() {
132+
local rc=0
133+
extract_block "$@" || rc=$?
134+
if [ "$rc" -eq 0 ]; then
135+
found=$((found + 1))
136+
elif [ "$rc" -eq 1 ]; then
137+
echo " Aborting lookup for '$ENTITY' due to grep error" >&2
138+
fi
139+
# rc=3 is not-found — continue silently (already printed by extract_block)
140+
}
141+
98142
# 1. Type definition — all fields and relationships
99-
extract_block \
143+
try_extract \
100144
"Type definition — fields and relationships" \
101145
"^type ${ENTITY} implements Record" \
102146
200
103147

104148
# 2. Filter input — used in `where:` arguments
105-
extract_block \
149+
try_extract \
106150
"Filter options — use in where: { ... }" \
107151
"^input ${ENTITY}_Filter" \
108152
100
109153

110154
# 3. OrderBy input — used in `orderBy:` arguments
111-
extract_block \
155+
try_extract \
112156
"Sort options — use in orderBy: { ... }" \
113157
"^input ${ENTITY}_OrderBy" \
114158
60
115159

116-
# 4. Create mutation inputs
117-
extract_block \
160+
# 4. Create mutation wrapper
161+
try_extract \
118162
"Create mutation wrapper — ${ENTITY}CreateInput" \
119163
"^input ${ENTITY}CreateInput" \
120164
10
121165

122-
extract_block \
166+
# 5. Create mutation fields
167+
try_extract \
123168
"Create mutation fields — ${ENTITY}CreateRepresentation" \
124169
"^input ${ENTITY}CreateRepresentation" \
125170
100
126171

127-
# 5. Update mutation inputs
128-
extract_block \
172+
# 6. Update mutation wrapper
173+
try_extract \
129174
"Update mutation wrapper — ${ENTITY}UpdateInput" \
130175
"^input ${ENTITY}UpdateInput" \
131176
10
132177

133-
extract_block \
178+
# 7. Update mutation fields
179+
try_extract \
134180
"Update mutation fields — ${ENTITY}UpdateRepresentation" \
135181
"^input ${ENTITY}UpdateRepresentation" \
136182
100
137183

184+
if [ "$found" -eq 0 ]; then
185+
echo "WARNING: No schema entries found for '$ENTITY'."
186+
echo " - Names are PascalCase (e.g., 'Account' not 'account')"
187+
echo " - Custom objects may need deployment first"
188+
fi
189+
138190
echo ""
139191
done
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
1.112.7
1+
1.112.10

samples/webapp-template-app-react-sample-b2x-experimental/CHANGELOG.md

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,33 @@
33
All notable changes to this project will be documented in this file.
44
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
55

6+
## [1.112.10](https://github.com/salesforce-experience-platform-emu/webapps/compare/v1.112.9...v1.112.10) (2026-03-24)
7+
8+
**Note:** Version bump only for package @salesforce/webapp-template-base-sfdx-project-experimental
9+
10+
11+
12+
13+
14+
## [1.112.9](https://github.com/salesforce-experience-platform-emu/webapps/compare/v1.112.8...v1.112.9) (2026-03-24)
15+
16+
17+
### Bug Fixes
18+
19+
* address PR [#81](https://github.com/salesforce-experience-platform-emu/webapps/issues/81) review feedback on graphql-search.sh ([#345](https://github.com/salesforce-experience-platform-emu/webapps/issues/345)) ([54a6e59](https://github.com/salesforce-experience-platform-emu/webapps/commit/54a6e590afd1923a12f776eba6b6cc147729c697))
20+
21+
22+
23+
24+
25+
## [1.112.8](https://github.com/salesforce-experience-platform-emu/webapps/compare/v1.112.7...v1.112.8) (2026-03-24)
26+
27+
**Note:** Version bump only for package @salesforce/webapp-template-base-sfdx-project-experimental
28+
29+
30+
31+
32+
633
## [1.112.7](https://github.com/salesforce-experience-platform-emu/webapps/compare/v1.112.6...v1.112.7) (2026-03-23)
734

835
**Note:** Version bump only for package @salesforce/webapp-template-base-sfdx-project-experimental

0 commit comments

Comments
 (0)