czg 1.6.2-beta.6 → 1.6.2-beta.8

Sign up to get free protection for your applications and to get access to all the features.
package/README.md CHANGED
@@ -23,7 +23,7 @@
23
23
  </p>
24
24
 
25
25
  <p align="center">
26
- <a href="https://github.com/Zhengqbbb/cz-git">Github</a>
26
+ <a href="https://github.com/Zhengqbbb/cz-git">GitHub</a>
27
27
  &nbsp; | &nbsp;
28
28
  <a href="https://cz-git.qbb.sh/cli/install.html">Installation</a>
29
29
  &nbsp; | &nbsp;
@@ -82,11 +82,19 @@ SUBCOMMAND:
82
82
  gpg Turn on use GPG sign commit message
83
83
 
84
84
  OPTIONS:
85
+ :, --alias= Directly submit the defined commit message
85
86
  --config= Specify the configuration file to use
86
- --openai-token= Setup OpenAI API secret key to local (.config/.czrc)
87
+
88
+ OpenAI:
87
89
  -N=,--ai-num= Setting AI return number subjects and Turn on choose mode
88
- :, --alias Directly submit the defined commit message
90
+ --api-key= Setup request OpenAI API secret key to local (.config/.czrc)
91
+ --api-proxy= Setup request OpenAI API proxy to local (.config/.czrc)
92
+ --api-endpoint= Setup request OpenAI API endpoint to local (.config/.czrc)
93
+
94
+ FLAG:
89
95
  -r, --retry Directly retry submit by the last message
96
+ --no-ai Turn off AI prompt mode in this session
97
+ --unset-proxy Unset request API proxy on local configure
90
98
  -h, --help Show help
91
99
  -v, --version Show version
92
100
 
@@ -95,7 +103,7 @@ EXAMPLES:
95
103
  czg emoji
96
104
  czg :fd
97
105
  czg --config="./config/cz.json"
98
- czg --openai-token="sk-XXXXX"
106
+ czg --api-key="sk-XXXXX"
99
107
  czg ai -N=3
100
108
 
101
109
  Extends 'git commit' options.
