git-coco 0.16.0 → 0.16.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +2 -1
- package/dist/index.esm.mjs +8 -6
- package/dist/index.js +11 -9
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -346,4 +346,5 @@ declare namespace types_d {
|
|
|
346
346
|
export type { types_d_BaseParserInput as BaseParserInput, types_d_BaseParserOptions as BaseParserOptions, types_d_CommandHandler as CommandHandler, types_d_CommitLogParserInput as CommitLogParserInput, types_d_ConfirmMessage as ConfirmMessage, types_d_ConfirmMessageCallback as ConfirmMessageCallback, types_d_DiffNode as DiffNode, types_d_DirectoryDiff as DirectoryDiff, types_d_FileChange as FileChange, types_d_FileChangeParserInput as FileChangeParserInput, types_d_FileChangeStatus as FileChangeStatus, types_d_FileDiff as FileDiff };
|
|
347
347
|
}
|
|
348
348
|
|
|
349
|
-
export {
|
|
349
|
+
export { _default$3 as changelog, _default$2 as commit, _default$1 as init, _default as recap, types_d as types };
|
|
350
|
+
export type { Config$1 as Config };
|
package/dist/index.esm.mjs
CHANGED
|
@@ -40,14 +40,13 @@ import { exec } from 'child_process';
|
|
|
40
40
|
import readline$1 from 'node:readline';
|
|
41
41
|
import require$$0 from 'stream';
|
|
42
42
|
import * as readline from 'readline';
|
|
43
|
-
import { lint, load } from '@commitlint/core';
|
|
44
43
|
|
|
45
44
|
// This file is auto-generated - DO NOT EDIT
|
|
46
45
|
/* eslint-disable */
|
|
47
46
|
/**
|
|
48
47
|
* Current build version from package.json
|
|
49
48
|
*/
|
|
50
|
-
const BUILD_VERSION = "0.16.
|
|
49
|
+
const BUILD_VERSION = "0.16.1";
|
|
51
50
|
|
|
52
51
|
const isInteractive = (config) => {
|
|
53
52
|
return config?.mode === 'interactive' || !!config?.interactive;
|
|
@@ -10941,7 +10940,6 @@ const handler$3 = async (argv, logger) => {
|
|
|
10941
10940
|
const schema = useConventional
|
|
10942
10941
|
? ConventionalCommitMessageResponseSchema
|
|
10943
10942
|
: CommitMessageResponseSchema;
|
|
10944
|
-
console.log('schema', schema);
|
|
10945
10943
|
const parser = new StructuredOutputParser(schema);
|
|
10946
10944
|
// Use conventional commit prompt if enabled
|
|
10947
10945
|
const promptTemplate = useConventional ? CONVENTIONAL_COMMIT_PROMPT : COMMIT_PROMPT;
|
|
@@ -10983,8 +10981,6 @@ const handler$3 = async (argv, logger) => {
|
|
|
10983
10981
|
commit_history: commit_history,
|
|
10984
10982
|
branch_name_context: branchNameContext,
|
|
10985
10983
|
};
|
|
10986
|
-
console.log('context', context);
|
|
10987
|
-
console.log('prompt', prompt);
|
|
10988
10984
|
const commitMsg = await executeChain({
|
|
10989
10985
|
llm,
|
|
10990
10986
|
prompt,
|
|
@@ -14155,12 +14151,15 @@ y.help().parse(process.argv.slice(2));
|
|
|
14155
14151
|
* Load commitlint configuration
|
|
14156
14152
|
*/
|
|
14157
14153
|
async function loadCommitlintConfig() {
|
|
14154
|
+
// Dynamically import commitlint core
|
|
14155
|
+
const commitlint = await import('@commitlint/core');
|
|
14156
|
+
const { load } = commitlint;
|
|
14158
14157
|
try {
|
|
14159
14158
|
// Try to load project config
|
|
14160
14159
|
const config = await load();
|
|
14161
14160
|
return config;
|
|
14162
14161
|
}
|
|
14163
|
-
catch
|
|
14162
|
+
catch {
|
|
14164
14163
|
// If no config found or error loading, use conventional config
|
|
14165
14164
|
return load({
|
|
14166
14165
|
extends: ['@commitlint/config-conventional'],
|
|
@@ -14173,6 +14172,9 @@ async function loadCommitlintConfig() {
|
|
|
14173
14172
|
async function validateCommitMessage(message, options = {}) {
|
|
14174
14173
|
try {
|
|
14175
14174
|
const config = await loadCommitlintConfig();
|
|
14175
|
+
// Dynamically import commitlint lint function
|
|
14176
|
+
const commitlint = await import('@commitlint/core');
|
|
14177
|
+
const { lint } = commitlint;
|
|
14176
14178
|
const result = await lint(message, config.rules, options);
|
|
14177
14179
|
return {
|
|
14178
14180
|
valid: result.valid,
|
package/dist/index.js
CHANGED
|
@@ -39,7 +39,6 @@ var child_process = require('child_process');
|
|
|
39
39
|
var readline = require('node:readline');
|
|
40
40
|
var require$$0 = require('stream');
|
|
41
41
|
var readline$1 = require('readline');
|
|
42
|
-
var core$1 = require('@commitlint/core');
|
|
43
42
|
|
|
44
43
|
function _interopNamespaceDefault(e) {
|
|
45
44
|
var n = Object.create(null);
|
|
@@ -69,7 +68,7 @@ var readline__namespace = /*#__PURE__*/_interopNamespaceDefault(readline$1);
|
|
|
69
68
|
/**
|
|
70
69
|
* Current build version from package.json
|
|
71
70
|
*/
|
|
72
|
-
const BUILD_VERSION = "0.16.
|
|
71
|
+
const BUILD_VERSION = "0.16.1";
|
|
73
72
|
|
|
74
73
|
const isInteractive = (config) => {
|
|
75
74
|
return config?.mode === 'interactive' || !!config?.interactive;
|
|
@@ -10963,7 +10962,6 @@ const handler$3 = async (argv, logger) => {
|
|
|
10963
10962
|
const schema = useConventional
|
|
10964
10963
|
? ConventionalCommitMessageResponseSchema
|
|
10965
10964
|
: CommitMessageResponseSchema;
|
|
10966
|
-
console.log('schema', schema);
|
|
10967
10965
|
const parser = new output_parsers.StructuredOutputParser(schema);
|
|
10968
10966
|
// Use conventional commit prompt if enabled
|
|
10969
10967
|
const promptTemplate = useConventional ? CONVENTIONAL_COMMIT_PROMPT : COMMIT_PROMPT;
|
|
@@ -11005,8 +11003,6 @@ const handler$3 = async (argv, logger) => {
|
|
|
11005
11003
|
commit_history: commit_history,
|
|
11006
11004
|
branch_name_context: branchNameContext,
|
|
11007
11005
|
};
|
|
11008
|
-
console.log('context', context);
|
|
11009
|
-
console.log('prompt', prompt);
|
|
11010
11006
|
const commitMsg = await executeChain({
|
|
11011
11007
|
llm,
|
|
11012
11008
|
prompt,
|
|
@@ -14177,14 +14173,17 @@ y.help().parse(process.argv.slice(2));
|
|
|
14177
14173
|
* Load commitlint configuration
|
|
14178
14174
|
*/
|
|
14179
14175
|
async function loadCommitlintConfig() {
|
|
14176
|
+
// Dynamically import commitlint core
|
|
14177
|
+
const commitlint = await import('@commitlint/core');
|
|
14178
|
+
const { load } = commitlint;
|
|
14180
14179
|
try {
|
|
14181
14180
|
// Try to load project config
|
|
14182
|
-
const config = await
|
|
14181
|
+
const config = await load();
|
|
14183
14182
|
return config;
|
|
14184
14183
|
}
|
|
14185
|
-
catch
|
|
14184
|
+
catch {
|
|
14186
14185
|
// If no config found or error loading, use conventional config
|
|
14187
|
-
return
|
|
14186
|
+
return load({
|
|
14188
14187
|
extends: ['@commitlint/config-conventional'],
|
|
14189
14188
|
});
|
|
14190
14189
|
}
|
|
@@ -14195,7 +14194,10 @@ async function loadCommitlintConfig() {
|
|
|
14195
14194
|
async function validateCommitMessage(message, options = {}) {
|
|
14196
14195
|
try {
|
|
14197
14196
|
const config = await loadCommitlintConfig();
|
|
14198
|
-
|
|
14197
|
+
// Dynamically import commitlint lint function
|
|
14198
|
+
const commitlint = await import('@commitlint/core');
|
|
14199
|
+
const { lint } = commitlint;
|
|
14200
|
+
const result = await lint(message, config.rules, options);
|
|
14199
14201
|
return {
|
|
14200
14202
|
valid: result.valid,
|
|
14201
14203
|
errors: result.errors.map((error) => error.message),
|