@salesforce/templates 65.4.3 → 65.5.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.
Files changed (113) hide show
  1. package/lib/generators/dxpSiteGenerator.d.ts +25 -0
  2. package/lib/generators/dxpSiteGenerator.js +207 -0
  3. package/lib/generators/dxpSiteGenerator.js.map +1 -0
  4. package/lib/generators/flexipageGenerator.d.ts +15 -0
  5. package/lib/generators/flexipageGenerator.js +120 -0
  6. package/lib/generators/flexipageGenerator.js.map +1 -0
  7. package/lib/generators/webApplicationGenerator.d.ts +1 -0
  8. package/lib/generators/webApplicationGenerator.js +41 -17
  9. package/lib/generators/webApplicationGenerator.js.map +1 -1
  10. package/lib/i18n/i18n.d.ts +7 -0
  11. package/lib/i18n/i18n.js +7 -0
  12. package/lib/i18n/i18n.js.map +1 -1
  13. package/lib/templates/dxpsite/build_your_own_lwr/_customSite.xml +28 -0
  14. package/lib/templates/dxpsite/build_your_own_lwr/_digitalExperience.xml +15 -0
  15. package/lib/templates/dxpsite/build_your_own_lwr/_digitalExperienceConfig.xml +8 -0
  16. package/lib/templates/dxpsite/build_your_own_lwr/_network.xml +59 -0
  17. package/lib/templates/dxpsite/build_your_own_lwr/sfdc_cms__appPage/mainAppPage/_meta.json +5 -0
  18. package/lib/templates/dxpsite/build_your_own_lwr/sfdc_cms__appPage/mainAppPage/content.json +12 -0
  19. package/lib/templates/dxpsite/build_your_own_lwr/sfdc_cms__brandingSet/Build_Your_Own_LWR/_meta.json +5 -0
  20. package/lib/templates/dxpsite/build_your_own_lwr/sfdc_cms__brandingSet/Build_Your_Own_LWR/content.json +280 -0
  21. package/lib/templates/dxpsite/build_your_own_lwr/sfdc_cms__languageSettings/languages/_meta.json +5 -0
  22. package/lib/templates/dxpsite/build_your_own_lwr/sfdc_cms__languageSettings/languages/content.json +16 -0
  23. package/lib/templates/dxpsite/build_your_own_lwr/sfdc_cms__mobilePublisherConfig/mobilePublisherConfig/_meta.json +5 -0
  24. package/lib/templates/dxpsite/build_your_own_lwr/sfdc_cms__mobilePublisherConfig/mobilePublisherConfig/content.json +49 -0
  25. package/lib/templates/dxpsite/build_your_own_lwr/sfdc_cms__route/Check_Password/_meta.json +5 -0
  26. package/lib/templates/dxpsite/build_your_own_lwr/sfdc_cms__route/Check_Password/content.json +12 -0
  27. package/lib/templates/dxpsite/build_your_own_lwr/sfdc_cms__route/Error/_meta.json +5 -0
  28. package/lib/templates/dxpsite/build_your_own_lwr/sfdc_cms__route/Error/content.json +12 -0
  29. package/lib/templates/dxpsite/build_your_own_lwr/sfdc_cms__route/Forgot_Password/_meta.json +5 -0
  30. package/lib/templates/dxpsite/build_your_own_lwr/sfdc_cms__route/Forgot_Password/content.json +12 -0
  31. package/lib/templates/dxpsite/build_your_own_lwr/sfdc_cms__route/Home/_meta.json +5 -0
  32. package/lib/templates/dxpsite/build_your_own_lwr/sfdc_cms__route/Home/content.json +12 -0
  33. package/lib/templates/dxpsite/build_your_own_lwr/sfdc_cms__route/Login/_meta.json +5 -0
  34. package/lib/templates/dxpsite/build_your_own_lwr/sfdc_cms__route/Login/content.json +12 -0
  35. package/lib/templates/dxpsite/build_your_own_lwr/sfdc_cms__route/News_Detail__c/_meta.json +5 -0
  36. package/lib/templates/dxpsite/build_your_own_lwr/sfdc_cms__route/News_Detail__c/content.json +12 -0
  37. package/lib/templates/dxpsite/build_your_own_lwr/sfdc_cms__route/Register/_meta.json +5 -0
  38. package/lib/templates/dxpsite/build_your_own_lwr/sfdc_cms__route/Register/content.json +12 -0
  39. package/lib/templates/dxpsite/build_your_own_lwr/sfdc_cms__route/Service_Not_Available/_meta.json +5 -0
  40. package/lib/templates/dxpsite/build_your_own_lwr/sfdc_cms__route/Service_Not_Available/content.json +14 -0
  41. package/lib/templates/dxpsite/build_your_own_lwr/sfdc_cms__route/Too_Many_Requests/_meta.json +5 -0
  42. package/lib/templates/dxpsite/build_your_own_lwr/sfdc_cms__route/Too_Many_Requests/content.json +15 -0
  43. package/lib/templates/dxpsite/build_your_own_lwr/sfdc_cms__site/_meta.json +5 -0
  44. package/lib/templates/dxpsite/build_your_own_lwr/sfdc_cms__site/content.json +10 -0
  45. package/lib/templates/dxpsite/build_your_own_lwr/sfdc_cms__theme/Build_Your_Own_LWR/_meta.json +5 -0
  46. package/lib/templates/dxpsite/build_your_own_lwr/sfdc_cms__theme/Build_Your_Own_LWR/content.json +19 -0
  47. package/lib/templates/dxpsite/build_your_own_lwr/sfdc_cms__themeLayout/scopedHeaderAndFooter/_meta.json +5 -0
  48. package/lib/templates/dxpsite/build_your_own_lwr/sfdc_cms__themeLayout/scopedHeaderAndFooter/content.json +87 -0
  49. package/lib/templates/dxpsite/build_your_own_lwr/sfdc_cms__themeLayout/snaThemeLayout/_meta.json +5 -0
  50. package/lib/templates/dxpsite/build_your_own_lwr/sfdc_cms__themeLayout/snaThemeLayout/content.json +27 -0
  51. package/lib/templates/dxpsite/build_your_own_lwr/sfdc_cms__view/checkPasswordResetEmail/_meta.json +5 -0
  52. package/lib/templates/dxpsite/build_your_own_lwr/sfdc_cms__view/checkPasswordResetEmail/content.json +93 -0
  53. package/lib/templates/dxpsite/build_your_own_lwr/sfdc_cms__view/error/_meta.json +5 -0
  54. package/lib/templates/dxpsite/build_your_own_lwr/sfdc_cms__view/error/content.json +81 -0
  55. package/lib/templates/dxpsite/build_your_own_lwr/sfdc_cms__view/forgotPassword/_meta.json +5 -0
  56. package/lib/templates/dxpsite/build_your_own_lwr/sfdc_cms__view/forgotPassword/content.json +96 -0
  57. package/lib/templates/dxpsite/build_your_own_lwr/sfdc_cms__view/home/_meta.json +5 -0
  58. package/lib/templates/dxpsite/build_your_own_lwr/sfdc_cms__view/home/content.json +81 -0
  59. package/lib/templates/dxpsite/build_your_own_lwr/sfdc_cms__view/login/_meta.json +5 -0
  60. package/lib/templates/dxpsite/build_your_own_lwr/sfdc_cms__view/login/content.json +111 -0
  61. package/lib/templates/dxpsite/build_your_own_lwr/sfdc_cms__view/newsDetail/_meta.json +5 -0
  62. package/lib/templates/dxpsite/build_your_own_lwr/sfdc_cms__view/newsDetail/content.json +61 -0
  63. package/lib/templates/dxpsite/build_your_own_lwr/sfdc_cms__view/register/_meta.json +5 -0
  64. package/lib/templates/dxpsite/build_your_own_lwr/sfdc_cms__view/register/content.json +99 -0
  65. package/lib/templates/dxpsite/build_your_own_lwr/sfdc_cms__view/serviceNotAvailable/_meta.json +5 -0
  66. package/lib/templates/dxpsite/build_your_own_lwr/sfdc_cms__view/serviceNotAvailable/content.json +54 -0
  67. package/lib/templates/dxpsite/build_your_own_lwr/sfdc_cms__view/tooManyRequests/_meta.json +5 -0
  68. package/lib/templates/dxpsite/build_your_own_lwr/sfdc_cms__view/tooManyRequests/content.json +68 -0
  69. package/lib/templates/flexipage/AppPage/_flexipage.flexipage-meta.xml +118 -0
  70. package/lib/templates/flexipage/HomePage/_flexipage.flexipage-meta.xml +127 -0
  71. package/lib/templates/flexipage/RecordPage/_flexipage.flexipage-meta.xml +337 -0
  72. package/lib/templates/webapplication/reactbasic/.prettierignore +9 -0
  73. package/lib/templates/webapplication/reactbasic/.prettierrc +11 -0
  74. package/lib/templates/webapplication/reactbasic/README.md +73 -0
  75. package/lib/templates/webapplication/reactbasic/eslint.config.js +113 -0
  76. package/lib/templates/webapplication/reactbasic/index.html +2 -1
  77. package/lib/templates/webapplication/reactbasic/package-lock.json +5248 -0
  78. package/lib/templates/webapplication/reactbasic/package.json +29 -19
  79. package/lib/templates/webapplication/reactbasic/src/app.tsx +13 -0
  80. package/lib/templates/webapplication/reactbasic/src/appLayout.tsx +9 -0
  81. package/lib/templates/webapplication/reactbasic/src/assets/icons/book.svg +3 -0
  82. package/lib/templates/webapplication/reactbasic/src/assets/icons/copy.svg +4 -0
  83. package/lib/templates/webapplication/reactbasic/src/assets/icons/rocket.svg +3 -0
  84. package/lib/templates/webapplication/reactbasic/src/assets/icons/star.svg +3 -0
  85. package/lib/templates/webapplication/reactbasic/src/assets/images/codey-1.png +0 -0
  86. package/lib/templates/webapplication/reactbasic/src/assets/images/codey-2.png +0 -0
  87. package/lib/templates/webapplication/reactbasic/src/assets/images/codey-3.png +0 -0
  88. package/lib/templates/webapplication/reactbasic/src/assets/images/vibe-codey.svg +194 -0
  89. package/lib/templates/webapplication/reactbasic/src/pages/About.tsx +9 -10
  90. package/lib/templates/webapplication/reactbasic/src/pages/Home.tsx +12 -15
  91. package/lib/templates/webapplication/reactbasic/src/pages/NotFound.tsx +3 -6
  92. package/lib/templates/webapplication/reactbasic/src/routes.tsx +23 -0
  93. package/lib/templates/webapplication/reactbasic/src/styles/global.css +6 -5
  94. package/lib/templates/webapplication/reactbasic/tsconfig.json +14 -5
  95. package/lib/templates/webapplication/reactbasic/tsconfig.node.json +0 -1
  96. package/lib/templates/webapplication/reactbasic/{src/vite-env.d.ts → vite-env.d.ts} +0 -1
  97. package/lib/templates/webapplication/reactbasic/vite.config.ts +62 -16
  98. package/lib/templates/webapplication/reactbasic/vitest-env.d.ts +2 -0
  99. package/lib/templates/webapplication/reactbasic/vitest.config.ts +11 -0
  100. package/lib/templates/webapplication/reactbasic/vitest.setup.ts +1 -0
  101. package/lib/templates/webapplication/reactbasic/webapp.json +7 -12
  102. package/lib/tsconfig.tsbuildinfo +1 -1
  103. package/lib/utils/types.d.ts +34 -11
  104. package/lib/utils/types.js +16 -10
  105. package/lib/utils/types.js.map +1 -1
  106. package/package.json +7 -4
  107. package/lib/templates/webapplication/reactbasic/postcss.config.js +0 -7
  108. package/lib/templates/webapplication/reactbasic/src/App.tsx +0 -25
  109. package/lib/templates/webapplication/reactbasic/src/components/Navigation.tsx +0 -70
  110. package/lib/templates/webapplication/reactbasic/src/main.tsx +0 -14
  111. package/lib/templates/webapplication/reactbasic/src/routes.ts +0 -20
  112. package/lib/templates/webapplication/reactbasic/src/test-setup/setup.ts +0 -10
  113. package/lib/templates/webapplication/reactbasic/tailwind.config.js +0 -9