@@ -0,0 +1,604 @@
1
+ /**
2
+ * @description: fork by "@commitlint/types" v16.2.1
3
+ */
4
+ /** ========== rules ========== */
5
+ /**
6
+ * Rules match the input either as successful or failed.
7
+ * For example, when `header-full-stop` detects a full stop and is set as "always"; it's true.
8
+ * If the `header-full-stop` discovers a full stop but is set to "never"; it's false.
9
+ */
10
+ type RuleOutcome = Readonly<[boolean, string?]>;
11
+ /**
12
+ * Rules receive a parsed commit, condition, and possible additional settings through value.
13
+ * All rules should provide the most sensible rule condition and value.
14
+ */
15
+ type RuleType = 'async' | 'sync' | 'either';
16
+ type BaseRule<Value = never, Type extends RuleType = 'either'> = (parsed: Commit, when?: RuleConfigCondition, value?: Value) => Type extends 'either' ? RuleOutcome | Promise<RuleOutcome> : Type extends 'async' ? Promise<RuleOutcome> : Type extends 'sync' ? RuleOutcome : never;
17
+ type Rule<Value = never> = BaseRule<Value, 'either'>;
18
+ type AsyncRule<Value = never> = BaseRule<Value, 'async'>;
19
+ type SyncRule<Value = never> = BaseRule<Value, 'sync'>;
20
+ /**
21
+ * Rules always have a severity.
22
+ * Severity indicates what to do if the rule is found to be broken
23
+ * 0 - Disable this rule
24
+ * 1 - Warn for violations
25
+ * 2 - Error for violations
26
+ */
27
+ declare enum RuleConfigSeverity {
28
+ Disabled = 0,
29
+ Warning = 1,
30
+ Error = 2
31
+ }
32
+ /**
33
+ * Rules always have a condition.
34
+ * It can be either "always" (as tested), or "never" (as tested).
35
+ * For example, `header-full-stop` can be enforced as "always" or "never".
36
+ */
37
+ type RuleConfigCondition = 'always' | 'never';
38
+ type RuleConfigTuple<T> = T extends void ? Readonly<[RuleConfigSeverity.Disabled]> | Readonly<[RuleConfigSeverity, RuleConfigCondition]> : Readonly<[RuleConfigSeverity.Disabled]> | Readonly<[RuleConfigSeverity, RuleConfigCondition, T]>;
39
+ declare enum RuleConfigQuality {
40
+ User = 0,
41
+ Qualified = 1
42
+ }
43
+ type QualifiedRuleConfig<T> = (() => RuleConfigTuple<T>) | (() => Promise<RuleConfigTuple<T>>) | RuleConfigTuple<T>;
44
+ type RuleConfig<V = RuleConfigQuality.Qualified, T = void> = V extends RuleConfigQuality.Qualified ? RuleConfigTuple<T> : QualifiedRuleConfig<T>;
45
+ type CaseRuleConfig<V = RuleConfigQuality.User> = RuleConfig<V, TargetCaseType | TargetCaseType[]>;
46
+ type LengthRuleConfig<V = RuleConfigQuality.User> = RuleConfig<V, number>;
47
+ type EnumRuleConfig<V = RuleConfigQuality.User> = RuleConfig<V, string[]>;
48
+ interface RulesConfig<V = RuleConfigQuality.User> {
49
+ 'body-case': CaseRuleConfig<V>;
50
+ 'body-empty': RuleConfig<V>;
51
+ 'body-full-stop': RuleConfig<V, string>;
52
+ 'body-leading-blank': RuleConfig<V>;
53
+ 'body-max-length': LengthRuleConfig<V>;
54
+ 'body-max-line-length': LengthRuleConfig<V>;
55
+ 'body-min-length': LengthRuleConfig<V>;
56
+ 'footer-empty': RuleConfig<V>;
57
+ 'footer-leading-blank': RuleConfig<V>;
58
+ 'footer-max-length': LengthRuleConfig<V>;
59
+ 'footer-max-line-length': LengthRuleConfig<V>;
60
+ 'footer-min-length': LengthRuleConfig<V>;
61
+ 'header-case': CaseRuleConfig<V>;
62
+ 'header-full-stop': RuleConfig<V, string>;
63
+ 'header-max-length': LengthRuleConfig<V>;
64
+ 'header-min-length': LengthRuleConfig<V>;
65
+ 'references-empty': RuleConfig<V>;
66
+ 'scope-case': CaseRuleConfig<V>;
67
+ 'scope-empty': RuleConfig<V>;
68
+ 'scope-enum': EnumRuleConfig<V>;
69
+ 'scope-max-length': LengthRuleConfig<V>;
70
+ 'scope-min-length': LengthRuleConfig<V>;
71
+ 'signed-off-by': RuleConfig<V, string>;
72
+ 'subject-case': CaseRuleConfig<V>;
73
+ 'subject-empty': RuleConfig<V>;
74
+ 'subject-full-stop': RuleConfig<V, string>;
75
+ 'subject-max-length': LengthRuleConfig<V>;
76
+ 'subject-min-length': LengthRuleConfig<V>;
77
+ 'trailer-exists': RuleConfig<V, string>;
78
+ 'type-case': CaseRuleConfig<V>;
79
+ 'type-empty': RuleConfig<V>;
80
+ 'type-enum': EnumRuleConfig<V>;
81
+ 'type-max-length': LengthRuleConfig<V>;
82
+ 'type-min-length': LengthRuleConfig<V>;
83
+ [key: string]: AnyRuleConfig<V>;
84
+ }
85
+ type AnyRuleConfig<V> = RuleConfig<V, unknown> | RuleConfig<V, void>;
86
+ interface Plugin {
87
+ rules: {
88
+ [ruleName: string]: Rule | AsyncRule | SyncRule;
89
+ };
90
+ }
91
+ interface CommitlintUserConfig {
92
+ extends?: string | string[];
93
+ formatter?: string;
94
+ rules?: Partial<RulesConfig>;
95
+ parserPreset?: string | ParserPreset | Promise<ParserPreset>;
96
+ ignores?: ((commit: string) => boolean)[];
97
+ defaultIgnores?: boolean;
98
+ plugins?: (string | Plugin)[];
99
+ helpUrl?: string;
100
+ [key: string]: unknown;
101
+ }
102
+ interface ParserPreset {
103
+ name?: string;
104
+ path?: string;
105
+ parserOpts?: unknown;
106
+ }
107
+ /** ========== parse ========== */
108
+ interface Commit {
109
+ raw: string;
110
+ header: string;
111
+ type: string | null;
112
+ scope: string | null;
113
+ subject: string | null;
114
+ body: string | null;
115
+ footer: string | null;
116
+ mentions: string[];
117
+ notes: CommitNote[];
118
+ references: CommitReference[];
119
+ revert: any;
120
+ merge: any;
121
+ }
122
+ interface CommitNote {
123
+ title: string;
124
+ text: string;
125
+ }
126
+ interface CommitReference {
127
+ raw: string;
128
+ prefix: string;
129
+ action: string | null;
130
+ owner: string | null;
131
+ repository: string | null;
132
+ issue: string | null;
133
+ }
134
+ /** ========== ensure ========== */
135
+ type TargetCaseType = 'camel-case' | 'kebab-case' | 'snake-case' | 'pascal-case' | 'start-case' | 'upper-case' | 'uppercase' | 'sentence-case' | 'sentencecase' | 'lower-case' | 'lowercase' | 'lowerCase';
136
+
137
+ /**
138
+ * @description: cz-git types
139
+ * @author: @Zhengqbbb (zhengqbbb@gmail.com)
140
+ * @license: MIT
141
+ * @copyright: Copyright (c) 2022-present Qiubin Zheng
142
+ */
143
+
144
+ interface UserConfig extends CommitlintUserConfig {
145
+ prompt?: CommitizenGitOptions;
146
+ }
147
+ interface Answers {
148
+ /**
149
+ * @default "Select the type of change that you're committing:"
150
+ */
151
+ type?: string;
152
+ /**
153
+ * @default 'Denote the SCOPE of this change (optional):'
154
+ */
155
+ scope?: string | string[];
156
+ /**
157
+ * @default 'Denote the SCOPE of this change:'
158
+ */
159
+ customScope?: string;
160
+ /**
161
+ * @default 'Write a SHORT, IMPERATIVE tense description of the change:\n'
162
+ */
163
+ subject?: string;
164
+ /**
165
+ * @default 'a LONGER description of the change (optional). Use "|" to break new line:\n'
166
+ */
167
+ body?: string;
168
+ /**
169
+ * @default 'Is any BREAKING CHANGE (add "!" in header) (optional) ?'
170
+ * @use need turn on options "markBreakingChangeMode"
171
+ */
172
+ markBreaking?: string | boolean;
173
+ /**
174
+ * @default 'List any BREAKING CHANGES (optional). Use "|" to break new line:\n'
175
+ */
176
+ breaking?: string;
177
+ /** @deprecated Please use `footerPrefixesSelect` field instead. @note fix typo option field v1.4.0: Already processed for normal compatibility */
178
+ footerPrefixsSelect?: string;
179
+ /**
180
+ * @default 'Select the ISSUES type of change (optional):'
181
+ */
182
+ footerPrefixesSelect?: string;
183
+ /** @deprecated Please use `customFooterPrefix` field instead. @note fix typo option field v1.4.0: Already processed for normal compatibility */
184
+ customFooterPrefixs?: string;
185
+ /**
186
+ * @default 'Input ISSUES prefix:'
187
+ */
188
+ customFooterPrefix?: string;
189
+ /**
190
+ * @default 'List any ISSUES AFFECTED by this change. E.g.: #31, #34:'
191
+ */
192
+ footer?: string;
193
+ /**
194
+ * @default 'Are you sure you want to proceed with the commit above?'
195
+ */
196
+ confirmCommit?: string;
197
+ /**
198
+ * @default 'Generating your AI commit subject...'
199
+ */
200
+ generatingByAI: string;
201
+ /**
202
+ * @default 'Select suitable subject by AI generated:'
203
+ */
204
+ generatedSelectByAI: string;
205
+ footerPrefix?: string;
206
+ }
207
+ type ScopesType = string[] | Array<{
208
+ name: string;
209
+ value?: string;
210
+ }>;
211
+ interface Option {
212
+ /**
213
+ * @description: show prompt name
214
+ */
215
+ name: string;
216
+ /**
217
+ * @description: output real value
218
+ */
219
+ value: string;
220
+ }
221
+ interface TypesOption extends Option {
222
+ /**
223
+ * @description: Submit emoji commit string
224
+ * @see: https://gitmoji.dev/
225
+ * @example: ":bug:" => 🐛
226
+ */
227
+ emoji?: string;
228
+ }
229
+ /**
230
+ * provide subdivides each message part
231
+ */
232
+ interface CommitMessageOptions {
233
+ /**
234
+ * @description: choose type list value
235
+ * @example: 'feat'
236
+ */
237
+ type: string;
238
+ /**
239
+ * @description: choose or custom scope value
240
+ * @example: 'app'
241
+ */
242
+ scope: string;
243
+ /**
244
+ * @description: choose type list emoji code. need turn on `useEmoji` options
245
+ * @example: ':sparkles:'
246
+ */
247
+ emoji: string;
248
+ /**
249
+ * @description: express is a breaking change message
250
+ * @example `!`
251
+ */
252
+ markBreaking: string;
253
+ /**
254
+ * @description: input subject
255
+ */
256
+ subject: string;
257
+ /**
258
+ * @description: base Angular format default header
259
+ * @example `feat(app): add a feature`
260
+ */
261
+ defaultHeader: string;
262
+ body: string;
263
+ breaking: string;
264
+ footer: string;
265
+ /**
266
+ * @description: base Angular format default all message
267
+ */
268
+ defaultMessage: string;
269
+ }
270
+ interface GenerateAIPromptType {
271
+ type?: string;
272
+ defaultScope?: string;
273
+ maxSubjectLength?: number;
274
+ upperCaseSubject?: boolean;
275
+ diff?: string;
276
+ }
277
+ interface CommitizenGitOptions {
278
+ /**
279
+ * @description: define commonly used commit message alias
280
+ * @default { fd: "docs: fix typos" }
281
+ * @use commitizen CLI: "cz_alias=fd cz"
282
+ * @use czg CLI: "czg --alias=fd" | "czg :fd"
283
+ * @note use commitizen CLI will meet process not exit. cz-git can't resolve it.
284
+ */
285
+ alias?: Record<string, string>;
286
+ /**
287
+ * @description: Customize prompt questions
288
+ */
289
+ messages?: Answers;
290
+ /**
291
+ * @description: the prompt inquirer primary color
292
+ * @rule `38;5;${color_code}`
293
+ * @tip the color_code can get by https://github.com/sindresorhus/xterm-colors
294
+ * @example "38;5;043"
295
+ * @default '' //cyan color
296
+ */
297
+ themeColorCode?: string;
298
+ /**
299
+ * @description: Customize prompt type
300
+ */
301
+ types?: TypesOption[];
302
+ /**
303
+ * @description: Add extra types to default types
304
+ * @use Use when you don't want to add bloated defaults and don't want to adjust the default order in configuration
305
+ * @example `typesAppend: [ { value: "workflow", name: "workflow: Workflow changes"} ],`
306
+ * @default []
307
+ */
308
+ typesAppend?: TypesOption[];
309
+ /**
310
+ * @description: default types list fuzzy search types `value` key of list.
311
+ * if choose `false` will search `name` key of list
312
+ * @use Using emoji unicode as `value` and that can't be searched
313
+ * @default true
314
+ */
315
+ typesSearchValue?: boolean;
316
+ /** @deprecated Please use `typesSearchValue` field instead. */
317
+ typesSearchValueKey?: boolean;
318
+ /**
319
+ * @description: Use OpenAI to auto generate short description for commit message
320
+ * @default false
321
+ */
322
+ useAI?: boolean;
323
+ /**
324
+ * @description: If >1 will turn on select mode, select generate options like returned by OpenAI
325
+ * @default 1
326
+ */
327
+ aiNumber?: number;
328
+ /**
329
+ * @description: To ignore selection codes when sending AI API requests
330
+ * @default [ "package-lock.json", "yarn.lock", "pnpm-lock.yaml" ]
331
+ * @example: [ "pnpm-lock.yaml", "docs/public" ]
332
+ */
333
+ aiDiffIgnore?: string[];
334
+ /**
335
+ * Choose the AI model you want to use: gpt-3.5-turbo | text-davinci-003
336
+ * gpt-3.5-turbo: Lower price consumption (10x) and faster
337
+ * text-davinci-003: Get more reliable information
338
+ *
339
+ * @default openAI-Turbo
340
+ */
341
+ aiType?: 'openAI-Turbo' | 'openAI-Davinci';
342
+ /**
343
+ * @description: Alert!!! Save on "$HOME/.czrc" or "$HOME/.config/.czrc". Do not save on project
344
+ */
345
+ openAIToken?: string;
346
+ /**
347
+ * It is recommended to use the command to configure the local
348
+ * `npx czg --api-proxy=<http_proxy>`
349
+ * e.g: `npx czg --api-proxy="http://127.0.0.1:1080"` or `npx czg --api-proxy="socks5://127.0.0.1:1080"`
350
+ */
351
+ apiProxy?: string;
352
+ /**
353
+ * `npx czg --api-endpoint=<url>`
354
+ * @default "https://api.openai.com/v1"
355
+ */
356
+ apiEndpoint?: string;
357
+ /**
358
+ * @description: Use the callback fn can customize edit information AI question information
359
+ * @param GenerateAIPromptType: provide some known parameters
360
+ * @default generateSubjectDefaultPrompt
361
+ */
362
+ aiQuestionCB?: (aiParam: GenerateAIPromptType) => string;
363
+ /**
364
+ * @description: Use emoji ?| it will be use typesOption.emoji code
365
+ * @default false
366
+ */
367
+ useEmoji?: boolean;
368
+ /**
369
+ * @description: Set the location of emoji in header
370
+ * @default "center"
371
+ */
372
+ emojiAlign?: 'left' | 'center' | 'right';
373
+ /**
374
+ * @description: Provides a select of prompt to select module scopes
375
+ * @note it auto import value from rule "scope-enum" with `@commitlint`
376
+ * @use want to add scopes description or when you not use commitlint
377
+ */
378
+ scopes?: ScopesType;
379
+ /**
380
+ * @description: default scope list fuzzy search types `name` key of list.
381
+ * if choose `true` will search `value` key of list.
382
+ * @use If have long description of scope. can use it to enhanced search.
383
+ * @default false
384
+ */
385
+ scopesSearchValue?: boolean;
386
+ /**
387
+ * @description: Provides an overriding select of prompt to select module scopes under specific type
388
+ * @note use this option should set `scopes` option to realize distinguish
389
+ * @example: [test] => provide select e2eTest unitTest
390
+ */
391
+ scopeOverrides?: {
392
+ [type: string]: ScopesType;
393
+ };
394
+ /**
395
+ * @description: Filter select of prompt to select module scopes by the scope.value
396
+ * @default ['.DS_Store']
397
+ */
398
+ scopeFilters?: string[];
399
+ /**
400
+ * @description: Whether to enable scope multiple mode
401
+ * @default false
402
+ */
403
+ enableMultipleScopes?: boolean;
404
+ /**
405
+ * @description: Multiple choice scope separator
406
+ * @default ","
407
+ */
408
+ scopeEnumSeparator?: string;
409
+ /**
410
+ * @description: Whether to show "custom" when selecting scopes
411
+ * @note it auto check rule "scope-enum" set the option with `@commitlint`
412
+ * @use when you not use commitlint
413
+ * @default true
414
+ */
415
+ allowCustomScopes?: boolean;
416
+ /**
417
+ * @description: Whether to show "empty" when selecting scopes
418
+ * @default true
419
+ */
420
+ allowEmptyScopes?: boolean;
421
+ /**
422
+ * @description: Set the location of empty option (empty) and custom option (custom) in selection range
423
+ * @default "bottom"
424
+ */
425
+ customScopesAlign?: 'top' | 'bottom' | 'top-bottom' | 'bottom-top';
426
+ /**
427
+ * @default "custom"
428
+ */
429
+ customScopesAlias?: string;
430
+ /**
431
+ * @default "empty"
432
+ */
433
+ emptyScopesAlias?: string;
434
+ /**
435
+ * @description: Subject is need upper case first.
436
+ * @default false
437
+ */
438
+ upperCaseSubject?: boolean;
439
+ /**
440
+ * @description: Whether to add extra prompt BREAKCHANGE ask. to add an extra "!" to the header
441
+ * @see: https://cz-git.qbb.sh/recipes/breakingchange
442
+ * @default false
443
+ */
444
+ markBreakingChangeMode?: boolean;
445
+ /**
446
+ * @description: Allow breaking changes in the included types output box
447
+ * @default ['feat', 'fix']
448
+ */
449
+ allowBreakingChanges?: string[];
450
+ /**
451
+ * @description: set body and BREAKING CHANGE max length to break-line
452
+ * @default 100
453
+ * @note it auto check rule "body-max-line-length" set the option with `@commitlint`.
454
+ * @use when you not use commitlint
455
+ */
456
+ breaklineNumber?: number;
457
+ /**
458
+ * @description: body and BREAKINGCHANGES new line char
459
+ * @default "|"
460
+ */
461
+ breaklineChar?: string;
462
+ /**
463
+ * @deprecated Please use `issuePrefixes` field instead.
464
+ * @note fix typo option field v1.3.4: Already processed for normal compatibility
465
+ */
466
+ issuePrefixs?: Option[];
467
+ /**
468
+ * @description: Provides a select issue prefix box in footer
469
+ * @default issuePrefixes: [{ value: "closed", name: "ISSUES has been processed" }]
470
+ */
471
+ issuePrefixes?: Option[];
472
+ /**
473
+ * @deprecated Please use `customIssuePrefixAlign` field instead.
474
+ * @note fix typo option field v1.3.4: Already processed for normal compatibility
475
+ */
476
+ customIssuePrefixsAlign?: 'top' | 'bottom' | 'top-bottom' | 'bottom-top';
477
+ /**
478
+ * @default "top"
479
+ */
480
+ customIssuePrefixAlign?: 'top' | 'bottom' | 'top-bottom' | 'bottom-top';
481
+ /**
482
+ * @deprecated Please use `emptyIssuePrefixAlias` field instead.
483
+ * @note fix typo option field v1.3.4: Already processed for normal compatibility
484
+ */
485
+ emptyIssuePrefixsAlias?: string;
486
+ /**
487
+ * @default "skip"
488
+ */
489
+ emptyIssuePrefixAlias?: string;
490
+ /**
491
+ * @deprecated Please use `customIssuePrefixAlias` field instead.
492
+ * @note fix typo option field v1.3.4: Already processed for normal compatibility
493
+ */
494
+ customIssuePrefixsAlias?: string;
495
+ /**
496
+ * @default "custom"
497
+ */
498
+ customIssuePrefixAlias?: string;
499
+ /**
500
+ * @deprecated Please use `allowCustomIssuePrefix` field instead.
501
+ * @note fix typo option field v1.3.4: Already processed for normal compatibility
502
+ */
503
+ allowCustomIssuePrefixs?: boolean;
504
+ /**
505
+ * @description: Whether to show "custom" selecting issue prefixes
506
+ * @default true
507
+ */
508
+ allowCustomIssuePrefix?: boolean;
509
+ /**
510
+ * @deprecated Please use `allowEmptyIssuePrefix` field instead.
511
+ * @note fix typo option field v1.3.4: Already processed for normal compatibility
512
+ */
513
+ allowEmptyIssuePrefixs?: boolean;
514
+ /**
515
+ * @description: Whether to show "skip(empty)" when selecting issue prefixes
516
+ * @default true
517
+ */
518
+ allowEmptyIssuePrefix?: boolean;
519
+ /**
520
+ * @description: Prompt final determination whether to display the color
521
+ * @default true
522
+ */
523
+ confirmColorize?: boolean;
524
+ /**
525
+ * @description: List of questions you want to skip
526
+ * @default []
527
+ * @example: ['body']
528
+ */
529
+ skipQuestions?: Array<'scope' | 'body' | 'breaking' | 'footerPrefix' | 'footer' | 'confirmCommit'>;
530
+ /**
531
+ * @description: Force set max header length | Equivalent setting maxSubjectLength.
532
+ * @note it auto check rule "header-max-length" set the option with `@commitlint`.
533
+ * @use when you not use commitlint
534
+ */
535
+ maxHeaderLength?: number;
536
+ /**
537
+ * @description: Force set max subject length.
538
+ * @note it auto check rule "subject-max-length" set the option with `@commitlint`.
539
+ * @use when you not use commitlint
540
+ */
541
+ maxSubjectLength?: number;
542
+ /**
543
+ * @description: Is not strict subject rule. Just provide prompt word length warning.
544
+ * Effected maxHeader and maxSubject commitlint
545
+ * @example [1, 'always', 80] 1: mean warning. will be true
546
+ * @default false
547
+ */
548
+ isIgnoreCheckMaxSubjectLength?: boolean;
549
+ /**
550
+ * @description: Force set header width.
551
+ * @note it auto check rule "subject-min-length" set the option with `@commitlint`.
552
+ * @use when you not use commitlint
553
+ */
554
+ minSubjectLength?: number;
555
+ /**
556
+ * @description: pin type item the top of the types list (match item value)
557
+ */
558
+ defaultType?: string;
559
+ /**
560
+ * @description: Whether to use display default value in custom scope
561
+ * @tip pin scope item the top of the scope list (match item value)
562
+ * @example: When you want to use default, just keyboard <Enter> it
563
+ */
564
+ defaultScope?: string;
565
+ /**
566
+ * @description: default value show subject template prompt
567
+ * @example: If you want to use template complete. just keyboard <Tab> or <Right Arrow> it
568
+ * @example: If you want to use default, just keyboard <Enter> it
569
+ */
570
+ defaultSubject?: string;
571
+ /**
572
+ * @description: default value show body and BREAKINGCHANGES template prompt
573
+ * @example: If you want to use template complete. just keyboard <Tab> or <Right Arrow> it
574
+ * @example: When you want to use default, just keyboard <Enter> it
575
+ */
576
+ defaultBody?: string;
577
+ /**
578
+ * @description: default value show issuePrefixes custom template prompt
579
+ * @example: If you want to use template complete. just keyboard <Tab> or <Right Arrow> it
580
+ * @example: When you want to use default, just keyboard <Enter> it
581
+ */
582
+ defaultFooterPrefix?: string;
583
+ /**
584
+ * @description: default value show issue foot template prompt
585
+ * @example: If you want to use template complete. just keyboard <Tab> or <Right Arrow> it
586
+ * @example: When you want to use default, just keyboard <Enter> it
587
+ */
588
+ defaultIssues?: string;
589
+ /**
590
+ * @description: Whether to use GPG sign commit message (git commit -S -m)
591
+ * @note the options only support `czg` cz-git cli and no support git hooks mode
592
+ * @usage_see https://github.com/Zhengqbbb/cz-git/issues/58
593
+ * @default false
594
+ */
595
+ useCommitSignGPG?: boolean;
596
+ /**
597
+ * @description: provide user custom finally message, can use the callback to change format
598
+ * @param CommitMessageOptions: provide subdivides each message part
599
+ * @default ({ defaultMessage }) => defaultMessage
600
+ */
601
+ formatMessageCB?: (messageMod: CommitMessageOptions) => string;
602
+ }
603
+
604
+ export { CommitizenGitOptions, UserConfig };