0d1f72bdec
* chore(package.json): add "@bdsqqq/try" dependency * refactor(api.ts): remove unnecessary whitespace * refactor(cli.ts): remove unused imports and variables * refactor(commit.ts): rename getStagedGitDiff to getDif * refactor(commit.ts): add getStagedFiles and getChangedFiles functions * feat(commit.ts): add multiselect prompt to select files to stage * feat(commit.ts): add gitAdd function to stage selected files * feat(commit.ts): add trytm function to handle errors * feat(commit.ts): add exitProgram function to exit the program with an error message if an error occurs during execution * refactor(commit.ts): refactor commit function to handle unstaged files * feat(commit.ts): add multiselect prompt to select files to add to commit when there are unstaged files * feat(git.ts): add getStagedFiles function to get list of staged files * feat(git.ts): add getChangedFiles function to get list of changed files * feat(git.ts): add gitAdd function to add files to commit * feat(git.ts): add getDif function to get diff of staged files * refactor(commit.ts): replace exitProgram function with process.exit(1) to exit the program * refactor(commit.ts): change message prompt to English in multiselect function * chore(package.json): add prettier to format code * refactor(api.ts): remove unnecessary whitespace and comments * refactor(commit.ts): add missing semicolons and fix formatting * feat(commit.ts): add support for selecting files to add to the commit when there are changed files but no staged files * refactor(commit.ts): add isStageAllFlag parameter to commit function * refactor(commit.ts): add whitespace to getDif function call * refactor(commit.ts): add whitespace to generateCommitMessageFromGitDiff function call * refactor(git.ts): reformat code for better readability * chore(git.ts): add semicolons to the end of each statement * chore(package.json): remove "@bdsqqq/try" dependency * refactor(commit.ts): move trytm function to utils/trytm.ts * refactor(commit.ts): add isStageAllFlag parameter to gitAdd function call in commit function * refactor(commit.ts): remove getStagedGitDiff function call and use getStagedFiles function call instead * refactor(commit.ts): add error handling to generateCommitMessageFromGitDiff function call in commit function * refactor(prepare-commit-msg-hook.ts): rename getStagedGitDiff to getStagedFiles * feat(prepare-commit-msg-hook.ts): add gitAdd function to stage changes before generating commit message * refactor(prepare-commit-msg-hook.ts): use getDif function to get staged changes diff instead of staged.diff * refactor(prepare-commit-msg-hook.ts): remove unnecessary if statement and return statement * refactor(git.ts): remove StagedDiff interface and getStagedGitDiff function * feat(git.ts): add support for untracked files in getChangedFiles function * refactor(git.ts): rename stdout variable in getChangedFiles function * refactor(git.ts): add excludeBigFilesFromDiff to getDif function * feat(trytm.ts): add trytm utility function for handling promises with try-catch block * fix(commit.ts): add missing function call parentheses in return statement * refactor(commit.ts): remove unused variable generateCommitResponse * refactor(commit.ts): exit process with code 0 after successful commit * fix(commit.ts): add check for no changes detected before opening commit prompt * fix(commit.ts): fix typo in function name from getDif to getDiff * fix(prepare-commit-msg-hook.ts): fix typo in function name from getDif to getDiff * refactor(git.ts): rename getDif function to getDiff for consistency and clarity * chore(git.ts): add excludeBigFilesFromDiff option to getStagedFiles function * chore(git.ts): import text function from @clack/prompts package * refactor(git.ts): remove excludeBigFilesFromDiff constant and filter out .lock files from getStagedFiles and getChangedFiles functions * feat(git.ts): add error message when all staged files are .lock files * feat(git.ts): add error message when all changed files are .lock files * feat(git.ts): add warning message when some files are .lock files and excluded from git add and git diff * refactor(git.ts): add filter to remove empty strings from returned array in getStagedFiles and getChangedFiles functions * refactor(commit.ts): pass isStageAllFlag to getChangedFiles function * fix(commit.ts): handle errorStagedFiles and errorChangedFiles variables * fix(git.ts): filter out empty strings from excludedFiles array * feat(git.ts): add isStageAllFlag parameter to getChangedFiles function to handle git add --all command * refactor(git.ts): remove console.log statement from getChangedFiles function and refactor code to improve readability * refactor(commit.ts): remove unnecessary parameter from getChangedFiles function call * refactor(git.ts): remove isStageAllFlag parameter from getChangedFiles function and add check for .lock files in the returned files list * refactor(commit.ts): remove unnecessary line breaks and whitespace * refactor(commit.ts): remove unnecessary parentheses in function calls * feat(git.ts): add someFilesExcludedMessage function to display excluded files message * refactor(git.ts): use someFilesExcludedMessage function instead of text function in getChangedFiles, gitAdd, and getDiff functions * refactor(git.ts): extract someFilesExcludedMessage function to handle excluded files message * fix(git.ts): use someFilesExcludedMessage function instead of throwing an error when all staged files are excluded files * refactor(git.ts): pad excluded files list with 5 spaces * refactor(git.ts): remove unnecessary padStart method call in someFilesExcludedMessage function * chore(git.ts): update someFilesExcludedMessage function to improve readability --------- Co-authored-by: Sukharev <57486732+di-sukharev@users.noreply.github.com>
72 lines
1.7 KiB
JSON
72 lines
1.7 KiB
JSON
{
|
|
"name": "opencommit",
|
|
"version": "1.1.11",
|
|
"description": "GPT CLI to auto-generate impressive commits in 1 second. Killing lame commits with AI 🤯🔫",
|
|
"keywords": [
|
|
"git",
|
|
"chatgpt",
|
|
"gpt",
|
|
"ai",
|
|
"openai",
|
|
"opencommit",
|
|
"aicommit",
|
|
"aicommits",
|
|
"gptcommit",
|
|
"commit"
|
|
],
|
|
"main": "cli.js",
|
|
"bin": {
|
|
"opencommit": "./out/cli.cjs",
|
|
"oc": "./out/cli.cjs"
|
|
},
|
|
"repository": {
|
|
"url": "https://github.com/di-sukharev/opencommit"
|
|
},
|
|
"type": "module",
|
|
"author": "https://github.com/di-sukharev",
|
|
"license": "ISC",
|
|
"files": [
|
|
"out/**/*"
|
|
],
|
|
"release": {
|
|
"branches": [
|
|
"master"
|
|
]
|
|
},
|
|
"publishConfig": {
|
|
"access": "public"
|
|
},
|
|
"scripts": {
|
|
"watch": "npm run -S build -- --sourcemap --watch",
|
|
"start": "node ./out/cli.cjs",
|
|
"dev": "ts-node ./src/cli.ts",
|
|
"build": "rimraf out && esbuild ./src/cli.ts --bundle --outfile=out/cli.cjs --format=cjs --platform=node",
|
|
"deploy": "npm run build && npm version patch && npm publish --tag latest",
|
|
"lint": "eslint src --ext ts && tsc --noEmit",
|
|
"format": "prettier --write src"
|
|
},
|
|
"devDependencies": {
|
|
"@types/ini": "^1.3.31",
|
|
"@types/inquirer": "^9.0.3",
|
|
"@types/node": "^16.18.14",
|
|
"@typescript-eslint/eslint-plugin": "^5.45.0",
|
|
"@typescript-eslint/parser": "^5.45.0",
|
|
"dotenv": "^16.0.3",
|
|
"esbuild": "^0.15.18",
|
|
"eslint": "^8.28.0",
|
|
"prettier": "^2.8.4",
|
|
"ts-node": "^10.9.1",
|
|
"typescript": "^4.9.3"
|
|
},
|
|
"dependencies": {
|
|
"@clack/prompts": "^0.6.1",
|
|
"axios": "^1.3.4",
|
|
"chalk": "^5.2.0",
|
|
"cleye": "^1.3.2",
|
|
"execa": "^7.0.0",
|
|
"ini": "^3.0.1",
|
|
"inquirer": "^9.1.4",
|
|
"openai": "^3.2.1"
|
|
}
|
|
}
|