@@ -65273,7 +65273,7 @@ const xml2js = __nccwpck_require__(7486);
6527365273
6527465274class Archive {
6527565275 // Parse the manifest XML file and extract paths of files to be included in the package
65276- static async GetPathsFromManifest (manifestPath) {
65276+ static async getPathsFromManifest (manifestPath) {
6527765277 const manifest = fs.readFileSync(manifestPath, "utf8");
6527865278 const xml = await new Promise((resolve, reject) => {
6527965279 xml2js.parseString(manifest, { explicitArray: false }, (err, json) => {
@@ -65306,7 +65306,7 @@ class Archive {
6530665306 }
6530765307
6530865308 // Create a new DAR package using the manifest file
65309- static async CreateNewDarPackage (manifestPath, outputPath, packageName) {
65309+ static async createNewDarPackage (manifestPath, outputPath, packageName) {
6531065310 try {
6531165311 const rootPath = process.cwd();
6531265312 const manifestFileFullPath = path.join(rootPath, "deployit-manifest.xml");
@@ -65338,10 +65338,10 @@ class Archive {
6533865338 throw new Error(`A DAR package already exists at ${packageFullPath}.`);
6533965339 }
6534065340
65341- const filesToInclude = await Archive.GetPathsFromManifest (manifestPath);
65341+ const filesToInclude = await Archive.getPathsFromManifest (manifestPath);
6534265342 console.log(`Files to include in the package = ${filesToInclude}`);
6534365343
65344- await Archive.CompressPackage (packageFullPath, filesToInclude, rootPath);
65344+ await Archive.compressPackage (packageFullPath, filesToInclude, rootPath);
6534565345 console.log("Package created at:", packageFullPath);
6534665346
6534765347 return packageFullPath;
@@ -65352,7 +65352,7 @@ class Archive {
6535265352 }
6535365353
6535465354 // Compress the files into a DAR package
65355- static async CompressPackage (packageFullPath, filesToInclude, rootPath) {
65355+ static async compressPackage (packageFullPath, filesToInclude, rootPath) {
6535665356 const archive = archiver("zip", {});
6535765357 const output = fs.createWriteStream(packageFullPath);
6535865358
@@ -65443,17 +65443,17 @@ class DeployManager {
6544365443
6544465444 // Deploy a package
6544565445 static async deployPackage(packageFullPath, targetEnvironment, rollback) {
65446- if (!Util.StartsWith (targetEnvironment, "Environments/", true)) {
65446+ if (!Util.startsWith (targetEnvironment, "Environments/", true)) {
6544765447 targetEnvironment = `Environments/${targetEnvironment}`;
6544865448 }
6544965449
6545065450 if (!await this.environmentExists(targetEnvironment)) {
6545165451 throw new Error(`Specified environment ${targetEnvironment} doesn't exists.`);
6545265452 }
6545365453
65454- const manifest = await Zip.GetManifestFromPackage (packageFullPath);
65455- const application = await Util.GetApplication (manifest);
65456- const version = await Util.GetVersion (manifest);
65454+ const manifest = await Zip.getManifestFromPackage (packageFullPath);
65455+ const application = await Util.getApplication (manifest);
65456+ const version = await Util.getVersion (manifest);
6545765457 const deploymentPackageId = `Applications/${application}/${version}`;
6545865458
6545965459 console.log(`Package name is ${deploymentPackageId}`);
@@ -65671,10 +65671,10 @@ async function createNewPackage(manifestPath, outputPath, packageName, versionNu
6567165671
6567265672 const outputFullPath = path.join(process.cwd(), outputPath);
6567365673 if (versionNumber) {
65674- Util.SetVersion (manifestFullPath, versionNumber);
65674+ Util.setVersion (manifestFullPath, versionNumber);
6567565675 }
6567665676
65677- return Archive.CreateNewDarPackage (manifestFullPath, outputFullPath, packageName);
65677+ return Archive.createNewDarPackage (manifestFullPath, outputFullPath, packageName);
6567865678}
6567965679
6568065680async function publishPackage(packageFullPath) {
@@ -65782,13 +65782,13 @@ const xml2js = __nccwpck_require__(7486);
6578265782class Util {
6578365783
6578465784 // Get version from manifest file
65785- static async GetVersionFromManifest (manifestPath) {
65785+ static async getVersionFromManifest (manifestPath) {
6578665786 const text = fs.readFileSync(manifestPath, "utf8");
65787- return await Util.GetVersion (text);
65787+ return await Util.getVersion (text);
6578865788 }
6578965789
6579065790 // Get version from manifest content
65791- static async GetVersion (manifest) {
65791+ static async getVersion (manifest) {
6579265792 const xml = await this.xml2json(manifest);
6579365793
6579465794 const udmDeploymentPackageElement = xml["udm.DeploymentPackage"];
@@ -65804,7 +65804,7 @@ class Util {
6580465804 }
6580565805
6580665806 // Check if input string starts with a specific value
65807- static StartsWith (inputString, value, ignoreCase) {
65807+ static startsWith (inputString, value, ignoreCase) {
6580865808 const subString = inputString.substring(0, value.length);
6580965809
6581065810 if (ignoreCase) {
@@ -65815,7 +65815,7 @@ class Util {
6581565815 }
6581665816
6581765817 // Set version in the manifest file
65818- static async SetVersion (manifestPath, version) {
65818+ static async setVersion (manifestPath, version) {
6581965819 const text = fs.readFileSync(manifestPath, "utf8");
6582065820 const xml = await this.xml2json(text);
6582165821
@@ -65835,13 +65835,13 @@ class Util {
6583565835 }
6583665836
6583765837 // Get application from manifest file
65838- static async GetApplicationFromManifest (manifestPath) {
65838+ static async getApplicationFromManifest (manifestPath) {
6583965839 const manifest = fs.readFileSync(manifestPath, "utf8");
65840- return await Util.GetApplication (manifest);
65840+ return await Util.getApplication (manifest);
6584165841 }
6584265842
6584365843 // Get application from manifest content
65844- static async GetApplication (manifest) {
65844+ static async getApplication (manifest) {
6584565845 const xml = await this.xml2json(manifest);
6584665846
6584765847 const udmDeploymentPackageElement = xml["udm.DeploymentPackage"];
@@ -65857,8 +65857,8 @@ class Util {
6585765857 }
6585865858
6585965859 // Get application name from manifest file
65860- static async GetApplicationNameFromManifest (manifestPath) {
65861- const application = await this.GetApplicationFromManifest (manifestPath);
65860+ static async getApplicationNameFromManifest (manifestPath) {
65861+ const application = await this.getApplicationFromManifest (manifestPath);
6586265862 const splitPath = application.split("/");
6586365863 return splitPath[splitPath.length - 1];
6586465864 }
@@ -65890,7 +65890,7 @@ class Zip {
6589065890
6589165891 //Extracts the 'deployit-manifest.xml' from the provided zip package.
6589265892
65893- static async GetManifestFromPackage (packagePath) {
65893+ static async getManifestFromPackage (packagePath) {
6589465894 const zip = await Zip.openStreamZip(packagePath);
6589565895
6589665896 try {
0 commit comments