Skip to content

Commit

Permalink
chore: update header comment info of files
Browse files Browse the repository at this point in the history
  • Loading branch information
Zhengqbbb committed Dec 3, 2024
1 parent 8557221 commit 328fb2e
Show file tree
Hide file tree
Showing 14 changed files with 35 additions and 29 deletions.
2 changes: 1 addition & 1 deletion docs/.vitepress/theme/components/markdown/plugins/image.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import type MarkdownIt from 'markdown-it'
* `![Image Example](/img/a.png) <!-- -->` use lazy attrs
* `![Image Example](/img/a.png) <!-- size=200 -->` use lazy attrs. width 200. height 200.
* `![Image Example](/img/a.gif) <!-- size=900x220 -->` use lazy attrs. width 900. height 220.
* @author Zhengqbbb
* @author Zhengqbbb <zhengqbbb@gmail.com>
*/
export function ImagePlugin(md: MarkdownIt) {
const imageRender = md.renderer.rules.image!
Expand Down
2 changes: 1 addition & 1 deletion packages/@cz-git/plugin-inquirer/src/checkbox/index.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/**
* @description inquirer plugin - Search Checkbox
* @author @Zhengqbbb (zhengqbbb@gmail.com)
* @author Zhengqbbb <zhengqbbb@gmail.com>
* @license MIT
*/

Expand Down
4 changes: 2 additions & 2 deletions packages/@cz-git/plugin-inquirer/src/input/index.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/**
* @description inquirer plugin - Search Checkbox
* @author @Zhengqbbb (zhengqbbb@gmail.com)
* @description inquirer plugin - Support completion of input
* @author Zhengqbbb <zhengqbbb@gmail.com>
* @license MIT
*/

Expand Down
2 changes: 1 addition & 1 deletion packages/@cz-git/plugin-inquirer/src/list/index.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/**
* @description inquirer plugin - Search List
* @author @Zhengqbbb (zhengqbbb@gmail.com)
* @author Zhengqbbb <zhengqbbb@gmail.com>
* @license MIT
* Powered by `inquirer-autocomplete-prompt`
*/
Expand Down
10 changes: 6 additions & 4 deletions packages/@cz-git/plugin-inquirer/src/shared/utils/fuzzy.ts
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
/**
* @description provide list and checkBox fuzzy search
* @author @Zhengqbbb (zhengqbbb@gmail.com)
* @description Provide list and checkBox fuzzy search
* @author Zhengqbbb <zhengqbbb@gmail.com>
* @license MIT
*/

import type { FilterArrayItemType } from '../types'

/**
* @description inputString match targetString return match score
* input string match target string return match score
*
* @param {string} input input string
* @param {string} target target string
* @param {boolean} caseSensitive isCaseSensitive, default: false
Expand Down Expand Up @@ -50,7 +51,8 @@ export function fuzzyMatch(
}

/**
* @description Array fuzzy filter
* Array fuzzy filter
*
* @param {string} input input string
* @param {Array<FilterArrayItemType | unknown>} arr target Array
* @return {Array<FilterArrayItemType>} filtered array
Expand Down
4 changes: 2 additions & 2 deletions packages/@cz-git/plugin-inquirer/src/shared/utils/style.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/**
* Terminal style output colorizen
* Inspired by picocolors(https://www.npmjs.com/package/picocolors)
* @author: @Zhengqbbb (zhengqbbb@gmail.com)
* Inspired by `picocolors` (https://www.npmjs.com/package/picocolors)
* @author Zhengqbbb <zhengqbbb@gmail.com>
* @license MIT
*/

Expand Down
6 changes: 6 additions & 0 deletions packages/@cz-git/plugin-loader/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
/**
* @description Commitizen and Commitlint config loader (Main: `configLoader`)
* @author Zhengqbbb <zhengqbbb@gmail.com>
* @license MIT
*/

import '@commitlint/types'
import path from 'node:path'
import os from 'node:os'
Expand Down
4 changes: 2 additions & 2 deletions packages/cz-git/src/generator/message.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/**
* @description generate commit message `generateMessage`
* @author @Zhengqbbb (zhengqbbb@gmail.com)
* @description (Main: `generateMessage`) - Generate commit message
* @author Zhengqbbb <zhengqbbb@gmail.com>
* @license MIT
*/

Expand Down
4 changes: 2 additions & 2 deletions packages/cz-git/src/generator/option.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/**
* @description generate commitizen config option(generateOptions)
* @author @Zhengqbbb (zhengqbbb@gmail.com)
* @description (Main: `generateOptions`) - Generate commitizen config option
* @author Zhengqbbb <zhengqbbb@gmail.com>
* @license MIT
*/

Expand Down
11 changes: 5 additions & 6 deletions packages/cz-git/src/generator/question.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* @description generate commitizen questions(generateQuestions)
* @description (Main: `generateQuestions`) - Generate commitizen questions
* @author @Zhengqbbb (zhengqbbb@gmail.com)
* @license MIT
*/
Expand Down Expand Up @@ -227,14 +227,14 @@ export function generateQuestions(options: CommitizenGitOptions, cz: any) {
completeValue: options.defaultBody || undefined,
when: (answers: Answers) => {
const answerType = getAnswersType(options, answers)

if (
options.allowBreakingChanges
&& answerType
&& options.allowBreakingChanges.includes(answerType)
) {
return true
}

else {
return answers.markBreaking || Boolean(process.env.break === '1') || false
}
Expand Down Expand Up @@ -286,10 +286,9 @@ export function generateQuestions(options: CommitizenGitOptions, cz: any) {
transformer: (input: string) => useThemeCode(input, options.themeColorCode),
},
].filter(
i =>
!options.skipQuestions?.includes(
i.name as 'scope' | 'body' | 'breaking' | 'footer' | 'footerPrefix' | 'confirmCommit',
),
i => !options.skipQuestions?.includes(
i.name as 'scope' | 'body' | 'breaking' | 'footer' | 'footerPrefix' | 'confirmCommit',
),
)
}

Expand Down
4 changes: 2 additions & 2 deletions packages/cz-git/src/generator/questionAI.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/**
* @description generate commitizen questions(generateQuestions)
* @author @Zhengqbbb (zhengqbbb@gmail.com)
* @description (Main: `generateAIPrompt`) - Generate AI returns a single or multiple messages in the Terminal display
* @author Zhengqbbb <zhengqbbb@gmail.com>
* @license MIT
*/

Expand Down
3 changes: 1 addition & 2 deletions packages/cz-git/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
/**
* @description customizable and git support commitizen adapter
* @author @Zhengqbbb (zhengqbbb@gmail.com)
* @author Zhengqbbb <zhengqbbb@gmail.com>
* @license MIT
* @copyright Copyright (c) 2022-present Qiubin Zheng
*/

import process from 'node:process'
Expand Down
4 changes: 2 additions & 2 deletions packages/cz-git/src/shared/types/options.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
/**
* @description cz-git types
* @author @Zhengqbbb (zhengqbbb@gmail.com)
* @author Zhengqbbb <zhengqbbb@gmail.com>
* @license MIT
* @copyright Copyright (c) 2022-present Qiubin Zheng
*/

import type { QuestionsType } from '../../generator'
import type { CommitlintUserConfig } from './commitlint'

Expand Down
4 changes: 2 additions & 2 deletions packages/cz-git/src/shared/utils/util.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/**
* @description provide until function
* @author @Zhengqbbb (zhengqbbb@gmail.com)
* @description Provide until function
* @author Zhengqbbb <zhengqbbb@gmail.com>
* @license MIT
*/

Expand Down

0 comments on commit 328fb2e

Please sign in to comment.