git-coco 0.22.6 → 0.22.7
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 +1 -0
- package/dist/index.esm.mjs +8 -15
- package/dist/index.js +7 -14
- package/package.json +2 -2
package/dist/index.d.ts
CHANGED
package/dist/index.esm.mjs
CHANGED
|
@@ -5,7 +5,7 @@ import yargs from 'yargs';
|
|
|
5
5
|
import chalk from 'chalk';
|
|
6
6
|
import * as fs from 'fs';
|
|
7
7
|
import fs__default, { promises, existsSync, readFileSync } from 'fs';
|
|
8
|
-
import { confirm, editor, select,
|
|
8
|
+
import { confirm, editor, select, input, password } from '@inquirer/prompts';
|
|
9
9
|
import * as ini from 'ini';
|
|
10
10
|
import * as os from 'os';
|
|
11
11
|
import os__default from 'os';
|
|
@@ -47,7 +47,7 @@ import { pathToFileURL } from 'url';
|
|
|
47
47
|
/**
|
|
48
48
|
* Current build version from package.json
|
|
49
49
|
*/
|
|
50
|
-
const BUILD_VERSION = "0.22.
|
|
50
|
+
const BUILD_VERSION = "0.22.7";
|
|
51
51
|
|
|
52
52
|
const isInteractive = (config) => {
|
|
53
53
|
return config?.mode === 'interactive' || !!config?.interactive;
|
|
@@ -231,7 +231,7 @@ function validateRequired(value, paramName, functionName) {
|
|
|
231
231
|
function validateNonEmptyString(value, paramName, functionName) {
|
|
232
232
|
validateRequired(value, paramName, functionName);
|
|
233
233
|
if (typeof value !== 'string' || value.trim() === '') {
|
|
234
|
-
throw new LangChainValidationError(`${
|
|
234
|
+
throw new LangChainValidationError(`${`${functionName}: ` }Parameter '${paramName}' must be a non-empty string`, { paramName, functionName, value, type: typeof value });
|
|
235
235
|
}
|
|
236
236
|
}
|
|
237
237
|
/**
|
|
@@ -240,7 +240,7 @@ function validateNonEmptyString(value, paramName, functionName) {
|
|
|
240
240
|
function validateNonEmptyArray(value, paramName, functionName) {
|
|
241
241
|
validateRequired(value, paramName, functionName);
|
|
242
242
|
if (!Array.isArray(value) || value.length === 0) {
|
|
243
|
-
throw new LangChainValidationError(`${
|
|
243
|
+
throw new LangChainValidationError(`${`${functionName}: ` }Parameter '${paramName}' must be a non-empty array`, { paramName, functionName, value, isArray: Array.isArray(value), length: Array.isArray(value) ? value.length : undefined });
|
|
244
244
|
}
|
|
245
245
|
}
|
|
246
246
|
/**
|
|
@@ -2627,9 +2627,8 @@ const errorMap = (issue, _ctx) => {
|
|
|
2627
2627
|
}
|
|
2628
2628
|
return { message };
|
|
2629
2629
|
};
|
|
2630
|
-
var defaultErrorMap = errorMap;
|
|
2631
2630
|
|
|
2632
|
-
let overrideErrorMap =
|
|
2631
|
+
let overrideErrorMap = errorMap;
|
|
2633
2632
|
function getErrorMap() {
|
|
2634
2633
|
return overrideErrorMap;
|
|
2635
2634
|
}
|
|
@@ -2672,7 +2671,7 @@ function addIssueToContext(ctx, issueData) {
|
|
|
2672
2671
|
ctx.common.contextualErrorMap, // contextual error map is first priority
|
|
2673
2672
|
ctx.schemaErrorMap, // then schema-bound map if available
|
|
2674
2673
|
overrideMap, // then global override map
|
|
2675
|
-
overrideMap ===
|
|
2674
|
+
overrideMap === errorMap ? undefined : errorMap, // then global default map
|
|
2676
2675
|
].filter((x) => !!x),
|
|
2677
2676
|
});
|
|
2678
2677
|
ctx.common.issues.push(issue);
|
|
@@ -5988,9 +5987,6 @@ ZodReadonly.create = (type, params) => {
|
|
|
5988
5987
|
...processCreateParams(params),
|
|
5989
5988
|
});
|
|
5990
5989
|
};
|
|
5991
|
-
({
|
|
5992
|
-
object: ZodObject.lazycreate,
|
|
5993
|
-
});
|
|
5994
5990
|
var ZodFirstPartyTypeKind;
|
|
5995
5991
|
(function (ZodFirstPartyTypeKind) {
|
|
5996
5992
|
ZodFirstPartyTypeKind["ZodString"] = "ZodString";
|
|
@@ -6034,7 +6030,6 @@ const stringType = ZodString.create;
|
|
|
6034
6030
|
ZodNever.create;
|
|
6035
6031
|
const arrayType = ZodArray.create;
|
|
6036
6032
|
const objectType = ZodObject.create;
|
|
6037
|
-
ZodObject.strictCreate;
|
|
6038
6033
|
const unionType = ZodUnion.create;
|
|
6039
6034
|
ZodIntersection.create;
|
|
6040
6035
|
ZodTuple.create;
|
|
@@ -7721,7 +7716,7 @@ const handler$4 = async (argv, logger) => {
|
|
|
7721
7716
|
logger.verbose(`Generating commit log since the last tag`, { color: 'yellow' });
|
|
7722
7717
|
// This function returns string[], needs to be adapted or replaced
|
|
7723
7718
|
// For now, this path will have limited details.
|
|
7724
|
-
const commitMessages = await getChangesSinceLastTag({ git
|
|
7719
|
+
const commitMessages = await getChangesSinceLastTag({ git});
|
|
7725
7720
|
commits = commitMessages.map(msg => ({ message: msg }));
|
|
7726
7721
|
}
|
|
7727
7722
|
else if (config.range && config.range.includes(':')) {
|
|
@@ -12885,9 +12880,7 @@ var review = {
|
|
|
12885
12880
|
command,
|
|
12886
12881
|
desc: 'Perform a code review on your changes',
|
|
12887
12882
|
builder,
|
|
12888
|
-
handler: commandExecutor(handler)
|
|
12889
|
-
options,
|
|
12890
|
-
};
|
|
12883
|
+
handler: commandExecutor(handler)};
|
|
12891
12884
|
|
|
12892
12885
|
var types = /*#__PURE__*/Object.freeze({
|
|
12893
12886
|
__proto__: null
|
package/dist/index.js
CHANGED
|
@@ -69,7 +69,7 @@ var readline__namespace = /*#__PURE__*/_interopNamespaceDefault(readline);
|
|
|
69
69
|
/**
|
|
70
70
|
* Current build version from package.json
|
|
71
71
|
*/
|
|
72
|
-
const BUILD_VERSION = "0.22.
|
|
72
|
+
const BUILD_VERSION = "0.22.7";
|
|
73
73
|
|
|
74
74
|
const isInteractive = (config) => {
|
|
75
75
|
return config?.mode === 'interactive' || !!config?.interactive;
|
|
@@ -253,7 +253,7 @@ function validateRequired(value, paramName, functionName) {
|
|
|
253
253
|
function validateNonEmptyString(value, paramName, functionName) {
|
|
254
254
|
validateRequired(value, paramName, functionName);
|
|
255
255
|
if (typeof value !== 'string' || value.trim() === '') {
|
|
256
|
-
throw new LangChainValidationError(`${
|
|
256
|
+
throw new LangChainValidationError(`${`${functionName}: ` }Parameter '${paramName}' must be a non-empty string`, { paramName, functionName, value, type: typeof value });
|
|
257
257
|
}
|
|
258
258
|
}
|
|
259
259
|
/**
|
|
@@ -262,7 +262,7 @@ function validateNonEmptyString(value, paramName, functionName) {
|
|
|
262
262
|
function validateNonEmptyArray(value, paramName, functionName) {
|
|
263
263
|
validateRequired(value, paramName, functionName);
|
|
264
264
|
if (!Array.isArray(value) || value.length === 0) {
|
|
265
|
-
throw new LangChainValidationError(`${
|
|
265
|
+
throw new LangChainValidationError(`${`${functionName}: ` }Parameter '${paramName}' must be a non-empty array`, { paramName, functionName, value, isArray: Array.isArray(value), length: Array.isArray(value) ? value.length : undefined });
|
|
266
266
|
}
|
|
267
267
|
}
|
|
268
268
|
/**
|
|
@@ -2649,9 +2649,8 @@ const errorMap = (issue, _ctx) => {
|
|
|
2649
2649
|
}
|
|
2650
2650
|
return { message };
|
|
2651
2651
|
};
|
|
2652
|
-
var defaultErrorMap = errorMap;
|
|
2653
2652
|
|
|
2654
|
-
let overrideErrorMap =
|
|
2653
|
+
let overrideErrorMap = errorMap;
|
|
2655
2654
|
function getErrorMap() {
|
|
2656
2655
|
return overrideErrorMap;
|
|
2657
2656
|
}
|
|
@@ -2694,7 +2693,7 @@ function addIssueToContext(ctx, issueData) {
|
|
|
2694
2693
|
ctx.common.contextualErrorMap, // contextual error map is first priority
|
|
2695
2694
|
ctx.schemaErrorMap, // then schema-bound map if available
|
|
2696
2695
|
overrideMap, // then global override map
|
|
2697
|
-
overrideMap ===
|
|
2696
|
+
overrideMap === errorMap ? undefined : errorMap, // then global default map
|
|
2698
2697
|
].filter((x) => !!x),
|
|
2699
2698
|
});
|
|
2700
2699
|
ctx.common.issues.push(issue);
|
|
@@ -6010,9 +6009,6 @@ ZodReadonly.create = (type, params) => {
|
|
|
6010
6009
|
...processCreateParams(params),
|
|
6011
6010
|
});
|
|
6012
6011
|
};
|
|
6013
|
-
({
|
|
6014
|
-
object: ZodObject.lazycreate,
|
|
6015
|
-
});
|
|
6016
6012
|
var ZodFirstPartyTypeKind;
|
|
6017
6013
|
(function (ZodFirstPartyTypeKind) {
|
|
6018
6014
|
ZodFirstPartyTypeKind["ZodString"] = "ZodString";
|
|
@@ -6056,7 +6052,6 @@ const stringType = ZodString.create;
|
|
|
6056
6052
|
ZodNever.create;
|
|
6057
6053
|
const arrayType = ZodArray.create;
|
|
6058
6054
|
const objectType = ZodObject.create;
|
|
6059
|
-
ZodObject.strictCreate;
|
|
6060
6055
|
const unionType = ZodUnion.create;
|
|
6061
6056
|
ZodIntersection.create;
|
|
6062
6057
|
ZodTuple.create;
|
|
@@ -7743,7 +7738,7 @@ const handler$4 = async (argv, logger) => {
|
|
|
7743
7738
|
logger.verbose(`Generating commit log since the last tag`, { color: 'yellow' });
|
|
7744
7739
|
// This function returns string[], needs to be adapted or replaced
|
|
7745
7740
|
// For now, this path will have limited details.
|
|
7746
|
-
const commitMessages = await getChangesSinceLastTag({ git
|
|
7741
|
+
const commitMessages = await getChangesSinceLastTag({ git});
|
|
7747
7742
|
commits = commitMessages.map(msg => ({ message: msg }));
|
|
7748
7743
|
}
|
|
7749
7744
|
else if (config.range && config.range.includes(':')) {
|
|
@@ -12907,9 +12902,7 @@ var review = {
|
|
|
12907
12902
|
command,
|
|
12908
12903
|
desc: 'Perform a code review on your changes',
|
|
12909
12904
|
builder,
|
|
12910
|
-
handler: commandExecutor(handler)
|
|
12911
|
-
options,
|
|
12912
|
-
};
|
|
12905
|
+
handler: commandExecutor(handler)};
|
|
12913
12906
|
|
|
12914
12907
|
var types = /*#__PURE__*/Object.freeze({
|
|
12915
12908
|
__proto__: null
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "git-coco",
|
|
3
|
-
"version": "0.22.
|
|
3
|
+
"version": "0.22.7",
|
|
4
4
|
"description": "zero-effort git commits with coco.",
|
|
5
5
|
"author": "gfargo <ghfargo@gmail.com>",
|
|
6
6
|
"license": "MIT",
|
|
@@ -60,7 +60,7 @@
|
|
|
60
60
|
"eslint": "^8.54.0",
|
|
61
61
|
"jest": "^30.0.5",
|
|
62
62
|
"release-it": "^19.0.4",
|
|
63
|
-
"rollup": "^
|
|
63
|
+
"rollup": "^4.50.0",
|
|
64
64
|
"rollup-plugin-dts": "^6.1.0",
|
|
65
65
|
"rollup-plugin-executable": "^1.6.3",
|
|
66
66
|
"rollup-plugin-peer-deps-external": "^2.2.4",
|