![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/git-manager
Advanced tools
Aura Helper Git Manager Module its a module to handle and manage all git operations and commands.
The Git Manager Module has an util methods to handle and manage git repository and has features to use in Aura Helper Framework. Yo can fetch data, list branches, get commits or get diffs from two branches, tags, commits...
You can use Aura Helper Metadata Factory Module @ah/metadata-factory to create a Metadata JSON Object from the Git diffs result, to create a package with Aura Helper Package Generator Module @ah/package-generator to create de package and destructive files from git changes to deploy or delete from your org. If you want, can use too the Aura Helper Ignore Module @ah/ignore to avoid deploy or delete some metadata types. With this workflow, refactor code, work with git and teams or implement Continuous Integration among other development processes and tasks are easy.
Class with util methods to handle and manage git repository and has features to use in Aura Helper Framework. Yo can fetch data, list branches, get commits or get diffs from two branches, tags, commits...
Can cobine this module with @ah/metadata-factory, @ah/package-generator and @ah/ignore to refactor code, work with git and teams or implement Continuous Integration among other development processes and tasks easy.
The fields that start with _ are for internal use only (Does not modify this fields to a correct GitManager work). To the rest of fields, setter methods are recommended instead modify fields.
Path to the project under a git repository
string
Constructor to instance a new GitManager object. All parameters are optional and you can use the setters methods to set the values when you want.
string
setProjectFolder(projectFolder)
Method to set the git project folder path
Method to get the User Name set on git config
Method to get the User Email set on git config
Method to get the Author Name set on git config
Method to get the Author Email set on git config
Method to get the Committer Name set on git config
Method to get the Committer Email set on git config
Method to fetch repository data into your local Salesforce gitr project
Method to get branch names from the Salesforce git repository
Method to list all git tags. You can also sort by field
Method to get the commits data from the Salesforce git repository
Method to get a list of GitDiff object with the differences between two branches, commits, tags...
Method to set the git project folder path
Return the GitManager instance
GitManager
Set Project folder
import { GitManager } from '@aurahelper/git-manager';
const gitManager = new GitManager();
gitManager.setProjectFolder('path/to/project/root');
Method to get the User Name set on git config
Return a String promise with the Git User Name
Promise<string>
This method can throw the next exceptions:
WrongDirectoryPathException
: If the project folder is not a String or can't convert to absolute pathDirectoryNotFoundException
: If the project folder not exists or not have access to itInvalidDirectoryPathException
: If the project folder is not a directoryOSNotSupportedException
: When run this processes with not supported operative systemGet git user name
import { GitManager } from '@aurahelper/git-manager';
const gitManager = new GitManager('path/to/project/root');
gitManager.getUserName().then((username) => {
console.log(username);
}).catch((error) => {
// handle error
});
Method to get the User Email set on git config
Return a String promise with the Git User Email
Promise<string>
This method can throw the next exceptions:
WrongDirectoryPathException
: If the project folder is not a String or can't convert to absolute pathDirectoryNotFoundException
: If the project folder not exists or not have access to itInvalidDirectoryPathException
: If the project folder is not a directoryOSNotSupportedException
: When run this processes with not supported operative systemGet git user email
import { GitManager } from '@aurahelper/git-manager';
const gitManager = new GitManager('path/to/project/root');
gitManager.getUserEmail().then((userEmail) => {
console.log(userEmail);
}).catch((error) => {
// handle error
});
Method to get the Author Name set on git config
Return a String promise with the Git Author Name
Promise<string>
This method can throw the next exceptions:
WrongDirectoryPathException
: If the project folder is not a String or can't convert to absolute pathDirectoryNotFoundException
: If the project folder not exists or not have access to itInvalidDirectoryPathException
: If the project folder is not a directoryOSNotSupportedException
: When run this processes with not supported operative systemGet git author name
import { GitManager } from '@aurahelper/git-manager';
const gitManager = new GitManager('path/to/project/root');
gitManager.getAuthorName().then((authorName) => {
console.log(authorName);
}).catch((error) => {
// handle error
});
Method to get the Author Email set on git config
Return a String promise with the Git Author Email
Promise<string>
This method can throw the next exceptions:
WrongDirectoryPathException
: If the project folder is not a String or can't convert to absolute pathDirectoryNotFoundException
: If the project folder not exists or not have access to itInvalidDirectoryPathException
: If the project folder is not a directoryOSNotSupportedException
: When run this processes with not supported operative systemGet git author email
import { GitManager } from '@aurahelper/git-manager';
const gitManager = new GitManager('path/to/project/root');
gitManager.getAuthorEmail().then((authorEmail) => {
console.log(authorEmail);
}).catch((error) => {
// handle error
});
Method to get the Committer Name set on git config
Return a String promise with the Git Committer Name
Promise<string>
This method can throw the next exceptions:
WrongDirectoryPathException
: If the project folder is not a String or can't convert to absolute pathDirectoryNotFoundException
: If the project folder not exists or not have access to itInvalidDirectoryPathException
: If the project folder is not a directoryOSNotSupportedException
: When run this processes with not supported operative systemGet git committer name
import { GitManager } from '@aurahelper/git-manager';
const gitManager = new GitManager('path/to/project/root');
gitManager.getCommitterName().then((committerName) => {
console.log(committerName);
}).catch((error) => {
// handle error
});
Method to get the Committer Email set on git config
Return a String promise with the Git Committer Email
Promise<string>
This method can throw the next exceptions:
WrongDirectoryPathException
: If the project folder is not a String or can't convert to absolute pathDirectoryNotFoundException
: If the project folder not exists or not have access to itInvalidDirectoryPathException
: If the project folder is not a directoryOSNotSupportedException
: When run this processes with not supported operative systemGet git committer email
import { GitManager } from '@aurahelper/git-manager';
const gitManager = new GitManager('path/to/project/root');
gitManager.getCommitterEmail().then((committerEmail) => {
console.log(committerEmail);
}).catch((error) => {
// handle error
});
Method to fetch repository data into your local Salesforce gitr project
Return an empty promise when finish fetch process
Promise<void>
This method can throw the next exceptions:
WrongDirectoryPathException
: If the project folder is not a String or can't convert to absolute pathDirectoryNotFoundException
: If the project folder not exists or not have access to itInvalidDirectoryPathException
: If the project folder is not a directoryOSNotSupportedException
: When run this processes with not supported operative systemFetch data to the local project
import { GitManager } from '@aurahelper/git-manager';
const gitManager = new GitManager('path/to/project/root');
gitManager.fetch().then(() => {
// data retrieved
}).catch((error) => {
// handle error
});
Method to get branch names from the Salesforce git repository
Returns a promise with an object list with branch name and active status
Promise<GitBranch[]>
This method can throw the next exceptions:
WrongDirectoryPathException
: If the project folder is not a String or can't convert to absolute pathDirectoryNotFoundException
: If the project folder not exists or not have access to itInvalidDirectoryPathException
: If the project folder is not a directoryOSNotSupportedException
: When run this processes with not supported operative systemGet branches from git project
import { GitManager } from '@aurahelper/git-manager';
const gitManager = new GitManager('path/to/project/root');
gitManager.getBranches().then((branches) => {
console.log(branches);
// [{ name: 'master', active: false }, { name: 'branch1', active: true }, {...}]
}).catch((error) => {
// handle error
});
Method to list all git tags. You can also sort by field
Returns a promise with a list of tags
Promise<GitTag[]>
This method can throw the next exceptions:
WrongDirectoryPathException
: If the project folder is not a String or can't convert to absolute pathDirectoryNotFoundException
: If the project folder not exists or not have access to itInvalidDirectoryPathException
: If the project folder is not a directoryOSNotSupportedException
: When run this processes with not supported operative systemGet tags from git project
import { GitManager } from '@aurahelper/git-manager';
const gitManager = new GitManager('path/to/project/root');
gitManager.getTags().then((tags) => {
console.log(tags);
// [{ name: 'v.1.0.0', description: 'tag description' }, { name: 'v.1.0.1', description: 'tag description' }, {...}]
}).catch((error) => {
// handle error
});
Method to get the commits data from the Salesforce git repository
Returns a promise with list of Commit objects
Promise<Commit[]>
This method can throw the next exceptions:
WrongDirectoryPathException
: If the project folder is not a String or can't convert to absolute pathDirectoryNotFoundException
: If the project folder not exists or not have access to itInvalidDirectoryPathException
: If the project folder is not a directoryOSNotSupportedException
: When run this processes with not supported operative systemGet commits data from git project
import { GitManager } from '@aurahelper/git-manager';
const gitManager = new GitManager('path/to/project/root');
gitManager.getCommits().then((commits) => {
for(const commit of commits){
console.log(commit.pointer);
console.log(commit.author);
console.log(commit.authorEmail);
console.log(commit.date.dayName);
console.log(commit.date.monthName);
console.log(commit.date.day);
console.log(commit.date.time);
console.log(commit.date.year);
console.log(commit.date.timeoffset);
console.log(commit.date.dateStr);
console.log(commit.title);
console.log(commit.message);
}
}).catch((error) => {
// handle error
});
Method to get a list of GitDiff object with the differences between two branches, commits, tags...
string
string
Returns a promise with GitDiffs objects list with the difference data
Promise<GitDiff[]>
This method can throw the next exceptions:
WrongDirectoryPathException
: If the project folder is not a String or can't convert to absolute pathDirectoryNotFoundException
: If the project folder not exists or not have access to itInvalidDirectoryPathException
: If the project folder is not a directoryOSNotSupportedException
: When run this processes with not supported operative systemDataRequiredException
: If source is not providedGet diffs from two branches
import { GitManager } from '@aurahelper/git-manager';
const gitManager = new GitManager('path/to/project/root');
gitManager.getDiffs('branch1', 'master').then((diffs) => {
for(const diff of diffs){
console.log(diff.path);
console.log(diff.mode);
console.log(diff.addChanges); // Array with every added line per file
console.log(diff.removeChanges); // Array with every removed line per file
}
}).catch((error) => {
// handle error
});
FAQs
Aura Helper Git Manager Module its a module to handle and manage all git operations and commands.
The npm package @aurahelper/git-manager receives a total of 27 weekly downloads. As such, @aurahelper/git-manager popularity was classified as not popular.
We found that @aurahelper/git-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.