@@ -0,0 +1,25 @@
1
+ import { DxpSiteOptions } from '../utils/types';
2
+ import { BaseGenerator } from './baseGenerator';
3
+ export default class DxpSiteGenerator extends BaseGenerator<DxpSiteOptions> {
4
+ private uuidCache;
5
+ constructor(options: DxpSiteOptions);
6
+ validateOptions(): void;
7
+ generate(): Promise<void>;
8
+ private generateNetwork;
9
+ private generateCustomSite;
10
+ private generateDigitalExperienceConfig;
11
+ private generateDEBMeta;
12
+ private generateDEBAppPage;
13
+ private generateDEBBrandingSet;
14
+ private generateDEBLanguageSettings;
15
+ private generateDEBMobilePublisherConfig;
16
+ private generateDEBRoutes;
17
+ private generateDEBSite;
18
+ private generateDEBTheme;
19
+ private generateDEBThemeLayouts;
20
+ private generateDEBViews;
21
+ private generateUUID;
22
+ private toSiteDevName;
23
+ private toPicassoSiteDevName;
24
+ private encodeForFileName;
25
+ }
@@ -0,0 +1,207 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const tslib_1 = require("tslib");
4
+ /*
5
+ * Copyright (c) 2026, salesforce.com, inc.
6
+ * All rights reserved.
7
+ * Licensed under the BSD 3-Clause license.
8
+ * For full license text, see LICENSE.txt file in the repo root or https://opensource.org/licenses/BSD-3-Clause
9
+ */
10
+ const path = require("path");
11
+ const utils_1 = require("../utils");
12
+ const baseGenerator_1 = require("./baseGenerator");
13
+ const i18n_1 = require("../i18n");
14
+ const TEMPLATE_ROOT = 'dxpsite';
15
+ class DxpSiteGenerator extends baseGenerator_1.BaseGenerator {
16
+ constructor(options) {
17
+ super(options);
18
+ this.uuidCache = {};
19
+ }
20
+ validateOptions() {
21
+ utils_1.CreateUtil.checkInputs(this.options.template);
22
+ // site name allows anything, but we will strip it down for dev name
23
+ // url path prefix must be strictly alphanumeric, no "-" or "_", can start with a number
24
+ // empty string is allowed (for sites without a prefix)
25
+ const alphaRegExp = /^[a-zA-Z0-9]*$/;
26
+ if (!alphaRegExp.test(this.options.urlpathprefix)) {
27
+ throw new Error(i18n_1.nls.localize('AlphaNumericValidationError', 'url-path-prefix'));
28
+ }
29
+ }
30
+ generate() {
31
+ return tslib_1.__awaiter(this, void 0, void 0, function* () {
32
+ const { template, sitename, urlpathprefix, adminemail } = this.options;
33
+ const siteDevName = this.toSiteDevName(sitename);
34
+ const picassoSiteDevName = this.toPicassoSiteDevName(siteDevName);
35
+ this.sourceRootWithPartialPath(path.join(TEMPLATE_ROOT, template));
36
+ yield this.generateNetwork(sitename, siteDevName, picassoSiteDevName, urlpathprefix, adminemail);
37
+ yield this.generateCustomSite(sitename, siteDevName, urlpathprefix);
38
+ yield this.generateDigitalExperienceConfig(sitename, picassoSiteDevName, urlpathprefix);
39
+ const bundlePath = path.join(this.outputdir, 'digitalExperiences', 'site', picassoSiteDevName);
40
+ yield this.generateDEBMeta(bundlePath, picassoSiteDevName);
41
+ yield this.generateDEBAppPage(bundlePath);
42
+ yield this.generateDEBBrandingSet(bundlePath);
43
+ yield this.generateDEBLanguageSettings(bundlePath);
44
+ yield this.generateDEBMobilePublisherConfig(bundlePath);
45
+ yield this.generateDEBRoutes(bundlePath);
46
+ yield this.generateDEBSite(bundlePath, sitename, picassoSiteDevName);
47
+ yield this.generateDEBTheme(bundlePath);
48
+ yield this.generateDEBThemeLayouts(bundlePath);
49
+ yield this.generateDEBViews(bundlePath);
50
+ });
51
+ }
52
+ generateNetwork(siteName, siteDevName, picassoSiteDevName, urlPathPrefix, adminEmail) {
53
+ return tslib_1.__awaiter(this, void 0, void 0, function* () {
54
+ const fileName = this.encodeForFileName(siteName);
55
+ yield this.render(this.templatePath('_network.xml'), this.destinationPath(path.join(this.outputdir, 'networks', `${fileName}.network-meta.xml`)), { siteName, siteDevName, picassoSiteDevName, urlPathPrefix, adminEmail });
56
+ });
57
+ }
58
+ generateCustomSite(siteName, siteDevName, urlPathPrefix) {
59
+ return tslib_1.__awaiter(this, void 0, void 0, function* () {
60
+ yield this.render(this.templatePath('_customSite.xml'), this.destinationPath(path.join(this.outputdir, 'sites', `${siteDevName}.site-meta.xml`)), { siteName, siteDevName, urlPathPrefix });
61
+ });
62
+ }
63
+ generateDigitalExperienceConfig(siteName, picassoSiteDevName, urlPathPrefix) {
64
+ return tslib_1.__awaiter(this, void 0, void 0, function* () {
65
+ yield this.render(this.templatePath('_digitalExperienceConfig.xml'), this.destinationPath(path.join(this.outputdir, 'digitalExperienceConfigs', `${picassoSiteDevName}.digitalExperienceConfig-meta.xml`)), { siteName, picassoSiteDevName, urlPathPrefix });
66
+ });
67
+ }
68
+ generateDEBMeta(bundlePath, picassoSiteDevName) {
69
+ return tslib_1.__awaiter(this, void 0, void 0, function* () {
70
+ yield this.render(this.templatePath('_digitalExperience.xml'), this.destinationPath(path.join(bundlePath, `${picassoSiteDevName}.digitalExperience-meta.xml`)), { picassoSiteDevName });
71
+ });
72
+ }
73
+ generateDEBAppPage(bundlePath) {
74
+ return tslib_1.__awaiter(this, void 0, void 0, function* () {
75
+ const appPagePath = path.join(bundlePath, 'sfdc_cms__appPage', 'mainAppPage');
76
+ yield this.render(this.templatePath('sfdc_cms__appPage', 'mainAppPage', 'content.json'), this.destinationPath(path.join(appPagePath, 'content.json')), {});
77
+ yield this.render(this.templatePath('sfdc_cms__appPage', 'mainAppPage', '_meta.json'), this.destinationPath(path.join(appPagePath, '_meta.json')), {});
78
+ });
79
+ }
80
+ generateDEBBrandingSet(bundlePath) {
81
+ return tslib_1.__awaiter(this, void 0, void 0, function* () {
82
+ const brandingPath = path.join(bundlePath, 'sfdc_cms__brandingSet', 'Build_Your_Own_LWR');
83
+ yield this.render(this.templatePath('sfdc_cms__brandingSet', 'Build_Your_Own_LWR', 'content.json'), this.destinationPath(path.join(brandingPath, 'content.json')), {});
84
+ yield this.render(this.templatePath('sfdc_cms__brandingSet', 'Build_Your_Own_LWR', '_meta.json'), this.destinationPath(path.join(brandingPath, '_meta.json')), {});
85
+ });
86
+ }
87
+ generateDEBLanguageSettings(bundlePath) {
88
+ return tslib_1.__awaiter(this, void 0, void 0, function* () {
89
+ const langPath = path.join(bundlePath, 'sfdc_cms__languageSettings', 'languages');
90
+ yield this.render(this.templatePath('sfdc_cms__languageSettings', 'languages', 'content.json'), this.destinationPath(path.join(langPath, 'content.json')), {});
91
+ yield this.render(this.templatePath('sfdc_cms__languageSettings', 'languages', '_meta.json'), this.destinationPath(path.join(langPath, '_meta.json')), {});
92
+ });
93
+ }
94
+ generateDEBMobilePublisherConfig(bundlePath) {
95
+ return tslib_1.__awaiter(this, void 0, void 0, function* () {
96
+ const mobileConfigPath = path.join(bundlePath, 'sfdc_cms__mobilePublisherConfig', 'mobilePublisherConfig');
97
+ yield this.render(this.templatePath('sfdc_cms__mobilePublisherConfig', 'mobilePublisherConfig', 'content.json'), this.destinationPath(path.join(mobileConfigPath, 'content.json')), {});
98
+ yield this.render(this.templatePath('sfdc_cms__mobilePublisherConfig', 'mobilePublisherConfig', '_meta.json'), this.destinationPath(path.join(mobileConfigPath, '_meta.json')), {});
99
+ });
100
+ }
101
+ generateDEBRoutes(bundlePath) {
102
+ return tslib_1.__awaiter(this, void 0, void 0, function* () {
103
+ const routes = [
104
+ 'Check_Password',
105
+ 'Error',
106
+ 'Forgot_Password',
107
+ 'Home',
108
+ 'Login',
109
+ 'News_Detail__c',
110
+ 'Register',
111
+ 'Service_Not_Available',
112
+ 'Too_Many_Requests',
113
+ ];
114
+ for (const route of routes) {
115
+ const routePath = path.join(bundlePath, 'sfdc_cms__route', route);
116
+ yield this.render(this.templatePath('sfdc_cms__route', route, 'content.json'), this.destinationPath(path.join(routePath, 'content.json')), {});
117
+ yield this.render(this.templatePath('sfdc_cms__route', route, '_meta.json'), this.destinationPath(path.join(routePath, '_meta.json')), {});
118
+ }
119
+ });
120
+ }
121
+ generateDEBSite(bundlePath, siteName, picassoSiteDevName) {
122
+ return tslib_1.__awaiter(this, void 0, void 0, function* () {
123
+ const urlName = siteName
124
+ .toLowerCase()
125
+ .replace(/[^a-z0-9]+/g, '-') // keep only alphanumeric characters
126
+ .replace(/-$/, ''); // remove trailing hyphen
127
+ const sitePath = path.join(bundlePath, 'sfdc_cms__site', picassoSiteDevName);
128
+ siteName = JSON.stringify(siteName) // escape special characters since this needs to be a JSON string
129
+ .slice(1, -1); // remove quotes added by JSON.stringify
130
+ yield this.render(this.templatePath('sfdc_cms__site', 'content.json'), this.destinationPath(path.join(sitePath, 'content.json')), { siteName, urlName });
131
+ yield this.render(this.templatePath('sfdc_cms__site', '_meta.json'), this.destinationPath(path.join(sitePath, '_meta.json')), { picassoSiteDevName });
132
+ });
133
+ }
134
+ generateDEBTheme(bundlePath) {
135
+ return tslib_1.__awaiter(this, void 0, void 0, function* () {
136
+ const themePath = path.join(bundlePath, 'sfdc_cms__theme', 'Build_Your_Own_LWR');
137
+ yield this.render(this.templatePath('sfdc_cms__theme', 'Build_Your_Own_LWR', 'content.json'), this.destinationPath(path.join(themePath, 'content.json')), {});
138
+ yield this.render(this.templatePath('sfdc_cms__theme', 'Build_Your_Own_LWR', '_meta.json'), this.destinationPath(path.join(themePath, '_meta.json')), {});
139
+ });
140
+ }
141
+ generateDEBThemeLayouts(bundlePath) {
142
+ return tslib_1.__awaiter(this, void 0, void 0, function* () {
143
+ const layouts = ['scopedHeaderAndFooter', 'snaThemeLayout'];
144
+ for (const layout of layouts) {
145
+ const layoutPath = path.join(bundlePath, 'sfdc_cms__themeLayout', layout);
146
+ yield this.render(this.templatePath('sfdc_cms__themeLayout', layout, 'content.json'), this.destinationPath(path.join(layoutPath, 'content.json')), { uuid: this.generateUUID.bind(this, `themeLayout_${layout}`) });
147
+ yield this.render(this.templatePath('sfdc_cms__themeLayout', layout, '_meta.json'), this.destinationPath(path.join(layoutPath, '_meta.json')), {});
148
+ }
149
+ });
150
+ }
151
+ generateDEBViews(bundlePath) {
152
+ return tslib_1.__awaiter(this, void 0, void 0, function* () {
153
+ const views = [
154
+ 'checkPasswordResetEmail',
155
+ 'error',
156
+ 'forgotPassword',
157
+ 'home',
158
+ 'login',
159
+ 'newsDetail',
160
+ 'register',
161
+ 'serviceNotAvailable',
162
+ 'tooManyRequests',
163
+ ];
164
+ for (const view of views) {
165
+ const viewPath = path.join(bundlePath, 'sfdc_cms__view', view);
166
+ yield this.render(this.templatePath('sfdc_cms__view', view, 'content.json'), this.destinationPath(path.join(viewPath, 'content.json')), { uuid: this.generateUUID.bind(this, `view_${view}`) });
167
+ yield this.render(this.templatePath('sfdc_cms__view', view, '_meta.json'), this.destinationPath(path.join(viewPath, '_meta.json')), {});
168
+ }
169
+ });
170
+ }
171
+ generateUUID(namepsace, key) {
172
+ if (!key) {
173
+ return crypto.randomUUID();
174
+ }
175
+ key = `${namepsace}:${key}`;
176
+ if (!this.uuidCache[key]) {
177
+ this.uuidCache[key] = crypto.randomUUID();
178
+ }
179
+ return this.uuidCache[key];
180
+ }
181
+ toSiteDevName(sitename) {
182
+ return sitename
183
+ .replace(/[^a-zA-Z0-9]+/g, '_') // remove non-alphanumeric characters
184
+ .replace(/_$/, '') // remove trailing underscore
185
+ .replace(/^([0-9])/, 'X$1'); // prefix with X if it starts with a number
186
+ }
187
+ toPicassoSiteDevName(siteDevName) {
188
+ return `${siteDevName}1`;
189
+ }
190
+ encodeForFileName(str) {
191
+ const charMap = {
192
+ '~': '%7E',
193
+ '!': '%21',
194
+ '.': '%2E',
195
+ "'": '%27',
196
+ '(': '%28',
197
+ ')': '%29',
198
+ };
199
+ // encodeURIComponent is for URL, so we need additional steps to match filename
200
+ // encoding from the server
201
+ return encodeURIComponent(str)
202
+ .replace(/%20/g, ' ')
203
+ .replace(/[~!.'()]/g, (char) => charMap[char]);
204
+ }
205
+ }
206
+ exports.default = DxpSiteGenerator;
207
+ //# sourceMappingURL=dxpSiteGenerator.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dxpSiteGenerator.js","sourceRoot":"","sources":["../../src/generators/dxpSiteGenerator.ts"],"names":[],"mappings":";;;AAAA;;;;;GAKG;AACH,6BAA6B;AAC7B,oCAAsC;AAEtC,mDAAgD;AAChD,kCAA8B;AAE9B,MAAM,aAAa,GAAG,SAAS,CAAC;AAEhC,MAAqB,gBAAiB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AE,EAAE,CAAC,CAAC,6BAA6B;aAC/C,OAAO,CAAC,UAAU,EAAE,KAAK,CAAC,CAAC,CAAC,2CAA2C;IAC5E,CAAC;IAEO,oBAAoB,CAAC,WAAmB;QAC9C,OAAO,GAAG,WAAW,GAAG,CAAC;IAC3B,CAAC;IAEO,iBAAiB,CAAC,GAAW;QACnC,MAAM,OAAO,GAAG;YACd,GAAG,EAAE,KAAK;YACV,GAAG,EAAE,KAAK;YACV,GAAG,EAAE,KAAK;YACV,GAAG,EAAE,KAAK;YACV,GAAG,EAAE,KAAK;YACV,GAAG,EAAE,KAAK;SACX,CAAC;QAEF,+EAA+E;QAC/E,2BAA2B;QAC3B,OAAO,kBAAkB,CAAC,GAAG,CAAC;aAC3B,OAAO,CAAC,MAAM,EAAE,GAAG,CAAC;aACpB,OAAO,CAAC,WAAW,EAAE,CAAC,IAAI,EAAE,EAAE,CAAC,OAAO,CAAC,IAA4B,CAAC,CAAC,CAAC;IAC3E,CAAC;CACF;AAvYD,mCAuYC"}
@@ -0,0 +1,15 @@
1
+ import { FlexipageOptions } from '../utils/types';
2
+ import { BaseGenerator } from './baseGenerator';
3
+ export default class FlexipageGenerator extends BaseGenerator<FlexipageOptions> {
4
+ constructor(options: FlexipageOptions);
5
+ validateOptions(): void;
6
+ generate(): Promise<void>;
7
+ /**
8
+ * Recursively process template directory and generate files
9
+ */
10
+ private generateFlexipageFromTemplate;
11
+ /**
12
+ * Check if file should be rendered as EJS template
13
+ */
14
+ private isTemplateFile;
15
+ }
@@ -0,0 +1,120 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const tslib_1 = require("tslib");
4
+ /*
5
+ * Copyright (c) 2020, salesforce.com, inc.
6
+ * All rights reserved.
7
+ * Licensed under the BSD 3-Clause license.
8
+ * For full license text, see LICENSE.txt file in the repo root or https://opensource.org/licenses/BSD-3-Clause
9
+ */
10
+ const fs = require("fs");
11
+ const promises_1 = require("node:fs/promises");
12
+ const path = require("path");
13
+ const utils_1 = require("../utils");
14
+ const baseGenerator_1 = require("./baseGenerator");
15
+ const i18n_1 = require("../i18n");
16
+ const VALID_TEMPLATES = ['RecordPage', 'AppPage', 'HomePage'];
17
+ const MAX_SECONDARY_FIELDS = 11;
18
+ class FlexipageGenerator extends baseGenerator_1.BaseGenerator {
19
+ constructor(options) {
20
+ super(options);
21
+ }
22
+ validateOptions() {
23
+ var _a, _b;
24
+ utils_1.CreateUtil.checkInputs(this.options.flexipagename);
25
+ utils_1.CreateUtil.checkInputs(this.options.template);
26
+ if (!VALID_TEMPLATES.includes(this.options.template)) {
27
+ throw new Error(i18n_1.nls.localize('InvalidFlexipageTemplate', [
28
+ this.options.template,
29
+ VALID_TEMPLATES.join(', '),
30
+ ]));
31
+ }
32
+ if (this.options.template === 'RecordPage' && !this.options.entityName) {
33
+ throw new Error(i18n_1.nls.localize('RecordPageRequiresEntityName'));
34
+ }
35
+ // Validate secondary fields limit (dynamicHighlights supports max 11 secondary fields)
36
+ const secondaryFieldsCount = (_b = (_a = this.options.secondaryFields) === null || _a === void 0 ? void 0 : _a.length) !== null && _b !== void 0 ? _b : 0;
37
+ if (secondaryFieldsCount > MAX_SECONDARY_FIELDS) {
38
+ throw new Error(i18n_1.nls.localize('TooManySecondaryFields', [
39
+ secondaryFieldsCount.toString(),
40
+ MAX_SECONDARY_FIELDS.toString(),
41
+ ]));
42
+ }
43
+ // Ensure output directory includes 'flexipages' folder
44
+ if (!this.options.internal && !this.outputdir.includes('flexipages')) {
45
+ this.outputdir = path.join(this.outputdir, 'flexipages');
46
+ }
47
+ }
48
+ generate() {
49
+ return tslib_1.__awaiter(this, void 0, void 0, function* () {
50
+ const { template, flexipagename, masterlabel, description, entityName, primaryField, secondaryFields = [], detailFields = [], flexipageTemplatesGitRepo, forceLoadingRemoteRepo, } = this.options;
51
+ // Set up custom templates if provided
52
+ let customTemplatesRootPath;
53
+ if (flexipageTemplatesGitRepo) {
54
+ customTemplatesRootPath = yield (0, baseGenerator_1.setCustomTemplatesRootPathOrGitRepo)(flexipageTemplatesGitRepo, forceLoadingRemoteRepo);
55
+ }
56
+ // Determine template root path
57
+ let templateRootPath;
58
+ if (customTemplatesRootPath) {
59
+ templateRootPath = path.join(customTemplatesRootPath, 'flexipage', template);
60
+ if (!fs.existsSync(templateRootPath)) {
61
+ throw new Error(i18n_1.nls.localize('MissingFlexipageTemplate', [
62
+ template,
63
+ customTemplatesRootPath,
64
+ ]));
65
+ }
66
+ }
67
+ else {
68
+ // Use built-in templates
69
+ this.sourceRootWithPartialPath('flexipage');
70
+ templateRootPath = this.templatePath(template);
71
+ }
72
+ // Prepare EJS template variables
73
+ const templateVars = {
74
+ flexipagename,
75
+ masterlabel: masterlabel || flexipagename,
76
+ description: description || '',
77
+ apiVersion: this.apiversion,
78
+ entityName: entityName || '',
79
+ primaryField: primaryField || '',
80
+ secondaryFields: Array.isArray(secondaryFields) ? secondaryFields : [],
81
+ detailFields: Array.isArray(detailFields) ? detailFields : [],
82
+ };
83
+ // Recursively process template directory
84
+ yield this.generateFlexipageFromTemplate(templateRootPath, this.outputdir, templateVars);
85
+ });
86
+ }
87
+ /**
88
+ * Recursively process template directory and generate files
89
+ */
90
+ generateFlexipageFromTemplate(sourceDir, destDir, templateVars) {
91
+ return tslib_1.__awaiter(this, void 0, void 0, function* () {
92
+ const entries = yield (0, promises_1.readdir)(sourceDir, { withFileTypes: true });
93
+ for (const entry of entries) {
94
+ const sourcePath = path.join(sourceDir, entry.name);
95
+ let destName = entry.name;
96
+ // Replace _flexipage placeholder with actual flexipage name
97
+ if (destName.includes('_flexipage')) {
98
+ destName = destName.replace(/_flexipage/g, templateVars.flexipagename);
99
+ }
100
+ const destPath = path.join(destDir, destName);
101
+ if (entry.isDirectory()) {
102
+ // Recursively process subdirectories
103
+ yield this.generateFlexipageFromTemplate(sourcePath, destPath, templateVars);
104
+ }
105
+ else if (entry.isFile() && this.isTemplateFile(entry.name)) {
106
+ // Render template files only (skip non-template files)
107
+ yield this.render(sourcePath, destPath, templateVars);
108
+ }
109
+ }
110
+ });
111
+ }
112
+ /**
113
+ * Check if file should be rendered as EJS template
114
+ */
115
+ isTemplateFile(filename) {
116
+ return filename.endsWith('.flexipage-meta.xml');
117
+ }
118
+ }
119
+ exports.default = FlexipageGenerator;
120
+ //# sourceMappingURL=flexipageGenerator.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"flexipageGenerator.js","sourceRoot":"","sources":["../../src/generators/flexipageGenerator.ts"],"names":[],"mappings":";;;AAAA;;;;;GAKG;AACH,yBAAyB;AACzB,+CAA2C;AAC3C,6BAA6B;AAC7B,oCAAsC;AAEtC,mDAGyB;AACzB,kCAA8B;AAE9B,MAAM,eAAe,GAAG,CAAC,YAAY,EAAE,SAAS,EAAE,UAAU,CAAU,CAAC;AACvE,MAAM,oBAAoB,GAAG,EAAE,CAAC;AAEhC,MAAqB,kBAAmB,SAAQ,6BAA+B;IAC7E,YAAY,OAAyB;QACnC,KAAK,CAAC,OAAO,CAAC,CAAC;IACjB,CAAC;IAEM,eAAe;;QACpB,kBAAU,CAAC,WAAW,CAAC,IAAI,CAAC,OAAO,CAAC,aAAa,CAAC,CAAC;QACnD,kBAAU,CAAC,WAAW,CAAC,IAAI,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC;QAE9C,IAAI,CAAC,eAAe,CAAC,QAAQ,CAAC,IAAI,CAAC,OAAO,CAAC,QAAe,CAAC,EAAE,CAAC;YAC5D,MAAM,IAAI,KAAK,CACb,UAAG,CAAC,QAAQ,CAAC,0BAA0B,EAAE;gBACvC,IAAI,CAAC,OAAO,CAAC,QAAQ;gBACrB,eAAe,CAAC,IAAI,CAAC,IAAI,CAAC;aAC3B,CAAC,CACH,CAAC;QACJ,CAAC;QAED,IAAI,IAAI,CAAC,OAAO,CAAC,QAAQ,KAAK,YAAY,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,UAAU,EAAE,CAAC;YACvE,MAAM,IAAI,KAAK,CAAC,UAAG,CAAC,QAA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AAQ,GAAG,KAAK,CAAC,IAAI,CAAC;gBAE1B,4DAA4D;gBAC5D,IAAI,QAAQ,CAAC,QAAQ,CAAC,YAAY,CAAC,EAAE,CAAC;oBACpC,QAAQ,GAAG,QAAQ,CAAC,OAAO,CACzB,aAAa,EACb,YAAY,CAAC,aAAuB,CACrC,CAAC;gBACJ,CAAC;gBAED,MAAM,QAAQ,GAAG,IAAI,CAAC,IAAI,CAAC,OAAO,EAAE,QAAQ,CAAC,CAAC;gBAE9C,IAAI,KAAK,CAAC,WAAW,EAAE,EAAE,CAAC;oBACxB,qCAAqC;oBACrC,MAAM,IAAI,CAAC,6BAA6B,CACtC,UAAU,EACV,QAAQ,EACR,YAAY,CACb,CAAC;gBACJ,CAAC;qBAAM,IAAI,KAAK,CAAC,MAAM,EAAE,IAAI,IAAI,CAAC,cAAc,CAAC,KAAK,CAAC,IAAI,CAAC,EAAE,CAAC;oBAC7D,uDAAuD;oBACvD,MAAM,IAAI,CAAC,MAAM,CAAC,UAAU,EAAE,QAAQ,EAAE,YAAY,CAAC,CAAC;gBACxD,CAAC;YACH,CAAC;QACH,CAAC;KAAA;IAED;;OAEG;IACK,cAAc,CAAC,QAAgB;QACrC,OAAO,QAAQ,CAAC,QAAQ,CAAC,qBAAqB,CAAC,CAAC;IAClD,CAAC;CACF;AApJD,qCAoJC"}
@@ -6,4 +6,5 @@ export default class WebApplicationGenerator extends BaseGenerator<WebApplicatio
6
6
  generate(): Promise<void>;
7
7
  private generateDefault;
8
8
  private generateReactBasic;
9
+ private copyDirectoryRecursive;
9
10
  }
@@ -8,7 +8,9 @@ const tslib_1 = require("tslib");
8
8
  * For full license text, see LICENSE.txt file in the repo root or https://opensource.org/licenses/BSD-3-Clause
9
9
  */
10
10
  const kit_1 = require("@salesforce/kit");
11
+ const fs = require("fs");
11
12
  const path = require("path");
13
+ const promises_1 = require("node:fs/promises");
12
14
  const i18n_1 = require("../i18n");
13
15
  const utils_1 = require("../utils");
14
16
  const baseGenerator_1 = require("./baseGenerator");
@@ -44,7 +46,9 @@ class WebApplicationGenerator extends baseGenerator_1.BaseGenerator {
44
46
  this.sourceRootWithPartialPath(path.join('webapplication', 'webappbasic'));
45
47
  yield this.render(this.templatePath('_webapplication.webApplication-meta.xml'), this.destinationPath(path.join(webappDir, `${webappname}.webApplication-meta.xml`)), { apiVersion: this.apiversion, masterLabel });
46
48
  yield this.render(this.templatePath('index.html'), this.destinationPath(path.join(webappDir, 'index.html')), { masterLabel });
47
- yield this.render(this.templatePath('webapp.json'), this.destinationPath(path.join(webappDir, 'webapp.json')), {});
49
+ // Copy the rest of the files over
50
+ const templatePath = this.sourceRoot();
51
+ yield this.copyDirectoryRecursive(templatePath, webappDir, new Set(['_webapplication.webApplication-meta.xml']));
48
52
  });
