@@ -65273,7 +65273,7 @@ const xml2js = __nccwpck_require__(7486);
65273
65273
65274
65274
class Archive {
65275
65275
// 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) {
65277
65277
const manifest = fs.readFileSync(manifestPath, "utf8");
65278
65278
const xml = await new Promise((resolve, reject) => {
65279
65279
xml2js.parseString(manifest, { explicitArray: false }, (err, json) => {
@@ -65306,7 +65306,7 @@ class Archive {
65306
65306
}
65307
65307
65308
65308
// Create a new DAR package using the manifest file
65309
- static async CreateNewDarPackage (manifestPath, outputPath, packageName) {
65309
+ static async createNewDarPackage (manifestPath, outputPath, packageName) {
65310
65310
try {
65311
65311
const rootPath = process.cwd();
65312
65312
const manifestFileFullPath = path.join(rootPath, "deployit-manifest.xml");
@@ -65338,10 +65338,10 @@ class Archive {
65338
65338
throw new Error(`A DAR package already exists at ${packageFullPath}.`);
65339
65339
}
65340
65340
65341
- const filesToInclude = await Archive.GetPathsFromManifest (manifestPath);
65341
+ const filesToInclude = await Archive.getPathsFromManifest (manifestPath);
65342
65342
console.log(`Files to include in the package = ${filesToInclude}`);
65343
65343
65344
- await Archive.CompressPackage (packageFullPath, filesToInclude, rootPath);
65344
+ await Archive.compressPackage (packageFullPath, filesToInclude, rootPath);
65345
65345
console.log("Package created at:", packageFullPath);
65346
65346
65347
65347
return packageFullPath;
@@ -65352,7 +65352,7 @@ class Archive {
65352
65352
}
65353
65353
65354
65354
// Compress the files into a DAR package
65355
- static async CompressPackage (packageFullPath, filesToInclude, rootPath) {
65355
+ static async compressPackage (packageFullPath, filesToInclude, rootPath) {
65356
65356
const archive = archiver("zip", {});
65357
65357
const output = fs.createWriteStream(packageFullPath);
65358
65358
@@ -65443,17 +65443,17 @@ class DeployManager {
65443
65443
65444
65444
// Deploy a package
65445
65445
static async deployPackage(packageFullPath, targetEnvironment, rollback) {
65446
- if (!Util.StartsWith (targetEnvironment, "Environments/", true)) {
65446
+ if (!Util.startsWith (targetEnvironment, "Environments/", true)) {
65447
65447
targetEnvironment = `Environments/${targetEnvironment}`;
65448
65448
}
65449
65449
65450
65450
if (!await this.environmentExists(targetEnvironment)) {
65451
65451
throw new Error(`Specified environment ${targetEnvironment} doesn't exists.`);
65452
65452
}
65453
65453
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);
65457
65457
const deploymentPackageId = `Applications/${application}/${version}`;
65458
65458
65459
65459
console.log(`Package name is ${deploymentPackageId}`);
@@ -65671,10 +65671,10 @@ async function createNewPackage(manifestPath, outputPath, packageName, versionNu
65671
65671
65672
65672
const outputFullPath = path.join(process.cwd(), outputPath);
65673
65673
if (versionNumber) {
65674
- Util.SetVersion (manifestFullPath, versionNumber);
65674
+ Util.setVersion (manifestFullPath, versionNumber);
65675
65675
}
65676
65676
65677
- return Archive.CreateNewDarPackage (manifestFullPath, outputFullPath, packageName);
65677
+ return Archive.createNewDarPackage (manifestFullPath, outputFullPath, packageName);
65678
65678
}
65679
65679
65680
65680
async function publishPackage(packageFullPath) {
@@ -65782,13 +65782,13 @@ const xml2js = __nccwpck_require__(7486);
65782
65782
class Util {
65783
65783
65784
65784
// Get version from manifest file
65785
- static async GetVersionFromManifest (manifestPath) {
65785
+ static async getVersionFromManifest (manifestPath) {
65786
65786
const text = fs.readFileSync(manifestPath, "utf8");
65787
- return await Util.GetVersion (text);
65787
+ return await Util.getVersion (text);
65788
65788
}
65789
65789
65790
65790
// Get version from manifest content
65791
- static async GetVersion (manifest) {
65791
+ static async getVersion (manifest) {
65792
65792
const xml = await this.xml2json(manifest);
65793
65793
65794
65794
const udmDeploymentPackageElement = xml["udm.DeploymentPackage"];
@@ -65804,7 +65804,7 @@ class Util {
65804
65804
}
65805
65805
65806
65806
// Check if input string starts with a specific value
65807
- static StartsWith (inputString, value, ignoreCase) {
65807
+ static startsWith (inputString, value, ignoreCase) {
65808
65808
const subString = inputString.substring(0, value.length);
65809
65809
65810
65810
if (ignoreCase) {
@@ -65815,7 +65815,7 @@ class Util {
65815
65815
}
65816
65816
65817
65817
// Set version in the manifest file
65818
- static async SetVersion (manifestPath, version) {
65818
+ static async setVersion (manifestPath, version) {
65819
65819
const text = fs.readFileSync(manifestPath, "utf8");
65820
65820
const xml = await this.xml2json(text);
65821
65821
@@ -65835,13 +65835,13 @@ class Util {
65835
65835
}
65836
65836
65837
65837
// Get application from manifest file
65838
- static async GetApplicationFromManifest (manifestPath) {
65838
+ static async getApplicationFromManifest (manifestPath) {
65839
65839
const manifest = fs.readFileSync(manifestPath, "utf8");
65840
- return await Util.GetApplication (manifest);
65840
+ return await Util.getApplication (manifest);
65841
65841
}
65842
65842
65843
65843
// Get application from manifest content
65844
- static async GetApplication (manifest) {
65844
+ static async getApplication (manifest) {
65845
65845
const xml = await this.xml2json(manifest);
65846
65846
65847
65847
const udmDeploymentPackageElement = xml["udm.DeploymentPackage"];
@@ -65857,8 +65857,8 @@ class Util {
65857
65857
}
65858
65858
65859
65859
// 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);
65862
65862
const splitPath = application.split("/");
65863
65863
return splitPath[splitPath.length - 1];
65864
65864
}
@@ -65890,7 +65890,7 @@ class Zip {
65890
65890
65891
65891
//Extracts the 'deployit-manifest.xml' from the provided zip package.
65892
65892
65893
- static async GetManifestFromPackage (packagePath) {
65893
+ static async getManifestFromPackage (packagePath) {
65894
65894
const zip = await Zip.openStreamZip(packagePath);
65895
65895
65896
65896
try {
0 commit comments