mirror of
https://github.com/di-sukharev/opencommit.git
synced 2026-01-13 07:38:01 -05:00
Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
50b44ec6b1 | ||
|
|
5762c35a7f |
@@ -83,7 +83,7 @@ To remove description:
|
||||
opencommit config set description=false
|
||||
```
|
||||
|
||||
<!-- ## Git hook
|
||||
## Git hook
|
||||
|
||||
You can set opencommit as Git [`prepare-commit-msg`](https://git-scm.com/docs/githooks#_prepare_commit_msg) hook. Hook integrates with you IDE Source Control and allows you edit the message before commit.
|
||||
|
||||
@@ -106,7 +106,7 @@ To use the hook:
|
||||
git commit
|
||||
```
|
||||
|
||||
Or follow the process of your IDE Source Control feature, when it calls `git commit` command — OpenCommit will integrate into the flow. -->
|
||||
Or follow the process of your IDE Source Control feature, when it calls `git commit` command — OpenCommit will integrate into the flow.
|
||||
|
||||
## Payments
|
||||
|
||||
|
||||
4
package-lock.json
generated
4
package-lock.json
generated
@@ -1,12 +1,12 @@
|
||||
{
|
||||
"name": "open-commit",
|
||||
"version": "0.0.17",
|
||||
"version": "0.0.21",
|
||||
"lockfileVersion": 3,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "open-commit",
|
||||
"version": "0.0.17",
|
||||
"version": "0.0.21",
|
||||
"license": "ISC",
|
||||
"dependencies": {
|
||||
"@clack/prompts": "^0.6.1",
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "opencommit",
|
||||
"version": "0.0.17",
|
||||
"version": "0.0.21",
|
||||
"description": "AI generates conventional commits with mind-blowing accuracy.",
|
||||
"keywords": [
|
||||
"git",
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#!/usr/bin/env node
|
||||
|
||||
import { cli } from 'cleye';
|
||||
import packageJSON from '../package.json' assert { type: 'json' };
|
||||
import packageJSON from '../package.json';
|
||||
|
||||
import { configCommand } from './commands/config';
|
||||
import { hookCommand, isHookCalled } from './commands/githook.js';
|
||||
|
||||
@@ -20,7 +20,7 @@ export const hookCommand = command(
|
||||
parameters: ['<set/unset>']
|
||||
},
|
||||
async (argv) => {
|
||||
const HOOK_PATH = fileURLToPath(new URL('cli.cjs', import.meta.url));
|
||||
const HOOK_URL = __filename;
|
||||
|
||||
try {
|
||||
await assertGitRepo();
|
||||
@@ -39,7 +39,7 @@ export const hookCommand = command(
|
||||
realPath = null;
|
||||
}
|
||||
|
||||
if (realPath === HOOK_PATH)
|
||||
if (realPath === HOOK_URL)
|
||||
return outro(`opencommit is already set as '${HOOK_NAME}'`);
|
||||
|
||||
throw new Error(
|
||||
@@ -48,7 +48,7 @@ export const hookCommand = command(
|
||||
}
|
||||
|
||||
await fs.mkdir(path.dirname(SYMLINK_URL), { recursive: true });
|
||||
await fs.symlink(HOOK_PATH, SYMLINK_URL, 'file');
|
||||
await fs.symlink(HOOK_URL, SYMLINK_URL, 'file');
|
||||
await fs.chmod(SYMLINK_URL, 0o755);
|
||||
|
||||
return outro(`${chalk.green('✔')} Hook set`);
|
||||
@@ -64,7 +64,7 @@ export const hookCommand = command(
|
||||
}
|
||||
|
||||
const realpath = await fs.realpath(SYMLINK_URL);
|
||||
if (realpath !== HOOK_PATH) {
|
||||
if (realpath !== HOOK_URL) {
|
||||
return outro(
|
||||
`opencommit wasn't previously set as '${HOOK_NAME}' hook, but different hook was, if you want to remove it — do it manually`
|
||||
);
|
||||
|
||||
@@ -1,36 +1,25 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
/* Projects */
|
||||
"target": "ES2020",
|
||||
"lib": ["ES5"],
|
||||
|
||||
/* Language and Environment */
|
||||
"target": "ESNext" /* Set the JavaScript language version for emitted JavaScript and include compatible library declarations. */,
|
||||
"lib": [
|
||||
"ES6"
|
||||
] /* Specify a set of bundled library declaration files that describe the target runtime environment. */,
|
||||
"module": "CommonJS",
|
||||
// "rootDir": "./src",
|
||||
"moduleResolution": "node",
|
||||
"resolveJsonModule": true,
|
||||
|
||||
/* Modules */
|
||||
"module": "ESNext" /* Specify what module code is generated. */,
|
||||
// "rootDir": "./src" /* Specify the root folder within your source files. */,
|
||||
"moduleResolution": "node" /* Specify how TypeScript looks up a file from a given module specifier. */,
|
||||
"resolveJsonModule": true /* Enable importing .json files. */,
|
||||
"allowJs": true,
|
||||
|
||||
/* JavaScript Support */
|
||||
"allowJs": true /* Allow JavaScript files to be a part of your program. Use the 'checkJS' option to get errors from these files. */,
|
||||
"outDir": "./out",
|
||||
|
||||
/* Emit */
|
||||
"outDir": "./out" /* Specify an output folder for all emitted files. */,
|
||||
"esModuleInterop": true,
|
||||
"forceConsistentCasingInFileNames": true,
|
||||
|
||||
/* Interop Constraints */
|
||||
"esModuleInterop": true /* Emit additional JavaScript to ease support for importing CommonJS modules. This enables 'allowSyntheticDefaultImports' for type compatibility. */,
|
||||
"forceConsistentCasingInFileNames": true /* Ensure that casing is correct in imports. */,
|
||||
"strict": true,
|
||||
"noUnusedLocals": true,
|
||||
"noUnusedParameters": true,
|
||||
|
||||
/* Type Checking */
|
||||
"strict": true /* Enable all strict type-checking options. */,
|
||||
"noUnusedLocals": true /* Enable error reporting when local variables aren't read. */,
|
||||
"noUnusedParameters": true /* Raise an error when a function parameter isn't read. */,
|
||||
|
||||
/* Completeness */
|
||||
"skipLibCheck": true /* Skip type checking all .d.ts files. */
|
||||
"skipLibCheck": true
|
||||
},
|
||||
"exclude": ["node_modules"],
|
||||
"ts-node": {
|
||||
|
||||
Reference in New Issue
Block a user