@salesforce/ui-bundle-template-feature-angular-language-switcher 12.6.3-canary.999.2.1.gd0b2ab15 → 12.7.0
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/README.md +6 -0
- package/dist/force-app/main/default/uiBundles/feature-angular-language-switcher/package.json +4 -4
- package/dist/force-app/main/default/uiBundles/feature-angular-language-switcher/src/app/components/ui/button/button.ts +1 -8
- package/dist/package-lock.json +2 -2
- package/dist/package.json +1 -1
- package/dist/scripts/network-senders.mjs +84 -0
- package/dist/scripts/org-setup-xml.mjs +11 -6
- package/dist/scripts/org-setup.mjs +13 -5
- package/package.json +1 -1
- package/dist/LICENSE.txt +0 -82
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
|
+
## [12.7.0](https://github.com/salesforce-experience-platform-emu/webapps/compare/v12.6.3...v12.7.0) (2026-09-22)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Bug Fixes
|
|
10
|
+
|
|
11
|
+
* **template-sfdx-project:** preserve target network sender addresses @W-24209513@ ([#993](https://github.com/salesforce-experience-platform-emu/webapps/issues/993)) ([fddbfdd](https://github.com/salesforce-experience-platform-emu/webapps/commit/fddbfddcb41270720372b0fd4c486f043d9ba8c5))
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
6
15
|
## [12.6.3](https://github.com/salesforce-experience-platform-emu/webapps/compare/v12.6.2...v12.6.3) (2026-09-14)
|
|
7
16
|
|
|
8
17
|
**Note:** Version bump only for package @salesforce/ui-bundle-template-base-sfdx-project
|
package/dist/README.md
CHANGED
|
@@ -24,6 +24,12 @@ default org or, in an interactive terminal, prompts you to pick one.
|
|
|
24
24
|
npm run setup -- --target-org <alias> # or omit --target-org to use the default / pick
|
|
25
25
|
```
|
|
26
26
|
|
|
27
|
+
Before each Network deployment, setup reads the target org's existing sender
|
|
28
|
+
address and preserves it in the local metadata. Sender changes must be made in
|
|
29
|
+
the site's Administration settings. For a direct `sf project deploy` command,
|
|
30
|
+
first run `node scripts/network-senders.mjs --target-org <alias>` after generating
|
|
31
|
+
the project.
|
|
32
|
+
|
|
27
33
|
Setup does **not** start the dev server. Once the org is set up, use `dev:preview` to
|
|
28
34
|
refresh the GraphQL types against the org and launch the Vite dev server on its own:
|
|
29
35
|
|
package/dist/force-app/main/default/uiBundles/feature-angular-language-switcher/package.json
CHANGED
|
@@ -28,8 +28,8 @@
|
|
|
28
28
|
"@angular/router": "^21.2.0",
|
|
29
29
|
"@ng-icons/core": "^32.2.0",
|
|
30
30
|
"@ng-icons/lucide": "^32.2.0",
|
|
31
|
-
"@salesforce/angular-plugin-ui-bundle": "^12.
|
|
32
|
-
"@salesforce/platform-sdk": "^12.
|
|
31
|
+
"@salesforce/angular-plugin-ui-bundle": "^12.7.0",
|
|
32
|
+
"@salesforce/platform-sdk": "^12.7.0",
|
|
33
33
|
"@spartan-ng/brain": "^1.3.1",
|
|
34
34
|
"class-variance-authority": "^0.7.1",
|
|
35
35
|
"clsx": "^2.1.1",
|
|
@@ -60,8 +60,8 @@
|
|
|
60
60
|
"tailwindcss": "^4.0.0",
|
|
61
61
|
"typescript": "~5.9.2",
|
|
62
62
|
"typescript-eslint": "^8.0.0",
|
|
63
|
-
"vitest": "^4.1.
|
|
64
|
-
"@salesforce/graphiti": "^12.
|
|
63
|
+
"vitest": "^4.1.11",
|
|
64
|
+
"@salesforce/graphiti": "^12.7.0"
|
|
65
65
|
},
|
|
66
66
|
"overrides": {
|
|
67
67
|
"undici": "^7.28.0"
|
|
@@ -18,14 +18,7 @@ import { SpinnerComponent } from '../spinner/spinner';
|
|
|
18
18
|
|
|
19
19
|
export type AppButtonAppearance = 'filled' | 'outlined' | 'text' | 'destructive';
|
|
20
20
|
export type AppButtonSize =
|
|
21
|
-
| '
|
|
22
|
-
| 'xs'
|
|
23
|
-
| 'sm'
|
|
24
|
-
| 'lg'
|
|
25
|
-
| 'icon'
|
|
26
|
-
| 'icon-xs'
|
|
27
|
-
| 'icon-sm'
|
|
28
|
-
| 'icon-lg';
|
|
21
|
+
'default' | 'xs' | 'sm' | 'lg' | 'icon' | 'icon-xs' | 'icon-sm' | 'icon-lg';
|
|
29
22
|
|
|
30
23
|
const APPEARANCE_TO_VARIANT: Record<AppButtonAppearance, string> = {
|
|
31
24
|
filled: 'default',
|
package/dist/package-lock.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@salesforce/ui-bundle-template-base-sfdx-project",
|
|
3
|
-
"version": "12.
|
|
3
|
+
"version": "12.7.0",
|
|
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": "12.
|
|
9
|
+
"version": "12.7.0",
|
|
10
10
|
"license": "SEE LICENSE IN LICENSE.txt",
|
|
11
11
|
"dependencies": {
|
|
12
12
|
"fast-xml-parser": "^5.9.3",
|
package/dist/package.json
CHANGED
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
import { execFileSync } from 'node:child_process';
|
|
2
|
+
import { existsSync, readdirSync, readFileSync, writeFileSync } from 'node:fs';
|
|
3
|
+
import { join, resolve, dirname } from 'node:path';
|
|
4
|
+
import { fileURLToPath } from 'node:url';
|
|
5
|
+
import { XMLBuilder } from 'fast-xml-parser';
|
|
6
|
+
import { parseNetworkDocument, NetworkXmlError } from './org-setup-xml.mjs';
|
|
7
|
+
import { escapeSoqlString } from './org-setup-utils.mjs';
|
|
8
|
+
|
|
9
|
+
const builder = new XMLBuilder({
|
|
10
|
+
ignoreAttributes: false,
|
|
11
|
+
commentPropName: '#comment',
|
|
12
|
+
format: true,
|
|
13
|
+
indentBy: ' ',
|
|
14
|
+
suppressEmptyNode: true,
|
|
15
|
+
});
|
|
16
|
+
|
|
17
|
+
export function preserveNetworkSenders(projectDir, targetOrg, run = execFileSync) {
|
|
18
|
+
const project = JSON.parse(readFileSync(join(projectDir, 'sfdx-project.json'), 'utf8'));
|
|
19
|
+
const files = (project.packageDirectories ?? []).flatMap(({ path }) => {
|
|
20
|
+
const dir = join(projectDir, path, 'main/default/networks');
|
|
21
|
+
if (!existsSync(dir)) return [];
|
|
22
|
+
return readdirSync(dir)
|
|
23
|
+
.filter((name) => name.endsWith('.network-meta.xml'))
|
|
24
|
+
.map((name) => ({ name: name.slice(0, -'.network-meta.xml'.length), path: join(dir, name) }));
|
|
25
|
+
});
|
|
26
|
+
if (!files.length) return;
|
|
27
|
+
|
|
28
|
+
const names = [...new Set(files.map(({ name }) => `'${escapeSoqlString(name)}'`))];
|
|
29
|
+
const response = JSON.parse(run('sf', [
|
|
30
|
+
'data', 'query', '--target-org', targetOrg,
|
|
31
|
+
'--query', `SELECT Name, EmailSenderAddress FROM Network WHERE Name IN (${names.join(',')})`,
|
|
32
|
+
'--json',
|
|
33
|
+
], { cwd: projectDir, encoding: 'utf8', stdio: ['ignore', 'pipe', 'pipe'], timeout: 60000 }));
|
|
34
|
+
if (response.status !== 0 || !Array.isArray(response.result?.records) || !response.result.done) {
|
|
35
|
+
throw new Error('Could not read all target Network sender addresses; deployment stopped.');
|
|
36
|
+
}
|
|
37
|
+
const senders = new Map(response.result.records.map((record) => [record.Name, record.EmailSenderAddress]));
|
|
38
|
+
|
|
39
|
+
const updates = files.map((file) => {
|
|
40
|
+
const original = readFileSync(file.path, 'utf8');
|
|
41
|
+
const document = parseNetworkDocument(original);
|
|
42
|
+
const network = document.Network;
|
|
43
|
+
let changed = false;
|
|
44
|
+
if (senders.has(file.name)) {
|
|
45
|
+
const sender = senders.get(file.name);
|
|
46
|
+
if (typeof sender !== 'string' || !sender.trim()) {
|
|
47
|
+
throw new Error(`The target Network "${file.name}" has no sender address; deployment stopped.`);
|
|
48
|
+
}
|
|
49
|
+
if (typeof network.emailSenderAddress !== 'string') {
|
|
50
|
+
throw new NetworkXmlError(`Expected one emailSenderAddress in ${file.name}.network-meta.xml`);
|
|
51
|
+
}
|
|
52
|
+
if (network.emailSenderAddress !== sender) {
|
|
53
|
+
network.emailSenderAddress = sender;
|
|
54
|
+
changed = true;
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
// Sender changes belong to the site's Administration workspace.
|
|
58
|
+
if ('newSenderAddress' in network) {
|
|
59
|
+
delete network.newSenderAddress;
|
|
60
|
+
changed = true;
|
|
61
|
+
}
|
|
62
|
+
return { ...file, xml: changed ? builder.build(document) : original, changed };
|
|
63
|
+
});
|
|
64
|
+
|
|
65
|
+
for (const file of updates) {
|
|
66
|
+
if (file.changed) writeFileSync(file.path, file.xml);
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
if (process.argv[1] && resolve(process.argv[1]) === fileURLToPath(import.meta.url)) {
|
|
71
|
+
const args = process.argv.slice(2);
|
|
72
|
+
if (args.length !== 2 || args[0] !== '--target-org' || !args[1].trim()) {
|
|
73
|
+
console.error('Usage: node scripts/network-senders.mjs --target-org <alias>');
|
|
74
|
+
process.exitCode = 1;
|
|
75
|
+
} else {
|
|
76
|
+
try {
|
|
77
|
+
preserveNetworkSenders(resolve(dirname(fileURLToPath(import.meta.url)), '..'), args[1]);
|
|
78
|
+
console.log('Network metadata prepared with the target org sender addresses.');
|
|
79
|
+
} catch (error) {
|
|
80
|
+
console.error(`Network metadata preparation failed: ${error.message}`);
|
|
81
|
+
process.exitCode = 1;
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
}
|
|
@@ -39,6 +39,7 @@ const parser = new XMLParser({
|
|
|
39
39
|
ignoreAttributes: false,
|
|
40
40
|
parseTagValue: false,
|
|
41
41
|
parseAttributeValue: false,
|
|
42
|
+
commentPropName: '#comment',
|
|
42
43
|
});
|
|
43
44
|
|
|
44
45
|
/**
|
|
@@ -73,22 +74,26 @@ export function assertSafeProfileName(name) {
|
|
|
73
74
|
}
|
|
74
75
|
|
|
75
76
|
/**
|
|
76
|
-
* Parse + assert this is a Network metadata document. Returns the parsed
|
|
77
|
-
*
|
|
77
|
+
* Parse + assert this is a Network metadata document. Returns the full parsed
|
|
78
|
+
* document. Throws NetworkXmlError if the root is missing (e.g. a file
|
|
78
79
|
* that is not actually network metadata).
|
|
79
80
|
*/
|
|
80
|
-
export function
|
|
81
|
+
export function parseNetworkDocument(xml) {
|
|
81
82
|
let parsed;
|
|
82
83
|
try {
|
|
83
|
-
parsed = parser.parse(xml);
|
|
84
|
+
parsed = parser.parse(xml, true);
|
|
84
85
|
} catch (e) {
|
|
85
86
|
throw new NetworkXmlError(`network metadata is not well-formed XML: ${e.message}`);
|
|
86
87
|
}
|
|
87
88
|
const network = parsed?.[NETWORK_ROOT];
|
|
88
|
-
if (network == null || typeof network !== 'object') {
|
|
89
|
+
if (network == null || typeof network !== 'object' || Array.isArray(network)) {
|
|
89
90
|
throw new NetworkXmlError(`expected a <${NETWORK_ROOT}> root node, but none was found`);
|
|
90
91
|
}
|
|
91
|
-
return
|
|
92
|
+
return parsed;
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
export function parseNetwork(xml) {
|
|
96
|
+
return parseNetworkDocument(xml)[NETWORK_ROOT];
|
|
92
97
|
}
|
|
93
98
|
|
|
94
99
|
/** Normalize a fast-xml-parser child (absent | scalar | array) to an array. */
|
|
@@ -55,6 +55,7 @@ import {
|
|
|
55
55
|
import { tmpdir } from 'node:os';
|
|
56
56
|
|
|
57
57
|
import { validateConfig } from './org-setup-config-schema.mjs';
|
|
58
|
+
import { preserveNetworkSenders } from './network-senders.mjs';
|
|
58
59
|
import {
|
|
59
60
|
addProfileToMemberGroups,
|
|
60
61
|
enableSelfRegInXml,
|
|
@@ -1149,9 +1150,14 @@ function ensureLogoutUrl(logoutUrl, siteName, targetOrg) {
|
|
|
1149
1150
|
writeFileSync(networkXmlPath, result.xml);
|
|
1150
1151
|
console.log(` Set <logoutUrl>${absoluteUrl}</logoutUrl> in ${siteName}.network-meta.xml`);
|
|
1151
1152
|
|
|
1152
|
-
|
|
1153
|
-
|
|
1154
|
-
|
|
1153
|
+
try {
|
|
1154
|
+
preserveNetworkSenders(ROOT, targetOrg);
|
|
1155
|
+
} catch (e) {
|
|
1156
|
+
console.error(` ERROR: cannot prepare Network metadata for "${siteName}" — ${e.message}. Skipping logout URL deployment.`);
|
|
1157
|
+
return;
|
|
1158
|
+
}
|
|
1159
|
+
|
|
1160
|
+
// Logout URL deployment is best-effort.
|
|
1155
1161
|
const deployResult = spawnSync('sf', [
|
|
1156
1162
|
'project', 'deploy', 'start',
|
|
1157
1163
|
'--target-org', targetOrg,
|
|
@@ -1160,8 +1166,7 @@ function ensureLogoutUrl(logoutUrl, siteName, targetOrg) {
|
|
|
1160
1166
|
if (deployResult.status !== 0) {
|
|
1161
1167
|
console.error(
|
|
1162
1168
|
` ERROR: failed to deploy <logoutUrl> for "${siteName}" (sf exit ${deployResult.status ?? 1}). ` +
|
|
1163
|
-
`
|
|
1164
|
-
`set the logout URL manually in the site's Administration settings.`,
|
|
1169
|
+
`Set the logout URL manually in the site's Administration settings.`,
|
|
1165
1170
|
);
|
|
1166
1171
|
return;
|
|
1167
1172
|
}
|
|
@@ -1208,6 +1213,8 @@ function enableSelfRegistration(selfRegConfig, siteName, targetOrg) {
|
|
|
1208
1213
|
writeFileSync(networkXmlPath, result.xml);
|
|
1209
1214
|
console.log(` Updated ${siteName}.network-meta.xml: selfRegistration=true, selfRegProfile=${selfRegProfile}`);
|
|
1210
1215
|
|
|
1216
|
+
preserveNetworkSenders(ROOT, targetOrg);
|
|
1217
|
+
|
|
1211
1218
|
// Re-deploy only the network file
|
|
1212
1219
|
const deployResult = spawnSync('sf', [
|
|
1213
1220
|
'project', 'deploy', 'start',
|
|
@@ -2118,6 +2125,7 @@ async function main() {
|
|
|
2118
2125
|
throw new StepError(`deploy blocked — ${licenseGate.reason}`);
|
|
2119
2126
|
}
|
|
2120
2127
|
}
|
|
2128
|
+
preserveNetworkSenders(ROOT, targetOrg);
|
|
2121
2129
|
run('Deploy metadata', 'sf', ['project', 'deploy', 'start', '--target-org', targetOrg], {
|
|
2122
2130
|
timeout: 180000,
|
|
2123
2131
|
});
|
package/package.json
CHANGED
package/dist/LICENSE.txt
DELETED
|
@@ -1,82 +0,0 @@
|
|
|
1
|
-
Terms of Use
|
|
2
|
-
|
|
3
|
-
Copyright 2026 Salesforce, Inc. All rights reserved.
|
|
4
|
-
|
|
5
|
-
These Terms of Use govern the download, installation, and/or use of this
|
|
6
|
-
software provided by Salesforce, Inc. ("Salesforce") (the "Software"), were
|
|
7
|
-
last updated on April 15, 2025, and constitute a legally binding
|
|
8
|
-
agreement between you and Salesforce. If you do not agree to these Terms of
|
|
9
|
-
Use, do not install or use the Software.
|
|
10
|
-
|
|
11
|
-
Salesforce grants you a worldwide, non-exclusive, no-charge, royalty-free
|
|
12
|
-
copyright license to reproduce, prepare derivative works of, publicly
|
|
13
|
-
display, publicly perform, sublicense, and distribute the Software and
|
|
14
|
-
derivative works subject to these Terms. These Terms shall be included in
|
|
15
|
-
all copies or substantial portions of the Software.
|
|
16
|
-
|
|
17
|
-
Subject to the limited rights expressly granted hereunder, Salesforce
|
|
18
|
-
reserves all rights, title, and interest in and to all intellectual
|
|
19
|
-
property subsisting in the Software. No rights are granted to you hereunder
|
|
20
|
-
other than as expressly set forth herein. Users residing in countries on
|
|
21
|
-
the United States Office of Foreign Assets Control sanction list, or which
|
|
22
|
-
are otherwise subject to a US export embargo, may not use the Software.
|
|
23
|
-
|
|
24
|
-
Implementation of the Software may require development work, for which you
|
|
25
|
-
are responsible. The Software may contain bugs, errors and
|
|
26
|
-
incompatibilities and is made available on an AS IS basis without support,
|
|
27
|
-
updates, or service level commitments.
|
|
28
|
-
|
|
29
|
-
Salesforce reserves the right at any time to modify, suspend, or
|
|
30
|
-
discontinue, the Software (or any part thereof) with or without notice. You
|
|
31
|
-
agree that Salesforce shall not be liable to you or to any third party for
|
|
32
|
-
any modification, suspension, or discontinuance.
|
|
33
|
-
|
|
34
|
-
You agree to defend Salesforce against any claim, demand, suit or
|
|
35
|
-
proceeding made or brought against Salesforce by a third party arising out
|
|
36
|
-
of or accruing from (a) your use of the Software, and (b) any application
|
|
37
|
-
you develop with the Software that infringes any copyright, trademark,
|
|
38
|
-
trade secret, trade dress, patent, or other intellectual property right of
|
|
39
|
-
any person or defames any person or violates their rights of publicity or
|
|
40
|
-
privacy (each a "Claim Against Salesforce"), and will indemnify Salesforce
|
|
41
|
-
from any damages, attorney fees, and costs finally awarded against
|
|
42
|
-
Salesforce as a result of, or for any amounts paid by Salesforce under a
|
|
43
|
-
settlement approved by you in writing of, a Claim Against Salesforce,
|
|
44
|
-
provided Salesforce (x) promptly gives you written notice of the Claim
|
|
45
|
-
Against Salesforce, (y) gives you sole control of the defense and
|
|
46
|
-
settlement of the Claim Against Salesforce (except that you may not settle
|
|
47
|
-
any Claim Against Salesforce unless it unconditionally releases Salesforce
|
|
48
|
-
of all liability), and (z) gives you all reasonable assistance, at your
|
|
49
|
-
expense.
|
|
50
|
-
|
|
51
|
-
WITHOUT LIMITING THE GENERALITY OF THE FOREGOING, THE SOFTWARE IS NOT
|
|
52
|
-
SUPPORTED AND IS PROVIDED "AS IS," WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
53
|
-
IMPLIED. IN NO EVENT SHALL SALESFORCE HAVE ANY LIABILITY FOR ANY DAMAGES,
|
|
54
|
-
INCLUDING, BUT NOT LIMITED TO, DIRECT, INDIRECT, SPECIAL, INCIDENTAL,
|
|
55
|
-
PUNITIVE, OR CONSEQUENTIAL DAMAGES, OR DAMAGES BASED ON LOST PROFITS, DATA,
|
|
56
|
-
OR USE, IN CONNECTION WITH THE SOFTWARE, HOWEVER CAUSED AND WHETHER IN
|
|
57
|
-
CONTRACT, TORT, OR UNDER ANY OTHER THEORY OF LIABILITY, WHETHER OR NOT YOU
|
|
58
|
-
HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
|
|
59
|
-
|
|
60
|
-
These Terms of Use shall be governed exclusively by the internal laws of
|
|
61
|
-
the State of California, without regard to its conflicts of laws
|
|
62
|
-
rules. Each party hereby consents to the exclusive jurisdiction of the
|
|
63
|
-
state and federal courts located in San Francisco County, California to
|
|
64
|
-
adjudicate any dispute arising out of or relating to these Terms of Use and
|
|
65
|
-
the download, installation, and/or use of the Software. Except as expressly
|
|
66
|
-
stated herein, these Terms of Use constitute the entire agreement between
|
|
67
|
-
the parties, and supersede all prior and contemporaneous agreements,
|
|
68
|
-
proposals, or representations, written or oral, concerning their subject
|
|
69
|
-
matter. No modification, amendment, or waiver of any provision of these
|
|
70
|
-
Terms of Use shall be effective unless it is by an update to these Terms of
|
|
71
|
-
Use that Salesforce makes available, or is in writing and signed by the
|
|
72
|
-
party against whom the modification, amendment, or waiver is to be
|
|
73
|
-
asserted.
|
|
74
|
-
|
|
75
|
-
Data Privacy: Salesforce may collect, process, and store device,
|
|
76
|
-
system, and other information related to your use of the Software. This
|
|
77
|
-
information includes, but is not limited to, IP address, user metrics, and
|
|
78
|
-
other data ("Usage Data"). Salesforce may use Usage Data for analytics,
|
|
79
|
-
product development, and marketing purposes. You acknowledge that files
|
|
80
|
-
generated in conjunction with the Software may contain sensitive or
|
|
81
|
-
confidential data, and you are solely responsible for anonymizing and
|
|
82
|
-
protecting such data.
|