![Oracle Drags Its Feet in the JavaScript Trademark Dispute](https://cdn.sanity.io/images/cgdhsj6q/production/919c3b22c24f93884c548d60cbb338e819ff2435-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Oracle Drags Its Feet in the JavaScript Trademark Dispute
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
@aurahelper/cli-manager
Advanced tools
Module to handle Aura Helper CLI and Aura Helper SFDX processes used in Aura Helper VSCode Extension
Module to create and handle Aura Helper CLI processes. With this module you can execute all CLI operations and handle the processes progress easy with the callbacks functions.
Aura Helper CLI is a Command Line Interface application to work with Salesforce projects. Is specially designed to DevOps workflows and Continous Integration.
Aura Helper CLI has too many processes to list or describe metadata types, import and export data between orgs, retrieve special metadata types, compress xml files, execute apex anonymous scripts N times or create package files to deploy or delete from git changes among other operations.
Class to create and handle Aura Helper CLI processes. With this module you can execute all CLI operations and handle the processes progress easy with the callbacks functions. Aura Helper CLI Has too many processes to list or describe metadata types, import and export data between orgs, retrieve special metadata types, compress xml files, execute apex anonymous scripts N times or create package files to deploy or delete from git changes among other operations.
The setters methods are defined like a builder pattern to make it more usefull
All CLI Manager methods return a Promise with the associated data to the processes.
The fields that start with _ are for internal use only (Does not modify this fields to a correct CLI Manager work). To the rest of fields, setter methods are recommended instead modify fields.
Path to the local project root folder
String
API Version number to run processes and connect to salesforce
String
| Number
Namespace prefix from the Org
String
True to compress all affected files when execute CLI Processes, false in otherwise
Boolean
Sort order value to sort the compresses files
String
Path to the ignore file to use on all processes that can ignore metadata
String
Path to the folder to save all outputs from commands when choose save output into a file.
String
The CLI Manager class has only one constructor to create a connection
Constructor to create a new CLI Manager object. All parameters are optional and you can use the setters methods to set the values when you want.
String
String
| Number
String
Method to set the API Version number to execute some Aura Helper CLI Processes
Method to set the local root project path to execute all Aura Helper CLI Processes
setNamespacePrefix(namespacePrefix)
Method to set the Namespace prefix from the project org
setCompressFiles(compressFiles)
Method to set if compress the affected files by Aura Helper processes
Method to set the sort order when compress XML Files
Method to set the ignore file path to use on some Aura Helper CLI Processes
Method to set the output folder path to redirect the response to files
Method to handle the progress event to handle AHCLI Progression
Method to handle when CLI Manager is aborted
Method to abort all CLI Manager running processes. When finishes call onAbort() callback
compress(filesOrFolders, sortOrder)
Method to compress a single file or folder or array with files to compress (compress more than one folder is not allowed but you can compress an entire folder an subfolders)
Method to compare the local project with the project auth org. Return the Metadata Types that exists on Org and not exists on local project
compareOrgBetween(source, target)
Method to compare between two orgs. Return the Metadata Types that exists on target and not exists on source. Source and Target must be authorized in the system.
Method to describe the all or selected Metadata Types from your local project
describeOrgMetadata(downloadAll, types)
Method to describe the all or selected Metadata Types from your project org
retrieveLocalSpecialMetadata(types)
Method to retrieve all or selected local special types
retrieveOrgSpecialMetadata(downloadAll, types)
Method to retrieve all or selected special types from org
retrieveMixedSpecialMetadata(downloadAll, types)
Method to retrieve all or selected special types on mixed mode
Method to load all available user permissions on the project org
createPackageFromGit(source, target, createType, deleteOrder, useIgnore)
Method to create the package XML and destructive XML files from git diffs and changes between two commits, tags, branches
createPackageFromJSON(source, createType, deleteOrder, useIgnore, explicit)
Method to create the package XML or destructive XML file from a Metadata JSON file
createPackageFromOtherPackages(source, createType, deleteOrder, useIgnore, explicit)
Method to create the package XML or destructive XML from other Package XML Files
Method to ignore Metadata Types from the local project
repairDependencies(types, onlyCheck, useIgnore)
Method to repair all error dependencies from your local project. Also you can check only to check if has errors.
Method to check if Aura Helper is installed on the system
Method to get the Aura Helper CLI installed version on the system
Method to update Aura Helper CLI with aura helper update command
Method to update Aura Helper CLI with NPM command
Method to set the API Version number to execute some Aura Helper CLI Processes
String
Returns the cli manager object
CLIManager
Set CLI Manager API version
const CLIManager = require('@aurahelper/cli-manager');
const cliManager = new CLIManager();
cliManager.setApiVersion(50);
Method to set the local root project path to execute all Aura Helper CLI Processes
String
Returns the cli manager object
CLIManager
Set CLI Manager project folder
const CLIManager = require('@aurahelper/cli-manager');
const cliManager = new CLIManager();
cliManager.setProjectFolder('path/to/root/project/folder');
// Or can concatenate method calls because setters return a cli manager object
cliManager.setApiVersion(50).setProjectFolder('path/to/root/project/folder');
Method to set the Namespace prefix from the project org
String
Returns the cli manager object
CLIManager
Set CLI Manager namespace prefix
const CLIManager = require('@aurahelper/cli-manager');
const cliManager = new CLIManager();
cliManager.setNamespacePrefix('NSPrefix');
// Or can concatenate method calls because setters return a cli manager object
cliManager.setApiVersion(50).setNamespacePrefix('NSPrefix');
Method to set if compress the affected files by Aura Helper processes
Boolean
Returns the cli manager object
CLIManager
Set CLI Manager compress files
const CLIManager = require('@aurahelper/cli-manager');
const cliManager = new CLIManager();
cliManager.setCompressFiles(true);
// Or can concatenate method calls because setters return a cli manager object
cliManager.setApiVersion(50).setCompressFiles(true);
Method to set the sort order when compress XML Files
String
Returns the cli manager object
CLIManager
Set CLI Manager compress files
const CLIManager = require('@aurahelper/cli-manager');
const cliManager = new CLIManager();
cliManager.setSortOrder('alphabetDesc');
// Or can concatenate method calls because setters return a cli manager object
cliManager.setApiVersion(50).setSortOrder('alphabetDesc');
Method to set the ignore file path to use on some Aura Helper CLI Processes
String
Returns the cli manager object
CLIManager
Set CLI Manager ignore file
const CLIManager = require('@aurahelper/cli-manager');
const cliManager = new CLIManager();
cliManager.setIgnoreFile('path/to/ignore/file.json');
// Or can concatenate method calls because setters return a cli manager object
cliManager.setApiVersion(50).setIgnoreFile('path/to/ignore/file.json');
Method to set the output folder path to redirect the response to files
String
Returns the cli manager object
CLIManager
Set CLI Manager ignore file
const CLIManager = require('@aurahelper/cli-manager');
const cliManager = new CLIManager();
cliManager.setOutputPath('path/to/ignore/output/path');
// Or can concatenate method calls because setters return a cli manager object
cliManager.setApiVersion(50).setOutputPath('path/to/ignore/output/path');
Method to handle the progress event to handle AHCLI Progression
Function
Returns the cli manager object
CLIManager
Set CLI Manager on progress callback
const CLIManager = require('@aurahelper/cli-manager');
const cliManager = new CLIManager();
cliManager.onProgress((status) => {
});
// Or can concatenate method calls because setters return a cli manager object
cliManager.setApiVersion(50).onProgress((status) => {
});
Method to handle the event when CLIManager processes are aborted
Function
Returns the cli manager object
CLIManager
Set CLI Manager on aport callback
const CLIManager = require('@aurahelper/cli-manager');
const cliManager = new CLIManager();
cliManager.onAbort(() => {
// Execute when abort all processes
});
// Or can concatenate method calls because setters return a cli manager object
cliManager.setApiVersion(50).onAbort(() => {
});
Method to abort all CLI Manager running processes. When finishes call onAbort() callback
Abort CLI Manager running processes
const CLIManager = require('@aurahelper/cli-manager');
const cliManager = new CLIManager();
cliManager.onAbort(() => {
console.log('process aborted');
});
cliManager.abortProcess();
Method to compress a single file or folder or array with files to compress (compress more than one folder is not allowed but you can compress an entire folder an subfolders)
String
| Array<String>
String
Return an empty promise when compress files finish succesfully
This method can throw the next exceptions:
CLIManagerException
: If run other cli manager process when has one process running or Aura Helper CLI Return an errorDataRequiredException
: If required data is not providedOSNotSupportedException
: When run this processes with not supported operative systemOperationNotSupportedException
: If try to compress more than one folder, or file and folders at the same timeDataNotFoundException
: If not found file or folder pathsWrongDirectoryPathException
: If the folder path is not a String or can't convert to absolute pathDirectoryNotFoundException
: If the folder path not exists or not have access to itInvalidDirectoryPathException
: If the project folder or package folder is not a directoryWrongFilePathException
: If the file is not a String or can't convert to absolute pathFileNotFoundException
: If the file not exists or not have access to itInvalidFilePathException
: If the file is not a fileWrongDatatypeException
: If the api version is not a Number or String. Can be undefinedCompress a single XML file
const CLIManager = require('@aurahelper/cli-manager');
const cliManager = new CLIManager('root/project/path', 50);
const filePath = 'path/to/file.xml';
cliManager.compress(filePath).then((response) => {
console.log('File compressed successfully');
}).catch((error) => {
// Handle error
});
Compress an entire folder and subfolders
const CLIManager = require('@aurahelper/cli-manager');
const cliManager = new CLIManager('root/project/path', 50);
const folderPath = 'path/to/folder';
cliManager.compress(folderPath).then((response) => {
console.log('Files compressed successfully');
}).catch((error) => {
// Handle error
});
Compress a file list
const CLIManager = require('@aurahelper/cli-manager');
const cliManager = new CLIManager('root/project/path', 50);
const files = [
'path/to/file1.xml',
'path/to/file2.xml',
'path/to/file3.xml',
'path/to/file4.xml',
'path/to/file5.xml',
];
cliManager.compress(files).then((response) => {
console.log('Files compressed successfully');
}).catch((error) => {
// Handle error
});
Method to compare the local project with the project auth org. Return the Metadata Types that exists on Org and not exists on local project. See Metadata JSON Format section to understand the JSON Metadata Format
Return a promise with a JSON Metadata Object with the data respose. Contains the Metadata Types that exists on the project org and not in the local project.
Promise<Object>
This method can throw the next exceptions:
CLIManagerException
: If run other cli manager process when has one process running or Aura Helper CLI Return an errorDataRequiredException
: If required data is not providedOSNotSupportedException
: When run this processes with not supported operative systemWrongDirectoryPathException
: If the folder path is not a String or can't convert to absolute pathDirectoryNotFoundException
: If the folder path not exists or not have access to itInvalidDirectoryPathException
: If the project folder or package folder is not a directoryWrongDatatypeException
: If the api version is not a Number or String. Can be undefinedCompare local project with org
const CLIManager = require('@aurahelper/cli-manager');
const cliManager = new CLIManager('root/project/path', 50);
cliManager.compareWithOrg().then((response) => {
console.log(response);
}).catch((error) => {
// Handle error
});
Method to compare between two orgs. Return the Metadata Types that exists on target and not exists on source. Source and Target must be authorized in the system. See Metadata JSON Format section to understand the JSON Metadata Format
String
String
Return a promise with a JSON Metadata Object with the data respose. Contains the Metadata Types that exists on target and not on source.
Promise<Object>
This method can throw the next exceptions:
CLIManagerException
: If run other cli manager process when has one process running or Aura Helper CLI Return an errorDataRequiredException
: If required data is not providedOSNotSupportedException
: When run this processes with not supported operative systemWrongDirectoryPathException
: If the folder path is not a String or can't convert to absolute pathDirectoryNotFoundException
: If the folder path not exists or not have access to itInvalidDirectoryPathException
: If the project folder or package folder is not a directoryWrongDatatypeException
: If the api version is not a Number or String. Can be undefinedCompare the project org with another org
const CLIManager = require('@aurahelper/cli-manager');
const cliManager = new CLIManager('root/project/path', 50);
cliManager.compareOrgBetween(undefined, 'TargetOrgAlias').then((response) => {
console.log(response);
}).catch((error) => {
// Handle error
});
Compare two different orgs
const CLIManager = require('@aurahelper/cli-manager');
const cliManager = new CLIManager('root/project/path', 50);
cliManager.compareOrgBetween('SourceOrgAlias', 'TargetOrgAlias').then((response) => {
console.log(response);
}).catch((error) => {
// Handle error
});
Method to describe the all or selected Metadata Types from your local project. See Metadata JSON Format section to understand the JSON Metadata Format
Array<String>
Return a promise with a Metadata JSON Object with the selected Metadata Types data
Promise<Object>
This method can throw the next exceptions:
CLIManagerException
: If run other cli manager process when has one process running or Aura Helper CLI Return an errorDataRequiredException
: If required data is not providedOSNotSupportedException
: When run this processes with not supported operative systemWrongDirectoryPathException
: If the folder path is not a String or can't convert to absolute pathDirectoryNotFoundException
: If the folder path not exists or not have access to itInvalidDirectoryPathException
: If the project folder or package folder is not a directoryWrongDatatypeException
: If the api version is not a Number or String. Can be undefinedDescribe all local metadata types
const CLIManager = require('@aurahelper/cli-manager');
const cliManager = new CLIManager('root/project/path', 50);
cliManager.describeLocalMetadata().then((response) => {
console.log(response);
}).catch((error) => {
// Handle error
});
Describe some local metadata types
const CLIManager = require('@aurahelper/cli-manager');
const cliManager = new CLIManager('root/project/path', 50);
const typesToDescribe = [
'CustomObject',
'ApexClass',
'CustomField',
'CustomTab'
];
cliManager.describeLocalMetadata(typesToDescribe).then((response) => {
console.log(response);
}).catch((error) => {
// Handle error
});
Method to describe the all or selected Metadata Types from your project org. See Metadata JSON Format section to understand the JSON Metadata Format
Boolean
Array<String>
Return a promise with a Metadata JSON Object with the selected Metadata Types data
Promise<Object>
This method can throw the next exceptions:
CLIManagerException
: If run other cli manager process when has one process running or Aura Helper CLI Return an errorDataRequiredException
: If required data is not providedOSNotSupportedException
: When run this processes with not supported operative systemWrongDirectoryPathException
: If the folder path is not a String or can't convert to absolute pathDirectoryNotFoundException
: If the folder path not exists or not have access to itInvalidDirectoryPathException
: If the project folder or package folder is not a directoryWrongDatatypeException
: If the api version is not a Number or String. Can be undefinedDescribe all org metadata types
const CLIManager = require('@aurahelper/cli-manager');
const cliManager = new CLIManager('root/project/path', 50);
cliManager.describeOrgMetadata().then((response) => {
console.log(response);
}).catch((error) => {
// Handle error
});
Describe some org metadata types
const CLIManager = require('@aurahelper/cli-manager');
const cliManager = new CLIManager('root/project/path', 50);
const typesToDescribe = [
'CustomObject',
'ApexClass',
'CustomField',
'CustomTab'
];
cliManager.describeOrgMetadata(typesToDescribe).then((response) => {
console.log(response);
}).catch((error) => {
// Handle error
});
Method to retrieve all or selected local special types. See Metadata JSON Format section to understand the JSON Metadata Format
String
| Object
Return a promise with a RetrieveResult object
Promise<RetrieveResult>
This method can throw the next exceptions:
CLIManagerException
: If run other cli manager process when has one process running or Aura Helper CLI Return an errorDataRequiredException
: If required data is not providedOSNotSupportedException
: When run this processes with not supported operative systemWrongDirectoryPathException
: If the folder path is not a String or can't convert to absolute pathDirectoryNotFoundException
: If the folder path not exists or not have access to itInvalidDirectoryPathException
: If the JSON Metadata file is not a String or can't convert to absolute pathWrongFilePathException
: If the JSON Metadata file not exists or not have access to itFileNotFoundException
: If the JSON Metadata file is not a fileInvalidFilePathException
: If the folder path not exists or not have access to itWrongFormatException
: If JSON Metadata file is not a JSON file or not have the correct Metadata JSON formatWrongDatatypeException
: If the api version is not a Number or String. Can be undefinedRetrieve all local special metadata types
const CLIManager = require('@aurahelper/cli-manager');
const cliManager = new CLIManager('root/project/path', 50);
cliManager.retrieveLocalSpecialMetadata().then((response) => {
console.log(response);
}).catch((error) => {
// Handle error
});
Retrieve some local special metadata types
const CLIManager = require('@aurahelper/cli-manager');
const cliManager = new CLIManager('root/project/path', 50);
const pathToJSONMetadataFile = 'path/to/json/file.json';
cliManager.retrieveLocalSpecialMetadata(pathToJSONMetadataFile).then((response) => {
console.log(response);
}).catch((error) => {
// Handle error
});
Method to retrieve all or selected special types from org. See Metadata JSON Format section to understand the JSON Metadata Format
Boolean
String
| Object
Return a promise with a RetrieveResult object
Promise<RetrieveResult>
This method can throw the next exceptions:
CLIManagerException
: If run other cli manager process when has one process running or Aura Helper CLI Return an errorDataRequiredException
: If required data is not providedOSNotSupportedException
: When run this processes with not supported operative systemWrongDirectoryPathException
: If the folder path is not a String or can't convert to absolute pathDirectoryNotFoundException
: If the folder path not exists or not have access to itInvalidDirectoryPathException
: If the JSON Metadata file is not a String or can't convert to absolute pathWrongFilePathException
: If the JSON Metadata file not exists or not have access to itFileNotFoundException
: If the JSON Metadata file is not a fileInvalidFilePathException
: If the folder path not exists or not have access to itWrongFormatException
: If JSON Metadata file is not a JSON file or not have the correct Metadata JSON formatWrongDatatypeException
: If the api version is not a Number or String. Can be undefinedRetrieve all org special metadata types from org namespace
const CLIManager = require('@aurahelper/cli-manager');
const cliManager = new CLIManager('root/project/path', 50);
cliManager.retrieveOrgSpecialMetadata(false).then((response) => {
console.log(response);
}).catch((error) => {
// Handle error
});
Retrieve some org special metadata types from org namespace
const CLIManager = require('@aurahelper/cli-manager');
const cliManager = new CLIManager('root/project/path', 50);
const pathToJSONMetadataFile = 'path/to/json/file.json';
cliManager.retrieveOrgSpecialMetadata(false, pathToJSONMetadataFile).then((response) => {
console.log(response);
}).catch((error) => {
// Handle error
});
Method to retrieve all or selected special types on mixed mode. See Metadata JSON Format section to understand the JSON Metadata Format
Boolean
String
| Object
Return a promise with a RetrieveResult object
Promise<RetrieveResult>
This method can throw the next exceptions:
CLIManagerException
: If run other cli manager process when has one process running or Aura Helper CLI Return an errorDataRequiredException
: If required data is not providedOSNotSupportedException
: When run this processes with not supported operative systemWrongDirectoryPathException
: If the folder path is not a String or can't convert to absolute pathDirectoryNotFoundException
: If the folder path not exists or not have access to itInvalidDirectoryPathException
: If the JSON Metadata file is not a String or can't convert to absolute pathWrongFilePathException
: If the JSON Metadata file not exists or not have access to itFileNotFoundException
: If the JSON Metadata file is not a fileInvalidFilePathException
: If the folder path not exists or not have access to itWrongFormatException
: If JSON Metadata file is not a JSON file or not have the correct Metadata JSON formatWrongDatatypeException
: If the api version is not a Number or String. Can be undefinedRetrieve all mixed special metadata types from org namespace
const CLIManager = require('@aurahelper/cli-manager');
const cliManager = new CLIManager('root/project/path', 50);
cliManager.retrieveMixedSpecialMetadata(false).then((response) => {
console.log(response);
}).catch((error) => {
// Handle error
});
Retrieve some mixed special metadata types from org namespace
const CLIManager = require('@aurahelper/cli-manager');
const cliManager = new CLIManager('root/project/path', 50);
const pathToJSONMetadataFile = 'path/to/json/file.json';
cliManager.retrieveMixedSpecialMetadata(false, pathToJSONMetadataFile).then((response) => {
console.log(response);
}).catch((error) => {
// Handle error
});
Method to load all available user permissions on the project org
Return a promise with the list of available user permission API Names
Promise<Array<String>>
This method can throw the next exceptions:
CLIManagerException
: If run other cli manager process when has one process running or Aura Helper CLI Return an errorDataRequiredException
: If required data is not providedOSNotSupportedException
: When run this processes with not supported operative systemWrongDirectoryPathException
: If the folder path is not a String or can't convert to absolute pathDirectoryNotFoundException
: If the folder path not exists or not have access to itInvalidDirectoryPathException
: If the JSON Metadata file is not a String or can't convert to absolute pathWrongDatatypeException
: If the api version is not a Number or String. Can be undefinedLoad available user permissions from project org
const CLIManager = require('@aurahelper/cli-manager');
const cliManager = new CLIManager('root/project/path', 50);
const pathToJSONMetadataFile = 'path/to/json/file.json';
cliManager.loadUserPermissions().then((response) => {
console.log(response);
}).catch((error) => {
// Handle error
});
Method to create the package XML and destructive XML files from git diffs and changes between two commits, tags, branches
String
String
String
String
Boolean
Return a promise with the PackageGeneratorResult object with the generated file paths
Promise<PackageGeneratorResult>
This method can throw the next exceptions:
CLIManagerException
: If run other cli manager process when has one process running or Aura Helper CLI Return an errorDataRequiredException
: If required data is not providedOSNotSupportedException
: When run this processes with not supported operative systemWrongDirectoryPathException
: If the folder path is not a String or can't convert to absolute pathDirectoryNotFoundException
: If the folder path not exists or not have access to itInvalidDirectoryPathException
: If the JSON Metadata file is not a String or can't convert to absolute pathWrongDatatypeException
: If the api version is not a Number or String. Can be undefinedCreate package and destructive files from changes between two branches
const CLIManager = require('@aurahelper/cli-manager');
const cliManager = new CLIManager('root/project/path', 50);
const sourceBranch = 'feature1';
const targetBranch = 'master';
const createType = 'both';
const deleteOrder = 'after';
cliManager.createPackageFromGit(sourceBranch, targetBranch, createType, deleteOrder).then((response) => {
console.log(response);
}).catch((error) => {
// Handle error
});
Create package file from changes between two branches
const CLIManager = require('@aurahelper/cli-manager');
const cliManager = new CLIManager('root/project/path', 50);
const sourceBranch = 'feature1';
const targetBranch = 'master';
const createType = 'package';
cliManager.createPackageFromGit(sourceBranch, targetBranch, createType).then((response) => {
console.log(response);
}).catch((error) => {
// Handle error
});
Method to create the package XML or destructive XML file from a Metadata JSON file. See Metadata JSON Format section to understand the JSON Metadata Format
String
String
String
Boolean
Boolean
Return a promise with the PackageGeneratorResult object with the generated file paths
Promise<PackageGeneratorResult>
This method can throw the next exceptions:
CLIManagerException
: If run other cli manager process when has one process running or Aura Helper CLI Return an errorDataRequiredException
: If required data is not providedOSNotSupportedException
: When run this processes with not supported operative systemWrongDirectoryPathException
: If the folder path is not a String or can't convert to absolute pathDirectoryNotFoundException
: If the folder path not exists or not have access to itInvalidDirectoryPathException
: If the JSON Metadata file is not a String or can't convert to absolute pathWrongDatatypeException
: If the api version is not a Number or String. Can be undefinedCreate package file from Metadata JSON File
const CLIManager = require('@aurahelper/cli-manager');
const cliManager = new CLIManager('root/project/path', 50);
const jsonFile = 'path/to/metadata/json/file.json';
const createType = 'package';
const deleteOrder = 'after';
cliManager.createPackageFromJSON(jsonFile, createType, deleteOrder).then((response) => {
console.log(response);
}).catch((error) => {
// Handle error
});
Create destructive file from Metadata JSON File
const CLIManager = require('@aurahelper/cli-manager');
const cliManager = new CLIManager('root/project/path', 50);
const jsonFile = 'path/to/metadata/json/file.json';
const createType = 'destructive';
const deleteOrder = 'after';
cliManager.createPackageFromJSON(jsonFile, createType, deleteOrder).then((response) => {
console.log(response);
}).catch((error) => {
// Handle error
});
Method to create the package XML or destructive XML from other Package XML Files
String
| Array<String>
String
String
Boolean
Return a promise with the PackageGeneratorResult object with the generated file paths
Promise<PackageGeneratorResult>
This method can throw the next exceptions:
CLIManagerException
: If run other cli manager process when has one process running or Aura Helper CLI Return an errorDataRequiredException
: If required data is not providedOSNotSupportedException
: When run this processes with not supported operative systemWrongDirectoryPathException
: If the folder path is not a String or can't convert to absolute pathDirectoryNotFoundException
: If the folder path not exists or not have access to itInvalidDirectoryPathException
: If the JSON Metadata file is not a String or can't convert to absolute pathWrongDatatypeException
: If the api version is not a Number or String. Can be undefinedCreate package file from other package files
const CLIManager = require('@aurahelper/cli-manager');
const cliManager = new CLIManager('root/project/path', 50);
const sources = [
'path/to/package.xml',
'path/to/package2.xml',
'path/to/destructiveChanges.xml',
'path/to/destructiveChangesPost.xml',
'path/to/destructiveChangesPost1.xml',
];
const createType = 'package';
const deleteOrder = 'after';
cliManager.createPackageFromOtherPackages(sources, createType, deleteOrder).then((response) => {
console.log(response);
}).catch((error) => {
// Handle error
});
Create destructive file from other package files
const CLIManager = require('@aurahelper/cli-manager');
const cliManager = new CLIManager('root/project/path', 50);
const sources = [
'path/to/package.xml',
'path/to/package2.xml',
'path/to/destructiveChanges.xml',
'path/to/destructiveChangesPost.xml',
'path/to/destructiveChangesPost1.xml',
];
const createType = 'destructive';
const deleteOrder = 'after';
cliManager.createPackageFromOtherPackages(jsonFile, createType, deleteOrder).then((response) => {
console.log(response);
}).catch((error) => {
// Handle error
});
Method to ignore Metadata Types from the local project
Array<String>
Return an empty promise when the ignore operation finish succesfully
Promise<Any>
This method can throw the next exceptions:
CLIManagerException
: If run other cli manager process when has one process running or Aura Helper CLI Return an errorDataRequiredException
: If required data is not providedOSNotSupportedException
: When run this processes with not supported operative systemWrongDirectoryPathException
: If the folder path is not a String or can't convert to absolute pathDirectoryNotFoundException
: If the folder path not exists or not have access to itInvalidDirectoryPathException
: If the JSON Metadata file is not a String or can't convert to absolute pathIgnore all metadata types from ignore file
const CLIManager = require('@aurahelper/cli-manager');
const cliManager = new CLIManager('root/project/path', 50);
cliManager.ignoreMetadata().then((response) => {
console.log(response);
}).catch((error) => {
// Handle error
});
Ignore some metadata types from ignore file
const CLIManager = require('@aurahelper/cli-manager');
const cliManager = new CLIManager('root/project/path', 50);
const typesToIgnore = [
'CustomObject',
'CustomField',
'Profile',
];
const createType = 'destructive';
const deleteOrder = 'after';
cliManager.ignoreMetadata(typesToIgnore).then((response) => {
console.log(response);
}).catch((error) => {
// Handle error
});
Method to repair all error dependencies from your local project. Also you can check only to check if has errors. See Repair Response section to understand the response when select repair dependencies or See Only Check Response section to understand the response when select only check dependencies errors.
String
| Object
Boolean
Boolean
Return a promise with the Repair response if you check repair, or the Only Check Response when select check only option
Promise<Object>
This method can throw the next exceptions:
CLIManagerException
: If run other cli manager process when has one process running or Aura Helper CLI Return an errorDataRequiredException
: If required data is not providedOSNotSupportedException
: When run this processes with not supported operative systemWrongDirectoryPathException
: If the folder path is not a String or can't convert to absolute pathDirectoryNotFoundException
: If the folder path not exists or not have access to itInvalidDirectoryPathException
: If the JSON Metadata file is not a String or can't convert to absolute pathRepair all metadata types
const CLIManager = require('@aurahelper/cli-manager');
const cliManager = new CLIManager('root/project/path', 50);
cliManager.repairDependencies().then((response) => {
console.log(response);
}).catch((error) => {
// Handle error
});
Repair some metadata types
const CLIManager = require('@aurahelper/cli-manager');
const cliManager = new CLIManager('root/project/path', 50);
const typesToRepair = [
'CustomObject',
'CustomField',
'Profile',
];
const createType = 'destructive';
const deleteOrder = 'after';
cliManager.Repair(typesToRepair).then((response) => {
console.log(response);
}).catch((error) => {
// Handle error
});
Check dependencies errors
const CLIManager = require('@aurahelper/cli-manager');
const cliManager = new CLIManager('root/project/path', 50);
cliManager.repairDependencies(undefined, true).then((response) => {
console.log(response);
}).catch((error) => {
// Handle error
});
Method to check if Aura Helper is installed on the system
Return a promise with true if is installer, false in otherwise
Promise<Boolean>
This method can throw the next exceptions:
CLIManagerException
: If run other cli manager process when has one process running or Aura Helper CLI Return an errorDataRequiredException
: If required data is not providedOSNotSupportedException
: When run this processes with not supported operative systemCheck if Aura Helper is installed
const CLIManager = require('@aurahelper/cli-manager');
const cliManager = new CLIManager('root/project/path', 50);
cliManager.isAuraHelperCLIInstalled(isInstalled).then((response) => {
if(isInstalled)
console.log('Aura Helper is installed');
else
console.log('Aura Helper is not installed');
}).catch((error) => {
// Handle error
});
Method to get the Aura Helper CLI installed version on the system
Return a promise with the Aura Helper CLI response
Promise<Object>
This method can throw the next exceptions:
CLIManagerException
: If run other cli manager process when has one process running or Aura Helper CLI Return an errorDataRequiredException
: If required data is not providedOSNotSupportedException
: When run this processes with not supported operative systemCheck if Aura Helper is installed
const CLIManager = require('@aurahelper/cli-manager');
const cliManager = new CLIManager('root/project/path', 50);
cliManager.getAuraHelperCLIVersion(response).then((response) => {
console.log(response);
}).catch((error) => {
// Handle error
});
Method to update Aura Helper CLI with aura helper update command
Return a promise with the Aura Helper CLI response
Promise<Object>
This method can throw the next exceptions:
CLIManagerException
: If run other cli manager process when has one process running or Aura Helper CLI Return an errorDataRequiredException
: If required data is not providedOSNotSupportedException
: When run this processes with not supported operative systemUpdate Aura Helper CLI
const CLIManager = require('@aurahelper/cli-manager');
const cliManager = new CLIManager('root/project/path', 50);
cliManager.updateAuraHelperCLI().then((response) => {
console.log(response);
}).catch((error) => {
// Handle error
});
Method to update Aura Helper CLI with NPM command
Return a promise with the Aura Helper CLI response
Promise<Object>
This method can throw the next exceptions:
CLIManagerException
: If run other cli manager process when has one process running or Aura Helper CLI Return an errorDataRequiredException
: If required data is not providedOSNotSupportedException
: When run this processes with not supported operative systemUpdate Aura Helper CLI with NPM
const CLIManager = require('@aurahelper/cli-manager');
const cliManager = new CLIManager('root/project/path', 50);
cliManager.updateAuraHelperCLIWithNPM().then((response) => {
console.log(response);
}).catch((error) => {
// Handle error
});
When you repair dependencies with any option (compress or not, repair specified types...) the response error has the next structure:
{
"MetadataTypeName": {
"metadataType": "MetadataTypeName"
"errors": [
{
"file": "path/to/file"
"errors": [
{
"elementPath": "xmlSuperParentTag>xmlParentTag>xmlTag",
"value": "error value",
"metadataType": "error Metadata Type",
"metadataObject": "error Metadata Object",
"metadataItem": "error Metadata Item",
"xmlElement": {
// xml Element error data
}
},
{
...
},
{
...
}
]
},
{
...
},
{
...
}
]
}
}
Example:
{
"CustomApplication": {
"metadataType": "CustomApplication"
"errors": [
{
"file": "..../force-app/main/default/applications/customApplicationExample.app-meta.xml"
"errors": [
{
"elementPath": "actionOverrides>content",
"value": "FlexiPageExample",
"metadataType": "FlexiPage",
"metadataObject": "FlexiPageExample",
"xmlElement": {
"actionName": "View",
"comment": "Action override description",
"content": "FlexiPageExample",
"formFactor": "Large",
"pageOrSobjectType": "Account",
"skipRecordTypeSelect": false,
"type": "Flexipage"
}
},
{
...
},
{
...
}
]
},
{
...
},
{
...
}
]
},
"PermissionSet": {
"metadataType": "PermissionSet"
"errors": [
{
"file": "..../force-app/main/default/permissionsets/permissionSetExample.app-meta.xml"
"errors": [
{
"elementPath": "fieldPermissions>field",
"value": "Account.custom_field__c",
"metadataType": "CustomField",
"metadataObject": "Account",
"metadataItem": "custom_field__c",
"xmlElement": {
"editable": false,
"field": "Account.custom_field__c",
"readable": false
}
},
{
...
},
{
...
}
]
},
{
...
},
{
...
}
]
}
}
When you only check dependencies errors the response error has the next structure:
{
"MetadataTypeName": [
{
"object": "MetadataObject",
"item": "MetadataItem"
"line": 16,
"startColumn": 146,
"endColumn": 166,
"message": "MetadataTypeName named MetadataObject.MetadataItem does not exists",
"severity": "Warning",
"file": "/path/to/file"
},
{
"object": "MetadataObject",
"item": "MetadataItem"
"line": 17,
"startColumn": 146,
"endColumn": 166,
"message": "MetadataTypeName named MetadataObject.MetadataItem does not exists",
"severity": "Warning",
"file": "/path/to/file"
},
],
"MetadataTypeName": [
{
...
},
{
...
}
]
}
Example:
{
"CustomApplication": [
{
"object": "FlexiPageExample",
"line": 16,
"startColumn": 146,
"endColumn": 166,
"message": "FlexiPage named FlexiPageExample does not exists",
"severity": "Warning",
"file": "..../force-app/main/default/applications/customApplicationExample.app-meta.xml"
},
{
"object": "FlexiPageExample",
"line": 17,
"startColumn": 146,
"endColumn": 166,
"message": "FlexiPage named FlexiPageExample does not exists",
"severity": "Warning",
"file": "..../force-app/main/default/applications/customApplicationExample.app-meta.xml"
},
],
"PermissionSet": [
{
"object": "Account",
"item": "custom_field__c",
"line": 1771,
"startColumn": 56,
"endColumn": 85,
"message": "CustomField named Account.custom_field__c does not exists",
"severity": "Warning",
"file": "..../force-app/main/default/permissionsets/permissionSetExample.permissionset-meta.xml"
},
{
"object": "Account",
"item": "custom_field2__c",
"line": 1772,
"startColumn": 56,
"endColumn": 85,
"message": "CustomField named Account.custom_field2__c does not exists",
"severity": "Warning",
"file": "..../force-app/main/default/permissionsets/permissionSetExample.permissionset-meta.xml"
},
]
}
The Metadata JSON Format used by Aura Helper Framework and modules have the next structure. Some fields are required and the datatypes checked to ensure the correct file structure.
{
"MetadataAPIName": {
"name": "MetadataAPIName", // Required (String). Contains the Metadata Type API Name (like object Key)
"checked": false, // Required (Boolean). Field for include this type on package or not
"path": "path/to/the/metadata/folder", // Optional (String). Path to the Metadata Type folder in local project
"suffix": "fileSuffix", // Optional (String). Metadata File suffix
"childs": { // Object with a collection of childs (Field required (JSON Object) but can be an empty object)
"MetadataObjectName":{
"name": "MetadataObjectName", // Required (String). Contains the Metadata Object API Name (like object Key)
"checked": false, // Required (Boolean). Field for include this object on package or not
"path": "path/to/the/metadata/file/or/folder", // Optional (String). Path to the object file or folder path
"childs": { // Object with a collection of childs (Field required (JSON Object) but can be an empty object)
"MetadataItemName": {
"name": "MetadataItemName", // Required (String). Contains the Metadata Item API Name (like object Key)
"checked": false, // Required (Boolean). Field for include this object on package or not
"path": "path/to/the/metadata/file"
},
"MetadataItemName2": {
...
},
...,
...,
...
}
}
"MetadataObjectName2":{
...
},
...,
...,
...
}
}
}
{
"CustomObject": {
"name": "CustomObject",
"checked": false,
"path": "path/to/root/project/force-app/main/default/objects",
"suffix": "object",
"childs": {
"Account": {
"name": "Account",
"checked": true, // Add Account Object to the package
"path": "path/to/root/project/force-app/main/default/objects/Account/Account.object-meta.xml",
"childs": {}
},
"Case": {
"name": "Case",
"checked": true, // Add Case Object to the package
"path": "path/to/root/project/force-app/main/default/objects/Case/Case.object-meta.xml",
"childs": {}
},
...,
...,
...
}
},
"CustomField": {
"name": "CustomField",
"checked": false,
"path": "path/to/root/project/force-app/main/default/objects",
"suffix": "field",
"childs": {
"Account": {
"name": "Account",
"checked": false,
"path": "path/to/root/project/force-app/main/default/objects/Account/fields",
"childs": {
"customField__c": {
"name": "customField__c",
"checked": true, // Add customField__c to the package
"path": "path/to/root/project/force-app/main/default/objects/Account/fields/customField__c.field-meta.xml",
},
...,
...,
...
}
},
"Case": {
"name": "Case",
"checked": false,
"path": "path/to/root/project/force-app/main/default/objects/Case/fields",
"childs": {
"CaseNumber": {
"name": "CaseNumber",
"checked": true, // Add CaseNumber to the package
"path": "path/to/root/project/force-app/main/default/objects/Account/fields/CaseNumber.field-meta.xml",
},
...,
...,
...
}
},
...,
...,
...
}
}
}
FAQs
Module to handle Aura Helper CLI and Aura Helper SFDX processes used in Aura Helper VSCode Extension
The npm package @aurahelper/cli-manager receives a total of 6 weekly downloads. As such, @aurahelper/cli-manager popularity was classified as not popular.
We found that @aurahelper/cli-manager demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.
Security News
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.