@salesforce/ui-bundle-template-feature-react-agentforce-conversation-client 11.44.2 → 11.44.3
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/CHANGELOG.md +9 -0
- package/dist/force-app/main/default/uiBundles/feature-react-agentforce-conversation-client/package.json +4 -4
- package/dist/package-lock.json +2 -2
- package/dist/package.json +1 -1
- package/dist/scripts/org-setup-utils.mjs +33 -3
- package/dist/scripts/org-setup.mjs +24 -2
- package/package.json +2 -2
package/dist/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,15 @@
|
|
|
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
|
+
## [11.44.3](https://github.com/salesforce-experience-platform-emu/webapps/compare/v11.44.2...v11.44.3) (2026-07-29)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Bug Fixes
|
|
10
|
+
|
|
11
|
+
* data import JSON parsing fails due to debug log format - @W-23626126@ ([#817](https://github.com/salesforce-experience-platform-emu/webapps/issues/817)) ([17fd9d7](https://github.com/salesforce-experience-platform-emu/webapps/commit/17fd9d77e76ca7385c40df03976492ed77d01ace))
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
6
15
|
## [11.44.2](https://github.com/salesforce-experience-platform-emu/webapps/compare/v11.44.1...v11.44.2) (2026-07-29)
|
|
7
16
|
|
|
8
17
|
**Note:** Version bump only for package @salesforce/ui-bundle-template-base-sfdx-project
|
|
@@ -18,8 +18,8 @@
|
|
|
18
18
|
"graphql:schema": "node scripts/get-graphql-schema.mjs"
|
|
19
19
|
},
|
|
20
20
|
"dependencies": {
|
|
21
|
-
"@salesforce/platform-sdk": "^11.44.
|
|
22
|
-
"@salesforce/ui-bundle": "^11.44.
|
|
21
|
+
"@salesforce/platform-sdk": "^11.44.3",
|
|
22
|
+
"@salesforce/ui-bundle": "^11.44.3",
|
|
23
23
|
"@tailwindcss/vite": "^4.1.17",
|
|
24
24
|
"class-variance-authority": "^0.7.1",
|
|
25
25
|
"clsx": "^2.1.1",
|
|
@@ -45,8 +45,8 @@
|
|
|
45
45
|
"@graphql-eslint/eslint-plugin": "^4.1.0",
|
|
46
46
|
"@graphql-tools/utils": "^11.0.0",
|
|
47
47
|
"@playwright/test": "^1.49.0",
|
|
48
|
-
"@salesforce/graphiti": "^11.44.
|
|
49
|
-
"@salesforce/vite-plugin-ui-bundle": "^11.44.
|
|
48
|
+
"@salesforce/graphiti": "^11.44.3",
|
|
49
|
+
"@salesforce/vite-plugin-ui-bundle": "^11.44.3",
|
|
50
50
|
"@testing-library/jest-dom": "^6.6.3",
|
|
51
51
|
"@testing-library/react": "^16.1.0",
|
|
52
52
|
"@testing-library/user-event": "^14.5.2",
|
package/dist/package-lock.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@salesforce/ui-bundle-template-base-sfdx-project",
|
|
3
|
-
"version": "11.44.
|
|
3
|
+
"version": "11.44.3",
|
|
4
4
|
"lockfileVersion": 3,
|
|
5
5
|
"requires": true,
|
|
6
6
|
"packages": {
|
|
7
7
|
"": {
|
|
8
8
|
"name": "@salesforce/ui-bundle-template-base-sfdx-project",
|
|
9
|
-
"version": "11.44.
|
|
9
|
+
"version": "11.44.3",
|
|
10
10
|
"license": "SEE LICENSE IN LICENSE.txt",
|
|
11
11
|
"dependencies": {
|
|
12
12
|
"fast-xml-parser": "^5.9.3",
|
package/dist/package.json
CHANGED
|
@@ -133,8 +133,20 @@ export function validateApiName(value, fieldLabel) {
|
|
|
133
133
|
*/
|
|
134
134
|
export function parseApexInsertResults(apexOut) {
|
|
135
135
|
const text = String(apexOut ?? '');
|
|
136
|
-
|
|
137
|
-
//
|
|
136
|
+
|
|
137
|
+
// Strategy: the actual System.debug output appears somewhere in the log as a JSON array.
|
|
138
|
+
// First, try to find it via the USER_DEBUG line format (most reliable).
|
|
139
|
+
// The line looks like: `...|USER_DEBUG|[line]|ERROR|SETUP_RESULT_JSON:[{"ref":"a","id":"001..."}]`.
|
|
140
|
+
// The array can be empty ([]) for zero records, so use .*? instead of .+? to allow empty arrays.
|
|
141
|
+
// Accept any log level (DEBUG, ERROR, etc) to handle both old and new logging configurations.
|
|
142
|
+
const userDebugPattern = /\|USER_DEBUG\|.*?\|(DEBUG|ERROR|INFO|WARN)\|SETUP_RESULT_JSON:(\[.*?\])(?:\n|$)/s;
|
|
143
|
+
let match = text.match(userDebugPattern);
|
|
144
|
+
|
|
145
|
+
if (match) {
|
|
146
|
+
return parseJsonPayload(match[2].trim());
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
// Fallback: look for the marker followed by a JSON array, but skip "Execute Anonymous:" lines
|
|
138
150
|
const markerIdx = text.indexOf('SETUP_RESULT_JSON:');
|
|
139
151
|
if (markerIdx === -1) {
|
|
140
152
|
return {
|
|
@@ -144,10 +156,28 @@ export function parseApexInsertResults(apexOut) {
|
|
|
144
156
|
errors: [],
|
|
145
157
|
};
|
|
146
158
|
}
|
|
159
|
+
|
|
160
|
+
// Check if this is the source code line, not the debug output
|
|
161
|
+
const lineStart = text.lastIndexOf('\n', markerIdx) + 1;
|
|
162
|
+
const line = text.slice(lineStart, Math.min(text.length, lineStart + 200));
|
|
163
|
+
if (line.includes('Execute Anonymous:')) {
|
|
164
|
+
return {
|
|
165
|
+
ok: false,
|
|
166
|
+
error: 'found SETUP_RESULT_JSON in source code but not in debug output (debug output may be missing or truncated)',
|
|
167
|
+
successes: [],
|
|
168
|
+
errors: [],
|
|
169
|
+
};
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
// Extract what follows the marker up to end of line. Pass it to parseJsonPayload
|
|
173
|
+
// which will validate it's proper JSON and an array, giving specific error messages.
|
|
147
174
|
const afterMarker = text.slice(markerIdx + 'SETUP_RESULT_JSON:'.length);
|
|
148
|
-
// The payload runs to the end of the debug line; stop at the first newline.
|
|
149
175
|
const payload = afterMarker.split('\n')[0].trim();
|
|
150
176
|
|
|
177
|
+
return parseJsonPayload(payload);
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
function parseJsonPayload(payload) {
|
|
151
181
|
let parsed;
|
|
152
182
|
try {
|
|
153
183
|
parsed = JSON.parse(payload);
|
|
@@ -1056,7 +1056,10 @@ function buildApexInsert(sobject, records, refIds) {
|
|
|
1056
1056
|
lines.push(' else { m.put(\'err\', results[i].getErrors()[0].getMessage()); }');
|
|
1057
1057
|
lines.push(' setupOut.add(m);');
|
|
1058
1058
|
lines.push('}');
|
|
1059
|
-
|
|
1059
|
+
// Use LoggingLevel.ERROR to ensure this critical line appears near the end of
|
|
1060
|
+
// the debug log and isn't truncated by excessive DEBUG-level noise from DML
|
|
1061
|
+
// operations, workflow rules, or process builders that fire during insert.
|
|
1062
|
+
lines.push("System.debug(LoggingLevel.ERROR, 'SETUP_RESULT_JSON:' + JSON.serialize(setupOut));");
|
|
1060
1063
|
return lines.join('\n');
|
|
1061
1064
|
}
|
|
1062
1065
|
|
|
@@ -1672,8 +1675,14 @@ async function main() {
|
|
|
1672
1675
|
// API headers (Sforce-Duplicate-Rule-Action) cannot override.
|
|
1673
1676
|
console.log('\n--- Data import (Apex) ---');
|
|
1674
1677
|
const refMap = new Map();
|
|
1678
|
+
// Apex anonymous code is capped at ~1M chars total, but each batch is much
|
|
1679
|
+
// smaller in practice. The real constraint is the SETUP_RESULT_JSON debug log
|
|
1680
|
+
// line: Salesforce truncates debug lines at ~5KB, and large batches produce
|
|
1681
|
+
// JSON arrays that exceed that limit. With RESULT_JSON_PER_RECORD = 150 and
|
|
1682
|
+
// MAX_BATCH = 100, the worst-case output is ~15KB of JSON, which fits
|
|
1683
|
+
// comfortably after the debug-line prefix and the marker.
|
|
1675
1684
|
const APEX_CHAR_LIMIT = 25000;
|
|
1676
|
-
const APEX_MAX_BATCH =
|
|
1685
|
+
const APEX_MAX_BATCH = 100;
|
|
1677
1686
|
|
|
1678
1687
|
for (const entry of planEntries) {
|
|
1679
1688
|
for (const file of entry.files) {
|
|
@@ -1705,7 +1714,16 @@ async function main() {
|
|
|
1705
1714
|
// rendered refId literal is counted here too (mirroring the same
|
|
1706
1715
|
// referenceId/_idx fallback the batch emit uses) — otherwise sizing
|
|
1707
1716
|
// under-counts and a packed batch could edge past APEX_CHAR_LIMIT.
|
|
1717
|
+
//
|
|
1718
|
+
// CRITICAL: also account for the SETUP_RESULT_JSON output size. The
|
|
1719
|
+
// System.debug line can exceed the Salesforce debug log line limit when
|
|
1720
|
+
// the serialized JSON array is large. Estimate ~85 chars per success
|
|
1721
|
+
// result ({"ref":"_idxNNN","id":"001XXXXXXXXXXXXXXX"}) and ~150 chars per
|
|
1722
|
+
// potential error ({"ref":"_idxNNN","err":"typical error message"}), taking
|
|
1723
|
+
// the higher value to be conservative. This ensures the batching prevents
|
|
1724
|
+
// log truncation that would fail parseApexInsertResults.
|
|
1708
1725
|
const overhead = buildApexInsert(entry.sobject, [], []).length;
|
|
1726
|
+
const RESULT_JSON_PER_RECORD = 150;
|
|
1709
1727
|
const recordSizes = records.map((rec, i) => {
|
|
1710
1728
|
let size = `{ ${entry.sobject} r = new ${entry.sobject}();\n`.length + 'recs.add(r); }\n'.length;
|
|
1711
1729
|
for (const [key, val] of Object.entries(rec)) {
|
|
@@ -1714,6 +1732,10 @@ async function main() {
|
|
|
1714
1732
|
}
|
|
1715
1733
|
const refId = rec.attributes?.referenceId || `_idx${i}`;
|
|
1716
1734
|
size += `'${escapeSoqlString(refId)}',`.length;
|
|
1735
|
+
// Add the estimated size of this record's JSON result entry in the
|
|
1736
|
+
// SETUP_RESULT_JSON output. Without this, large batches can produce
|
|
1737
|
+
// debug log lines that exceed Salesforce's limit and get truncated.
|
|
1738
|
+
size += RESULT_JSON_PER_RECORD;
|
|
1717
1739
|
return size;
|
|
1718
1740
|
});
|
|
1719
1741
|
const batches = planApexBatches(recordSizes, {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@salesforce/ui-bundle-template-feature-react-agentforce-conversation-client",
|
|
3
|
-
"version": "11.44.
|
|
3
|
+
"version": "11.44.3",
|
|
4
4
|
"description": "Embedded Agentforce conversation client feature for UI Bundles",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE.txt",
|
|
6
6
|
"author": "",
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
"clean": "rm -rf dist"
|
|
27
27
|
},
|
|
28
28
|
"dependencies": {
|
|
29
|
-
"@salesforce/agentforce-conversation-client": "^11.44.
|
|
29
|
+
"@salesforce/agentforce-conversation-client": "^11.44.3"
|
|
30
30
|
},
|
|
31
31
|
"devDependencies": {
|
|
32
32
|
"@types/react": "^19.2.7",
|