salesforce-metadata-mcp 2.1.4 → 2.3.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/CHANGELOG.md +143 -0
- package/README.md +176 -19
- package/dist/index.js +4 -4
- package/dist/schemas/index.js +628 -0
- package/dist/services/deployment.js +24 -1
- package/dist/services/salesforce.js +1461 -0
- package/dist/tools/agentforce.js +3 -3
- package/dist/tools/apex.js +71 -3
- package/dist/tools/automation.js +25 -2
- package/dist/tools/data.js +86 -0
- package/dist/tools/deployment.js +40 -4
- package/dist/tools/experience.js +52 -2
- package/dist/tools/index.js +8 -0
- package/dist/tools/integrations.js +22 -2
- package/dist/tools/objects.js +42 -2
- package/dist/tools/omnichannel.js +279 -0
- package/dist/tools/omnistudio.js +280 -0
- package/dist/tools/reports.js +46 -0
- package/dist/tools/security.js +82 -2
- package/dist/tools/ui.js +72 -2
- package/package.json +26 -3
|
@@ -163,6 +163,28 @@ function lightningTypeFor(sfType) {
|
|
|
163
163
|
return "lightning__textAreaType";
|
|
164
164
|
return "lightning__textType";
|
|
165
165
|
}
|
|
166
|
+
export async function buildVFPageZip(pageName, markup, apiVersion) {
|
|
167
|
+
const zip = new JSZip();
|
|
168
|
+
const packageXml = buildPackageXml([{ name: "ApexPage", members: [pageName] }], apiVersion);
|
|
169
|
+
zip.file("package.xml", packageXml);
|
|
170
|
+
zip.file(`pages/${pageName}.page`, markup);
|
|
171
|
+
zip.file(`pages/${pageName}.page-meta.xml`, `<?xml version="1.0" encoding="UTF-8"?>\n<ApexPage xmlns="http://soap.sforce.com/2006/04/metadata">\n <apiVersion>${apiVersion}</apiVersion>\n <availableInTouch>true</availableInTouch>\n <confirmationTokenRequired>false</confirmationTokenRequired>\n <label>${pageName}</label>\n</ApexPage>`);
|
|
172
|
+
const buffer = await zip.generateAsync({ type: "nodebuffer" });
|
|
173
|
+
return buffer.toString("base64");
|
|
174
|
+
}
|
|
175
|
+
export async function buildAuraZip(componentName, markup, controller, helper, style, apiVersion) {
|
|
176
|
+
const zip = new JSZip();
|
|
177
|
+
const packageXml = buildPackageXml([{ name: "AuraDefinitionBundle", members: [componentName] }], apiVersion);
|
|
178
|
+
zip.file("package.xml", packageXml);
|
|
179
|
+
const dir = `aura/${componentName}`;
|
|
180
|
+
zip.file(`${dir}/${componentName}.cmp`, markup || `<aura:component>\n</aura:component>`);
|
|
181
|
+
zip.file(`${dir}/${componentName}.cmp-meta.xml`, `<?xml version="1.0" encoding="UTF-8"?>\n<AuraDefinitionBundle xmlns="http://soap.sforce.com/2006/04/metadata">\n <apiVersion>${apiVersion}</apiVersion>\n <description>${componentName}</description>\n</AuraDefinitionBundle>`);
|
|
182
|
+
if (controller) zip.file(`${dir}/${componentName}Controller.js`, controller);
|
|
183
|
+
if (helper) zip.file(`${dir}/${componentName}Helper.js`, helper);
|
|
184
|
+
if (style) zip.file(`${dir}/${componentName}.css`, style);
|
|
185
|
+
const buffer = await zip.generateAsync({ type: "nodebuffer" });
|
|
186
|
+
return buffer.toString("base64");
|
|
187
|
+
}
|
|
166
188
|
export async function buildGenericDeployZip(components, apiVersion) {
|
|
167
189
|
const zip = new JSZip();
|
|
168
190
|
const typeMap = new Map();
|
|
@@ -193,7 +215,8 @@ export async function deployZip(auth, base64Zip, options = {}) {
|
|
|
193
215
|
<met:allowMissingFiles>false</met:allowMissingFiles>
|
|
194
216
|
<met:autoUpdatePackage>false</met:autoUpdatePackage>
|
|
195
217
|
<met:checkOnly>${options.checkOnly === true}</met:checkOnly>
|
|
196
|
-
<met:runAllTests
|
|
218
|
+
<met:runAllTests>${options.testLevel === "RunAllTestsInOrg" ? "true" : "false"}</met:runAllTests>
|
|
219
|
+
${options.testLevel && options.testLevel !== "RunAllTestsInOrg" ? `<met:testLevel>${options.testLevel}</met:testLevel>` : ""}
|
|
197
220
|
${testsXml}
|
|
198
221
|
<met:rollbackOnError>${options.rollbackOnError !== false}</met:rollbackOnError>
|
|
199
222
|
<met:singlePackage>true</met:singlePackage>
|