49
53
  }
50
54
  generateReactBasic(webappDir, webappname, masterLabel) {
@@ -52,23 +56,43 @@ class WebApplicationGenerator extends baseGenerator_1.BaseGenerator {
52
56
  this.sourceRootWithPartialPath(path.join('webapplication', 'reactbasic'));
53
57
  yield this.render(this.templatePath('_webapplication.webApplication-meta.xml'), this.destinationPath(path.join(webappDir, `${webappname}.webApplication-meta.xml`)), { apiVersion: this.apiversion, masterLabel });
54
58
  yield this.render(this.templatePath('index.html'), this.destinationPath(path.join(webappDir, 'index.html')), { masterLabel });
55
- yield this.render(this.templatePath('webapp.json'), this.destinationPath(path.join(webappDir, 'webapp.json')), {});
56
59
  yield this.render(this.templatePath('package.json'), this.destinationPath(path.join(webappDir, 'package.json')), { webappname });
57
- yield this.render(this.templatePath('vite.config.ts'), this.destinationPath(path.join(webappDir, 'vite.config.ts')), {});
58
- yield this.render(this.templatePath('tsconfig.json'), this.destinationPath(path.join(webappDir, 'tsconfig.json')), {});
59
- yield this.render(this.templatePath('tsconfig.node.json'), this.destinationPath(path.join(webappDir, 'tsconfig.node.json')), {});
60
- yield this.render(this.templatePath('tailwind.config.js'), this.destinationPath(path.join(webappDir, 'tailwind.config.js')), {});
61
- yield this.render(this.templatePath('postcss.config.js'), this.destinationPath(path.join(webappDir, 'postcss.config.js')), {});
62
- yield this.render(this.templatePath(path.join('src', 'main.tsx')), this.destinationPath(path.join(webappDir, 'src', 'main.tsx')), {});
63
- yield this.render(this.templatePath(path.join('src', 'App.tsx')), this.destinationPath(path.join(webappDir, 'src', 'App.tsx')), {});
64
- yield this.render(this.templatePath(path.join('src', 'routes.ts')), this.destinationPath(path.join(webappDir, 'src', 'routes.ts')), {});
65
- yield this.render(this.templatePath(path.join('src', 'vite-env.d.ts')), this.destinationPath(path.join(webappDir, 'src', 'vite-env.d.ts')), {});
66
- yield this.render(this.templatePath(path.join('src', 'components', 'Navigation.tsx')), this.destinationPath(path.join(webappDir, 'src', 'components', 'Navigation.tsx')), {});
67
- yield this.render(this.templatePath(path.join('src', 'pages', 'Home.tsx')), this.destinationPath(path.join(webappDir, 'src', 'pages', 'Home.tsx')), {});
68
- yield this.render(this.templatePath(path.join('src', 'pages', 'About.tsx')), this.destinationPath(path.join(webappDir, 'src', 'pages', 'About.tsx')), {});
69
- yield this.render(this.templatePath(path.join('src', 'pages', 'NotFound.tsx')), this.destinationPath(path.join(webappDir, 'src', 'pages', 'NotFound.tsx')), {});
70
- yield this.render(this.templatePath(path.join('src', 'styles', 'global.css')), this.destinationPath(path.join(webappDir, 'src', 'styles', 'global.css')), {});
71
- yield this.render(this.templatePath(path.join('src', 'test-setup', 'setup.ts')), this.destinationPath(path.join(webappDir, 'src', 'test-setup', 'setup.ts')), {});
60
+ // Copy the rest of the files over
61
+ const templatePath = this.sourceRoot();
62
+ yield this.copyDirectoryRecursive(templatePath, webappDir, new Set(['_webapplication.webApplication-meta.xml']));
63
+ });
64
+ }
65
+ copyDirectoryRecursive(sourceDir_1, destDir_1) {
66
+ return tslib_1.__awaiter(this, arguments, void 0, function* (sourceDir, destDir, excludeFiles = new Set()) {
67
+ if (!fs.existsSync(sourceDir)) {
68
+ return;
69
+ }
70
+ yield (0, promises_1.mkdir)(destDir, { recursive: true });
71
+ const entries = fs.readdirSync(sourceDir, { withFileTypes: true });
72
+ for (const entry of entries) {
73
+ const sourcePath = path.join(sourceDir, entry.name);
74
+ const destPath = path.join(destDir, entry.name);
75
+ // Skip template files that were rendered
76
+ if (excludeFiles.has(entry.name)) {
77
+ continue;
78
+ }
79
+ // Skip files that already exist
80
+ if (fs.existsSync(destPath)) {
81
+ continue;
82
+ }
83
+ if (entry.isDirectory()) {
84
+ yield this.copyDirectoryRecursive(sourcePath, destPath, excludeFiles);
85
+ }
86
+ else {
87
+ // Copy file and track it
88
+ const content = yield (0, promises_1.readFile)(sourcePath);
89
+ yield (0, promises_1.mkdir)(path.dirname(destPath), { recursive: true });
90
+ yield (0, promises_1.writeFile)(destPath, content);
91
+ // Register the created file
92
+ const relativePath = path.relative(process.cwd(), destPath);
93
+ this.changes.created.push(relativePath);
94
+ }
95
+ }
72
96
  });
73
97
  }
74
98
  }
@@ -1 +1 @@
1
- {"version":3,"file":"webApplicationGenerator.js","sourceRoot":"","sources":["../../src/generators/webApplicationGenerator.ts"],"names":[],"mappings":";;;AAAA;;;;;GAKG;AACH,yCAAuD;AACvD,6BAA6B;AAC7B,kCAA8B;AAC9B,oCAAsC;AAEtC,mDAAgD;AAEhD,MAAqB,uBAAwB,SAAQ,6BAAoC;IACvF,YAAY,OAA8B;QACxC,KAAK,CAAC,OAAO,CAAC,CAAC;IACjB,CAAC;IAEM,eAAe;QACpB,kBAAU,CAAC,WAAW,CAAC,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,CAAC;QAChD,kBAAU,CAAC,WAAW,CAAC,IAAI,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC;QAE9C,MAAM,SAAS,GAAG,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;QAC/D,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,QAAQ,IAAI,CAAC,SAAS,CAAC,QAAQ,CAAC,iBAAiB,CAAC,EAAE,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C,QAAQ,CAAC,EAAE,CAAC;oBAC5B,SAAS;gBACX,CAAC;gBAED,IAAI,KAAK,CAAC,WAAW,EAAE,EAAE,CAAC;oBACxB,MAAM,IAAI,CAAC,sBAAsB,CAAC,UAAU,EAAE,QAAQ,EAAE,YAAY,CAAC,CAAC;gBACxE,CAAC;qBAAM,CAAC;oBACN,yBAAyB;oBACzB,MAAM,OAAO,GAAG,MAAM,IAAA,mBAAQ,EAAC,UAAU,CAAC,CAAC;oBAC3C,MAAM,IAAA,gBAAK,EAAC,IAAI,CAAC,OAAO,CAAC,QAAQ,CAAC,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,CAAC;oBACzD,MAAM,IAAA,oBAAS,EAAC,QAAQ,EAAE,OAAqB,CAAC,CAAC;oBAEjD,4BAA4B;oBAC5B,MAAM,YAAY,GAAG,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC,GAAG,EAAE,EAAE,QAAQ,CAAC,CAAC;oBAC5D,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC;gBAC1C,CAAC;YACH,CAAC;QACH,CAAC;KAAA;CACF;AA1ID,0CA0IC"}
@@ -18,6 +18,7 @@ export declare const messages: {
18
18
  MissingAuraDir: string;
19
19
  MissingLWCDir: string;
20
20
  MissingWebApplicationsDir: string;
21
+ MissingFlexipagesDir: string;
21
22
  MissingLightningComponentTemplate: string;
22
23
  localCustomTemplateDoNotExist: string;
23
24
  customTemplatesShouldUseHttpsProtocol: string;
@@ -31,4 +32,10 @@ export declare const messages: {
31
32
  LightningTest: string;
32
33
  RawOutput: string;
33
34
  templateTypeNotFound: string;
35
+ InvalidFlexipageTemplate: string;
36
+ RecordPageRequiresEntityName: string;
37
+ TooManySecondaryFields: string;
38
+ MissingFlexipageTemplate: string;
39
+ FailedToLoadFlexipageTemplatesRepo: string;
40
+ AlphaNumericValidationError: string;
34
41
  };
package/lib/i18n/i18n.js CHANGED
@@ -27,6 +27,7 @@ exports.messages = {
27
27
  MissingAuraDir: "Lightning bundles must have a parent folder named 'aura'.",
28
28
  MissingLWCDir: "Lightning bundles must have a parent folder named 'lwc'.",
29
29
  MissingWebApplicationsDir: "Web applications must have a parent folder named 'webApplications'.",
30
+ MissingFlexipagesDir: "FlexiPages must have a parent folder named 'flexipages'.",
30
31
  MissingLightningComponentTemplate: 'Template %s not available for component type %s.',
31
32
  localCustomTemplateDoNotExist: 'Local custom templates folder %s does not exist',
32
33
  customTemplatesShouldUseHttpsProtocol: 'Only HTTPS protocol is supported for custom templates. Got %s.',
@@ -40,5 +41,11 @@ exports.messages = {
40
41
  LightningTest: 'A Lightning Test',
41
42
  RawOutput: 'target dir = %s\n%s',
42
43
  templateTypeNotFound: 'The template type does not exist',
44
+ InvalidFlexipageTemplate: 'Invalid FlexiPage template "%s". Valid templates are: %s',
45
+ RecordPageRequiresEntityName: 'RecordPage template requires an entityName option (e.g., "Account", "Opportunity", "Custom_Object__c").',
46
+ TooManySecondaryFields: 'Too many secondary fields specified (%s). The Dynamic Highlights Panel supports a maximum of %s secondary fields.',
47
+ MissingFlexipageTemplate: 'FlexiPage template "%s" not found in repository: %s. Please verify the template name is correct.',
48
+ FailedToLoadFlexipageTemplatesRepo: 'Failed to load the FlexiPage templates repository. Please verify the URL is correct and accessible.',
49
+ AlphaNumericValidationError: '%s must contain only alphanumeric characters.',
43
50
  };
44
51
  //# sourceMappingURL=i18n.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"i18n.js","sourceRoot":"","sources":["../../src/i18n/i18n.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;AAEH;;;;;;;;;GASG;AACU,QAAA,QAAQ,GAAG;IACtB,qBAAqB,EAAE,iDAAiD;IACxE,4BAA4B,EAAE,gCAAgC;IAC9D,sBAAsB,EAAE,oCAAoC;IAC5D,qBAAqB,EAAE,+CAA+C;IACtE,eAAe,EAAE,uDAAuD;IAExE,uBAAuB,EACrB,sEAAsE;IACxE,cAAc,EAAE,2DA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AoB,EAAE,kCAAkC;IACxD,wBAAwB,EACtB,0DAA0D;IAC5D,4BAA4B,EAC1B,yGAAyG;IAC3G,sBAAsB,EACpB,mHAAmH;IACrH,wBAAwB,EACtB,kGAAkG;IACpG,kCAAkC,EAChC,qGAAqG;IAEvG,2BAA2B,EAAE,+CAA+C;CAC7E,CAAC"}
@@ -0,0 +1,28 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <CustomSite xmlns="http://soap.sforce.com/2006/04/metadata">
3
+ <active>true</active>
4
+ <allowGuestPaymentsApi>false</allowGuestPaymentsApi>
5
+ <allowHomePage>false</allowHomePage>
6
+ <allowStandardAnswersPages>false</allowStandardAnswersPages>
7
+ <allowStandardIdeasPages>false</allowStandardIdeasPages>
8
+ <allowStandardLookups>false</allowStandardLookups>
9
+ <allowStandardPortalPages>true</allowStandardPortalPages>
10
+ <allowStandardSearch>false</allowStandardSearch>
11
+ <authorizationRequiredPage>CommunitiesLogin</authorizationRequiredPage>
12
+ <bandwidthExceededPage>BandwidthExceeded</bandwidthExceededPage>
13
+ <browserXssProtection>true</browserXssProtection>
14
+ <cachePublicVisualforcePagesInProxyServers>true</cachePublicVisualforcePagesInProxyServers>
15
+ <clickjackProtectionLevel>SameOriginOnly</clickjackProtectionLevel>
16
+ <contentSniffingProtection>true</contentSniffingProtection>
17
+ <enableAuraRequests>true</enableAuraRequests>
18
+ <fileNotFoundPage>FileNotFound</fileNotFoundPage>
19
+ <genericErrorPage>Exception</genericErrorPage>
20
+ <inMaintenancePage>InMaintenance</inMaintenancePage>
21
+ <indexPage>CommunitiesLanding</indexPage>
22
+ <masterLabel><%= siteName %></masterLabel>
23
+ <redirectToCustomDomain>false</redirectToCustomDomain>
24
+ <referrerPolicyOriginWhenCrossOrigin>true</referrerPolicyOriginWhenCrossOrigin>
25
+ <selfRegPage>CommunitiesSelfReg</selfRegPage>
26
+ <siteType>ChatterNetwork</siteType>
27
+ <urlPathPrefix><%= urlPathPrefix %>vforcesite</urlPathPrefix>
28
+ </CustomSite>
@@ -0,0 +1,15 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <DigitalExperienceBundle xmlns="http://soap.sforce.com/2006/04/metadata">
3
+ <digitalExperienceFolderShares/>
4
+ <label><%= picassoSiteDevName %></label>
5
+ <modules>
6
+ <module>
7
+ <fullyQualifiedName>sfdc_cms__collection</fullyQualifiedName>
8
+ <status>ENABLED</status>
9
+ </module>
10
+ <module>
11
+ <fullyQualifiedName>sfdc_cms__mobilePublisherConfig</fullyQualifiedName>
12
+ <status>ENABLED</status>
13
+ </module>
14
+ </modules>
15
+ </DigitalExperienceBundle>
@@ -0,0 +1,8 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <DigitalExperienceConfig xmlns="http://soap.sforce.com/2006/04/metadata">
3
+ <label><%= siteName %></label>
4
+ <site>
5
+ <urlPathPrefix><%= urlPathPrefix %></urlPathPrefix>
6
+ </site>
7
+ <space>site/<%= picassoSiteDevName %></space>
8
+ </DigitalExperienceConfig>