@releasekit/release 0.7.44 → 0.7.45
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/cli.js +2374 -1949
- package/dist/dispatcher.js +1547 -1122
- package/package.json +6 -6
package/dist/dispatcher.js
CHANGED
|
@@ -1785,12 +1785,12 @@ var init_path = __esm({
|
|
|
1785
1785
|
"use strict";
|
|
1786
1786
|
init_error();
|
|
1787
1787
|
EMPTY = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.create(null));
|
|
1788
|
-
createPathTagFunction = (pathEncoder = encodeURIPath) => function
|
|
1788
|
+
createPathTagFunction = (pathEncoder = encodeURIPath) => function path18(statics, ...params) {
|
|
1789
1789
|
if (statics.length === 1)
|
|
1790
1790
|
return statics[0];
|
|
1791
1791
|
let postPath = false;
|
|
1792
1792
|
const invalidSegments = [];
|
|
1793
|
-
const
|
|
1793
|
+
const path19 = statics.reduce((previousValue, currentValue, index) => {
|
|
1794
1794
|
if (/[?#]/.test(currentValue)) {
|
|
1795
1795
|
postPath = true;
|
|
1796
1796
|
}
|
|
@@ -1807,7 +1807,7 @@ var init_path = __esm({
|
|
|
1807
1807
|
}
|
|
1808
1808
|
return previousValue + currentValue + (index === params.length ? "" : encoded);
|
|
1809
1809
|
}, "");
|
|
1810
|
-
const pathOnly =
|
|
1810
|
+
const pathOnly = path19.split(/[?#]/, 1)[0];
|
|
1811
1811
|
const invalidSegmentPattern = /(?<=^|\/)(?:\.|%2e){1,2}(?=\/|$)/gi;
|
|
1812
1812
|
let match2;
|
|
1813
1813
|
while ((match2 = invalidSegmentPattern.exec(pathOnly)) !== null) {
|
|
@@ -1828,10 +1828,10 @@ var init_path = __esm({
|
|
|
1828
1828
|
}, "");
|
|
1829
1829
|
throw new AnthropicError(`Path parameters result in path with invalid segments:
|
|
1830
1830
|
${invalidSegments.map((e) => e.error).join("\n")}
|
|
1831
|
-
${
|
|
1831
|
+
${path19}
|
|
1832
1832
|
${underline}`);
|
|
1833
1833
|
}
|
|
1834
|
-
return
|
|
1834
|
+
return path19;
|
|
1835
1835
|
};
|
|
1836
1836
|
path3 = /* @__PURE__ */ createPathTagFunction(encodeURIPath);
|
|
1837
1837
|
}
|
|
@@ -5152,9 +5152,9 @@ var init_client = __esm({
|
|
|
5152
5152
|
makeStatusError(status, error3, message, headers) {
|
|
5153
5153
|
return APIError.generate(status, error3, message, headers);
|
|
5154
5154
|
}
|
|
5155
|
-
buildURL(
|
|
5155
|
+
buildURL(path18, query, defaultBaseURL) {
|
|
5156
5156
|
const baseURL = !__classPrivateFieldGet(this, _BaseAnthropic_instances, "m", _BaseAnthropic_baseURLOverridden).call(this) && defaultBaseURL || this.baseURL;
|
|
5157
|
-
const url = isAbsoluteURL(
|
|
5157
|
+
const url = isAbsoluteURL(path18) ? new URL(path18) : new URL(baseURL + (baseURL.endsWith("/") && path18.startsWith("/") ? path18.slice(1) : path18));
|
|
5158
5158
|
const defaultQuery = this.defaultQuery();
|
|
5159
5159
|
const pathQuery = Object.fromEntries(url.searchParams);
|
|
5160
5160
|
if (!isEmptyObj(defaultQuery) || !isEmptyObj(pathQuery)) {
|
|
@@ -5186,24 +5186,24 @@ var init_client = __esm({
|
|
|
5186
5186
|
*/
|
|
5187
5187
|
async prepareRequest(request, { url, options }) {
|
|
5188
5188
|
}
|
|
5189
|
-
get(
|
|
5190
|
-
return this.methodRequest("get",
|
|
5189
|
+
get(path18, opts) {
|
|
5190
|
+
return this.methodRequest("get", path18, opts);
|
|
5191
5191
|
}
|
|
5192
|
-
post(
|
|
5193
|
-
return this.methodRequest("post",
|
|
5192
|
+
post(path18, opts) {
|
|
5193
|
+
return this.methodRequest("post", path18, opts);
|
|
5194
5194
|
}
|
|
5195
|
-
patch(
|
|
5196
|
-
return this.methodRequest("patch",
|
|
5195
|
+
patch(path18, opts) {
|
|
5196
|
+
return this.methodRequest("patch", path18, opts);
|
|
5197
5197
|
}
|
|
5198
|
-
put(
|
|
5199
|
-
return this.methodRequest("put",
|
|
5198
|
+
put(path18, opts) {
|
|
5199
|
+
return this.methodRequest("put", path18, opts);
|
|
5200
5200
|
}
|
|
5201
|
-
delete(
|
|
5202
|
-
return this.methodRequest("delete",
|
|
5201
|
+
delete(path18, opts) {
|
|
5202
|
+
return this.methodRequest("delete", path18, opts);
|
|
5203
5203
|
}
|
|
5204
|
-
methodRequest(method,
|
|
5204
|
+
methodRequest(method, path18, opts) {
|
|
5205
5205
|
return this.request(Promise.resolve(opts).then((opts2) => {
|
|
5206
|
-
return { method, path:
|
|
5206
|
+
return { method, path: path18, ...opts2 };
|
|
5207
5207
|
}));
|
|
5208
5208
|
}
|
|
5209
5209
|
request(options, remainingRetries = null) {
|
|
@@ -5307,8 +5307,8 @@ var init_client = __esm({
|
|
|
5307
5307
|
}));
|
|
5308
5308
|
return { response, options, controller, requestLogID, retryOfRequestLogID, startTime };
|
|
5309
5309
|
}
|
|
5310
|
-
getAPIList(
|
|
5311
|
-
return this.requestAPIList(Page3, opts && "then" in opts ? opts.then((opts2) => ({ method: "get", path:
|
|
5310
|
+
getAPIList(path18, Page3, opts) {
|
|
5311
|
+
return this.requestAPIList(Page3, opts && "then" in opts ? opts.then((opts2) => ({ method: "get", path: path18, ...opts2 })) : { method: "get", path: path18, ...opts });
|
|
5312
5312
|
}
|
|
5313
5313
|
requestAPIList(Page3, options) {
|
|
5314
5314
|
const request = this.makeRequest(options, null, void 0);
|
|
@@ -5396,8 +5396,8 @@ var init_client = __esm({
|
|
|
5396
5396
|
}
|
|
5397
5397
|
async buildRequest(inputOptions, { retryCount = 0 } = {}) {
|
|
5398
5398
|
const options = { ...inputOptions };
|
|
5399
|
-
const { method, path:
|
|
5400
|
-
const url = this.buildURL(
|
|
5399
|
+
const { method, path: path18, query, defaultBaseURL } = options;
|
|
5400
|
+
const url = this.buildURL(path18, query, defaultBaseURL);
|
|
5401
5401
|
if ("timeout" in options)
|
|
5402
5402
|
validatePositiveInteger("timeout", options.timeout);
|
|
5403
5403
|
options.timeout = options.timeout ?? this.timeout;
|
|
@@ -7335,12 +7335,12 @@ var init_path2 = __esm({
|
|
|
7335
7335
|
"use strict";
|
|
7336
7336
|
init_error3();
|
|
7337
7337
|
EMPTY2 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.create(null));
|
|
7338
|
-
createPathTagFunction2 = (pathEncoder = encodeURIPath2) => function
|
|
7338
|
+
createPathTagFunction2 = (pathEncoder = encodeURIPath2) => function path18(statics, ...params) {
|
|
7339
7339
|
if (statics.length === 1)
|
|
7340
7340
|
return statics[0];
|
|
7341
7341
|
let postPath = false;
|
|
7342
7342
|
const invalidSegments = [];
|
|
7343
|
-
const
|
|
7343
|
+
const path19 = statics.reduce((previousValue, currentValue, index) => {
|
|
7344
7344
|
if (/[?#]/.test(currentValue)) {
|
|
7345
7345
|
postPath = true;
|
|
7346
7346
|
}
|
|
@@ -7357,7 +7357,7 @@ var init_path2 = __esm({
|
|
|
7357
7357
|
}
|
|
7358
7358
|
return previousValue + currentValue + (index === params.length ? "" : encoded);
|
|
7359
7359
|
}, "");
|
|
7360
|
-
const pathOnly =
|
|
7360
|
+
const pathOnly = path19.split(/[?#]/, 1)[0];
|
|
7361
7361
|
const invalidSegmentPattern = /(?<=^|\/)(?:\.|%2e){1,2}(?=\/|$)/gi;
|
|
7362
7362
|
let match2;
|
|
7363
7363
|
while ((match2 = invalidSegmentPattern.exec(pathOnly)) !== null) {
|
|
@@ -7378,10 +7378,10 @@ var init_path2 = __esm({
|
|
|
7378
7378
|
}, "");
|
|
7379
7379
|
throw new OpenAIError(`Path parameters result in path with invalid segments:
|
|
7380
7380
|
${invalidSegments.map((e) => e.error).join("\n")}
|
|
7381
|
-
${
|
|
7381
|
+
${path19}
|
|
7382
7382
|
${underline}`);
|
|
7383
7383
|
}
|
|
7384
|
-
return
|
|
7384
|
+
return path19;
|
|
7385
7385
|
};
|
|
7386
7386
|
path4 = /* @__PURE__ */ createPathTagFunction2(encodeURIPath2);
|
|
7387
7387
|
}
|
|
@@ -13167,9 +13167,9 @@ var init_client2 = __esm({
|
|
|
13167
13167
|
this.apiKey = token;
|
|
13168
13168
|
return true;
|
|
13169
13169
|
}
|
|
13170
|
-
buildURL(
|
|
13170
|
+
buildURL(path18, query, defaultBaseURL) {
|
|
13171
13171
|
const baseURL = !__classPrivateFieldGet2(this, _OpenAI_instances, "m", _OpenAI_baseURLOverridden).call(this) && defaultBaseURL || this.baseURL;
|
|
13172
|
-
const url = isAbsoluteURL2(
|
|
13172
|
+
const url = isAbsoluteURL2(path18) ? new URL(path18) : new URL(baseURL + (baseURL.endsWith("/") && path18.startsWith("/") ? path18.slice(1) : path18));
|
|
13173
13173
|
const defaultQuery = this.defaultQuery();
|
|
13174
13174
|
const pathQuery = Object.fromEntries(url.searchParams);
|
|
13175
13175
|
if (!isEmptyObj2(defaultQuery) || !isEmptyObj2(pathQuery)) {
|
|
@@ -13194,24 +13194,24 @@ var init_client2 = __esm({
|
|
|
13194
13194
|
*/
|
|
13195
13195
|
async prepareRequest(request, { url, options }) {
|
|
13196
13196
|
}
|
|
13197
|
-
get(
|
|
13198
|
-
return this.methodRequest("get",
|
|
13197
|
+
get(path18, opts) {
|
|
13198
|
+
return this.methodRequest("get", path18, opts);
|
|
13199
13199
|
}
|
|
13200
|
-
post(
|
|
13201
|
-
return this.methodRequest("post",
|
|
13200
|
+
post(path18, opts) {
|
|
13201
|
+
return this.methodRequest("post", path18, opts);
|
|
13202
13202
|
}
|
|
13203
|
-
patch(
|
|
13204
|
-
return this.methodRequest("patch",
|
|
13203
|
+
patch(path18, opts) {
|
|
13204
|
+
return this.methodRequest("patch", path18, opts);
|
|
13205
13205
|
}
|
|
13206
|
-
put(
|
|
13207
|
-
return this.methodRequest("put",
|
|
13206
|
+
put(path18, opts) {
|
|
13207
|
+
return this.methodRequest("put", path18, opts);
|
|
13208
13208
|
}
|
|
13209
|
-
delete(
|
|
13210
|
-
return this.methodRequest("delete",
|
|
13209
|
+
delete(path18, opts) {
|
|
13210
|
+
return this.methodRequest("delete", path18, opts);
|
|
13211
13211
|
}
|
|
13212
|
-
methodRequest(method,
|
|
13212
|
+
methodRequest(method, path18, opts) {
|
|
13213
13213
|
return this.request(Promise.resolve(opts).then((opts2) => {
|
|
13214
|
-
return { method, path:
|
|
13214
|
+
return { method, path: path18, ...opts2 };
|
|
13215
13215
|
}));
|
|
13216
13216
|
}
|
|
13217
13217
|
request(options, remainingRetries = null) {
|
|
@@ -13315,8 +13315,8 @@ var init_client2 = __esm({
|
|
|
13315
13315
|
}));
|
|
13316
13316
|
return { response, options, controller, requestLogID, retryOfRequestLogID, startTime };
|
|
13317
13317
|
}
|
|
13318
|
-
getAPIList(
|
|
13319
|
-
return this.requestAPIList(Page3, opts && "then" in opts ? opts.then((opts2) => ({ method: "get", path:
|
|
13318
|
+
getAPIList(path18, Page3, opts) {
|
|
13319
|
+
return this.requestAPIList(Page3, opts && "then" in opts ? opts.then((opts2) => ({ method: "get", path: path18, ...opts2 })) : { method: "get", path: path18, ...opts });
|
|
13320
13320
|
}
|
|
13321
13321
|
requestAPIList(Page3, options) {
|
|
13322
13322
|
const request = this.makeRequest(options, null, void 0);
|
|
@@ -13395,8 +13395,8 @@ var init_client2 = __esm({
|
|
|
13395
13395
|
}
|
|
13396
13396
|
async buildRequest(inputOptions, { retryCount = 0 } = {}) {
|
|
13397
13397
|
const options = { ...inputOptions };
|
|
13398
|
-
const { method, path:
|
|
13399
|
-
const url = this.buildURL(
|
|
13398
|
+
const { method, path: path18, query, defaultBaseURL } = options;
|
|
13399
|
+
const url = this.buildURL(path18, query, defaultBaseURL);
|
|
13400
13400
|
if ("timeout" in options)
|
|
13401
13401
|
validatePositiveInteger2("timeout", options.timeout);
|
|
13402
13402
|
options.timeout = options.timeout ?? this.timeout;
|
|
@@ -13691,30 +13691,30 @@ function resolvePaths(name, paths) {
|
|
|
13691
13691
|
return filePath;
|
|
13692
13692
|
}
|
|
13693
13693
|
}
|
|
13694
|
-
function getIncludePath(
|
|
13694
|
+
function getIncludePath(path18, options) {
|
|
13695
13695
|
let includePath;
|
|
13696
13696
|
let filePath;
|
|
13697
13697
|
let views = options.views;
|
|
13698
|
-
let match2 = /^[A-Za-z]+:\\|^\//.exec(
|
|
13698
|
+
let match2 = /^[A-Za-z]+:\\|^\//.exec(path18);
|
|
13699
13699
|
if (match2 && match2.length) {
|
|
13700
|
-
|
|
13700
|
+
path18 = path18.replace(/^\/*/, "");
|
|
13701
13701
|
if (Array.isArray(options.root)) {
|
|
13702
|
-
includePath = resolvePaths(
|
|
13702
|
+
includePath = resolvePaths(path18, options.root);
|
|
13703
13703
|
} else {
|
|
13704
|
-
includePath = ejs.resolveInclude(
|
|
13704
|
+
includePath = ejs.resolveInclude(path18, options.root || "/", true);
|
|
13705
13705
|
}
|
|
13706
13706
|
} else {
|
|
13707
13707
|
if (options.filename) {
|
|
13708
|
-
filePath = ejs.resolveInclude(
|
|
13708
|
+
filePath = ejs.resolveInclude(path18, options.filename);
|
|
13709
13709
|
if (fs3.existsSync(filePath)) {
|
|
13710
13710
|
includePath = filePath;
|
|
13711
13711
|
}
|
|
13712
13712
|
}
|
|
13713
13713
|
if (!includePath && Array.isArray(views)) {
|
|
13714
|
-
includePath = resolvePaths(
|
|
13714
|
+
includePath = resolvePaths(path18, views);
|
|
13715
13715
|
}
|
|
13716
13716
|
if (!includePath && typeof options.includer !== "function") {
|
|
13717
|
-
throw new Error('Could not find the include file "' + options.escapeFunction(
|
|
13717
|
+
throw new Error('Could not find the include file "' + options.escapeFunction(path18) + '"');
|
|
13718
13718
|
}
|
|
13719
13719
|
}
|
|
13720
13720
|
return includePath;
|
|
@@ -13773,11 +13773,11 @@ function tryHandleCache(options, data, cb) {
|
|
|
13773
13773
|
function fileLoader(filePath) {
|
|
13774
13774
|
return ejs.fileLoader(filePath);
|
|
13775
13775
|
}
|
|
13776
|
-
function includeFile(
|
|
13776
|
+
function includeFile(path18, options) {
|
|
13777
13777
|
let opts = utils_default.shallowCopy(utils_default.createNullProtoObjWherePossible(), options);
|
|
13778
|
-
opts.filename = getIncludePath(
|
|
13778
|
+
opts.filename = getIncludePath(path18, opts);
|
|
13779
13779
|
if (typeof options.includer === "function") {
|
|
13780
|
-
let includerResult = options.includer(
|
|
13780
|
+
let includerResult = options.includer(path18, opts.filename);
|
|
13781
13781
|
if (includerResult) {
|
|
13782
13782
|
if (includerResult.filename) {
|
|
13783
13783
|
opts.filename = includerResult.filename;
|
|
@@ -14055,12 +14055,12 @@ var init_ejs = __esm({
|
|
|
14055
14055
|
throw e;
|
|
14056
14056
|
}
|
|
14057
14057
|
let returnedFn = opts.client ? fn : function anonymous(data) {
|
|
14058
|
-
let include = function(
|
|
14058
|
+
let include = function(path18, includeData) {
|
|
14059
14059
|
let d = utils_default.shallowCopy(utils_default.createNullProtoObjWherePossible(), data);
|
|
14060
14060
|
if (includeData) {
|
|
14061
14061
|
d = utils_default.shallowCopy(d, includeData);
|
|
14062
14062
|
}
|
|
14063
|
-
return includeFile(
|
|
14063
|
+
return includeFile(path18, opts)(d);
|
|
14064
14064
|
};
|
|
14065
14065
|
return fn.apply(
|
|
14066
14066
|
opts.context,
|
|
@@ -15388,13 +15388,13 @@ var require_ast = __commonJS({
|
|
|
15388
15388
|
helperExpression: function helperExpression(node) {
|
|
15389
15389
|
return node.type === "SubExpression" || (node.type === "MustacheStatement" || node.type === "BlockStatement") && !!(node.params && node.params.length || node.hash);
|
|
15390
15390
|
},
|
|
15391
|
-
scopedId: function scopedId(
|
|
15392
|
-
return /^\.|this\b/.test(
|
|
15391
|
+
scopedId: function scopedId(path18) {
|
|
15392
|
+
return /^\.|this\b/.test(path18.original);
|
|
15393
15393
|
},
|
|
15394
15394
|
// an ID is simple if it only has one part, and that part is not
|
|
15395
15395
|
// `..` or `this`.
|
|
15396
|
-
simpleId: function simpleId(
|
|
15397
|
-
return
|
|
15396
|
+
simpleId: function simpleId(path18) {
|
|
15397
|
+
return path18.parts.length === 1 && !AST2.helpers.scopedId(path18) && !path18.depth;
|
|
15398
15398
|
}
|
|
15399
15399
|
}
|
|
15400
15400
|
};
|
|
@@ -16464,12 +16464,12 @@ var require_helpers2 = __commonJS({
|
|
|
16464
16464
|
loc
|
|
16465
16465
|
};
|
|
16466
16466
|
}
|
|
16467
|
-
function prepareMustache(
|
|
16467
|
+
function prepareMustache(path18, params, hash, open, strip3, locInfo) {
|
|
16468
16468
|
var escapeFlag = open.charAt(3) || open.charAt(2), escaped = escapeFlag !== "{" && escapeFlag !== "&";
|
|
16469
16469
|
var decorator = /\*/.test(open);
|
|
16470
16470
|
return {
|
|
16471
16471
|
type: decorator ? "Decorator" : "MustacheStatement",
|
|
16472
|
-
path:
|
|
16472
|
+
path: path18,
|
|
16473
16473
|
params,
|
|
16474
16474
|
hash,
|
|
16475
16475
|
escaped,
|
|
@@ -16787,9 +16787,9 @@ var require_compiler = __commonJS({
|
|
|
16787
16787
|
},
|
|
16788
16788
|
DecoratorBlock: function DecoratorBlock(decorator) {
|
|
16789
16789
|
var program = decorator.program && this.compileProgram(decorator.program);
|
|
16790
|
-
var params = this.setupFullMustacheParams(decorator, program, void 0),
|
|
16790
|
+
var params = this.setupFullMustacheParams(decorator, program, void 0), path18 = decorator.path;
|
|
16791
16791
|
this.useDecorators = true;
|
|
16792
|
-
this.opcode("registerDecorator", params.length,
|
|
16792
|
+
this.opcode("registerDecorator", params.length, path18.original);
|
|
16793
16793
|
},
|
|
16794
16794
|
PartialStatement: function PartialStatement(partial) {
|
|
16795
16795
|
this.usePartial = true;
|
|
@@ -16853,46 +16853,46 @@ var require_compiler = __commonJS({
|
|
|
16853
16853
|
}
|
|
16854
16854
|
},
|
|
16855
16855
|
ambiguousSexpr: function ambiguousSexpr(sexpr, program, inverse) {
|
|
16856
|
-
var
|
|
16857
|
-
this.opcode("getContext",
|
|
16856
|
+
var path18 = sexpr.path, name = path18.parts[0], isBlock = program != null || inverse != null;
|
|
16857
|
+
this.opcode("getContext", path18.depth);
|
|
16858
16858
|
this.opcode("pushProgram", program);
|
|
16859
16859
|
this.opcode("pushProgram", inverse);
|
|
16860
|
-
|
|
16861
|
-
this.accept(
|
|
16860
|
+
path18.strict = true;
|
|
16861
|
+
this.accept(path18);
|
|
16862
16862
|
this.opcode("invokeAmbiguous", name, isBlock);
|
|
16863
16863
|
},
|
|
16864
16864
|
simpleSexpr: function simpleSexpr(sexpr) {
|
|
16865
|
-
var
|
|
16866
|
-
|
|
16867
|
-
this.accept(
|
|
16865
|
+
var path18 = sexpr.path;
|
|
16866
|
+
path18.strict = true;
|
|
16867
|
+
this.accept(path18);
|
|
16868
16868
|
this.opcode("resolvePossibleLambda");
|
|
16869
16869
|
},
|
|
16870
16870
|
helperSexpr: function helperSexpr(sexpr, program, inverse) {
|
|
16871
|
-
var params = this.setupFullMustacheParams(sexpr, program, inverse),
|
|
16871
|
+
var params = this.setupFullMustacheParams(sexpr, program, inverse), path18 = sexpr.path, name = path18.parts[0];
|
|
16872
16872
|
if (this.options.knownHelpers[name]) {
|
|
16873
16873
|
this.opcode("invokeKnownHelper", params.length, name);
|
|
16874
16874
|
} else if (this.options.knownHelpersOnly) {
|
|
16875
16875
|
throw new _exception2["default"]("You specified knownHelpersOnly, but used the unknown helper " + name, sexpr);
|
|
16876
16876
|
} else {
|
|
16877
|
-
|
|
16878
|
-
|
|
16879
|
-
this.accept(
|
|
16880
|
-
this.opcode("invokeHelper", params.length,
|
|
16877
|
+
path18.strict = true;
|
|
16878
|
+
path18.falsy = true;
|
|
16879
|
+
this.accept(path18);
|
|
16880
|
+
this.opcode("invokeHelper", params.length, path18.original, _ast2["default"].helpers.simpleId(path18));
|
|
16881
16881
|
}
|
|
16882
16882
|
},
|
|
16883
|
-
PathExpression: function PathExpression(
|
|
16884
|
-
this.addDepth(
|
|
16885
|
-
this.opcode("getContext",
|
|
16886
|
-
var name =
|
|
16883
|
+
PathExpression: function PathExpression(path18) {
|
|
16884
|
+
this.addDepth(path18.depth);
|
|
16885
|
+
this.opcode("getContext", path18.depth);
|
|
16886
|
+
var name = path18.parts[0], scoped = _ast2["default"].helpers.scopedId(path18), blockParamId = !path18.depth && !scoped && this.blockParamIndex(name);
|
|
16887
16887
|
if (blockParamId) {
|
|
16888
|
-
this.opcode("lookupBlockParam", blockParamId,
|
|
16888
|
+
this.opcode("lookupBlockParam", blockParamId, path18.parts);
|
|
16889
16889
|
} else if (!name) {
|
|
16890
16890
|
this.opcode("pushContext");
|
|
16891
|
-
} else if (
|
|
16891
|
+
} else if (path18.data) {
|
|
16892
16892
|
this.options.data = true;
|
|
16893
|
-
this.opcode("lookupData",
|
|
16893
|
+
this.opcode("lookupData", path18.depth, path18.parts, path18.strict);
|
|
16894
16894
|
} else {
|
|
16895
|
-
this.opcode("lookupOnContext",
|
|
16895
|
+
this.opcode("lookupOnContext", path18.parts, path18.falsy, path18.strict, scoped);
|
|
16896
16896
|
}
|
|
16897
16897
|
},
|
|
16898
16898
|
StringLiteral: function StringLiteral(string) {
|
|
@@ -17245,16 +17245,16 @@ var require_util = __commonJS({
|
|
|
17245
17245
|
}
|
|
17246
17246
|
exports2.urlGenerate = urlGenerate;
|
|
17247
17247
|
function normalize3(aPath) {
|
|
17248
|
-
var
|
|
17248
|
+
var path18 = aPath;
|
|
17249
17249
|
var url = urlParse(aPath);
|
|
17250
17250
|
if (url) {
|
|
17251
17251
|
if (!url.path) {
|
|
17252
17252
|
return aPath;
|
|
17253
17253
|
}
|
|
17254
|
-
|
|
17254
|
+
path18 = url.path;
|
|
17255
17255
|
}
|
|
17256
|
-
var isAbsolute = exports2.isAbsolute(
|
|
17257
|
-
var parts =
|
|
17256
|
+
var isAbsolute = exports2.isAbsolute(path18);
|
|
17257
|
+
var parts = path18.split(/\/+/);
|
|
17258
17258
|
for (var part, up = 0, i = parts.length - 1; i >= 0; i--) {
|
|
17259
17259
|
part = parts[i];
|
|
17260
17260
|
if (part === ".") {
|
|
@@ -17271,18 +17271,18 @@ var require_util = __commonJS({
|
|
|
17271
17271
|
}
|
|
17272
17272
|
}
|
|
17273
17273
|
}
|
|
17274
|
-
|
|
17275
|
-
if (
|
|
17276
|
-
|
|
17274
|
+
path18 = parts.join("/");
|
|
17275
|
+
if (path18 === "") {
|
|
17276
|
+
path18 = isAbsolute ? "/" : ".";
|
|
17277
17277
|
}
|
|
17278
17278
|
if (url) {
|
|
17279
|
-
url.path =
|
|
17279
|
+
url.path = path18;
|
|
17280
17280
|
return urlGenerate(url);
|
|
17281
17281
|
}
|
|
17282
|
-
return
|
|
17282
|
+
return path18;
|
|
17283
17283
|
}
|
|
17284
17284
|
exports2.normalize = normalize3;
|
|
17285
|
-
function
|
|
17285
|
+
function join25(aRoot, aPath) {
|
|
17286
17286
|
if (aRoot === "") {
|
|
17287
17287
|
aRoot = ".";
|
|
17288
17288
|
}
|
|
@@ -17314,7 +17314,7 @@ var require_util = __commonJS({
|
|
|
17314
17314
|
}
|
|
17315
17315
|
return joined;
|
|
17316
17316
|
}
|
|
17317
|
-
exports2.join =
|
|
17317
|
+
exports2.join = join25;
|
|
17318
17318
|
exports2.isAbsolute = function(aPath) {
|
|
17319
17319
|
return aPath.charAt(0) === "/" || urlRegexp.test(aPath);
|
|
17320
17320
|
};
|
|
@@ -17487,7 +17487,7 @@ var require_util = __commonJS({
|
|
|
17487
17487
|
parsed.path = parsed.path.substring(0, index + 1);
|
|
17488
17488
|
}
|
|
17489
17489
|
}
|
|
17490
|
-
sourceURL =
|
|
17490
|
+
sourceURL = join25(urlGenerate(parsed), sourceURL);
|
|
17491
17491
|
}
|
|
17492
17492
|
return normalize3(sourceURL);
|
|
17493
17493
|
}
|
|
@@ -20070,8 +20070,8 @@ var require_printer = __commonJS({
|
|
|
20070
20070
|
return this.accept(sexpr.path) + " " + params + hash;
|
|
20071
20071
|
};
|
|
20072
20072
|
PrintVisitor.prototype.PathExpression = function(id) {
|
|
20073
|
-
var
|
|
20074
|
-
return (id.data ? "@" : "") + "PATH:" +
|
|
20073
|
+
var path18 = id.parts.join("/");
|
|
20074
|
+
return (id.data ? "@" : "") + "PATH:" + path18;
|
|
20075
20075
|
};
|
|
20076
20076
|
PrintVisitor.prototype.StringLiteral = function(string) {
|
|
20077
20077
|
return '"' + string.value + '"';
|
|
@@ -23350,10 +23350,10 @@ var init_liquid_node = __esm({
|
|
|
23350
23350
|
yield filepath;
|
|
23351
23351
|
}
|
|
23352
23352
|
}
|
|
23353
|
-
dirname(
|
|
23353
|
+
dirname(path18) {
|
|
23354
23354
|
const fs19 = this.options.fs;
|
|
23355
23355
|
assert(fs19.dirname, "`fs.dirname` is required for relative reference");
|
|
23356
|
-
return fs19.dirname(
|
|
23356
|
+
return fs19.dirname(path18);
|
|
23357
23357
|
}
|
|
23358
23358
|
lookupError(file, roots) {
|
|
23359
23359
|
const err = new Error("ENOENT");
|
|
@@ -30931,9 +30931,9 @@ var init_chunk_LMPZV35Z = __esm({
|
|
|
30931
30931
|
"../version/dist/chunk-LMPZV35Z.js"() {
|
|
30932
30932
|
"use strict";
|
|
30933
30933
|
execAsync = (file, args, options) => {
|
|
30934
|
-
const
|
|
30934
|
+
const defaultOptions4 = { maxBuffer: 1024 * 1024 * 10, ...options };
|
|
30935
30935
|
return new Promise((resolve11, reject2) => {
|
|
30936
|
-
execFile2(file, args,
|
|
30936
|
+
execFile2(file, args, defaultOptions4, (error3, stdout, stderr) => {
|
|
30937
30937
|
if (error3) {
|
|
30938
30938
|
reject2(error3);
|
|
30939
30939
|
} else {
|
|
@@ -30946,14 +30946,14 @@ var init_chunk_LMPZV35Z = __esm({
|
|
|
30946
30946
|
}
|
|
30947
30947
|
});
|
|
30948
30948
|
|
|
30949
|
-
// ../../node_modules/.pnpm/@conventional-changelog+git-client@2.
|
|
30949
|
+
// ../../node_modules/.pnpm/@conventional-changelog+git-client@2.6.0_conventional-commits-filter@5.0.0_conventional-commits-parser@6.2.1/node_modules/@conventional-changelog/git-client/dist/types.js
|
|
30950
30950
|
var init_types = __esm({
|
|
30951
|
-
"../../node_modules/.pnpm/@conventional-changelog+git-client@2.
|
|
30951
|
+
"../../node_modules/.pnpm/@conventional-changelog+git-client@2.6.0_conventional-commits-filter@5.0.0_conventional-commits-parser@6.2.1/node_modules/@conventional-changelog/git-client/dist/types.js"() {
|
|
30952
30952
|
"use strict";
|
|
30953
30953
|
}
|
|
30954
30954
|
});
|
|
30955
30955
|
|
|
30956
|
-
// ../../node_modules/.pnpm/@conventional-changelog+git-client@2.
|
|
30956
|
+
// ../../node_modules/.pnpm/@conventional-changelog+git-client@2.6.0_conventional-commits-filter@5.0.0_conventional-commits-parser@6.2.1/node_modules/@conventional-changelog/git-client/dist/utils.js
|
|
30957
30957
|
function formatArgs(...args) {
|
|
30958
30958
|
return args.reduce((finalArgs, arg) => {
|
|
30959
30959
|
if (arg) {
|
|
@@ -30966,12 +30966,12 @@ function toArray2(value) {
|
|
|
30966
30966
|
return Array.isArray(value) ? value : [value];
|
|
30967
30967
|
}
|
|
30968
30968
|
var init_utils4 = __esm({
|
|
30969
|
-
"../../node_modules/.pnpm/@conventional-changelog+git-client@2.
|
|
30969
|
+
"../../node_modules/.pnpm/@conventional-changelog+git-client@2.6.0_conventional-commits-filter@5.0.0_conventional-commits-parser@6.2.1/node_modules/@conventional-changelog/git-client/dist/utils.js"() {
|
|
30970
30970
|
"use strict";
|
|
30971
30971
|
}
|
|
30972
30972
|
});
|
|
30973
30973
|
|
|
30974
|
-
// ../../node_modules/.pnpm/@simple-libs+stream-utils@1.
|
|
30974
|
+
// ../../node_modules/.pnpm/@simple-libs+stream-utils@1.2.0/node_modules/@simple-libs/stream-utils/dist/index.js
|
|
30975
30975
|
async function toArray3(iterable) {
|
|
30976
30976
|
const result = [];
|
|
30977
30977
|
for await (const item of iterable) {
|
|
@@ -31005,12 +31005,12 @@ async function* splitStream(stream, separator) {
|
|
|
31005
31005
|
}
|
|
31006
31006
|
}
|
|
31007
31007
|
var init_dist3 = __esm({
|
|
31008
|
-
"../../node_modules/.pnpm/@simple-libs+stream-utils@1.
|
|
31008
|
+
"../../node_modules/.pnpm/@simple-libs+stream-utils@1.2.0/node_modules/@simple-libs/stream-utils/dist/index.js"() {
|
|
31009
31009
|
"use strict";
|
|
31010
31010
|
}
|
|
31011
31011
|
});
|
|
31012
31012
|
|
|
31013
|
-
// ../../node_modules/.pnpm/@simple-libs+child-process-utils@1.0.
|
|
31013
|
+
// ../../node_modules/.pnpm/@simple-libs+child-process-utils@1.0.2/node_modules/@simple-libs/child-process-utils/dist/index.js
|
|
31014
31014
|
async function exitCode(process2) {
|
|
31015
31015
|
if (process2.exitCode !== null) {
|
|
31016
31016
|
return process2.exitCode;
|
|
@@ -31055,17 +31055,17 @@ function output(process2) {
|
|
|
31055
31055
|
return concatBufferStream(outputStream(process2));
|
|
31056
31056
|
}
|
|
31057
31057
|
var init_dist4 = __esm({
|
|
31058
|
-
"../../node_modules/.pnpm/@simple-libs+child-process-utils@1.0.
|
|
31058
|
+
"../../node_modules/.pnpm/@simple-libs+child-process-utils@1.0.2/node_modules/@simple-libs/child-process-utils/dist/index.js"() {
|
|
31059
31059
|
"use strict";
|
|
31060
31060
|
init_dist3();
|
|
31061
31061
|
}
|
|
31062
31062
|
});
|
|
31063
31063
|
|
|
31064
|
-
// ../../node_modules/.pnpm/@conventional-changelog+git-client@2.
|
|
31064
|
+
// ../../node_modules/.pnpm/@conventional-changelog+git-client@2.6.0_conventional-commits-filter@5.0.0_conventional-commits-parser@6.2.1/node_modules/@conventional-changelog/git-client/dist/GitClient.js
|
|
31065
31065
|
import { spawn } from "child_process";
|
|
31066
31066
|
var SCISSOR, GitClient;
|
|
31067
31067
|
var init_GitClient = __esm({
|
|
31068
|
-
"../../node_modules/.pnpm/@conventional-changelog+git-client@2.
|
|
31068
|
+
"../../node_modules/.pnpm/@conventional-changelog+git-client@2.6.0_conventional-commits-filter@5.0.0_conventional-commits-parser@6.2.1/node_modules/@conventional-changelog/git-client/dist/GitClient.js"() {
|
|
31069
31069
|
"use strict";
|
|
31070
31070
|
init_dist3();
|
|
31071
31071
|
init_dist4();
|
|
@@ -31113,7 +31113,7 @@ var init_GitClient = __esm({
|
|
|
31113
31113
|
try {
|
|
31114
31114
|
await this.exec("init");
|
|
31115
31115
|
return true;
|
|
31116
|
-
} catch
|
|
31116
|
+
} catch {
|
|
31117
31117
|
return false;
|
|
31118
31118
|
}
|
|
31119
31119
|
}
|
|
@@ -31127,9 +31127,9 @@ var init_GitClient = __esm({
|
|
|
31127
31127
|
* @yields Raw commits data.
|
|
31128
31128
|
*/
|
|
31129
31129
|
async *getRawCommits(params = {}) {
|
|
31130
|
-
const { path:
|
|
31130
|
+
const { path: path18, from = "", to = "HEAD", format: format2 = "%B", ignore, reverse: reverse2, merges, since } = params;
|
|
31131
31131
|
const shouldNotIgnore = ignore ? (chunk2) => !ignore.test(chunk2) : () => true;
|
|
31132
|
-
const stdout = this.execStream("log", `--format=${format2}%n${SCISSOR}`, since && `--since=${since instanceof Date ? since.toISOString() : since}`, reverse2 && "--reverse", merges && "--merges", merges === false && "--no-merges", [from, to].filter(Boolean).join(".."), ...
|
|
31132
|
+
const stdout = this.execStream("log", `--format=${format2}%n${SCISSOR}`, since && `--since=${since instanceof Date ? since.toISOString() : since}`, reverse2 && "--reverse", merges && "--merges", merges === false && "--no-merges", [from, to].filter(Boolean).join(".."), ...path18 ? ["--", ...toArray2(path18)] : []);
|
|
31133
31133
|
const commitsStream = splitStream(stdout, `${SCISSOR}
|
|
31134
31134
|
`);
|
|
31135
31135
|
let chunk;
|
|
@@ -31145,9 +31145,9 @@ var init_GitClient = __esm({
|
|
|
31145
31145
|
* @yields Tags
|
|
31146
31146
|
*/
|
|
31147
31147
|
async *getTags(params = {}) {
|
|
31148
|
-
const { path:
|
|
31148
|
+
const { path: path18, from = "", to = "HEAD", since } = params;
|
|
31149
31149
|
const tagRegex = /tag:\s*(.+?)[,)]/gi;
|
|
31150
|
-
const stdout = this.execStream("log", "--decorate", "--no-color", "--date-order", since && `--since=${since instanceof Date ? since.toISOString() : since}`, [from, to].filter(Boolean).join(".."), ...
|
|
31150
|
+
const stdout = this.execStream("log", "--decorate", "--no-color", "--date-order", since && `--since=${since instanceof Date ? since.toISOString() : since}`, [from, to].filter(Boolean).join(".."), ...path18 ? ["--", ...toArray2(path18)] : []);
|
|
31151
31151
|
let chunk;
|
|
31152
31152
|
let matches;
|
|
31153
31153
|
let tag;
|
|
@@ -31175,7 +31175,7 @@ var init_GitClient = __esm({
|
|
|
31175
31175
|
try {
|
|
31176
31176
|
await this.exec("check-ignore", "--", file);
|
|
31177
31177
|
return true;
|
|
31178
|
-
} catch
|
|
31178
|
+
} catch {
|
|
31179
31179
|
return false;
|
|
31180
31180
|
}
|
|
31181
31181
|
}
|
|
@@ -31919,10 +31919,16 @@ var init_dist6 = __esm({
|
|
|
31919
31919
|
}
|
|
31920
31920
|
});
|
|
31921
31921
|
|
|
31922
|
-
// ../../node_modules/.pnpm/@conventional-changelog+git-client@2.
|
|
31922
|
+
// ../../node_modules/.pnpm/@conventional-changelog+git-client@2.6.0_conventional-commits-filter@5.0.0_conventional-commits-parser@6.2.1/node_modules/@conventional-changelog/git-client/dist/ConventionalGitClient.js
|
|
31923
|
+
function packagePrefix(packageName) {
|
|
31924
|
+
if (!packageName) {
|
|
31925
|
+
return /^.+@/;
|
|
31926
|
+
}
|
|
31927
|
+
return `${packageName}@`;
|
|
31928
|
+
}
|
|
31923
31929
|
var import_semver2, ConventionalGitClient;
|
|
31924
31930
|
var init_ConventionalGitClient = __esm({
|
|
31925
|
-
"../../node_modules/.pnpm/@conventional-changelog+git-client@2.
|
|
31931
|
+
"../../node_modules/.pnpm/@conventional-changelog+git-client@2.6.0_conventional-commits-filter@5.0.0_conventional-commits-parser@6.2.1/node_modules/@conventional-changelog/git-client/dist/ConventionalGitClient.js"() {
|
|
31926
31932
|
"use strict";
|
|
31927
31933
|
import_semver2 = __toESM(require_semver2(), 1);
|
|
31928
31934
|
init_dist3();
|
|
@@ -31934,8 +31940,8 @@ var init_ConventionalGitClient = __esm({
|
|
|
31934
31940
|
return this.deps;
|
|
31935
31941
|
}
|
|
31936
31942
|
this.deps = Promise.all([
|
|
31937
|
-
Promise.resolve().then(() => (init_dist5(), dist_exports3)).then(({ parseCommits:
|
|
31938
|
-
Promise.resolve().then(() => (init_dist6(), dist_exports4)).then(({ filterRevertedCommits:
|
|
31943
|
+
Promise.resolve().then(() => (init_dist5(), dist_exports3)).then(({ parseCommits: parseCommits3 }) => parseCommits3),
|
|
31944
|
+
Promise.resolve().then(() => (init_dist6(), dist_exports4)).then(({ filterRevertedCommits: filterRevertedCommits3 }) => filterRevertedCommits3)
|
|
31939
31945
|
]);
|
|
31940
31946
|
return this.deps;
|
|
31941
31947
|
}
|
|
@@ -31951,12 +31957,12 @@ var init_ConventionalGitClient = __esm({
|
|
|
31951
31957
|
*/
|
|
31952
31958
|
async *getCommits(params = {}, parserOptions = {}) {
|
|
31953
31959
|
const { filterReverts, ...gitLogParams } = params;
|
|
31954
|
-
const [
|
|
31960
|
+
const [parseCommits3, filterRevertedCommits3] = await this.loadDeps();
|
|
31955
31961
|
if (filterReverts) {
|
|
31956
|
-
yield*
|
|
31962
|
+
yield* filterRevertedCommits3(this.getCommits(gitLogParams, parserOptions));
|
|
31957
31963
|
return;
|
|
31958
31964
|
}
|
|
31959
|
-
const parse4 =
|
|
31965
|
+
const parse4 = parseCommits3(parserOptions);
|
|
31960
31966
|
const commitsStream = this.getRawCommits(gitLogParams);
|
|
31961
31967
|
yield* parse4(commitsStream);
|
|
31962
31968
|
}
|
|
@@ -32029,9 +32035,9 @@ var init_ConventionalGitClient = __esm({
|
|
|
32029
32035
|
}
|
|
32030
32036
|
});
|
|
32031
32037
|
|
|
32032
|
-
// ../../node_modules/.pnpm/@conventional-changelog+git-client@2.
|
|
32038
|
+
// ../../node_modules/.pnpm/@conventional-changelog+git-client@2.6.0_conventional-commits-filter@5.0.0_conventional-commits-parser@6.2.1/node_modules/@conventional-changelog/git-client/dist/index.js
|
|
32033
32039
|
var init_dist7 = __esm({
|
|
32034
|
-
"../../node_modules/.pnpm/@conventional-changelog+git-client@2.
|
|
32040
|
+
"../../node_modules/.pnpm/@conventional-changelog+git-client@2.6.0_conventional-commits-filter@5.0.0_conventional-commits-parser@6.2.1/node_modules/@conventional-changelog/git-client/dist/index.js"() {
|
|
32035
32041
|
"use strict";
|
|
32036
32042
|
init_types();
|
|
32037
32043
|
init_utils4();
|
|
@@ -32040,832 +32046,57 @@ var init_dist7 = __esm({
|
|
|
32040
32046
|
}
|
|
32041
32047
|
});
|
|
32042
32048
|
|
|
32043
|
-
// ../../node_modules/.pnpm/
|
|
32044
|
-
|
|
32045
|
-
|
|
32046
|
-
"
|
|
32047
|
-
}
|
|
32048
|
-
});
|
|
32049
|
-
|
|
32050
|
-
// ../../node_modules/.pnpm/conventional-changelog-preset-loader@5.0.0/node_modules/conventional-changelog-preset-loader/dist/presetLoader.js
|
|
32051
|
-
import path10 from "path";
|
|
32052
|
-
function resolvePresetNameVariants(preset) {
|
|
32053
|
-
if (path10.isAbsolute(preset)) {
|
|
32054
|
-
return [preset];
|
|
32055
|
-
}
|
|
32056
|
-
let scope = "";
|
|
32057
|
-
let name = preset.toLocaleLowerCase();
|
|
32058
|
-
if (preset.startsWith("@")) {
|
|
32059
|
-
const parts = preset.split("/");
|
|
32060
|
-
scope = `${parts.shift()}/`;
|
|
32061
|
-
if (scope === "@conventional-changelog/") {
|
|
32062
|
-
return [preset];
|
|
32063
|
-
}
|
|
32064
|
-
name = parts.join("/");
|
|
32065
|
-
}
|
|
32066
|
-
if (!name.startsWith("conventional-changelog-")) {
|
|
32067
|
-
name = `conventional-changelog-${name}`;
|
|
32068
|
-
}
|
|
32069
|
-
const altPreset = `${scope}${name}`;
|
|
32070
|
-
if (altPreset !== preset) {
|
|
32071
|
-
return [altPreset, preset];
|
|
32072
|
-
}
|
|
32073
|
-
return [preset];
|
|
32074
|
-
}
|
|
32075
|
-
function getModuleDefaultExport(module2) {
|
|
32076
|
-
if (("__esModule" in module2 || Object.getPrototypeOf(module2) === null) && "default" in module2) {
|
|
32077
|
-
return module2.default;
|
|
32078
|
-
}
|
|
32079
|
-
return module2;
|
|
32080
|
-
}
|
|
32081
|
-
async function loadWithFallbacks(moduleLoader, variants) {
|
|
32082
|
-
let error3 = null;
|
|
32083
|
-
for (const variant of variants) {
|
|
32084
|
-
try {
|
|
32085
|
-
return getModuleDefaultExport(await moduleLoader(variant));
|
|
32086
|
-
} catch (err) {
|
|
32087
|
-
if (!error3) {
|
|
32088
|
-
error3 = err;
|
|
32089
|
-
}
|
|
32090
|
-
}
|
|
32049
|
+
// ../../node_modules/.pnpm/git-semver-tags@8.0.1_conventional-commits-filter@5.0.0_conventional-commits-parser@6.2.1/node_modules/git-semver-tags/src/index.js
|
|
32050
|
+
function getFinalOptions(options = {}) {
|
|
32051
|
+
if (options.package && !options.lernaTags) {
|
|
32052
|
+
throw new Error("opts.package should only be used when running in lerna mode");
|
|
32091
32053
|
}
|
|
32092
|
-
|
|
32093
|
-
|
|
32094
|
-
|
|
32095
|
-
|
|
32096
|
-
let preset = "";
|
|
32097
|
-
let params = null;
|
|
32098
|
-
if (typeof presetOrParams === "string") {
|
|
32099
|
-
preset = presetOrParams;
|
|
32100
|
-
} else if (typeof presetOrParams === "object" && typeof presetOrParams.name === "string") {
|
|
32101
|
-
preset = presetOrParams.name;
|
|
32102
|
-
params = presetOrParams;
|
|
32103
|
-
} else {
|
|
32104
|
-
throw Error("Preset must be string or object with property `name`");
|
|
32105
|
-
}
|
|
32106
|
-
const presetNameVariants = resolvePresetNameVariants(preset);
|
|
32107
|
-
let createPreset = null;
|
|
32108
|
-
try {
|
|
32109
|
-
createPreset = await loadWithFallbacks(moduleLoader, presetNameVariants);
|
|
32110
|
-
} catch (err) {
|
|
32111
|
-
throw new Error(`Unable to load the "${preset}" preset. Please make sure it's installed.`, {
|
|
32112
|
-
cause: err
|
|
32113
|
-
});
|
|
32114
|
-
}
|
|
32115
|
-
if (typeof createPreset !== "function") {
|
|
32116
|
-
throw new Error(`The "${preset}" preset does not export a function. Maybe you are using an old version of the preset. Please upgrade.`);
|
|
32117
|
-
}
|
|
32118
|
-
return params ? await createPreset(params) : await createPreset();
|
|
32054
|
+
const finalOptions = {
|
|
32055
|
+
cwd: options.cwd || process.cwd(),
|
|
32056
|
+
prefix: options.lernaTags ? packagePrefix(options.package) : options.tagPrefix,
|
|
32057
|
+
skipUnstable: options.skipUnstable
|
|
32119
32058
|
};
|
|
32059
|
+
return finalOptions;
|
|
32120
32060
|
}
|
|
32121
|
-
|
|
32122
|
-
|
|
32123
|
-
|
|
32124
|
-
|
|
32125
|
-
|
|
32126
|
-
|
|
32127
|
-
|
|
32128
|
-
|
|
32129
|
-
|
|
32130
|
-
var init_dist8 = __esm({
|
|
32131
|
-
"../../node_modules/.pnpm/conventional-changelog-preset-loader@5.0.0/node_modules/conventional-changelog-preset-loader/dist/index.js"() {
|
|
32132
|
-
"use strict";
|
|
32133
|
-
init_types3();
|
|
32134
|
-
init_presetLoader();
|
|
32061
|
+
async function getSemverTags(options = {}) {
|
|
32062
|
+
const {
|
|
32063
|
+
cwd: cwd3,
|
|
32064
|
+
...finalOptions
|
|
32065
|
+
} = getFinalOptions(options);
|
|
32066
|
+
const client = new ConventionalGitClient(cwd3);
|
|
32067
|
+
const tags2 = [];
|
|
32068
|
+
for await (const tag of client.getSemverTags(finalOptions)) {
|
|
32069
|
+
tags2.push(tag);
|
|
32135
32070
|
}
|
|
32136
|
-
|
|
32137
|
-
|
|
32138
|
-
// ../../node_modules/.pnpm/conventional-recommended-bump@11.2.0/node_modules/conventional-recommended-bump/dist/utils.js
|
|
32139
|
-
function isIterable2(value) {
|
|
32140
|
-
return value !== null && (typeof value[Symbol.iterator] === "function" || typeof value[Symbol.asyncIterator] === "function");
|
|
32141
|
-
}
|
|
32142
|
-
function bindLogNamespace(namespace, logger) {
|
|
32143
|
-
return (messages) => logger(namespace, messages);
|
|
32071
|
+
return tags2;
|
|
32144
32072
|
}
|
|
32145
|
-
var
|
|
32146
|
-
"../../node_modules/.pnpm/
|
|
32147
|
-
"use strict";
|
|
32148
|
-
}
|
|
32149
|
-
});
|
|
32150
|
-
|
|
32151
|
-
// ../../node_modules/.pnpm/conventional-recommended-bump@11.2.0/node_modules/conventional-recommended-bump/dist/bumper.js
|
|
32152
|
-
var VERSIONS, Bumper;
|
|
32153
|
-
var init_bumper = __esm({
|
|
32154
|
-
"../../node_modules/.pnpm/conventional-recommended-bump@11.2.0/node_modules/conventional-recommended-bump/dist/bumper.js"() {
|
|
32073
|
+
var init_src = __esm({
|
|
32074
|
+
"../../node_modules/.pnpm/git-semver-tags@8.0.1_conventional-commits-filter@5.0.0_conventional-commits-parser@6.2.1/node_modules/git-semver-tags/src/index.js"() {
|
|
32155
32075
|
"use strict";
|
|
32156
32076
|
init_dist7();
|
|
32157
|
-
init_dist8();
|
|
32158
|
-
init_utils7();
|
|
32159
|
-
VERSIONS = [
|
|
32160
|
-
"major",
|
|
32161
|
-
"minor",
|
|
32162
|
-
"patch"
|
|
32163
|
-
];
|
|
32164
|
-
Bumper = class {
|
|
32165
|
-
gitClient;
|
|
32166
|
-
params;
|
|
32167
|
-
whatBump;
|
|
32168
|
-
tagGetter;
|
|
32169
|
-
commitsGetter;
|
|
32170
|
-
constructor(cwdOrGitClient = process.cwd()) {
|
|
32171
|
-
this.gitClient = typeof cwdOrGitClient === "string" ? new ConventionalGitClient(cwdOrGitClient) : cwdOrGitClient;
|
|
32172
|
-
this.whatBump = null;
|
|
32173
|
-
this.params = Promise.resolve({
|
|
32174
|
-
commits: {
|
|
32175
|
-
format: "%B%n-hash-%n%H",
|
|
32176
|
-
filterReverts: true
|
|
32177
|
-
}
|
|
32178
|
-
});
|
|
32179
|
-
this.tagGetter = () => this.getLastSemverTag();
|
|
32180
|
-
this.commitsGetter = () => this.getCommits();
|
|
32181
|
-
}
|
|
32182
|
-
composeParams(params) {
|
|
32183
|
-
this.params = Promise.all([params, this.params]).then(([params2, prevParams]) => ({
|
|
32184
|
-
options: {
|
|
32185
|
-
...prevParams.options,
|
|
32186
|
-
...params2.options
|
|
32187
|
-
},
|
|
32188
|
-
tags: {
|
|
32189
|
-
...prevParams.tags,
|
|
32190
|
-
...params2.tags
|
|
32191
|
-
},
|
|
32192
|
-
commits: {
|
|
32193
|
-
...prevParams.commits,
|
|
32194
|
-
...params2.commits
|
|
32195
|
-
},
|
|
32196
|
-
parser: {
|
|
32197
|
-
...prevParams.parser,
|
|
32198
|
-
...params2.parser
|
|
32199
|
-
}
|
|
32200
|
-
}));
|
|
32201
|
-
}
|
|
32202
|
-
async getLastSemverTag() {
|
|
32203
|
-
const { tags: tags2 } = await this.params;
|
|
32204
|
-
return await this.gitClient.getLastSemverTag(tags2);
|
|
32205
|
-
}
|
|
32206
|
-
async *getCommits() {
|
|
32207
|
-
const { options, commits, parser } = await this.params;
|
|
32208
|
-
const parserParams = {
|
|
32209
|
-
...parser
|
|
32210
|
-
};
|
|
32211
|
-
if (!parserParams.warn && options?.warn) {
|
|
32212
|
-
parserParams.warn = bindLogNamespace("parser", options.warn);
|
|
32213
|
-
}
|
|
32214
|
-
yield* this.gitClient.getCommits({
|
|
32215
|
-
from: await this.tagGetter() || "",
|
|
32216
|
-
...commits
|
|
32217
|
-
}, parserParams);
|
|
32218
|
-
}
|
|
32219
|
-
/**
|
|
32220
|
-
* Load configs from a preset
|
|
32221
|
-
* @param preset
|
|
32222
|
-
* @param loader - Preset module loader, if not provided, will use default loader
|
|
32223
|
-
* @returns this
|
|
32224
|
-
*/
|
|
32225
|
-
loadPreset(preset, loader2) {
|
|
32226
|
-
const loadPreset2 = loader2 ? createPresetLoader(loader2) : loadPreset;
|
|
32227
|
-
const config = loadPreset2(preset).then((config2) => {
|
|
32228
|
-
if (!config2) {
|
|
32229
|
-
throw Error("Preset is not loaded or have incorrect exports");
|
|
32230
|
-
}
|
|
32231
|
-
return config2;
|
|
32232
|
-
});
|
|
32233
|
-
this.whatBump = async (commits) => {
|
|
32234
|
-
const { whatBump } = await config;
|
|
32235
|
-
return whatBump(commits);
|
|
32236
|
-
};
|
|
32237
|
-
this.composeParams(config);
|
|
32238
|
-
return this;
|
|
32239
|
-
}
|
|
32240
|
-
/**
|
|
32241
|
-
* Set config directly
|
|
32242
|
-
* @param config - Config object
|
|
32243
|
-
* @returns this
|
|
32244
|
-
*/
|
|
32245
|
-
config(config) {
|
|
32246
|
-
this.composeParams(config);
|
|
32247
|
-
return this;
|
|
32248
|
-
}
|
|
32249
|
-
/**
|
|
32250
|
-
* Set bumper options
|
|
32251
|
-
* @param options - Bumper options
|
|
32252
|
-
* @returns this
|
|
32253
|
-
*/
|
|
32254
|
-
options(options) {
|
|
32255
|
-
this.composeParams({
|
|
32256
|
-
options
|
|
32257
|
-
});
|
|
32258
|
-
return this;
|
|
32259
|
-
}
|
|
32260
|
-
/**
|
|
32261
|
-
* Set params to get the last semver tag
|
|
32262
|
-
* @param paramsOrTag - Params to get the last semver tag or a tag name
|
|
32263
|
-
* @returns this
|
|
32264
|
-
*/
|
|
32265
|
-
tag(paramsOrTag) {
|
|
32266
|
-
if (typeof paramsOrTag === "string") {
|
|
32267
|
-
this.tagGetter = () => paramsOrTag;
|
|
32268
|
-
} else {
|
|
32269
|
-
this.tagGetter = () => this.getLastSemverTag();
|
|
32270
|
-
this.composeParams({
|
|
32271
|
-
tags: paramsOrTag
|
|
32272
|
-
});
|
|
32273
|
-
}
|
|
32274
|
-
return this;
|
|
32275
|
-
}
|
|
32276
|
-
commits(paramsOrCommits, parserOptions) {
|
|
32277
|
-
if (isIterable2(paramsOrCommits)) {
|
|
32278
|
-
this.commitsGetter = () => paramsOrCommits;
|
|
32279
|
-
} else {
|
|
32280
|
-
this.commitsGetter = () => this.getCommits();
|
|
32281
|
-
this.composeParams({
|
|
32282
|
-
commits: paramsOrCommits,
|
|
32283
|
-
parser: parserOptions
|
|
32284
|
-
});
|
|
32285
|
-
}
|
|
32286
|
-
return this;
|
|
32287
|
-
}
|
|
32288
|
-
/**
|
|
32289
|
-
* Recommend a bump by `whatBump` function
|
|
32290
|
-
* @param whatBump - Function to recommend a bump from commits
|
|
32291
|
-
* @returns Bump recommendation
|
|
32292
|
-
*/
|
|
32293
|
-
async bump(whatBump = this.whatBump) {
|
|
32294
|
-
if (typeof whatBump !== "function") {
|
|
32295
|
-
throw Error("`whatBump` must be a function");
|
|
32296
|
-
}
|
|
32297
|
-
const { gitClient } = this;
|
|
32298
|
-
const { options } = await this.params;
|
|
32299
|
-
if (!gitClient.debug && options?.debug) {
|
|
32300
|
-
gitClient.debug = bindLogNamespace("git-client", options.debug);
|
|
32301
|
-
}
|
|
32302
|
-
const commitsStream = this.commitsGetter();
|
|
32303
|
-
const commits = [];
|
|
32304
|
-
let commit;
|
|
32305
|
-
for await (commit of commitsStream) {
|
|
32306
|
-
commits.push(commit);
|
|
32307
|
-
}
|
|
32308
|
-
const result = await whatBump(commits);
|
|
32309
|
-
if (result && "level" in result) {
|
|
32310
|
-
return {
|
|
32311
|
-
...result,
|
|
32312
|
-
releaseType: VERSIONS[result.level],
|
|
32313
|
-
commits
|
|
32314
|
-
};
|
|
32315
|
-
}
|
|
32316
|
-
return {
|
|
32317
|
-
commits
|
|
32318
|
-
};
|
|
32319
|
-
}
|
|
32320
|
-
};
|
|
32321
|
-
}
|
|
32322
|
-
});
|
|
32323
|
-
|
|
32324
|
-
// ../../node_modules/.pnpm/conventional-recommended-bump@11.2.0/node_modules/conventional-recommended-bump/dist/index.js
|
|
32325
|
-
var init_dist9 = __esm({
|
|
32326
|
-
"../../node_modules/.pnpm/conventional-recommended-bump@11.2.0/node_modules/conventional-recommended-bump/dist/index.js"() {
|
|
32327
|
-
"use strict";
|
|
32328
|
-
init_bumper();
|
|
32329
|
-
}
|
|
32330
|
-
});
|
|
32331
|
-
|
|
32332
|
-
// ../../node_modules/.pnpm/@conventional-changelog+git-client@2.6.0_conventional-commits-filter@5.0.0_conventional-commits-parser@6.2.1/node_modules/@conventional-changelog/git-client/dist/types.js
|
|
32333
|
-
var init_types4 = __esm({
|
|
32334
|
-
"../../node_modules/.pnpm/@conventional-changelog+git-client@2.6.0_conventional-commits-filter@5.0.0_conventional-commits-parser@6.2.1/node_modules/@conventional-changelog/git-client/dist/types.js"() {
|
|
32335
|
-
"use strict";
|
|
32336
|
-
}
|
|
32337
|
-
});
|
|
32338
|
-
|
|
32339
|
-
// ../../node_modules/.pnpm/@conventional-changelog+git-client@2.6.0_conventional-commits-filter@5.0.0_conventional-commits-parser@6.2.1/node_modules/@conventional-changelog/git-client/dist/utils.js
|
|
32340
|
-
function formatArgs2(...args) {
|
|
32341
|
-
return args.reduce((finalArgs, arg) => {
|
|
32342
|
-
if (arg) {
|
|
32343
|
-
finalArgs.push(String(arg));
|
|
32344
|
-
}
|
|
32345
|
-
return finalArgs;
|
|
32346
|
-
}, []);
|
|
32347
|
-
}
|
|
32348
|
-
function toArray4(value) {
|
|
32349
|
-
return Array.isArray(value) ? value : [value];
|
|
32350
|
-
}
|
|
32351
|
-
var init_utils8 = __esm({
|
|
32352
|
-
"../../node_modules/.pnpm/@conventional-changelog+git-client@2.6.0_conventional-commits-filter@5.0.0_conventional-commits-parser@6.2.1/node_modules/@conventional-changelog/git-client/dist/utils.js"() {
|
|
32353
|
-
"use strict";
|
|
32354
|
-
}
|
|
32355
|
-
});
|
|
32356
|
-
|
|
32357
|
-
// ../../node_modules/.pnpm/@simple-libs+stream-utils@1.2.0/node_modules/@simple-libs/stream-utils/dist/index.js
|
|
32358
|
-
async function toArray5(iterable) {
|
|
32359
|
-
const result = [];
|
|
32360
|
-
for await (const item of iterable) {
|
|
32361
|
-
result.push(item);
|
|
32362
|
-
}
|
|
32363
|
-
return result;
|
|
32364
|
-
}
|
|
32365
|
-
async function concatBufferStream2(iterable) {
|
|
32366
|
-
return Buffer.concat(await toArray5(iterable));
|
|
32367
|
-
}
|
|
32368
|
-
async function firstFromStream2(stream) {
|
|
32369
|
-
for await (const tag of stream) {
|
|
32370
|
-
return tag;
|
|
32371
|
-
}
|
|
32372
|
-
return null;
|
|
32373
|
-
}
|
|
32374
|
-
async function* splitStream2(stream, separator) {
|
|
32375
|
-
let chunk;
|
|
32376
|
-
let payload;
|
|
32377
|
-
let buffer = "";
|
|
32378
|
-
for await (chunk of stream) {
|
|
32379
|
-
buffer += chunk.toString();
|
|
32380
|
-
if (buffer.includes(separator)) {
|
|
32381
|
-
payload = buffer.split(separator);
|
|
32382
|
-
buffer = payload.pop() || "";
|
|
32383
|
-
yield* payload;
|
|
32384
|
-
}
|
|
32385
|
-
}
|
|
32386
|
-
if (buffer) {
|
|
32387
|
-
yield buffer;
|
|
32388
|
-
}
|
|
32389
|
-
}
|
|
32390
|
-
var init_dist10 = __esm({
|
|
32391
|
-
"../../node_modules/.pnpm/@simple-libs+stream-utils@1.2.0/node_modules/@simple-libs/stream-utils/dist/index.js"() {
|
|
32392
|
-
"use strict";
|
|
32393
32077
|
}
|
|
32394
32078
|
});
|
|
32395
32079
|
|
|
32396
|
-
// ../../node_modules/.pnpm
|
|
32397
|
-
|
|
32398
|
-
|
|
32399
|
-
|
|
32400
|
-
}
|
|
32401
|
-
return new Promise((resolve11) => process2.once("close", resolve11));
|
|
32402
|
-
}
|
|
32403
|
-
async function catchProcessError2(process2) {
|
|
32404
|
-
let error3 = new Error("Process exited with non-zero code");
|
|
32405
|
-
let stderr = "";
|
|
32406
|
-
process2.on("error", (err) => {
|
|
32407
|
-
error3 = err;
|
|
32408
|
-
});
|
|
32409
|
-
if (process2.stderr) {
|
|
32410
|
-
let chunk;
|
|
32411
|
-
for await (chunk of process2.stderr) {
|
|
32412
|
-
stderr += chunk.toString();
|
|
32413
|
-
}
|
|
32414
|
-
}
|
|
32415
|
-
const code = await exitCode2(process2);
|
|
32416
|
-
if (stderr) {
|
|
32417
|
-
error3 = new Error(stderr);
|
|
32418
|
-
}
|
|
32419
|
-
return code ? error3 : null;
|
|
32420
|
-
}
|
|
32421
|
-
async function* outputStream2(process2) {
|
|
32422
|
-
const { stdout } = process2;
|
|
32423
|
-
const errorPromise = catchProcessError2(process2);
|
|
32424
|
-
if (stdout) {
|
|
32425
|
-
stdout.on("error", (err) => {
|
|
32426
|
-
if (err.name === "AbortError" && process2.exitCode === null) {
|
|
32427
|
-
process2.kill("SIGKILL");
|
|
32428
|
-
}
|
|
32429
|
-
});
|
|
32430
|
-
yield* stdout;
|
|
32431
|
-
}
|
|
32432
|
-
const error3 = await errorPromise;
|
|
32433
|
-
if (error3) {
|
|
32434
|
-
throw error3;
|
|
32435
|
-
}
|
|
32436
|
-
}
|
|
32437
|
-
function output2(process2) {
|
|
32438
|
-
return concatBufferStream2(outputStream2(process2));
|
|
32080
|
+
// ../../node_modules/.pnpm/figlet@1.11.0/node_modules/figlet/dist/figlet-C8Ns3Vyn.js
|
|
32081
|
+
function escapeRegExpChar(char) {
|
|
32082
|
+
const specialChars = /[.*+?^${}()|[\]\\]/;
|
|
32083
|
+
return specialChars.test(char) ? "\\" + char : char;
|
|
32439
32084
|
}
|
|
32440
|
-
var
|
|
32441
|
-
|
|
32442
|
-
|
|
32443
|
-
init_dist10();
|
|
32444
|
-
}
|
|
32445
|
-
});
|
|
32446
|
-
|
|
32447
|
-
// ../../node_modules/.pnpm/@conventional-changelog+git-client@2.6.0_conventional-commits-filter@5.0.0_conventional-commits-parser@6.2.1/node_modules/@conventional-changelog/git-client/dist/GitClient.js
|
|
32448
|
-
import { spawn as spawn2 } from "child_process";
|
|
32449
|
-
var SCISSOR3, GitClient2;
|
|
32450
|
-
var init_GitClient2 = __esm({
|
|
32451
|
-
"../../node_modules/.pnpm/@conventional-changelog+git-client@2.6.0_conventional-commits-filter@5.0.0_conventional-commits-parser@6.2.1/node_modules/@conventional-changelog/git-client/dist/GitClient.js"() {
|
|
32085
|
+
var LAYOUT, FigletFont, fontList, renamedFonts, getFontName, figlet;
|
|
32086
|
+
var init_figlet_C8Ns3Vyn = __esm({
|
|
32087
|
+
"../../node_modules/.pnpm/figlet@1.11.0/node_modules/figlet/dist/figlet-C8Ns3Vyn.js"() {
|
|
32452
32088
|
"use strict";
|
|
32453
|
-
|
|
32454
|
-
|
|
32455
|
-
|
|
32456
|
-
|
|
32457
|
-
|
|
32458
|
-
|
|
32459
|
-
|
|
32460
|
-
constructor(
|
|
32461
|
-
this.
|
|
32462
|
-
this.
|
|
32463
|
-
|
|
32464
|
-
formatArgs(...args) {
|
|
32465
|
-
const finalArgs = formatArgs2(...args);
|
|
32466
|
-
if (this.debug) {
|
|
32467
|
-
this.debug(finalArgs);
|
|
32468
|
-
}
|
|
32469
|
-
return finalArgs;
|
|
32470
|
-
}
|
|
32471
|
-
/**
|
|
32472
|
-
* Raw exec method to run git commands.
|
|
32473
|
-
* @param args
|
|
32474
|
-
* @returns Stdout string output of the command.
|
|
32475
|
-
*/
|
|
32476
|
-
async exec(...args) {
|
|
32477
|
-
return (await output2(spawn2("git", this.formatArgs(...args), {
|
|
32478
|
-
cwd: this.cwd
|
|
32479
|
-
}))).toString().trim();
|
|
32480
|
-
}
|
|
32481
|
-
/**
|
|
32482
|
-
* Raw exec method to run git commands with stream output.
|
|
32483
|
-
* @param args
|
|
32484
|
-
* @returns Stdout stream of the command.
|
|
32485
|
-
*/
|
|
32486
|
-
execStream(...args) {
|
|
32487
|
-
return outputStream2(spawn2("git", this.formatArgs(...args), {
|
|
32488
|
-
cwd: this.cwd
|
|
32489
|
-
}));
|
|
32490
|
-
}
|
|
32491
|
-
/**
|
|
32492
|
-
* Initialize a new git repository.
|
|
32493
|
-
* @returns Boolean result.
|
|
32494
|
-
*/
|
|
32495
|
-
async init() {
|
|
32496
|
-
try {
|
|
32497
|
-
await this.exec("init");
|
|
32498
|
-
return true;
|
|
32499
|
-
} catch {
|
|
32500
|
-
return false;
|
|
32501
|
-
}
|
|
32502
|
-
}
|
|
32503
|
-
/**
|
|
32504
|
-
* Get raw commits stream.
|
|
32505
|
-
* @param params
|
|
32506
|
-
* @param params.path - Read commits from specific path.
|
|
32507
|
-
* @param params.from - Start commits range.
|
|
32508
|
-
* @param params.to - End commits range.
|
|
32509
|
-
* @param params.format - Commits format.
|
|
32510
|
-
* @yields Raw commits data.
|
|
32511
|
-
*/
|
|
32512
|
-
async *getRawCommits(params = {}) {
|
|
32513
|
-
const { path: path19, from = "", to = "HEAD", format: format2 = "%B", ignore, reverse: reverse2, merges, since } = params;
|
|
32514
|
-
const shouldNotIgnore = ignore ? (chunk2) => !ignore.test(chunk2) : () => true;
|
|
32515
|
-
const stdout = this.execStream("log", `--format=${format2}%n${SCISSOR3}`, since && `--since=${since instanceof Date ? since.toISOString() : since}`, reverse2 && "--reverse", merges && "--merges", merges === false && "--no-merges", [from, to].filter(Boolean).join(".."), ...path19 ? ["--", ...toArray4(path19)] : []);
|
|
32516
|
-
const commitsStream = splitStream2(stdout, `${SCISSOR3}
|
|
32517
|
-
`);
|
|
32518
|
-
let chunk;
|
|
32519
|
-
for await (chunk of commitsStream) {
|
|
32520
|
-
if (shouldNotIgnore(chunk)) {
|
|
32521
|
-
yield chunk;
|
|
32522
|
-
}
|
|
32523
|
-
}
|
|
32524
|
-
}
|
|
32525
|
-
/**
|
|
32526
|
-
* Get tags stream.
|
|
32527
|
-
* @param params
|
|
32528
|
-
* @yields Tags
|
|
32529
|
-
*/
|
|
32530
|
-
async *getTags(params = {}) {
|
|
32531
|
-
const { path: path19, from = "", to = "HEAD", since } = params;
|
|
32532
|
-
const tagRegex = /tag:\s*(.+?)[,)]/gi;
|
|
32533
|
-
const stdout = this.execStream("log", "--decorate", "--no-color", "--date-order", since && `--since=${since instanceof Date ? since.toISOString() : since}`, [from, to].filter(Boolean).join(".."), ...path19 ? ["--", ...toArray4(path19)] : []);
|
|
32534
|
-
let chunk;
|
|
32535
|
-
let matches;
|
|
32536
|
-
let tag;
|
|
32537
|
-
for await (chunk of stdout) {
|
|
32538
|
-
matches = chunk.toString().trim().matchAll(tagRegex);
|
|
32539
|
-
for ([, tag] of matches) {
|
|
32540
|
-
yield tag;
|
|
32541
|
-
}
|
|
32542
|
-
}
|
|
32543
|
-
}
|
|
32544
|
-
/**
|
|
32545
|
-
* Get last tag.
|
|
32546
|
-
* @param params
|
|
32547
|
-
* @returns Last tag, `null` if not found.
|
|
32548
|
-
*/
|
|
32549
|
-
async getLastTag(params) {
|
|
32550
|
-
return firstFromStream2(this.getTags(params));
|
|
32551
|
-
}
|
|
32552
|
-
/**
|
|
32553
|
-
* Check file is ignored via .gitignore.
|
|
32554
|
-
* @param file - Path to target file.
|
|
32555
|
-
* @returns Boolean value.
|
|
32556
|
-
*/
|
|
32557
|
-
async checkIgnore(file) {
|
|
32558
|
-
try {
|
|
32559
|
-
await this.exec("check-ignore", "--", file);
|
|
32560
|
-
return true;
|
|
32561
|
-
} catch {
|
|
32562
|
-
return false;
|
|
32563
|
-
}
|
|
32564
|
-
}
|
|
32565
|
-
/**
|
|
32566
|
-
* Add files to git index.
|
|
32567
|
-
* @param files - Files to stage.
|
|
32568
|
-
*/
|
|
32569
|
-
async add(files) {
|
|
32570
|
-
await this.exec("add", "--", ...toArray4(files));
|
|
32571
|
-
}
|
|
32572
|
-
/**
|
|
32573
|
-
* Commit changes.
|
|
32574
|
-
* @param params
|
|
32575
|
-
* @param params.verify
|
|
32576
|
-
* @param params.sign
|
|
32577
|
-
* @param params.files
|
|
32578
|
-
* @param params.allowEmpty
|
|
32579
|
-
* @param params.message
|
|
32580
|
-
*/
|
|
32581
|
-
async commit(params) {
|
|
32582
|
-
const { verify = true, sign = false, files = [], allowEmpty = false, message } = params;
|
|
32583
|
-
await this.exec("commit", !verify && "--no-verify", sign && "-S", allowEmpty && "--allow-empty", "-m", message, "--", ...files);
|
|
32584
|
-
}
|
|
32585
|
-
/**
|
|
32586
|
-
* Create a tag for the current commit.
|
|
32587
|
-
* @param params
|
|
32588
|
-
* @param params.sign
|
|
32589
|
-
* @param params.name
|
|
32590
|
-
* @param params.message
|
|
32591
|
-
*/
|
|
32592
|
-
async tag(params) {
|
|
32593
|
-
let { sign = false, name, message } = params;
|
|
32594
|
-
if (sign) {
|
|
32595
|
-
message = "";
|
|
32596
|
-
}
|
|
32597
|
-
await this.exec("tag", sign && "-s", message && "-a", ...message ? ["-m", message] : [], "--", name);
|
|
32598
|
-
}
|
|
32599
|
-
/**
|
|
32600
|
-
* Get current branch name.
|
|
32601
|
-
* @returns Current branch name.
|
|
32602
|
-
*/
|
|
32603
|
-
async getCurrentBranch() {
|
|
32604
|
-
const branch = await this.exec("rev-parse", "--abbrev-ref", "HEAD");
|
|
32605
|
-
return branch;
|
|
32606
|
-
}
|
|
32607
|
-
/**
|
|
32608
|
-
* Get default branch name.
|
|
32609
|
-
* @returns Default branch name.
|
|
32610
|
-
*/
|
|
32611
|
-
async getDefaultBranch() {
|
|
32612
|
-
const branch = (await this.exec("rev-parse", "--abbrev-ref", "origin/HEAD")).replace(/^origin\//, "");
|
|
32613
|
-
return branch;
|
|
32614
|
-
}
|
|
32615
|
-
/**
|
|
32616
|
-
* Push changes to remote.
|
|
32617
|
-
* @param branch
|
|
32618
|
-
* @param params
|
|
32619
|
-
* @param params.verify
|
|
32620
|
-
*/
|
|
32621
|
-
async push(branch, params = {}) {
|
|
32622
|
-
const { verify = true, tags: tags2 = false, followTags = false, force = false } = params;
|
|
32623
|
-
await this.exec("push", followTags && "--follow-tags", tags2 && "--tags", !verify && "--no-verify", force && "--force", "origin", "--", branch);
|
|
32624
|
-
}
|
|
32625
|
-
/**
|
|
32626
|
-
* Verify rev exists.
|
|
32627
|
-
* @param rev
|
|
32628
|
-
* @param safe - If `true`, will not throw error if rev not found.
|
|
32629
|
-
* @returns Target hash.
|
|
32630
|
-
*/
|
|
32631
|
-
async verify(rev, safe) {
|
|
32632
|
-
let git = this.exec("rev-parse", "--verify", rev);
|
|
32633
|
-
if (safe) {
|
|
32634
|
-
git = git.catch(() => "");
|
|
32635
|
-
}
|
|
32636
|
-
return await git;
|
|
32637
|
-
}
|
|
32638
|
-
/**
|
|
32639
|
-
* Get config value by key.
|
|
32640
|
-
* @param key - Config key.
|
|
32641
|
-
* @returns Config value.
|
|
32642
|
-
*/
|
|
32643
|
-
async getConfig(key) {
|
|
32644
|
-
return await this.exec("config", "--get", "--", key);
|
|
32645
|
-
}
|
|
32646
|
-
/**
|
|
32647
|
-
* Set config value by key.
|
|
32648
|
-
* @param key - Config key.
|
|
32649
|
-
* @param value - Config value.
|
|
32650
|
-
*/
|
|
32651
|
-
async setConfig(key, value) {
|
|
32652
|
-
await this.exec("config", "--", key, value);
|
|
32653
|
-
}
|
|
32654
|
-
/**
|
|
32655
|
-
* Fetch changes from remote.
|
|
32656
|
-
* @param params
|
|
32657
|
-
*/
|
|
32658
|
-
async fetch(params = {}) {
|
|
32659
|
-
const { prune = false, unshallow = false, tags: tags2 = false, all = false, remote, branch } = params;
|
|
32660
|
-
await this.exec("fetch", prune && "--prune", unshallow && "--unshallow", tags2 && "--tags", all && "--all", ...remote && branch ? [
|
|
32661
|
-
"--",
|
|
32662
|
-
remote,
|
|
32663
|
-
branch
|
|
32664
|
-
] : []);
|
|
32665
|
-
}
|
|
32666
|
-
/**
|
|
32667
|
-
* Create a new branch.
|
|
32668
|
-
* @param branch - Branch name.
|
|
32669
|
-
*/
|
|
32670
|
-
async createBranch(branch) {
|
|
32671
|
-
await this.exec("checkout", "-b", branch);
|
|
32672
|
-
}
|
|
32673
|
-
/**
|
|
32674
|
-
* Delete a branch.
|
|
32675
|
-
* @param branch - Branch name.
|
|
32676
|
-
*/
|
|
32677
|
-
async deleteBranch(branch) {
|
|
32678
|
-
await this.exec("branch", "-D", "--", branch);
|
|
32679
|
-
}
|
|
32680
|
-
/**
|
|
32681
|
-
* Checkout a branch.
|
|
32682
|
-
* @param branch - Branch name.
|
|
32683
|
-
*/
|
|
32684
|
-
async checkout(branch) {
|
|
32685
|
-
await this.exec("checkout", branch);
|
|
32686
|
-
}
|
|
32687
|
-
};
|
|
32688
|
-
}
|
|
32689
|
-
});
|
|
32690
|
-
|
|
32691
|
-
// ../../node_modules/.pnpm/@conventional-changelog+git-client@2.6.0_conventional-commits-filter@5.0.0_conventional-commits-parser@6.2.1/node_modules/@conventional-changelog/git-client/dist/ConventionalGitClient.js
|
|
32692
|
-
function packagePrefix2(packageName) {
|
|
32693
|
-
if (!packageName) {
|
|
32694
|
-
return /^.+@/;
|
|
32695
|
-
}
|
|
32696
|
-
return `${packageName}@`;
|
|
32697
|
-
}
|
|
32698
|
-
var import_semver3, ConventionalGitClient2;
|
|
32699
|
-
var init_ConventionalGitClient2 = __esm({
|
|
32700
|
-
"../../node_modules/.pnpm/@conventional-changelog+git-client@2.6.0_conventional-commits-filter@5.0.0_conventional-commits-parser@6.2.1/node_modules/@conventional-changelog/git-client/dist/ConventionalGitClient.js"() {
|
|
32701
|
-
"use strict";
|
|
32702
|
-
import_semver3 = __toESM(require_semver2(), 1);
|
|
32703
|
-
init_dist10();
|
|
32704
|
-
init_GitClient2();
|
|
32705
|
-
ConventionalGitClient2 = class extends GitClient2 {
|
|
32706
|
-
deps = null;
|
|
32707
|
-
loadDeps() {
|
|
32708
|
-
if (this.deps) {
|
|
32709
|
-
return this.deps;
|
|
32710
|
-
}
|
|
32711
|
-
this.deps = Promise.all([
|
|
32712
|
-
Promise.resolve().then(() => (init_dist5(), dist_exports3)).then(({ parseCommits: parseCommits2 }) => parseCommits2),
|
|
32713
|
-
Promise.resolve().then(() => (init_dist6(), dist_exports4)).then(({ filterRevertedCommits: filterRevertedCommits2 }) => filterRevertedCommits2)
|
|
32714
|
-
]);
|
|
32715
|
-
return this.deps;
|
|
32716
|
-
}
|
|
32717
|
-
/**
|
|
32718
|
-
* Get parsed commits stream.
|
|
32719
|
-
* @param params
|
|
32720
|
-
* @param params.path - Read commits from specific path.
|
|
32721
|
-
* @param params.from - Start commits range.
|
|
32722
|
-
* @param params.to - End commits range.
|
|
32723
|
-
* @param params.format - Commits format.
|
|
32724
|
-
* @param parserOptions - Commit parser options.
|
|
32725
|
-
* @yields Raw commits data.
|
|
32726
|
-
*/
|
|
32727
|
-
async *getCommits(params = {}, parserOptions = {}) {
|
|
32728
|
-
const { filterReverts, ...gitLogParams } = params;
|
|
32729
|
-
const [parseCommits2, filterRevertedCommits2] = await this.loadDeps();
|
|
32730
|
-
if (filterReverts) {
|
|
32731
|
-
yield* filterRevertedCommits2(this.getCommits(gitLogParams, parserOptions));
|
|
32732
|
-
return;
|
|
32733
|
-
}
|
|
32734
|
-
const parse4 = parseCommits2(parserOptions);
|
|
32735
|
-
const commitsStream = this.getRawCommits(gitLogParams);
|
|
32736
|
-
yield* parse4(commitsStream);
|
|
32737
|
-
}
|
|
32738
|
-
/**
|
|
32739
|
-
* Get semver tags stream.
|
|
32740
|
-
* @param params
|
|
32741
|
-
* @param params.prefix - Get semver tags with specific prefix.
|
|
32742
|
-
* @param params.skipUnstable - Skip semver tags with unstable versions.
|
|
32743
|
-
* @param params.clean - Clean version from prefix and trash.
|
|
32744
|
-
* @yields Semver tags.
|
|
32745
|
-
*/
|
|
32746
|
-
async *getSemverTags(params = {}) {
|
|
32747
|
-
const { prefix, skipUnstable, clean } = params;
|
|
32748
|
-
const tagsStream = this.getTags();
|
|
32749
|
-
const unstableTagRegex = /\d+\.\d+\.\d+-.+/;
|
|
32750
|
-
const cleanTag = clean ? (tag2, unprefixed2) => import_semver3.default.clean(unprefixed2 || tag2) : (tag2) => tag2;
|
|
32751
|
-
let unprefixed;
|
|
32752
|
-
let tag;
|
|
32753
|
-
for await (tag of tagsStream) {
|
|
32754
|
-
if (skipUnstable && unstableTagRegex.test(tag)) {
|
|
32755
|
-
continue;
|
|
32756
|
-
}
|
|
32757
|
-
if (prefix) {
|
|
32758
|
-
const isPrefixed = typeof prefix === "string" ? tag.startsWith(prefix) : prefix.test(tag);
|
|
32759
|
-
if (isPrefixed) {
|
|
32760
|
-
unprefixed = tag.replace(prefix, "");
|
|
32761
|
-
if (import_semver3.default.valid(unprefixed)) {
|
|
32762
|
-
tag = cleanTag(tag, unprefixed);
|
|
32763
|
-
if (tag) {
|
|
32764
|
-
yield tag;
|
|
32765
|
-
}
|
|
32766
|
-
}
|
|
32767
|
-
}
|
|
32768
|
-
} else if (import_semver3.default.valid(tag)) {
|
|
32769
|
-
tag = cleanTag(tag);
|
|
32770
|
-
if (tag) {
|
|
32771
|
-
yield tag;
|
|
32772
|
-
}
|
|
32773
|
-
}
|
|
32774
|
-
}
|
|
32775
|
-
}
|
|
32776
|
-
/**
|
|
32777
|
-
* Get last semver tag.
|
|
32778
|
-
* @param params - getSemverTags params.
|
|
32779
|
-
* @returns Last semver tag, `null` if not found.
|
|
32780
|
-
*/
|
|
32781
|
-
async getLastSemverTag(params = {}) {
|
|
32782
|
-
return firstFromStream2(this.getSemverTags(params));
|
|
32783
|
-
}
|
|
32784
|
-
/**
|
|
32785
|
-
* Get current sematic version from git tags.
|
|
32786
|
-
* @param params - Additional git params.
|
|
32787
|
-
* @returns Current sematic version, `null` if not found.
|
|
32788
|
-
*/
|
|
32789
|
-
async getVersionFromTags(params = {}) {
|
|
32790
|
-
const semverTagsStream = this.getSemverTags({
|
|
32791
|
-
clean: true,
|
|
32792
|
-
...params
|
|
32793
|
-
});
|
|
32794
|
-
const semverTags = [];
|
|
32795
|
-
for await (const tag of semverTagsStream) {
|
|
32796
|
-
semverTags.push(tag);
|
|
32797
|
-
}
|
|
32798
|
-
if (!semverTags.length) {
|
|
32799
|
-
return null;
|
|
32800
|
-
}
|
|
32801
|
-
return semverTags.sort(import_semver3.default.rcompare)[0] || null;
|
|
32802
|
-
}
|
|
32803
|
-
};
|
|
32804
|
-
}
|
|
32805
|
-
});
|
|
32806
|
-
|
|
32807
|
-
// ../../node_modules/.pnpm/@conventional-changelog+git-client@2.6.0_conventional-commits-filter@5.0.0_conventional-commits-parser@6.2.1/node_modules/@conventional-changelog/git-client/dist/index.js
|
|
32808
|
-
var init_dist12 = __esm({
|
|
32809
|
-
"../../node_modules/.pnpm/@conventional-changelog+git-client@2.6.0_conventional-commits-filter@5.0.0_conventional-commits-parser@6.2.1/node_modules/@conventional-changelog/git-client/dist/index.js"() {
|
|
32810
|
-
"use strict";
|
|
32811
|
-
init_types4();
|
|
32812
|
-
init_utils8();
|
|
32813
|
-
init_GitClient2();
|
|
32814
|
-
init_ConventionalGitClient2();
|
|
32815
|
-
}
|
|
32816
|
-
});
|
|
32817
|
-
|
|
32818
|
-
// ../../node_modules/.pnpm/git-semver-tags@8.0.1_conventional-commits-filter@5.0.0_conventional-commits-parser@6.2.1/node_modules/git-semver-tags/src/index.js
|
|
32819
|
-
function getFinalOptions(options = {}) {
|
|
32820
|
-
if (options.package && !options.lernaTags) {
|
|
32821
|
-
throw new Error("opts.package should only be used when running in lerna mode");
|
|
32822
|
-
}
|
|
32823
|
-
const finalOptions = {
|
|
32824
|
-
cwd: options.cwd || process.cwd(),
|
|
32825
|
-
prefix: options.lernaTags ? packagePrefix2(options.package) : options.tagPrefix,
|
|
32826
|
-
skipUnstable: options.skipUnstable
|
|
32827
|
-
};
|
|
32828
|
-
return finalOptions;
|
|
32829
|
-
}
|
|
32830
|
-
async function getSemverTags(options = {}) {
|
|
32831
|
-
const {
|
|
32832
|
-
cwd: cwd3,
|
|
32833
|
-
...finalOptions
|
|
32834
|
-
} = getFinalOptions(options);
|
|
32835
|
-
const client = new ConventionalGitClient2(cwd3);
|
|
32836
|
-
const tags2 = [];
|
|
32837
|
-
for await (const tag of client.getSemverTags(finalOptions)) {
|
|
32838
|
-
tags2.push(tag);
|
|
32839
|
-
}
|
|
32840
|
-
return tags2;
|
|
32841
|
-
}
|
|
32842
|
-
var init_src = __esm({
|
|
32843
|
-
"../../node_modules/.pnpm/git-semver-tags@8.0.1_conventional-commits-filter@5.0.0_conventional-commits-parser@6.2.1/node_modules/git-semver-tags/src/index.js"() {
|
|
32844
|
-
"use strict";
|
|
32845
|
-
init_dist12();
|
|
32846
|
-
}
|
|
32847
|
-
});
|
|
32848
|
-
|
|
32849
|
-
// ../../node_modules/.pnpm/figlet@1.11.0/node_modules/figlet/dist/figlet-C8Ns3Vyn.js
|
|
32850
|
-
function escapeRegExpChar(char) {
|
|
32851
|
-
const specialChars = /[.*+?^${}()|[\]\\]/;
|
|
32852
|
-
return specialChars.test(char) ? "\\" + char : char;
|
|
32853
|
-
}
|
|
32854
|
-
var LAYOUT, FigletFont, fontList, renamedFonts, getFontName, figlet;
|
|
32855
|
-
var init_figlet_C8Ns3Vyn = __esm({
|
|
32856
|
-
"../../node_modules/.pnpm/figlet@1.11.0/node_modules/figlet/dist/figlet-C8Ns3Vyn.js"() {
|
|
32857
|
-
"use strict";
|
|
32858
|
-
LAYOUT = {
|
|
32859
|
-
FULL_WIDTH: 0,
|
|
32860
|
-
FITTING: 1,
|
|
32861
|
-
SMUSHING: 2,
|
|
32862
|
-
CONTROLLED_SMUSHING: 3
|
|
32863
|
-
};
|
|
32864
|
-
FigletFont = class {
|
|
32865
|
-
constructor() {
|
|
32866
|
-
this.comment = "";
|
|
32867
|
-
this.numChars = 0;
|
|
32868
|
-
this.options = {};
|
|
32089
|
+
LAYOUT = {
|
|
32090
|
+
FULL_WIDTH: 0,
|
|
32091
|
+
FITTING: 1,
|
|
32092
|
+
SMUSHING: 2,
|
|
32093
|
+
CONTROLLED_SMUSHING: 3
|
|
32094
|
+
};
|
|
32095
|
+
FigletFont = class {
|
|
32096
|
+
constructor() {
|
|
32097
|
+
this.comment = "";
|
|
32098
|
+
this.numChars = 0;
|
|
32099
|
+
this.options = {};
|
|
32869
32100
|
}
|
|
32870
32101
|
};
|
|
32871
32102
|
fontList = [
|
|
@@ -34188,7 +33419,7 @@ var init_figlet_C8Ns3Vyn = __esm({
|
|
|
34188
33419
|
|
|
34189
33420
|
// ../../node_modules/.pnpm/figlet@1.11.0/node_modules/figlet/dist/node-figlet.mjs
|
|
34190
33421
|
import * as fs12 from "fs";
|
|
34191
|
-
import * as
|
|
33422
|
+
import * as path10 from "path";
|
|
34192
33423
|
import { fileURLToPath as fileURLToPath2 } from "url";
|
|
34193
33424
|
var __filename, __dirname2, fontPath, nodeFiglet;
|
|
34194
33425
|
var init_node_figlet = __esm({
|
|
@@ -34196,8 +33427,8 @@ var init_node_figlet = __esm({
|
|
|
34196
33427
|
"use strict";
|
|
34197
33428
|
init_figlet_C8Ns3Vyn();
|
|
34198
33429
|
__filename = fileURLToPath2(import.meta.url);
|
|
34199
|
-
__dirname2 =
|
|
34200
|
-
fontPath =
|
|
33430
|
+
__dirname2 = path10.dirname(__filename);
|
|
33431
|
+
fontPath = path10.join(__dirname2, "/../fonts/");
|
|
34201
33432
|
nodeFiglet = figlet;
|
|
34202
33433
|
nodeFiglet.defaults({ fontPath });
|
|
34203
33434
|
nodeFiglet.loadFont = function(name, callback2) {
|
|
@@ -34211,7 +33442,7 @@ var init_node_figlet = __esm({
|
|
|
34211
33442
|
return;
|
|
34212
33443
|
}
|
|
34213
33444
|
fs12.readFile(
|
|
34214
|
-
|
|
33445
|
+
path10.join(nodeFiglet.defaults().fontPath, actualFontName + ".flf"),
|
|
34215
33446
|
{ encoding: "utf-8" },
|
|
34216
33447
|
(err, fontData) => {
|
|
34217
33448
|
if (err) {
|
|
@@ -34248,7 +33479,7 @@ var init_node_figlet = __esm({
|
|
|
34248
33479
|
return nodeFiglet.figFonts[actualFontName].options;
|
|
34249
33480
|
}
|
|
34250
33481
|
const fontData = fs12.readFileSync(
|
|
34251
|
-
|
|
33482
|
+
path10.join(nodeFiglet.defaults().fontPath, actualFontName + ".flf"),
|
|
34252
33483
|
{
|
|
34253
33484
|
encoding: "utf-8"
|
|
34254
33485
|
}
|
|
@@ -35327,7 +34558,7 @@ var init_escape = __esm({
|
|
|
35327
34558
|
});
|
|
35328
34559
|
|
|
35329
34560
|
// ../../node_modules/.pnpm/minimatch@10.2.5/node_modules/minimatch/dist/esm/index.js
|
|
35330
|
-
var minimatch, starDotExtRE, starDotExtTest, starDotExtTestDot, starDotExtTestNocase, starDotExtTestNocaseDot, starDotStarRE, starDotStarTest, starDotStarTestDot, dotStarRE, dotStarTest, starRE, starTest, starTestDot, qmarksRE, qmarksTestNocase, qmarksTestNocaseDot, qmarksTestDot, qmarksTest, qmarksTestNoExt, qmarksTestNoExtDot, defaultPlatform,
|
|
34561
|
+
var minimatch, starDotExtRE, starDotExtTest, starDotExtTestDot, starDotExtTestNocase, starDotExtTestNocaseDot, starDotStarRE, starDotStarTest, starDotStarTestDot, dotStarRE, dotStarTest, starRE, starTest, starTestDot, qmarksRE, qmarksTestNocase, qmarksTestNocaseDot, qmarksTestDot, qmarksTest, qmarksTestNoExt, qmarksTestNoExtDot, defaultPlatform, path11, sep2, GLOBSTAR, qmark2, star2, twoStarDot, twoStarNoDot, filter2, ext, defaults2, braceExpand, makeRe, match, globMagic, regExpEscape2, Minimatch;
|
|
35331
34562
|
var init_esm3 = __esm({
|
|
35332
34563
|
"../../node_modules/.pnpm/minimatch@10.2.5/node_modules/minimatch/dist/esm/index.js"() {
|
|
35333
34564
|
"use strict";
|
|
@@ -35397,11 +34628,11 @@ var init_esm3 = __esm({
|
|
|
35397
34628
|
return (f) => f.length === len && f !== "." && f !== "..";
|
|
35398
34629
|
};
|
|
35399
34630
|
defaultPlatform = typeof process === "object" && process ? typeof process.env === "object" && process.env && process.env.__MINIMATCH_TESTING_PLATFORM__ || process.platform : "posix";
|
|
35400
|
-
|
|
34631
|
+
path11 = {
|
|
35401
34632
|
win32: { sep: "\\" },
|
|
35402
34633
|
posix: { sep: "/" }
|
|
35403
34634
|
};
|
|
35404
|
-
sep2 = defaultPlatform === "win32" ?
|
|
34635
|
+
sep2 = defaultPlatform === "win32" ? path11.win32.sep : path11.posix.sep;
|
|
35405
34636
|
minimatch.sep = sep2;
|
|
35406
34637
|
GLOBSTAR = /* @__PURE__ */ Symbol("globstar **");
|
|
35407
34638
|
minimatch.GLOBSTAR = GLOBSTAR;
|
|
@@ -36153,25 +35384,25 @@ var init_esm3 = __esm({
|
|
|
36153
35384
|
import { createRequire as createRequire2 } from "module";
|
|
36154
35385
|
import { basename, dirname as dirname11, normalize as normalize2, relative, resolve as resolve8, sep as sep3 } from "path";
|
|
36155
35386
|
import * as nativeFs from "fs";
|
|
36156
|
-
function cleanPath(
|
|
36157
|
-
let normalized = normalize2(
|
|
35387
|
+
function cleanPath(path18) {
|
|
35388
|
+
let normalized = normalize2(path18);
|
|
36158
35389
|
if (normalized.length > 1 && normalized[normalized.length - 1] === sep3) normalized = normalized.substring(0, normalized.length - 1);
|
|
36159
35390
|
return normalized;
|
|
36160
35391
|
}
|
|
36161
|
-
function convertSlashes(
|
|
36162
|
-
return
|
|
35392
|
+
function convertSlashes(path18, separator) {
|
|
35393
|
+
return path18.replace(SLASHES_REGEX, separator);
|
|
36163
35394
|
}
|
|
36164
|
-
function isRootDirectory(
|
|
36165
|
-
return
|
|
35395
|
+
function isRootDirectory(path18) {
|
|
35396
|
+
return path18 === "/" || WINDOWS_ROOT_DIR_REGEX.test(path18);
|
|
36166
35397
|
}
|
|
36167
|
-
function normalizePath(
|
|
35398
|
+
function normalizePath(path18, options) {
|
|
36168
35399
|
const { resolvePaths: resolvePaths2, normalizePath: normalizePath$1, pathSeparator } = options;
|
|
36169
|
-
const pathNeedsCleaning = process.platform === "win32" &&
|
|
36170
|
-
if (resolvePaths2)
|
|
36171
|
-
if (normalizePath$1 || pathNeedsCleaning)
|
|
36172
|
-
if (
|
|
36173
|
-
const needsSeperator =
|
|
36174
|
-
return convertSlashes(needsSeperator ?
|
|
35400
|
+
const pathNeedsCleaning = process.platform === "win32" && path18.includes("/") || path18.startsWith(".");
|
|
35401
|
+
if (resolvePaths2) path18 = resolve8(path18);
|
|
35402
|
+
if (normalizePath$1 || pathNeedsCleaning) path18 = cleanPath(path18);
|
|
35403
|
+
if (path18 === ".") return "";
|
|
35404
|
+
const needsSeperator = path18[path18.length - 1] !== pathSeparator;
|
|
35405
|
+
return convertSlashes(needsSeperator ? path18 + pathSeparator : path18, pathSeparator);
|
|
36175
35406
|
}
|
|
36176
35407
|
function joinPathWithBasePath(filename, directoryPath) {
|
|
36177
35408
|
return directoryPath + filename;
|
|
@@ -36227,9 +35458,9 @@ function build$2(options, isSynchronous) {
|
|
|
36227
35458
|
if (!options.resolveSymlinks || options.excludeSymlinks) return null;
|
|
36228
35459
|
return isSynchronous ? resolveSymlinks : resolveSymlinksAsync;
|
|
36229
35460
|
}
|
|
36230
|
-
function isRecursive(
|
|
35461
|
+
function isRecursive(path18, resolved, state) {
|
|
36231
35462
|
if (state.options.useRealPaths) return isRecursiveUsingRealPaths(resolved, state);
|
|
36232
|
-
let parent = dirname11(
|
|
35463
|
+
let parent = dirname11(path18);
|
|
36233
35464
|
let depth = 1;
|
|
36234
35465
|
while (parent !== state.root && depth < 2) {
|
|
36235
35466
|
const resolvedPath = state.symlinks.get(parent);
|
|
@@ -36237,7 +35468,7 @@ function isRecursive(path19, resolved, state) {
|
|
|
36237
35468
|
if (isSameRoot) depth++;
|
|
36238
35469
|
else parent = dirname11(parent);
|
|
36239
35470
|
}
|
|
36240
|
-
state.symlinks.set(
|
|
35471
|
+
state.symlinks.set(path18, resolved);
|
|
36241
35472
|
return depth > 1;
|
|
36242
35473
|
}
|
|
36243
35474
|
function isRecursiveUsingRealPaths(resolved, state) {
|
|
@@ -36274,7 +35505,7 @@ function sync(root, options) {
|
|
|
36274
35505
|
return walker.start();
|
|
36275
35506
|
}
|
|
36276
35507
|
var __require2, SLASHES_REGEX, WINDOWS_ROOT_DIR_REGEX, pushDirectory, pushDirectoryFilter, empty$2, pushFileFilterAndCount, pushFileFilter, pushFileCount, pushFile, empty$1, getArray, getArrayGroup, groupFiles, empty, resolveSymlinksAsync, resolveSymlinks, onlyCountsSync, groupsSync, defaultSync, limitFilesSync, onlyCountsAsync, defaultAsync, limitFilesAsync, groupsAsync, readdirOpts, walkAsync, walkSync, Queue, Counter, Aborter, Walker, APIBuilder, pm, Builder;
|
|
36277
|
-
var
|
|
35508
|
+
var init_dist8 = __esm({
|
|
36278
35509
|
"../../node_modules/.pnpm/fdir@6.5.0_picomatch@4.0.4/node_modules/fdir/dist/index.mjs"() {
|
|
36279
35510
|
"use strict";
|
|
36280
35511
|
__require2 = /* @__PURE__ */ createRequire2(import.meta.url);
|
|
@@ -36284,8 +35515,8 @@ var init_dist13 = __esm({
|
|
|
36284
35515
|
paths.push(directoryPath || ".");
|
|
36285
35516
|
};
|
|
36286
35517
|
pushDirectoryFilter = (directoryPath, paths, filters2) => {
|
|
36287
|
-
const
|
|
36288
|
-
if (filters2.every((filter3) => filter3(
|
|
35518
|
+
const path18 = directoryPath || ".";
|
|
35519
|
+
if (filters2.every((filter3) => filter3(path18, true))) paths.push(path18);
|
|
36289
35520
|
};
|
|
36290
35521
|
empty$2 = () => {
|
|
36291
35522
|
};
|
|
@@ -36318,26 +35549,26 @@ var init_dist13 = __esm({
|
|
|
36318
35549
|
};
|
|
36319
35550
|
empty = () => {
|
|
36320
35551
|
};
|
|
36321
|
-
resolveSymlinksAsync = function(
|
|
35552
|
+
resolveSymlinksAsync = function(path18, state, callback$1) {
|
|
36322
35553
|
const { queue, fs: fs19, options: { suppressErrors } } = state;
|
|
36323
35554
|
queue.enqueue();
|
|
36324
|
-
fs19.realpath(
|
|
35555
|
+
fs19.realpath(path18, (error3, resolvedPath) => {
|
|
36325
35556
|
if (error3) return queue.dequeue(suppressErrors ? null : error3, state);
|
|
36326
35557
|
fs19.stat(resolvedPath, (error$1, stat2) => {
|
|
36327
35558
|
if (error$1) return queue.dequeue(suppressErrors ? null : error$1, state);
|
|
36328
|
-
if (stat2.isDirectory() && isRecursive(
|
|
35559
|
+
if (stat2.isDirectory() && isRecursive(path18, resolvedPath, state)) return queue.dequeue(null, state);
|
|
36329
35560
|
callback$1(stat2, resolvedPath);
|
|
36330
35561
|
queue.dequeue(null, state);
|
|
36331
35562
|
});
|
|
36332
35563
|
});
|
|
36333
35564
|
};
|
|
36334
|
-
resolveSymlinks = function(
|
|
35565
|
+
resolveSymlinks = function(path18, state, callback$1) {
|
|
36335
35566
|
const { queue, fs: fs19, options: { suppressErrors } } = state;
|
|
36336
35567
|
queue.enqueue();
|
|
36337
35568
|
try {
|
|
36338
|
-
const resolvedPath = fs19.realpathSync(
|
|
35569
|
+
const resolvedPath = fs19.realpathSync(path18);
|
|
36339
35570
|
const stat2 = fs19.statSync(resolvedPath);
|
|
36340
|
-
if (stat2.isDirectory() && isRecursive(
|
|
35571
|
+
if (stat2.isDirectory() && isRecursive(path18, resolvedPath, state)) return;
|
|
36341
35572
|
callback$1(stat2, resolvedPath);
|
|
36342
35573
|
} catch (e) {
|
|
36343
35574
|
if (!suppressErrors) throw e;
|
|
@@ -36495,19 +35726,19 @@ var init_dist13 = __esm({
|
|
|
36495
35726
|
const filename = this.joinPath(entry.name, directoryPath);
|
|
36496
35727
|
this.pushFile(filename, files, this.state.counts, filters2);
|
|
36497
35728
|
} else if (entry.isDirectory()) {
|
|
36498
|
-
let
|
|
36499
|
-
if (exclude && exclude(entry.name,
|
|
36500
|
-
this.pushDirectory(
|
|
36501
|
-
this.walkDirectory(this.state,
|
|
35729
|
+
let path18 = joinDirectoryPath(entry.name, directoryPath, this.state.options.pathSeparator);
|
|
35730
|
+
if (exclude && exclude(entry.name, path18)) continue;
|
|
35731
|
+
this.pushDirectory(path18, paths, filters2);
|
|
35732
|
+
this.walkDirectory(this.state, path18, path18, depth - 1, this.walk);
|
|
36502
35733
|
} else if (this.resolveSymlink && entry.isSymbolicLink()) {
|
|
36503
|
-
let
|
|
36504
|
-
this.resolveSymlink(
|
|
35734
|
+
let path18 = joinPathWithBasePath(entry.name, directoryPath);
|
|
35735
|
+
this.resolveSymlink(path18, this.state, (stat2, resolvedPath) => {
|
|
36505
35736
|
if (stat2.isDirectory()) {
|
|
36506
35737
|
resolvedPath = normalizePath(resolvedPath, this.state.options);
|
|
36507
|
-
if (exclude && exclude(entry.name, useRealPaths ? resolvedPath :
|
|
36508
|
-
this.walkDirectory(this.state, resolvedPath, useRealPaths ? resolvedPath :
|
|
35738
|
+
if (exclude && exclude(entry.name, useRealPaths ? resolvedPath : path18 + pathSeparator)) return;
|
|
35739
|
+
this.walkDirectory(this.state, resolvedPath, useRealPaths ? resolvedPath : path18 + pathSeparator, depth - 1, this.walk);
|
|
36509
35740
|
} else {
|
|
36510
|
-
resolvedPath = useRealPaths ? resolvedPath :
|
|
35741
|
+
resolvedPath = useRealPaths ? resolvedPath : path18;
|
|
36511
35742
|
const filename = basename(resolvedPath);
|
|
36512
35743
|
const directoryPath$1 = normalizePath(dirname11(resolvedPath), this.state.options);
|
|
36513
35744
|
resolvedPath = this.joinPath(filename, directoryPath$1);
|
|
@@ -36652,12 +35883,12 @@ var init_dist13 = __esm({
|
|
|
36652
35883
|
globWithOptions(patterns, ...options) {
|
|
36653
35884
|
const globFn = this.globFunction || pm;
|
|
36654
35885
|
if (!globFn) throw new Error("Please specify a glob function to use glob matching.");
|
|
36655
|
-
var
|
|
36656
|
-
if (!
|
|
36657
|
-
|
|
36658
|
-
this.globCache[patterns.join("\0")] =
|
|
35886
|
+
var isMatch3 = this.globCache[patterns.join("\0")];
|
|
35887
|
+
if (!isMatch3) {
|
|
35888
|
+
isMatch3 = globFn(patterns, ...options);
|
|
35889
|
+
this.globCache[patterns.join("\0")] = isMatch3;
|
|
36659
35890
|
}
|
|
36660
|
-
this.options.filters.push((
|
|
35891
|
+
this.options.filters.push((path18) => isMatch3(path18));
|
|
36661
35892
|
return this;
|
|
36662
35893
|
}
|
|
36663
35894
|
};
|
|
@@ -36919,8 +36150,8 @@ var require_utils2 = __commonJS({
|
|
|
36919
36150
|
}
|
|
36920
36151
|
return output3;
|
|
36921
36152
|
};
|
|
36922
|
-
exports2.basename = (
|
|
36923
|
-
const segs =
|
|
36153
|
+
exports2.basename = (path18, { windows } = {}) => {
|
|
36154
|
+
const segs = path18.split(windows ? /[\\/]/ : "/");
|
|
36924
36155
|
const last2 = segs[segs.length - 1];
|
|
36925
36156
|
if (last2 === "") {
|
|
36926
36157
|
return segs[segs.length - 2];
|
|
@@ -38270,8 +37501,8 @@ var require_picomatch = __commonJS({
|
|
|
38270
37501
|
if (Array.isArray(glob2)) {
|
|
38271
37502
|
const fns = glob2.map((input) => picomatch2(input, options, returnState));
|
|
38272
37503
|
const arrayMatcher = (str3) => {
|
|
38273
|
-
for (const
|
|
38274
|
-
const state2 =
|
|
37504
|
+
for (const isMatch3 of fns) {
|
|
37505
|
+
const state2 = isMatch3(str3);
|
|
38275
37506
|
if (state2) return state2;
|
|
38276
37507
|
}
|
|
38277
37508
|
return false;
|
|
@@ -38293,12 +37524,12 @@ var require_picomatch = __commonJS({
|
|
|
38293
37524
|
isIgnored = picomatch2(opts.ignore, ignoreOpts, returnState);
|
|
38294
37525
|
}
|
|
38295
37526
|
const matcher = (input, returnObject = false) => {
|
|
38296
|
-
const { isMatch:
|
|
38297
|
-
const result = { glob: glob2, state, regex, posix: posix2, input, output: output3, match: match2, isMatch:
|
|
37527
|
+
const { isMatch: isMatch3, match: match2, output: output3 } = picomatch2.test(input, regex, options, { glob: glob2, posix: posix2 });
|
|
37528
|
+
const result = { glob: glob2, state, regex, posix: posix2, input, output: output3, match: match2, isMatch: isMatch3 };
|
|
38298
37529
|
if (typeof opts.onResult === "function") {
|
|
38299
37530
|
opts.onResult(result);
|
|
38300
37531
|
}
|
|
38301
|
-
if (
|
|
37532
|
+
if (isMatch3 === false) {
|
|
38302
37533
|
result.isMatch = false;
|
|
38303
37534
|
return returnObject ? result : false;
|
|
38304
37535
|
}
|
|
@@ -38416,7 +37647,7 @@ var require_picomatch2 = __commonJS({
|
|
|
38416
37647
|
|
|
38417
37648
|
// ../../node_modules/.pnpm/tinyglobby@0.2.15/node_modules/tinyglobby/dist/index.mjs
|
|
38418
37649
|
import nativeFs2 from "fs";
|
|
38419
|
-
import
|
|
37650
|
+
import path12, { posix } from "path";
|
|
38420
37651
|
import { fileURLToPath as fileURLToPath3 } from "url";
|
|
38421
37652
|
function getPartialMatcher(patterns, options = {}) {
|
|
38422
37653
|
const patternsCount = patterns.length;
|
|
@@ -38499,7 +37730,7 @@ function normalizePattern(pattern, expandDirectories, cwd3, props, isIgnore) {
|
|
|
38499
37730
|
if (pattern.endsWith("/")) result = pattern.slice(0, -1);
|
|
38500
37731
|
if (!result.endsWith("*") && expandDirectories) result += "/**";
|
|
38501
37732
|
const escapedCwd = escapePath(cwd3);
|
|
38502
|
-
if (
|
|
37733
|
+
if (path12.isAbsolute(result.replace(ESCAPING_BACKSLASHES, ""))) result = posix.relative(escapedCwd, result);
|
|
38503
37734
|
else result = posix.normalize(result);
|
|
38504
37735
|
const parentDirectoryMatch = PARENT_DIRECTORY.exec(result);
|
|
38505
37736
|
const parts = splitPattern(result);
|
|
@@ -38566,7 +37797,7 @@ function formatPaths(paths, relative2) {
|
|
|
38566
37797
|
function normalizeCwd(cwd3) {
|
|
38567
37798
|
if (!cwd3) return process.cwd().replace(BACKSLASHES, "/");
|
|
38568
37799
|
if (cwd3 instanceof URL) return fileURLToPath3(cwd3).replace(BACKSLASHES, "/");
|
|
38569
|
-
return
|
|
37800
|
+
return path12.resolve(cwd3).replace(BACKSLASHES, "/");
|
|
38570
37801
|
}
|
|
38571
37802
|
function getCrawler(patterns, inputOptions = {}) {
|
|
38572
37803
|
const options = process.env.TINYGLOBBY_DEBUG ? {
|
|
@@ -38678,10 +37909,10 @@ function globSync(patternsOrOptions, options) {
|
|
|
38678
37909
|
return formatPaths(crawler.sync(), relative2);
|
|
38679
37910
|
}
|
|
38680
37911
|
var import_picomatch, isReadonlyArray3, isWin, ONLY_PARENT_DIRECTORIES, WIN32_ROOT_DIR, isRoot, splitPatternOptions, POSIX_UNESCAPED_GLOB_SYMBOLS, WIN32_UNESCAPED_GLOB_SYMBOLS, escapePosixPath, escapeWin32Path, escapePath, PARENT_DIRECTORY, ESCAPING_BACKSLASHES, BACKSLASHES;
|
|
38681
|
-
var
|
|
37912
|
+
var init_dist9 = __esm({
|
|
38682
37913
|
"../../node_modules/.pnpm/tinyglobby@0.2.15/node_modules/tinyglobby/dist/index.mjs"() {
|
|
38683
37914
|
"use strict";
|
|
38684
|
-
|
|
37915
|
+
init_dist8();
|
|
38685
37916
|
import_picomatch = __toESM(require_picomatch2(), 1);
|
|
38686
37917
|
isReadonlyArray3 = Array.isArray;
|
|
38687
37918
|
isWin = process.platform === "win32";
|
|
@@ -38707,7 +37938,7 @@ function isNothing(subject) {
|
|
|
38707
37938
|
function isObject2(subject) {
|
|
38708
37939
|
return typeof subject === "object" && subject !== null;
|
|
38709
37940
|
}
|
|
38710
|
-
function
|
|
37941
|
+
function toArray4(sequence) {
|
|
38711
37942
|
if (Array.isArray(sequence)) return sequence;
|
|
38712
37943
|
else if (isNothing(sequence)) return [];
|
|
38713
37944
|
return [sequence];
|
|
@@ -40888,7 +40119,7 @@ var init_js_yaml = __esm({
|
|
|
40888
40119
|
"use strict";
|
|
40889
40120
|
isNothing_1 = isNothing;
|
|
40890
40121
|
isObject_1 = isObject2;
|
|
40891
|
-
toArray_1 =
|
|
40122
|
+
toArray_1 = toArray4;
|
|
40892
40123
|
repeat_1 = repeat;
|
|
40893
40124
|
isNegativeZero_1 = isNegativeZero;
|
|
40894
40125
|
extend_1 = extend;
|
|
@@ -42262,12 +41493,12 @@ var require_document = __commonJS({
|
|
|
42262
41493
|
result.data = null;
|
|
42263
41494
|
return result;
|
|
42264
41495
|
}
|
|
42265
|
-
function arg_to_path(
|
|
42266
|
-
if (typeof
|
|
42267
|
-
if (
|
|
42268
|
-
if (typeof
|
|
42269
|
-
if (!Array.isArray(
|
|
42270
|
-
return
|
|
41496
|
+
function arg_to_path(path18) {
|
|
41497
|
+
if (typeof path18 === "number") path18 = String(path18);
|
|
41498
|
+
if (path18 === "") path18 = [];
|
|
41499
|
+
if (typeof path18 === "string") path18 = path18.split(".");
|
|
41500
|
+
if (!Array.isArray(path18)) throw Error("Invalid path type, string or array expected");
|
|
41501
|
+
return path18;
|
|
42271
41502
|
}
|
|
42272
41503
|
function find_element_in_tokenlist(element, lvl, tokens, begin, end) {
|
|
42273
41504
|
while (tokens[begin].stack[lvl] != element) {
|
|
@@ -42391,30 +41622,30 @@ var require_document = __commonJS({
|
|
|
42391
41622
|
return true;
|
|
42392
41623
|
}
|
|
42393
41624
|
}
|
|
42394
|
-
Document.prototype.set = function(
|
|
42395
|
-
|
|
42396
|
-
if (
|
|
41625
|
+
Document.prototype.set = function(path18, value) {
|
|
41626
|
+
path18 = arg_to_path(path18);
|
|
41627
|
+
if (path18.length === 0) {
|
|
42397
41628
|
if (value === void 0) throw Error("can't remove root document");
|
|
42398
41629
|
this._data = value;
|
|
42399
41630
|
var new_key = false;
|
|
42400
41631
|
} else {
|
|
42401
41632
|
var data = this._data;
|
|
42402
|
-
for (var i = 0; i <
|
|
42403
|
-
check_if_can_be_placed(
|
|
42404
|
-
data = data[
|
|
41633
|
+
for (var i = 0; i < path18.length - 1; i++) {
|
|
41634
|
+
check_if_can_be_placed(path18[i], data, false);
|
|
41635
|
+
data = data[path18[i]];
|
|
42405
41636
|
}
|
|
42406
|
-
if (i ===
|
|
42407
|
-
check_if_can_be_placed(
|
|
41637
|
+
if (i === path18.length - 1) {
|
|
41638
|
+
check_if_can_be_placed(path18[i], data, value === void 0);
|
|
42408
41639
|
}
|
|
42409
|
-
var new_key = !(
|
|
41640
|
+
var new_key = !(path18[i] in data);
|
|
42410
41641
|
if (value === void 0) {
|
|
42411
41642
|
if (Array.isArray(data)) {
|
|
42412
41643
|
data.pop();
|
|
42413
41644
|
} else {
|
|
42414
|
-
delete data[
|
|
41645
|
+
delete data[path18[i]];
|
|
42415
41646
|
}
|
|
42416
41647
|
} else {
|
|
42417
|
-
data[
|
|
41648
|
+
data[path18[i]] = value;
|
|
42418
41649
|
}
|
|
42419
41650
|
}
|
|
42420
41651
|
if (!this._tokens.length)
|
|
@@ -42423,15 +41654,15 @@ var require_document = __commonJS({
|
|
|
42423
41654
|
find_first_non_ws_token(this._tokens, 0, this._tokens.length - 1),
|
|
42424
41655
|
find_last_non_ws_token(this._tokens, 0, this._tokens.length - 1)
|
|
42425
41656
|
];
|
|
42426
|
-
for (var i = 0; i <
|
|
42427
|
-
position = find_element_in_tokenlist(
|
|
41657
|
+
for (var i = 0; i < path18.length - 1; i++) {
|
|
41658
|
+
position = find_element_in_tokenlist(path18[i], i, this._tokens, position[0], position[1]);
|
|
42428
41659
|
if (position == false) throw Error("internal error, please report this");
|
|
42429
41660
|
}
|
|
42430
|
-
if (
|
|
42431
|
-
var newtokens = value_to_tokenlist(value,
|
|
41661
|
+
if (path18.length === 0) {
|
|
41662
|
+
var newtokens = value_to_tokenlist(value, path18, this._options);
|
|
42432
41663
|
} else if (!new_key) {
|
|
42433
41664
|
var pos_old = position;
|
|
42434
|
-
position = find_element_in_tokenlist(
|
|
41665
|
+
position = find_element_in_tokenlist(path18[i], i, this._tokens, position[0], position[1]);
|
|
42435
41666
|
if (value === void 0 && position !== false) {
|
|
42436
41667
|
var newtokens = [];
|
|
42437
41668
|
if (!Array.isArray(data)) {
|
|
@@ -42441,7 +41672,7 @@ var require_document = __commonJS({
|
|
|
42441
41672
|
position[0] = pos2;
|
|
42442
41673
|
var pos2 = find_last_non_ws_token(this._tokens, pos_old[0], position[0] - 1);
|
|
42443
41674
|
assert2.equal(this._tokens[pos2].type, "key");
|
|
42444
|
-
assert2.equal(this._tokens[pos2].value,
|
|
41675
|
+
assert2.equal(this._tokens[pos2].value, path18[path18.length - 1]);
|
|
42445
41676
|
position[0] = pos2;
|
|
42446
41677
|
}
|
|
42447
41678
|
var pos2 = find_last_non_ws_token(this._tokens, pos_old[0], position[0] - 1);
|
|
@@ -42457,21 +41688,21 @@ var require_document = __commonJS({
|
|
|
42457
41688
|
}
|
|
42458
41689
|
} else {
|
|
42459
41690
|
var indent = pos2 !== false ? detect_indent_style(this._tokens, Array.isArray(data), pos_old[0], position[1] - 1, i) : {};
|
|
42460
|
-
var newtokens = value_to_tokenlist(value,
|
|
41691
|
+
var newtokens = value_to_tokenlist(value, path18, this._options, false, indent);
|
|
42461
41692
|
}
|
|
42462
41693
|
} else {
|
|
42463
|
-
var path_1 =
|
|
41694
|
+
var path_1 = path18.slice(0, i);
|
|
42464
41695
|
var pos2 = find_last_non_ws_token(this._tokens, position[0] + 1, position[1] - 1);
|
|
42465
41696
|
assert2(pos2 !== false);
|
|
42466
41697
|
var indent = pos2 !== false ? detect_indent_style(this._tokens, Array.isArray(data), position[0] + 1, pos2, i) : {};
|
|
42467
|
-
var newtokens = value_to_tokenlist(value,
|
|
41698
|
+
var newtokens = value_to_tokenlist(value, path18, this._options, false, indent);
|
|
42468
41699
|
var prefix = [];
|
|
42469
41700
|
if (indent.newline && indent.newline.length)
|
|
42470
41701
|
prefix = prefix.concat(indent.newline);
|
|
42471
41702
|
if (indent.prefix && indent.prefix.length)
|
|
42472
41703
|
prefix = prefix.concat(indent.prefix);
|
|
42473
41704
|
if (!Array.isArray(data)) {
|
|
42474
|
-
prefix = prefix.concat(value_to_tokenlist(
|
|
41705
|
+
prefix = prefix.concat(value_to_tokenlist(path18[path18.length - 1], path_1, this._options, true));
|
|
42475
41706
|
if (indent.sep1 && indent.sep1.length)
|
|
42476
41707
|
prefix = prefix.concat(indent.sep1);
|
|
42477
41708
|
prefix.push({ raw: ":", type: "separator", stack: path_1 });
|
|
@@ -42479,7 +41710,7 @@ var require_document = __commonJS({
|
|
|
42479
41710
|
prefix = prefix.concat(indent.sep2);
|
|
42480
41711
|
}
|
|
42481
41712
|
newtokens.unshift.apply(newtokens, prefix);
|
|
42482
|
-
if (this._tokens[pos2].type === "separator" && this._tokens[pos2].stack.length ===
|
|
41713
|
+
if (this._tokens[pos2].type === "separator" && this._tokens[pos2].stack.length === path18.length - 1) {
|
|
42483
41714
|
if (this._tokens[pos2].raw === ",") {
|
|
42484
41715
|
newtokens.push({ raw: ",", type: "separator", stack: path_1 });
|
|
42485
41716
|
}
|
|
@@ -42497,24 +41728,24 @@ var require_document = __commonJS({
|
|
|
42497
41728
|
this._tokens.splice.apply(this._tokens, newtokens);
|
|
42498
41729
|
return this;
|
|
42499
41730
|
};
|
|
42500
|
-
Document.prototype.unset = function(
|
|
42501
|
-
return this.set(
|
|
41731
|
+
Document.prototype.unset = function(path18) {
|
|
41732
|
+
return this.set(path18, void 0);
|
|
42502
41733
|
};
|
|
42503
|
-
Document.prototype.get = function(
|
|
42504
|
-
|
|
41734
|
+
Document.prototype.get = function(path18) {
|
|
41735
|
+
path18 = arg_to_path(path18);
|
|
42505
41736
|
var data = this._data;
|
|
42506
|
-
for (var i = 0; i <
|
|
41737
|
+
for (var i = 0; i < path18.length; i++) {
|
|
42507
41738
|
if (!isObject3(data)) return void 0;
|
|
42508
|
-
data = data[
|
|
41739
|
+
data = data[path18[i]];
|
|
42509
41740
|
}
|
|
42510
41741
|
return data;
|
|
42511
41742
|
};
|
|
42512
|
-
Document.prototype.has = function(
|
|
42513
|
-
|
|
41743
|
+
Document.prototype.has = function(path18) {
|
|
41744
|
+
path18 = arg_to_path(path18);
|
|
42514
41745
|
var data = this._data;
|
|
42515
|
-
for (var i = 0; i <
|
|
41746
|
+
for (var i = 0; i < path18.length; i++) {
|
|
42516
41747
|
if (!isObject3(data)) return false;
|
|
42517
|
-
data = data[
|
|
41748
|
+
data = data[path18[i]];
|
|
42518
41749
|
}
|
|
42519
41750
|
return data !== void 0;
|
|
42520
41751
|
};
|
|
@@ -42522,37 +41753,37 @@ var require_document = __commonJS({
|
|
|
42522
41753
|
var self = this;
|
|
42523
41754
|
change([], self._data, value);
|
|
42524
41755
|
return self;
|
|
42525
|
-
function change(
|
|
41756
|
+
function change(path18, old_data, new_data) {
|
|
42526
41757
|
if (!isObject3(new_data) || !isObject3(old_data)) {
|
|
42527
41758
|
if (new_data !== old_data)
|
|
42528
|
-
self.set(
|
|
41759
|
+
self.set(path18, new_data);
|
|
42529
41760
|
} else if (Array.isArray(new_data) != Array.isArray(old_data)) {
|
|
42530
|
-
self.set(
|
|
41761
|
+
self.set(path18, new_data);
|
|
42531
41762
|
} else if (Array.isArray(new_data)) {
|
|
42532
41763
|
if (new_data.length > old_data.length) {
|
|
42533
41764
|
for (var i = 0; i < new_data.length; i++) {
|
|
42534
|
-
|
|
42535
|
-
change(
|
|
42536
|
-
|
|
41765
|
+
path18.push(String(i));
|
|
41766
|
+
change(path18, old_data[i], new_data[i]);
|
|
41767
|
+
path18.pop();
|
|
42537
41768
|
}
|
|
42538
41769
|
} else {
|
|
42539
41770
|
for (var i = old_data.length - 1; i >= 0; i--) {
|
|
42540
|
-
|
|
42541
|
-
change(
|
|
42542
|
-
|
|
41771
|
+
path18.push(String(i));
|
|
41772
|
+
change(path18, old_data[i], new_data[i]);
|
|
41773
|
+
path18.pop();
|
|
42543
41774
|
}
|
|
42544
41775
|
}
|
|
42545
41776
|
} else {
|
|
42546
41777
|
for (var i in new_data) {
|
|
42547
|
-
|
|
42548
|
-
change(
|
|
42549
|
-
|
|
41778
|
+
path18.push(String(i));
|
|
41779
|
+
change(path18, old_data[i], new_data[i]);
|
|
41780
|
+
path18.pop();
|
|
42550
41781
|
}
|
|
42551
41782
|
for (var i in old_data) {
|
|
42552
41783
|
if (i in new_data) continue;
|
|
42553
|
-
|
|
42554
|
-
change(
|
|
42555
|
-
|
|
41784
|
+
path18.push(String(i));
|
|
41785
|
+
change(path18, old_data[i], new_data[i]);
|
|
41786
|
+
path18.pop();
|
|
42556
41787
|
}
|
|
42557
41788
|
}
|
|
42558
41789
|
}
|
|
@@ -42632,7 +41863,7 @@ var require_jju = __commonJS({
|
|
|
42632
41863
|
});
|
|
42633
41864
|
|
|
42634
41865
|
// ../../node_modules/.pnpm/@manypkg+tools@2.1.0/node_modules/@manypkg/tools/dist/manypkg-tools.js
|
|
42635
|
-
import * as
|
|
41866
|
+
import * as path13 from "path";
|
|
42636
41867
|
import path__default from "path";
|
|
42637
41868
|
import * as fs13 from "fs";
|
|
42638
41869
|
import fs__default from "fs";
|
|
@@ -42690,7 +41921,7 @@ function expandPackageGlobsSync(packageGlobs, directory) {
|
|
|
42690
41921
|
}
|
|
42691
41922
|
async function hasBunLockFile(directory) {
|
|
42692
41923
|
try {
|
|
42693
|
-
await Promise.any([fsp.access(
|
|
41924
|
+
await Promise.any([fsp.access(path13.join(directory, "bun.lockb"), F_OK), fsp.access(path13.join(directory, "bun.lock"), F_OK)]);
|
|
42694
41925
|
return true;
|
|
42695
41926
|
} catch (err) {
|
|
42696
41927
|
return false;
|
|
@@ -42698,28 +41929,28 @@ async function hasBunLockFile(directory) {
|
|
|
42698
41929
|
}
|
|
42699
41930
|
function hasBunLockFileSync(directory) {
|
|
42700
41931
|
try {
|
|
42701
|
-
fs13.accessSync(
|
|
41932
|
+
fs13.accessSync(path13.join(directory, "bun.lockb"), F_OK);
|
|
42702
41933
|
return true;
|
|
42703
41934
|
} catch (err) {
|
|
42704
41935
|
try {
|
|
42705
|
-
fs13.accessSync(
|
|
41936
|
+
fs13.accessSync(path13.join(directory, "bun.lock"), F_OK);
|
|
42706
41937
|
return true;
|
|
42707
41938
|
} catch (err2) {
|
|
42708
41939
|
return false;
|
|
42709
41940
|
}
|
|
42710
41941
|
}
|
|
42711
41942
|
}
|
|
42712
|
-
async function readYamlFile(
|
|
42713
|
-
return fsp__default.readFile(
|
|
41943
|
+
async function readYamlFile(path18) {
|
|
41944
|
+
return fsp__default.readFile(path18, "utf8").then((data) => jsYaml.load(data));
|
|
42714
41945
|
}
|
|
42715
|
-
function readYamlFileSync(
|
|
42716
|
-
return jsYaml.load(fs__default.readFileSync(
|
|
41946
|
+
function readYamlFileSync(path18) {
|
|
41947
|
+
return jsYaml.load(fs__default.readFileSync(path18, "utf8"));
|
|
42717
41948
|
}
|
|
42718
41949
|
var import_jju, InvalidMonorepoError, readJson, readJsonSync, BunTool, LernaTool, NpmTool, PnpmTool, RootTool, RushTool, YarnTool;
|
|
42719
41950
|
var init_manypkg_tools = __esm({
|
|
42720
41951
|
"../../node_modules/.pnpm/@manypkg+tools@2.1.0/node_modules/@manypkg/tools/dist/manypkg-tools.js"() {
|
|
42721
41952
|
"use strict";
|
|
42722
|
-
|
|
41953
|
+
init_dist9();
|
|
42723
41954
|
init_js_yaml();
|
|
42724
41955
|
import_jju = __toESM(require_jju(), 1);
|
|
42725
41956
|
InvalidMonorepoError = class extends Error {
|
|
@@ -42765,7 +41996,7 @@ var init_manypkg_tools = __esm({
|
|
|
42765
41996
|
return false;
|
|
42766
41997
|
},
|
|
42767
41998
|
async getPackages(directory) {
|
|
42768
|
-
const rootDir =
|
|
41999
|
+
const rootDir = path13.resolve(directory);
|
|
42769
42000
|
try {
|
|
42770
42001
|
const pkgJson = await readJson(rootDir, "package.json");
|
|
42771
42002
|
const packageGlobs = pkgJson.workspaces || [];
|
|
@@ -42787,7 +42018,7 @@ var init_manypkg_tools = __esm({
|
|
|
42787
42018
|
}
|
|
42788
42019
|
},
|
|
42789
42020
|
getPackagesSync(directory) {
|
|
42790
|
-
const rootDir =
|
|
42021
|
+
const rootDir = path13.resolve(directory);
|
|
42791
42022
|
try {
|
|
42792
42023
|
const pkgJson = readJsonSync(rootDir, "package.json");
|
|
42793
42024
|
const packageGlobs = pkgJson.workspaces || [];
|
|
@@ -43258,7 +42489,7 @@ var init_manypkg_tools = __esm({
|
|
|
43258
42489
|
// ../../node_modules/.pnpm/@manypkg+find-root@3.1.0/node_modules/@manypkg/find-root/dist/manypkg-find-root.js
|
|
43259
42490
|
import fs14 from "fs";
|
|
43260
42491
|
import fsp2 from "fs/promises";
|
|
43261
|
-
import
|
|
42492
|
+
import path14 from "path";
|
|
43262
42493
|
function findRootSync(cwd3, options = {}) {
|
|
43263
42494
|
let monorepoRoot;
|
|
43264
42495
|
const tools = options.tools || DEFAULT_TOOLS;
|
|
@@ -43280,7 +42511,7 @@ function findRootSync(cwd3, options = {}) {
|
|
|
43280
42511
|
throw new NoMatchingMonorepoFound(cwd3);
|
|
43281
42512
|
}
|
|
43282
42513
|
const rootDir = findUpSync((directory) => {
|
|
43283
|
-
const exists2 = fs14.existsSync(
|
|
42514
|
+
const exists2 = fs14.existsSync(path14.join(directory, "package.json"));
|
|
43284
42515
|
return exists2 ? directory : void 0;
|
|
43285
42516
|
}, cwd3);
|
|
43286
42517
|
if (!rootDir) {
|
|
@@ -43292,16 +42523,16 @@ function findRootSync(cwd3, options = {}) {
|
|
|
43292
42523
|
};
|
|
43293
42524
|
}
|
|
43294
42525
|
function findUpSync(matcher, cwd3) {
|
|
43295
|
-
let directory =
|
|
42526
|
+
let directory = path14.resolve(cwd3);
|
|
43296
42527
|
const {
|
|
43297
42528
|
root
|
|
43298
|
-
} =
|
|
42529
|
+
} = path14.parse(directory);
|
|
43299
42530
|
while (directory && directory !== root) {
|
|
43300
42531
|
const filePath = matcher(directory);
|
|
43301
42532
|
if (filePath) {
|
|
43302
|
-
return
|
|
42533
|
+
return path14.resolve(directory, filePath);
|
|
43303
42534
|
}
|
|
43304
|
-
directory =
|
|
42535
|
+
directory = path14.dirname(directory);
|
|
43305
42536
|
}
|
|
43306
42537
|
}
|
|
43307
42538
|
var DEFAULT_TOOLS, NoPkgJsonFound, NoMatchingMonorepoFound;
|
|
@@ -43326,7 +42557,7 @@ var init_manypkg_find_root = __esm({
|
|
|
43326
42557
|
});
|
|
43327
42558
|
|
|
43328
42559
|
// ../../node_modules/.pnpm/@manypkg+get-packages@3.1.0/node_modules/@manypkg/get-packages/dist/manypkg-get-packages.js
|
|
43329
|
-
import
|
|
42560
|
+
import path15 from "path";
|
|
43330
42561
|
function getPackagesSync(dir, options) {
|
|
43331
42562
|
const monorepoRoot = findRootSync(dir, options);
|
|
43332
42563
|
const tools = options?.tools || DEFAULT_TOOLS;
|
|
@@ -43340,7 +42571,7 @@ function validatePackages(packages) {
|
|
|
43340
42571
|
const pkgJsonsMissingNameField = [];
|
|
43341
42572
|
for (const pkg of packages.packages) {
|
|
43342
42573
|
if (!pkg.packageJson.name) {
|
|
43343
|
-
pkgJsonsMissingNameField.push(
|
|
42574
|
+
pkgJsonsMissingNameField.push(path15.join(pkg.relativeDir, "package.json"));
|
|
43344
42575
|
}
|
|
43345
42576
|
}
|
|
43346
42577
|
if (pkgJsonsMissingNameField.length > 0) {
|
|
@@ -43363,6 +42594,543 @@ ${directories.join("\n")}`);
|
|
|
43363
42594
|
}
|
|
43364
42595
|
});
|
|
43365
42596
|
|
|
42597
|
+
// ../version/dist/dist-3B6ZXCEH.js
|
|
42598
|
+
var dist_3B6ZXCEH_exports = {};
|
|
42599
|
+
__export(dist_3B6ZXCEH_exports, {
|
|
42600
|
+
CommitParser: () => CommitParser2,
|
|
42601
|
+
createCommitObject: () => createCommitObject2,
|
|
42602
|
+
parseCommits: () => parseCommits2,
|
|
42603
|
+
parseCommitsStream: () => parseCommitsStream2
|
|
42604
|
+
});
|
|
42605
|
+
import { Transform as Transform3 } from "stream";
|
|
42606
|
+
function join18(parts, joiner) {
|
|
42607
|
+
return parts.map((val) => val.trim()).filter(Boolean).join(joiner);
|
|
42608
|
+
}
|
|
42609
|
+
function getNotesRegex2(noteKeywords, notesPattern) {
|
|
42610
|
+
if (!noteKeywords) {
|
|
42611
|
+
return nomatchRegex2;
|
|
42612
|
+
}
|
|
42613
|
+
const noteKeywordsSelection = join18(noteKeywords, "|");
|
|
42614
|
+
if (!notesPattern) {
|
|
42615
|
+
return new RegExp(`^[\\s|*]*(${noteKeywordsSelection})[:\\s]+(.*)`, "i");
|
|
42616
|
+
}
|
|
42617
|
+
return notesPattern(noteKeywordsSelection);
|
|
42618
|
+
}
|
|
42619
|
+
function getReferencePartsRegex2(issuePrefixes, issuePrefixesCaseSensitive) {
|
|
42620
|
+
if (!issuePrefixes) {
|
|
42621
|
+
return nomatchRegex2;
|
|
42622
|
+
}
|
|
42623
|
+
const flags = issuePrefixesCaseSensitive ? "g" : "gi";
|
|
42624
|
+
return new RegExp(`(?:.*?)??\\s*([\\w-\\.\\/]*?)??(${join18(issuePrefixes, "|")})([\\w-]+)(?=\\s|$|[,;)\\]])`, flags);
|
|
42625
|
+
}
|
|
42626
|
+
function getReferencesRegex2(referenceActions) {
|
|
42627
|
+
if (!referenceActions) {
|
|
42628
|
+
return /()(.+)/gi;
|
|
42629
|
+
}
|
|
42630
|
+
const joinedKeywords = join18(referenceActions, "|");
|
|
42631
|
+
return new RegExp(`(${joinedKeywords})(?:\\s+(.*?))(?=(?:${joinedKeywords})|$)`, "gi");
|
|
42632
|
+
}
|
|
42633
|
+
function getParserRegexes2(options = {}) {
|
|
42634
|
+
const notes = getNotesRegex2(options.noteKeywords, options.notesPattern);
|
|
42635
|
+
const referenceParts = getReferencePartsRegex2(options.issuePrefixes, options.issuePrefixesCaseSensitive);
|
|
42636
|
+
const references = getReferencesRegex2(options.referenceActions);
|
|
42637
|
+
return {
|
|
42638
|
+
notes,
|
|
42639
|
+
referenceParts,
|
|
42640
|
+
references,
|
|
42641
|
+
mentions: /@([\w-]+)/g,
|
|
42642
|
+
url: /\b(?:https?):\/\/(?:www\.)?([-a-zA-Z0-9@:%_+.~#?&//=])+\b/
|
|
42643
|
+
};
|
|
42644
|
+
}
|
|
42645
|
+
function trimNewLines2(input) {
|
|
42646
|
+
const matches = input.match(/[^\r\n]/);
|
|
42647
|
+
if (typeof matches?.index !== "number") {
|
|
42648
|
+
return "";
|
|
42649
|
+
}
|
|
42650
|
+
const firstIndex = matches.index;
|
|
42651
|
+
let lastIndex = input.length - 1;
|
|
42652
|
+
while (input[lastIndex] === "\r" || input[lastIndex] === "\n") {
|
|
42653
|
+
lastIndex--;
|
|
42654
|
+
}
|
|
42655
|
+
return input.substring(firstIndex, lastIndex + 1);
|
|
42656
|
+
}
|
|
42657
|
+
function appendLine2(src, line) {
|
|
42658
|
+
return src ? `${src}
|
|
42659
|
+
${line || ""}` : line || "";
|
|
42660
|
+
}
|
|
42661
|
+
function getCommentFilter2(char) {
|
|
42662
|
+
return char ? (line) => !line.startsWith(char) : () => true;
|
|
42663
|
+
}
|
|
42664
|
+
function truncateToScissor2(lines, commentChar) {
|
|
42665
|
+
const scissorIndex = lines.indexOf(`${commentChar} ${SCISSOR3}`);
|
|
42666
|
+
if (scissorIndex === -1) {
|
|
42667
|
+
return lines;
|
|
42668
|
+
}
|
|
42669
|
+
return lines.slice(0, scissorIndex);
|
|
42670
|
+
}
|
|
42671
|
+
function gpgFilter2(line) {
|
|
42672
|
+
return !line.match(/^\s*gpg:/);
|
|
42673
|
+
}
|
|
42674
|
+
function assignMatchedCorrespondence2(target, matches, correspondence) {
|
|
42675
|
+
const { groups } = matches;
|
|
42676
|
+
for (let i = 0, len = correspondence.length, key; i < len; i++) {
|
|
42677
|
+
key = correspondence[i];
|
|
42678
|
+
target[key] = (groups ? groups[key] : matches[i + 1]) || null;
|
|
42679
|
+
}
|
|
42680
|
+
return target;
|
|
42681
|
+
}
|
|
42682
|
+
function createCommitObject2(initialData = {}) {
|
|
42683
|
+
return {
|
|
42684
|
+
merge: null,
|
|
42685
|
+
revert: null,
|
|
42686
|
+
header: null,
|
|
42687
|
+
body: null,
|
|
42688
|
+
footer: null,
|
|
42689
|
+
notes: [],
|
|
42690
|
+
mentions: [],
|
|
42691
|
+
references: [],
|
|
42692
|
+
...initialData
|
|
42693
|
+
};
|
|
42694
|
+
}
|
|
42695
|
+
function parseCommits2(options = {}) {
|
|
42696
|
+
const warnOption = options.warn;
|
|
42697
|
+
const warn4 = warnOption === true ? (err) => {
|
|
42698
|
+
throw err;
|
|
42699
|
+
} : warnOption ? (err) => warnOption(err.toString()) : () => {
|
|
42700
|
+
};
|
|
42701
|
+
return async function* parse4(rawCommits) {
|
|
42702
|
+
const parser = new CommitParser2(options);
|
|
42703
|
+
let rawCommit;
|
|
42704
|
+
for await (rawCommit of rawCommits) {
|
|
42705
|
+
try {
|
|
42706
|
+
yield parser.parse(rawCommit.toString());
|
|
42707
|
+
} catch (err) {
|
|
42708
|
+
warn4(err);
|
|
42709
|
+
}
|
|
42710
|
+
}
|
|
42711
|
+
};
|
|
42712
|
+
}
|
|
42713
|
+
function parseCommitsStream2(options = {}) {
|
|
42714
|
+
return Transform3.from(parseCommits2(options));
|
|
42715
|
+
}
|
|
42716
|
+
var nomatchRegex2, SCISSOR3, defaultOptions3, CommitParser2;
|
|
42717
|
+
var init_dist_3B6ZXCEH = __esm({
|
|
42718
|
+
"../version/dist/dist-3B6ZXCEH.js"() {
|
|
42719
|
+
"use strict";
|
|
42720
|
+
nomatchRegex2 = /(?!.*)/;
|
|
42721
|
+
SCISSOR3 = "------------------------ >8 ------------------------";
|
|
42722
|
+
defaultOptions3 = {
|
|
42723
|
+
noteKeywords: ["BREAKING CHANGE", "BREAKING-CHANGE"],
|
|
42724
|
+
issuePrefixes: ["#"],
|
|
42725
|
+
referenceActions: [
|
|
42726
|
+
"close",
|
|
42727
|
+
"closes",
|
|
42728
|
+
"closed",
|
|
42729
|
+
"fix",
|
|
42730
|
+
"fixes",
|
|
42731
|
+
"fixed",
|
|
42732
|
+
"resolve",
|
|
42733
|
+
"resolves",
|
|
42734
|
+
"resolved"
|
|
42735
|
+
],
|
|
42736
|
+
headerPattern: /^(\w*)(?:\(([\w$@.\-*/ ]*)\))?: (.*)$/,
|
|
42737
|
+
headerCorrespondence: [
|
|
42738
|
+
"type",
|
|
42739
|
+
"scope",
|
|
42740
|
+
"subject"
|
|
42741
|
+
],
|
|
42742
|
+
revertPattern: /^Revert\s"([\s\S]*)"\s*This reverts commit (\w*)\./,
|
|
42743
|
+
revertCorrespondence: ["header", "hash"],
|
|
42744
|
+
fieldPattern: /^-(.*?)-$/
|
|
42745
|
+
};
|
|
42746
|
+
CommitParser2 = class {
|
|
42747
|
+
options;
|
|
42748
|
+
regexes;
|
|
42749
|
+
lines = [];
|
|
42750
|
+
lineIndex = 0;
|
|
42751
|
+
commit = createCommitObject2();
|
|
42752
|
+
constructor(options = {}) {
|
|
42753
|
+
this.options = {
|
|
42754
|
+
...defaultOptions3,
|
|
42755
|
+
...options
|
|
42756
|
+
};
|
|
42757
|
+
this.regexes = getParserRegexes2(this.options);
|
|
42758
|
+
}
|
|
42759
|
+
currentLine() {
|
|
42760
|
+
return this.lines[this.lineIndex];
|
|
42761
|
+
}
|
|
42762
|
+
nextLine() {
|
|
42763
|
+
return this.lines[this.lineIndex++];
|
|
42764
|
+
}
|
|
42765
|
+
isLineAvailable() {
|
|
42766
|
+
return this.lineIndex < this.lines.length;
|
|
42767
|
+
}
|
|
42768
|
+
parseReference(input, action) {
|
|
42769
|
+
const { regexes } = this;
|
|
42770
|
+
if (regexes.url.test(input)) {
|
|
42771
|
+
return null;
|
|
42772
|
+
}
|
|
42773
|
+
const matches = regexes.referenceParts.exec(input);
|
|
42774
|
+
if (!matches) {
|
|
42775
|
+
return null;
|
|
42776
|
+
}
|
|
42777
|
+
let [raw2, repository = null, prefix, issue] = matches;
|
|
42778
|
+
let owner = null;
|
|
42779
|
+
if (repository) {
|
|
42780
|
+
const slashIndex = repository.indexOf("/");
|
|
42781
|
+
if (slashIndex !== -1) {
|
|
42782
|
+
owner = repository.slice(0, slashIndex);
|
|
42783
|
+
repository = repository.slice(slashIndex + 1);
|
|
42784
|
+
}
|
|
42785
|
+
}
|
|
42786
|
+
return {
|
|
42787
|
+
raw: raw2,
|
|
42788
|
+
action,
|
|
42789
|
+
owner,
|
|
42790
|
+
repository,
|
|
42791
|
+
prefix,
|
|
42792
|
+
issue
|
|
42793
|
+
};
|
|
42794
|
+
}
|
|
42795
|
+
parseReferences(input) {
|
|
42796
|
+
const { regexes } = this;
|
|
42797
|
+
const regex = input.match(regexes.references) ? regexes.references : /()(.+)/gi;
|
|
42798
|
+
const references = [];
|
|
42799
|
+
let matches;
|
|
42800
|
+
let action;
|
|
42801
|
+
let sentence;
|
|
42802
|
+
let reference;
|
|
42803
|
+
while (true) {
|
|
42804
|
+
matches = regex.exec(input);
|
|
42805
|
+
if (!matches) {
|
|
42806
|
+
break;
|
|
42807
|
+
}
|
|
42808
|
+
action = matches[1] || null;
|
|
42809
|
+
sentence = matches[2] || "";
|
|
42810
|
+
while (true) {
|
|
42811
|
+
reference = this.parseReference(sentence, action);
|
|
42812
|
+
if (!reference) {
|
|
42813
|
+
break;
|
|
42814
|
+
}
|
|
42815
|
+
references.push(reference);
|
|
42816
|
+
}
|
|
42817
|
+
}
|
|
42818
|
+
return references;
|
|
42819
|
+
}
|
|
42820
|
+
skipEmptyLines() {
|
|
42821
|
+
let line = this.currentLine();
|
|
42822
|
+
while (line !== void 0 && !line.trim()) {
|
|
42823
|
+
this.nextLine();
|
|
42824
|
+
line = this.currentLine();
|
|
42825
|
+
}
|
|
42826
|
+
}
|
|
42827
|
+
parseMerge() {
|
|
42828
|
+
const { commit, options } = this;
|
|
42829
|
+
const correspondence = options.mergeCorrespondence || [];
|
|
42830
|
+
const merge2 = this.currentLine();
|
|
42831
|
+
const matches = merge2 && options.mergePattern ? merge2.match(options.mergePattern) : null;
|
|
42832
|
+
if (matches) {
|
|
42833
|
+
this.nextLine();
|
|
42834
|
+
commit.merge = matches[0] || null;
|
|
42835
|
+
assignMatchedCorrespondence2(commit, matches, correspondence);
|
|
42836
|
+
return true;
|
|
42837
|
+
}
|
|
42838
|
+
return false;
|
|
42839
|
+
}
|
|
42840
|
+
parseHeader(isMergeCommit) {
|
|
42841
|
+
if (isMergeCommit) {
|
|
42842
|
+
this.skipEmptyLines();
|
|
42843
|
+
}
|
|
42844
|
+
const { commit, options } = this;
|
|
42845
|
+
const correspondence = options.headerCorrespondence || [];
|
|
42846
|
+
const header = commit.header ?? this.nextLine();
|
|
42847
|
+
let matches = null;
|
|
42848
|
+
if (header) {
|
|
42849
|
+
if (options.breakingHeaderPattern) {
|
|
42850
|
+
matches = header.match(options.breakingHeaderPattern);
|
|
42851
|
+
}
|
|
42852
|
+
if (!matches && options.headerPattern) {
|
|
42853
|
+
matches = header.match(options.headerPattern);
|
|
42854
|
+
}
|
|
42855
|
+
}
|
|
42856
|
+
if (header) {
|
|
42857
|
+
commit.header = header;
|
|
42858
|
+
}
|
|
42859
|
+
if (matches) {
|
|
42860
|
+
assignMatchedCorrespondence2(commit, matches, correspondence);
|
|
42861
|
+
}
|
|
42862
|
+
}
|
|
42863
|
+
parseMeta() {
|
|
42864
|
+
const { options, commit } = this;
|
|
42865
|
+
if (!options.fieldPattern || !this.isLineAvailable()) {
|
|
42866
|
+
return false;
|
|
42867
|
+
}
|
|
42868
|
+
let matches;
|
|
42869
|
+
let field = null;
|
|
42870
|
+
let parsed = false;
|
|
42871
|
+
while (this.isLineAvailable()) {
|
|
42872
|
+
matches = this.currentLine().match(options.fieldPattern);
|
|
42873
|
+
if (matches) {
|
|
42874
|
+
field = matches[1] || null;
|
|
42875
|
+
this.nextLine();
|
|
42876
|
+
continue;
|
|
42877
|
+
}
|
|
42878
|
+
if (field) {
|
|
42879
|
+
parsed = true;
|
|
42880
|
+
commit[field] = appendLine2(commit[field], this.currentLine());
|
|
42881
|
+
this.nextLine();
|
|
42882
|
+
} else {
|
|
42883
|
+
break;
|
|
42884
|
+
}
|
|
42885
|
+
}
|
|
42886
|
+
return parsed;
|
|
42887
|
+
}
|
|
42888
|
+
parseNotes() {
|
|
42889
|
+
const { regexes, commit } = this;
|
|
42890
|
+
if (!this.isLineAvailable()) {
|
|
42891
|
+
return false;
|
|
42892
|
+
}
|
|
42893
|
+
const matches = this.currentLine().match(regexes.notes);
|
|
42894
|
+
let references = [];
|
|
42895
|
+
if (matches) {
|
|
42896
|
+
const note = {
|
|
42897
|
+
title: matches[1],
|
|
42898
|
+
text: matches[2]
|
|
42899
|
+
};
|
|
42900
|
+
commit.notes.push(note);
|
|
42901
|
+
commit.footer = appendLine2(commit.footer, this.currentLine());
|
|
42902
|
+
this.nextLine();
|
|
42903
|
+
while (this.isLineAvailable()) {
|
|
42904
|
+
if (this.parseMeta()) {
|
|
42905
|
+
return true;
|
|
42906
|
+
}
|
|
42907
|
+
if (this.parseNotes()) {
|
|
42908
|
+
return true;
|
|
42909
|
+
}
|
|
42910
|
+
references = this.parseReferences(this.currentLine());
|
|
42911
|
+
if (references.length) {
|
|
42912
|
+
commit.references.push(...references);
|
|
42913
|
+
} else {
|
|
42914
|
+
note.text = appendLine2(note.text, this.currentLine());
|
|
42915
|
+
}
|
|
42916
|
+
commit.footer = appendLine2(commit.footer, this.currentLine());
|
|
42917
|
+
this.nextLine();
|
|
42918
|
+
if (references.length) {
|
|
42919
|
+
break;
|
|
42920
|
+
}
|
|
42921
|
+
}
|
|
42922
|
+
return true;
|
|
42923
|
+
}
|
|
42924
|
+
return false;
|
|
42925
|
+
}
|
|
42926
|
+
parseBodyAndFooter(isBody) {
|
|
42927
|
+
const { commit } = this;
|
|
42928
|
+
if (!this.isLineAvailable()) {
|
|
42929
|
+
return isBody;
|
|
42930
|
+
}
|
|
42931
|
+
const references = this.parseReferences(this.currentLine());
|
|
42932
|
+
const isStillBody = !references.length && isBody;
|
|
42933
|
+
if (isStillBody) {
|
|
42934
|
+
commit.body = appendLine2(commit.body, this.currentLine());
|
|
42935
|
+
} else {
|
|
42936
|
+
commit.references.push(...references);
|
|
42937
|
+
commit.footer = appendLine2(commit.footer, this.currentLine());
|
|
42938
|
+
}
|
|
42939
|
+
this.nextLine();
|
|
42940
|
+
return isStillBody;
|
|
42941
|
+
}
|
|
42942
|
+
parseBreakingHeader() {
|
|
42943
|
+
const { commit, options } = this;
|
|
42944
|
+
if (!options.breakingHeaderPattern || commit.notes.length || !commit.header) {
|
|
42945
|
+
return;
|
|
42946
|
+
}
|
|
42947
|
+
const matches = commit.header.match(options.breakingHeaderPattern);
|
|
42948
|
+
if (matches) {
|
|
42949
|
+
commit.notes.push({
|
|
42950
|
+
title: "BREAKING CHANGE",
|
|
42951
|
+
text: matches[3]
|
|
42952
|
+
});
|
|
42953
|
+
}
|
|
42954
|
+
}
|
|
42955
|
+
parseMentions(input) {
|
|
42956
|
+
const { commit, regexes } = this;
|
|
42957
|
+
let matches;
|
|
42958
|
+
for (; ; ) {
|
|
42959
|
+
matches = regexes.mentions.exec(input);
|
|
42960
|
+
if (!matches) {
|
|
42961
|
+
break;
|
|
42962
|
+
}
|
|
42963
|
+
commit.mentions.push(matches[1]);
|
|
42964
|
+
}
|
|
42965
|
+
}
|
|
42966
|
+
parseRevert(input) {
|
|
42967
|
+
const { commit, options } = this;
|
|
42968
|
+
const correspondence = options.revertCorrespondence || [];
|
|
42969
|
+
const matches = options.revertPattern ? input.match(options.revertPattern) : null;
|
|
42970
|
+
if (matches) {
|
|
42971
|
+
commit.revert = assignMatchedCorrespondence2({}, matches, correspondence);
|
|
42972
|
+
}
|
|
42973
|
+
}
|
|
42974
|
+
cleanupCommit() {
|
|
42975
|
+
const { commit } = this;
|
|
42976
|
+
if (commit.body) {
|
|
42977
|
+
commit.body = trimNewLines2(commit.body);
|
|
42978
|
+
}
|
|
42979
|
+
if (commit.footer) {
|
|
42980
|
+
commit.footer = trimNewLines2(commit.footer);
|
|
42981
|
+
}
|
|
42982
|
+
commit.notes.forEach((note) => {
|
|
42983
|
+
note.text = trimNewLines2(note.text);
|
|
42984
|
+
});
|
|
42985
|
+
}
|
|
42986
|
+
/**
|
|
42987
|
+
* Parse commit message string into an object.
|
|
42988
|
+
* @param input - Commit message string.
|
|
42989
|
+
* @returns Commit object.
|
|
42990
|
+
*/
|
|
42991
|
+
parse(input) {
|
|
42992
|
+
if (!input.trim()) {
|
|
42993
|
+
throw new TypeError("Expected a raw commit");
|
|
42994
|
+
}
|
|
42995
|
+
const { commentChar } = this.options;
|
|
42996
|
+
const commentFilter = getCommentFilter2(commentChar);
|
|
42997
|
+
const rawLines = trimNewLines2(input).split(/\r?\n/);
|
|
42998
|
+
const lines = commentChar ? truncateToScissor2(rawLines, commentChar).filter((line) => commentFilter(line) && gpgFilter2(line)) : rawLines.filter((line) => gpgFilter2(line));
|
|
42999
|
+
const commit = createCommitObject2();
|
|
43000
|
+
this.lines = lines;
|
|
43001
|
+
this.lineIndex = 0;
|
|
43002
|
+
this.commit = commit;
|
|
43003
|
+
const isMergeCommit = this.parseMerge();
|
|
43004
|
+
this.parseHeader(isMergeCommit);
|
|
43005
|
+
if (commit.header) {
|
|
43006
|
+
commit.references = this.parseReferences(commit.header);
|
|
43007
|
+
}
|
|
43008
|
+
let isBody = true;
|
|
43009
|
+
while (this.isLineAvailable()) {
|
|
43010
|
+
this.parseMeta();
|
|
43011
|
+
if (this.parseNotes()) {
|
|
43012
|
+
isBody = false;
|
|
43013
|
+
}
|
|
43014
|
+
if (!this.parseBodyAndFooter(isBody)) {
|
|
43015
|
+
isBody = false;
|
|
43016
|
+
}
|
|
43017
|
+
}
|
|
43018
|
+
this.parseBreakingHeader();
|
|
43019
|
+
this.parseMentions(input);
|
|
43020
|
+
this.parseRevert(input);
|
|
43021
|
+
this.cleanupCommit();
|
|
43022
|
+
return commit;
|
|
43023
|
+
}
|
|
43024
|
+
};
|
|
43025
|
+
}
|
|
43026
|
+
});
|
|
43027
|
+
|
|
43028
|
+
// ../version/dist/dist-XFQOB6BJ.js
|
|
43029
|
+
var dist_XFQOB6BJ_exports = {};
|
|
43030
|
+
__export(dist_XFQOB6BJ_exports, {
|
|
43031
|
+
RevertedCommitsFilter: () => RevertedCommitsFilter2,
|
|
43032
|
+
filterRevertedCommits: () => filterRevertedCommits2,
|
|
43033
|
+
filterRevertedCommitsStream: () => filterRevertedCommitsStream2,
|
|
43034
|
+
filterRevertedCommitsSync: () => filterRevertedCommitsSync2
|
|
43035
|
+
});
|
|
43036
|
+
import { Transform as Transform4 } from "stream";
|
|
43037
|
+
function isMatch2(object, source) {
|
|
43038
|
+
let aValue;
|
|
43039
|
+
let bValue;
|
|
43040
|
+
for (const key in source) {
|
|
43041
|
+
aValue = object[key];
|
|
43042
|
+
bValue = source[key];
|
|
43043
|
+
if (typeof aValue === "string") {
|
|
43044
|
+
aValue = aValue.trim();
|
|
43045
|
+
}
|
|
43046
|
+
if (typeof bValue === "string") {
|
|
43047
|
+
bValue = bValue.trim();
|
|
43048
|
+
}
|
|
43049
|
+
if (aValue !== bValue) {
|
|
43050
|
+
return false;
|
|
43051
|
+
}
|
|
43052
|
+
}
|
|
43053
|
+
return true;
|
|
43054
|
+
}
|
|
43055
|
+
function findRevertCommit2(commit, reverts) {
|
|
43056
|
+
if (!reverts.size) {
|
|
43057
|
+
return null;
|
|
43058
|
+
}
|
|
43059
|
+
const rawCommit = commit.raw || commit;
|
|
43060
|
+
for (const revertCommit of reverts) {
|
|
43061
|
+
if (revertCommit.revert && isMatch2(rawCommit, revertCommit.revert)) {
|
|
43062
|
+
return revertCommit;
|
|
43063
|
+
}
|
|
43064
|
+
}
|
|
43065
|
+
return null;
|
|
43066
|
+
}
|
|
43067
|
+
async function* filterRevertedCommits2(commits) {
|
|
43068
|
+
const filter3 = new RevertedCommitsFilter2();
|
|
43069
|
+
for await (const commit of commits) {
|
|
43070
|
+
yield* filter3.process(commit);
|
|
43071
|
+
}
|
|
43072
|
+
yield* filter3.flush();
|
|
43073
|
+
}
|
|
43074
|
+
function* filterRevertedCommitsSync2(commits) {
|
|
43075
|
+
const filter3 = new RevertedCommitsFilter2();
|
|
43076
|
+
for (const commit of commits) {
|
|
43077
|
+
yield* filter3.process(commit);
|
|
43078
|
+
}
|
|
43079
|
+
yield* filter3.flush();
|
|
43080
|
+
}
|
|
43081
|
+
function filterRevertedCommitsStream2() {
|
|
43082
|
+
return Transform4.from(filterRevertedCommits2);
|
|
43083
|
+
}
|
|
43084
|
+
var RevertedCommitsFilter2;
|
|
43085
|
+
var init_dist_XFQOB6BJ = __esm({
|
|
43086
|
+
"../version/dist/dist-XFQOB6BJ.js"() {
|
|
43087
|
+
"use strict";
|
|
43088
|
+
RevertedCommitsFilter2 = class {
|
|
43089
|
+
hold = /* @__PURE__ */ new Set();
|
|
43090
|
+
holdRevertsCount = 0;
|
|
43091
|
+
/**
|
|
43092
|
+
* Process commit to filter reverted commits
|
|
43093
|
+
* @param commit
|
|
43094
|
+
* @yields Commit
|
|
43095
|
+
*/
|
|
43096
|
+
*process(commit) {
|
|
43097
|
+
const { hold } = this;
|
|
43098
|
+
const revertCommit = findRevertCommit2(commit, hold);
|
|
43099
|
+
if (revertCommit) {
|
|
43100
|
+
hold.delete(revertCommit);
|
|
43101
|
+
this.holdRevertsCount--;
|
|
43102
|
+
return;
|
|
43103
|
+
}
|
|
43104
|
+
if (commit.revert) {
|
|
43105
|
+
hold.add(commit);
|
|
43106
|
+
this.holdRevertsCount++;
|
|
43107
|
+
return;
|
|
43108
|
+
}
|
|
43109
|
+
if (this.holdRevertsCount > 0) {
|
|
43110
|
+
hold.add(commit);
|
|
43111
|
+
} else {
|
|
43112
|
+
if (hold.size) {
|
|
43113
|
+
yield* hold;
|
|
43114
|
+
hold.clear();
|
|
43115
|
+
}
|
|
43116
|
+
yield commit;
|
|
43117
|
+
}
|
|
43118
|
+
}
|
|
43119
|
+
/**
|
|
43120
|
+
* Flush all held commits
|
|
43121
|
+
* @yields Held commits
|
|
43122
|
+
*/
|
|
43123
|
+
*flush() {
|
|
43124
|
+
const { hold } = this;
|
|
43125
|
+
if (hold.size) {
|
|
43126
|
+
yield* hold;
|
|
43127
|
+
hold.clear();
|
|
43128
|
+
}
|
|
43129
|
+
}
|
|
43130
|
+
};
|
|
43131
|
+
}
|
|
43132
|
+
});
|
|
43133
|
+
|
|
43366
43134
|
// ../version/dist/commandExecutor-E44ID5U4.js
|
|
43367
43135
|
var commandExecutor_E44ID5U4_exports = {};
|
|
43368
43136
|
__export(commandExecutor_E44ID5U4_exports, {
|
|
@@ -43388,9 +43156,9 @@ var init_baseError_DQHIJACF = __esm({
|
|
|
43388
43156
|
}
|
|
43389
43157
|
});
|
|
43390
43158
|
|
|
43391
|
-
// ../version/dist/chunk-
|
|
43159
|
+
// ../version/dist/chunk-45DJUNXI.js
|
|
43392
43160
|
import * as fs15 from "fs";
|
|
43393
|
-
import * as
|
|
43161
|
+
import * as path16 from "path";
|
|
43394
43162
|
import * as TOML3 from "smol-toml";
|
|
43395
43163
|
import * as fs34 from "fs";
|
|
43396
43164
|
import * as path34 from "path";
|
|
@@ -43401,26 +43169,28 @@ import * as os3 from "os";
|
|
|
43401
43169
|
import * as path23 from "path";
|
|
43402
43170
|
import fs44 from "fs";
|
|
43403
43171
|
import { cwd } from "process";
|
|
43172
|
+
import { spawn as spawn2 } from "child_process";
|
|
43173
|
+
import path44 from "path";
|
|
43404
43174
|
import chalk5 from "chalk";
|
|
43405
43175
|
import fs63 from "fs";
|
|
43406
|
-
import
|
|
43176
|
+
import path64 from "path";
|
|
43407
43177
|
import fs54 from "fs";
|
|
43408
|
-
import
|
|
43178
|
+
import path54 from "path";
|
|
43409
43179
|
import * as TOML23 from "smol-toml";
|
|
43410
43180
|
import * as fs93 from "fs";
|
|
43411
|
-
import
|
|
43181
|
+
import path83 from "path";
|
|
43412
43182
|
import fs83 from "fs";
|
|
43413
43183
|
import fs103 from "fs";
|
|
43414
|
-
import * as
|
|
43184
|
+
import * as path92 from "path";
|
|
43415
43185
|
import { cwd as cwd2 } from "process";
|
|
43416
|
-
import
|
|
43186
|
+
import path102 from "path";
|
|
43417
43187
|
import { Command as Command3 } from "commander";
|
|
43418
43188
|
function parseCargoToml2(cargoPath) {
|
|
43419
43189
|
const content = fs15.readFileSync(cargoPath, "utf-8");
|
|
43420
43190
|
return TOML3.parse(content);
|
|
43421
43191
|
}
|
|
43422
43192
|
function isCargoToml(filePath) {
|
|
43423
|
-
return
|
|
43193
|
+
return path16.basename(filePath) === "Cargo.toml";
|
|
43424
43194
|
}
|
|
43425
43195
|
function parseJsonc3(content) {
|
|
43426
43196
|
if (content.length > MAX_JSONC_LENGTH3) {
|
|
@@ -43629,14 +43399,14 @@ function enableJsonOutput(dryRun = false) {
|
|
|
43629
43399
|
_jsonData.commitMessage = void 0;
|
|
43630
43400
|
_pendingWrites.length = 0;
|
|
43631
43401
|
}
|
|
43632
|
-
function recordPendingWrite(
|
|
43402
|
+
function recordPendingWrite(path112, content) {
|
|
43633
43403
|
if (!_jsonOutputMode) return;
|
|
43634
|
-
_pendingWrites.push({ path:
|
|
43404
|
+
_pendingWrites.push({ path: path112, content });
|
|
43635
43405
|
}
|
|
43636
43406
|
function flushPendingWrites() {
|
|
43637
43407
|
try {
|
|
43638
|
-
for (const { path:
|
|
43639
|
-
fs44.writeFileSync(
|
|
43408
|
+
for (const { path: path112, content } of _pendingWrites) {
|
|
43409
|
+
fs44.writeFileSync(path112, content);
|
|
43640
43410
|
}
|
|
43641
43411
|
} finally {
|
|
43642
43412
|
_pendingWrites.length = 0;
|
|
@@ -43677,6 +43447,167 @@ function printJsonOutput() {
|
|
|
43677
43447
|
console.log(JSON.stringify(_jsonData, null, 2));
|
|
43678
43448
|
}
|
|
43679
43449
|
}
|
|
43450
|
+
function formatArgs2(...args) {
|
|
43451
|
+
return args.reduce((finalArgs, arg) => {
|
|
43452
|
+
if (arg) {
|
|
43453
|
+
finalArgs.push(String(arg));
|
|
43454
|
+
}
|
|
43455
|
+
return finalArgs;
|
|
43456
|
+
}, []);
|
|
43457
|
+
}
|
|
43458
|
+
function toArray5(value) {
|
|
43459
|
+
return Array.isArray(value) ? value : [value];
|
|
43460
|
+
}
|
|
43461
|
+
async function toArray22(iterable) {
|
|
43462
|
+
const result = [];
|
|
43463
|
+
for await (const item of iterable) {
|
|
43464
|
+
result.push(item);
|
|
43465
|
+
}
|
|
43466
|
+
return result;
|
|
43467
|
+
}
|
|
43468
|
+
async function concatBufferStream2(iterable) {
|
|
43469
|
+
return Buffer.concat(await toArray22(iterable));
|
|
43470
|
+
}
|
|
43471
|
+
async function firstFromStream2(stream) {
|
|
43472
|
+
for await (const tag of stream) {
|
|
43473
|
+
return tag;
|
|
43474
|
+
}
|
|
43475
|
+
return null;
|
|
43476
|
+
}
|
|
43477
|
+
async function* splitStream2(stream, separator) {
|
|
43478
|
+
let chunk;
|
|
43479
|
+
let payload;
|
|
43480
|
+
let buffer = "";
|
|
43481
|
+
for await (chunk of stream) {
|
|
43482
|
+
buffer += chunk.toString();
|
|
43483
|
+
if (buffer.includes(separator)) {
|
|
43484
|
+
payload = buffer.split(separator);
|
|
43485
|
+
buffer = payload.pop() || "";
|
|
43486
|
+
yield* payload;
|
|
43487
|
+
}
|
|
43488
|
+
}
|
|
43489
|
+
if (buffer) {
|
|
43490
|
+
yield buffer;
|
|
43491
|
+
}
|
|
43492
|
+
}
|
|
43493
|
+
async function exitCode2(process2) {
|
|
43494
|
+
if (process2.exitCode !== null) {
|
|
43495
|
+
return process2.exitCode;
|
|
43496
|
+
}
|
|
43497
|
+
return new Promise((resolve22) => process2.once("close", resolve22));
|
|
43498
|
+
}
|
|
43499
|
+
async function catchProcessError2(process2) {
|
|
43500
|
+
let error3 = new Error("Process exited with non-zero code");
|
|
43501
|
+
let stderr = "";
|
|
43502
|
+
process2.on("error", (err) => {
|
|
43503
|
+
error3 = err;
|
|
43504
|
+
});
|
|
43505
|
+
if (process2.stderr) {
|
|
43506
|
+
let chunk;
|
|
43507
|
+
for await (chunk of process2.stderr) {
|
|
43508
|
+
stderr += chunk.toString();
|
|
43509
|
+
}
|
|
43510
|
+
}
|
|
43511
|
+
const code = await exitCode2(process2);
|
|
43512
|
+
if (stderr) {
|
|
43513
|
+
error3 = new Error(stderr);
|
|
43514
|
+
}
|
|
43515
|
+
return code ? error3 : null;
|
|
43516
|
+
}
|
|
43517
|
+
async function* outputStream2(process2) {
|
|
43518
|
+
const { stdout } = process2;
|
|
43519
|
+
const errorPromise = catchProcessError2(process2);
|
|
43520
|
+
if (stdout) {
|
|
43521
|
+
stdout.on("error", (err) => {
|
|
43522
|
+
if (err.name === "AbortError" && process2.exitCode === null) {
|
|
43523
|
+
process2.kill("SIGKILL");
|
|
43524
|
+
}
|
|
43525
|
+
});
|
|
43526
|
+
yield* stdout;
|
|
43527
|
+
}
|
|
43528
|
+
const error3 = await errorPromise;
|
|
43529
|
+
if (error3) {
|
|
43530
|
+
throw error3;
|
|
43531
|
+
}
|
|
43532
|
+
}
|
|
43533
|
+
function output2(process2) {
|
|
43534
|
+
return concatBufferStream2(outputStream2(process2));
|
|
43535
|
+
}
|
|
43536
|
+
function resolvePresetNameVariants(preset) {
|
|
43537
|
+
if (path44.isAbsolute(preset)) {
|
|
43538
|
+
return [preset];
|
|
43539
|
+
}
|
|
43540
|
+
let scope = "";
|
|
43541
|
+
let name = preset.toLocaleLowerCase();
|
|
43542
|
+
if (preset.startsWith("@")) {
|
|
43543
|
+
const parts = preset.split("/");
|
|
43544
|
+
scope = `${parts.shift()}/`;
|
|
43545
|
+
if (scope === "@conventional-changelog/") {
|
|
43546
|
+
return [preset];
|
|
43547
|
+
}
|
|
43548
|
+
name = parts.join("/");
|
|
43549
|
+
}
|
|
43550
|
+
if (!name.startsWith("conventional-changelog-")) {
|
|
43551
|
+
name = `conventional-changelog-${name}`;
|
|
43552
|
+
}
|
|
43553
|
+
const altPreset = `${scope}${name}`;
|
|
43554
|
+
if (altPreset !== preset) {
|
|
43555
|
+
return [altPreset, preset];
|
|
43556
|
+
}
|
|
43557
|
+
return [preset];
|
|
43558
|
+
}
|
|
43559
|
+
function getModuleDefaultExport(module2) {
|
|
43560
|
+
if (("__esModule" in module2 || Object.getPrototypeOf(module2) === null) && "default" in module2) {
|
|
43561
|
+
return module2.default;
|
|
43562
|
+
}
|
|
43563
|
+
return module2;
|
|
43564
|
+
}
|
|
43565
|
+
async function loadWithFallbacks(moduleLoader, variants) {
|
|
43566
|
+
let error3 = null;
|
|
43567
|
+
for (const variant of variants) {
|
|
43568
|
+
try {
|
|
43569
|
+
return getModuleDefaultExport(await moduleLoader(variant));
|
|
43570
|
+
} catch (err) {
|
|
43571
|
+
if (!error3) {
|
|
43572
|
+
error3 = err;
|
|
43573
|
+
}
|
|
43574
|
+
}
|
|
43575
|
+
}
|
|
43576
|
+
throw error3;
|
|
43577
|
+
}
|
|
43578
|
+
function createPresetLoader(moduleLoader) {
|
|
43579
|
+
return async function loadPreset2(presetOrParams) {
|
|
43580
|
+
let preset = "";
|
|
43581
|
+
let params = null;
|
|
43582
|
+
if (typeof presetOrParams === "string") {
|
|
43583
|
+
preset = presetOrParams;
|
|
43584
|
+
} else if (typeof presetOrParams === "object" && typeof presetOrParams.name === "string") {
|
|
43585
|
+
preset = presetOrParams.name;
|
|
43586
|
+
params = presetOrParams;
|
|
43587
|
+
} else {
|
|
43588
|
+
throw Error("Preset must be string or object with property `name`");
|
|
43589
|
+
}
|
|
43590
|
+
const presetNameVariants = resolvePresetNameVariants(preset);
|
|
43591
|
+
let createPreset = null;
|
|
43592
|
+
try {
|
|
43593
|
+
createPreset = await loadWithFallbacks(moduleLoader, presetNameVariants);
|
|
43594
|
+
} catch (err) {
|
|
43595
|
+
throw new Error(`Unable to load the "${preset}" preset. Please make sure it's installed.`, {
|
|
43596
|
+
cause: err
|
|
43597
|
+
});
|
|
43598
|
+
}
|
|
43599
|
+
if (typeof createPreset !== "function") {
|
|
43600
|
+
throw new Error(`The "${preset}" preset does not export a function. Maybe you are using an old version of the preset. Please upgrade.`);
|
|
43601
|
+
}
|
|
43602
|
+
return params ? await createPreset(params) : await createPreset();
|
|
43603
|
+
};
|
|
43604
|
+
}
|
|
43605
|
+
function isIterable2(value) {
|
|
43606
|
+
return value !== null && (typeof value[Symbol.iterator] === "function" || typeof value[Symbol.asyncIterator] === "function");
|
|
43607
|
+
}
|
|
43608
|
+
function bindLogNamespace(namespace, logger) {
|
|
43609
|
+
return (messages) => logger(namespace, messages);
|
|
43610
|
+
}
|
|
43680
43611
|
function getCurrentBranch() {
|
|
43681
43612
|
const result = execSync("git", ["rev-parse", "--abbrev-ref", "HEAD"]);
|
|
43682
43613
|
return result.toString().trim();
|
|
@@ -43896,7 +43827,7 @@ function getCargoInfo(cargoPath) {
|
|
|
43896
43827
|
name: cargo.package.name,
|
|
43897
43828
|
version: cargo.package.version || "0.0.0",
|
|
43898
43829
|
path: cargoPath,
|
|
43899
|
-
dir:
|
|
43830
|
+
dir: path54.dirname(cargoPath),
|
|
43900
43831
|
content: cargo
|
|
43901
43832
|
};
|
|
43902
43833
|
} catch (error3) {
|
|
@@ -43937,8 +43868,8 @@ function updateCargoVersion2(cargoPath, version, dryRun = false) {
|
|
|
43937
43868
|
}
|
|
43938
43869
|
}
|
|
43939
43870
|
function getVersionFromManifests(packageDir) {
|
|
43940
|
-
const packageJsonPath =
|
|
43941
|
-
const cargoTomlPath =
|
|
43871
|
+
const packageJsonPath = path64.join(packageDir, "package.json");
|
|
43872
|
+
const cargoTomlPath = path64.join(packageDir, "Cargo.toml");
|
|
43942
43873
|
if (fs63.existsSync(packageJsonPath)) {
|
|
43943
43874
|
try {
|
|
43944
43875
|
const packageJson = JSON.parse(fs63.readFileSync(packageJsonPath, "utf-8"));
|
|
@@ -44342,8 +44273,8 @@ async function calculateVersion(config, options) {
|
|
|
44342
44273
|
function extractAllChangelogEntriesWithHash(projectDir, revisionRange) {
|
|
44343
44274
|
try {
|
|
44344
44275
|
const args = ["log", revisionRange, "--pretty=format:%H|||%B---COMMIT_DELIMITER---", "--no-merges"];
|
|
44345
|
-
const
|
|
44346
|
-
const commits =
|
|
44276
|
+
const output22 = execSync("git", args, { cwd: projectDir, encoding: "utf8" }).toString();
|
|
44277
|
+
const commits = output22.split("---COMMIT_DELIMITER---").filter((commit) => commit.trim() !== "");
|
|
44347
44278
|
return commits.map((commit) => {
|
|
44348
44279
|
const [hash, ...messageParts] = commit.split("|||");
|
|
44349
44280
|
const message = messageParts.join("|||").trim();
|
|
@@ -44361,14 +44292,14 @@ function extractAllChangelogEntriesWithHash(projectDir, revisionRange) {
|
|
|
44361
44292
|
}
|
|
44362
44293
|
function commitTouchesAnyPackage(projectDir, commitHash, packageDirs, sharedPackageDirs = []) {
|
|
44363
44294
|
try {
|
|
44364
|
-
const
|
|
44295
|
+
const output22 = execSync("git", ["diff-tree", "--no-commit-id", "--name-only", "-r", commitHash], {
|
|
44365
44296
|
cwd: projectDir,
|
|
44366
44297
|
encoding: "utf8"
|
|
44367
44298
|
}).toString().trim();
|
|
44368
|
-
if (!
|
|
44299
|
+
if (!output22) {
|
|
44369
44300
|
return false;
|
|
44370
44301
|
}
|
|
44371
|
-
const changedFiles =
|
|
44302
|
+
const changedFiles = output22.split("\n");
|
|
44372
44303
|
return changedFiles.some((file) => {
|
|
44373
44304
|
return packageDirs.some((pkgDir) => {
|
|
44374
44305
|
if (sharedPackageDirs.some((sharedDir) => pkgDir.includes(sharedDir))) {
|
|
@@ -44415,8 +44346,8 @@ function extractCommitsFromGitLog(projectDir, revisionRange, filterToPath) {
|
|
|
44415
44346
|
if (filterToPath) {
|
|
44416
44347
|
args.push("--", ".");
|
|
44417
44348
|
}
|
|
44418
|
-
const
|
|
44419
|
-
const commits =
|
|
44349
|
+
const output22 = execSync("git", args, { cwd: projectDir, encoding: "utf8" }).toString();
|
|
44350
|
+
const commits = output22.split("---COMMIT_DELIMITER---").filter((commit) => commit.trim() !== "");
|
|
44420
44351
|
return commits.map((commit) => parseCommitMessage(commit)).filter((entry) => entry !== null);
|
|
44421
44352
|
} catch (error3) {
|
|
44422
44353
|
const errorMessage = error3 instanceof Error ? error3.message : String(error3);
|
|
@@ -44575,14 +44506,14 @@ function updateCargoFiles(packageDir, version, cargoConfig, dryRun = false) {
|
|
|
44575
44506
|
const cargoPaths = cargoConfig?.paths;
|
|
44576
44507
|
if (cargoPaths && cargoPaths.length > 0) {
|
|
44577
44508
|
for (const cargoPath of cargoPaths) {
|
|
44578
|
-
const resolvedCargoPath =
|
|
44509
|
+
const resolvedCargoPath = path92.resolve(packageDir, cargoPath, "Cargo.toml");
|
|
44579
44510
|
if (fs103.existsSync(resolvedCargoPath)) {
|
|
44580
44511
|
updatePackageVersion(resolvedCargoPath, version, dryRun);
|
|
44581
44512
|
updatedFiles.push(resolvedCargoPath);
|
|
44582
44513
|
}
|
|
44583
44514
|
}
|
|
44584
44515
|
} else {
|
|
44585
|
-
const cargoTomlPath =
|
|
44516
|
+
const cargoTomlPath = path92.join(packageDir, "Cargo.toml");
|
|
44586
44517
|
if (fs103.existsSync(cargoTomlPath)) {
|
|
44587
44518
|
updatePackageVersion(cargoTomlPath, version, dryRun);
|
|
44588
44519
|
updatedFiles.push(cargoTomlPath);
|
|
@@ -44663,7 +44594,7 @@ function createSyncStrategy(config) {
|
|
|
44663
44594
|
const processedPaths = /* @__PURE__ */ new Set();
|
|
44664
44595
|
try {
|
|
44665
44596
|
if (packages.root) {
|
|
44666
|
-
const rootPkgPath =
|
|
44597
|
+
const rootPkgPath = path92.join(packages.root, "package.json");
|
|
44667
44598
|
if (fs103.existsSync(rootPkgPath)) {
|
|
44668
44599
|
updatePackageVersion(rootPkgPath, nextVersion, dryRun);
|
|
44669
44600
|
files.push(rootPkgPath);
|
|
@@ -44683,7 +44614,7 @@ function createSyncStrategy(config) {
|
|
|
44683
44614
|
if (!shouldProcessPackage2(pkg, config)) {
|
|
44684
44615
|
continue;
|
|
44685
44616
|
}
|
|
44686
|
-
const packageJsonPath =
|
|
44617
|
+
const packageJsonPath = path92.join(pkg.dir, "package.json");
|
|
44687
44618
|
if (processedPaths.has(packageJsonPath)) {
|
|
44688
44619
|
continue;
|
|
44689
44620
|
}
|
|
@@ -44742,7 +44673,7 @@ function createSyncStrategy(config) {
|
|
|
44742
44673
|
let repoUrl = null;
|
|
44743
44674
|
for (const searchPath of [mainPkgPath, versionSourcePath].filter(Boolean)) {
|
|
44744
44675
|
try {
|
|
44745
|
-
const pkgJsonPath =
|
|
44676
|
+
const pkgJsonPath = path92.join(searchPath, "package.json");
|
|
44746
44677
|
if (fs103.existsSync(pkgJsonPath)) {
|
|
44747
44678
|
const pkgJson = JSON.parse(fs103.readFileSync(pkgJsonPath, "utf8"));
|
|
44748
44679
|
let url;
|
|
@@ -44911,7 +44842,7 @@ function createSingleStrategy(config) {
|
|
|
44911
44842
|
}
|
|
44912
44843
|
let repoUrl;
|
|
44913
44844
|
try {
|
|
44914
|
-
const packageJsonPath2 =
|
|
44845
|
+
const packageJsonPath2 = path92.join(pkgPath, "package.json");
|
|
44915
44846
|
if (fs103.existsSync(packageJsonPath2)) {
|
|
44916
44847
|
const packageJson = JSON.parse(fs103.readFileSync(packageJsonPath2, "utf8"));
|
|
44917
44848
|
if (packageJson.repository) {
|
|
@@ -44939,7 +44870,7 @@ function createSingleStrategy(config) {
|
|
|
44939
44870
|
repoUrl: repoUrl || null,
|
|
44940
44871
|
entries: changelogEntries
|
|
44941
44872
|
});
|
|
44942
|
-
const packageJsonPath =
|
|
44873
|
+
const packageJsonPath = path92.join(pkgPath, "package.json");
|
|
44943
44874
|
updatePackageVersion(packageJsonPath, nextVersion, dryRun);
|
|
44944
44875
|
const filesToCommit = [packageJsonPath];
|
|
44945
44876
|
const cargoFiles = updateCargoFiles(pkgPath, nextVersion, config.cargo, dryRun);
|
|
@@ -45059,7 +44990,7 @@ function filterByDirectoryPattern(packages, pattern, workspaceRoot) {
|
|
|
45059
44990
|
}
|
|
45060
44991
|
const normalizedPattern = pattern.replace(/\\/g, "/");
|
|
45061
44992
|
return packages.filter((pkg) => {
|
|
45062
|
-
const relativePath =
|
|
44993
|
+
const relativePath = path102.relative(workspaceRoot, pkg.dir);
|
|
45063
44994
|
const normalizedRelativePath = relativePath.replace(/\\/g, "/");
|
|
45064
44995
|
if (normalizedPattern === normalizedRelativePath) {
|
|
45065
44996
|
return true;
|
|
@@ -45176,13 +45107,13 @@ function createVersionCommand() {
|
|
|
45176
45107
|
}
|
|
45177
45108
|
});
|
|
45178
45109
|
}
|
|
45179
|
-
var import_semver4, import_semver5, import_semver6, ConfigError4, MAX_JSONC_LENGTH3, GitConfigSchema3, MonorepoConfigSchema3, BranchPatternSchema3, VersionCargoConfigSchema3, VersionConfigSchema3, NpmConfigSchema3, CargoPublishConfigSchema3, PublishGitConfigSchema3, GitHubReleaseConfigSchema3, VerifyRegistryConfigSchema3, VerifyConfigSchema3, PublishConfigSchema3, TemplateConfigSchema3, LocationModeSchema3, ChangelogConfigSchema3, LLMOptionsSchema3, LLMRetryConfigSchema3, LLMTasksConfigSchema3, LLMCategorySchema3, ScopeRulesSchema3, ScopeConfigSchema3, LLMPromptOverridesSchema3, LLMPromptsConfigSchema3, LLMConfigSchema3, ReleaseNotesConfigSchema3, NotesInputConfigSchema3, NotesConfigSchema3, CILabelsConfigSchema3, CIConfigSchema3, ReleaseCIConfigSchema3, ReleaseConfigSchema3, ReleaseKitConfigSchema3, MAX_INPUT_LENGTH3, SOLE_REFERENCE_PATTERN3, AUTH_DIR3, AUTH_FILE3, CONFIG_FILE3, VersionError, VersionErrorCode, _jsonOutputMode, _pendingWrites, _jsonData, STANDARD_BUMP_TYPES, VersionMismatchError, CONVENTIONAL_COMMIT_REGEX, BREAKING_CHANGE_REGEX, PackageProcessor, GitError, VersionEngine;
|
|
45180
|
-
var
|
|
45181
|
-
"../version/dist/chunk-
|
|
45110
|
+
var import_semver3, import_semver4, import_semver5, import_semver6, ConfigError4, MAX_JSONC_LENGTH3, GitConfigSchema3, MonorepoConfigSchema3, BranchPatternSchema3, VersionCargoConfigSchema3, VersionConfigSchema3, NpmConfigSchema3, CargoPublishConfigSchema3, PublishGitConfigSchema3, GitHubReleaseConfigSchema3, VerifyRegistryConfigSchema3, VerifyConfigSchema3, PublishConfigSchema3, TemplateConfigSchema3, LocationModeSchema3, ChangelogConfigSchema3, LLMOptionsSchema3, LLMRetryConfigSchema3, LLMTasksConfigSchema3, LLMCategorySchema3, ScopeRulesSchema3, ScopeConfigSchema3, LLMPromptOverridesSchema3, LLMPromptsConfigSchema3, LLMConfigSchema3, ReleaseNotesConfigSchema3, NotesInputConfigSchema3, NotesConfigSchema3, CILabelsConfigSchema3, CIConfigSchema3, ReleaseCIConfigSchema3, ReleaseConfigSchema3, ReleaseKitConfigSchema3, MAX_INPUT_LENGTH3, SOLE_REFERENCE_PATTERN3, AUTH_DIR3, AUTH_FILE3, CONFIG_FILE3, VersionError, VersionErrorCode, _jsonOutputMode, _pendingWrites, _jsonData, SCISSOR4, GitClient2, ConventionalGitClient2, loadPreset, VERSIONS, Bumper, STANDARD_BUMP_TYPES, VersionMismatchError, CONVENTIONAL_COMMIT_REGEX, BREAKING_CHANGE_REGEX, PackageProcessor, GitError, VersionEngine;
|
|
45111
|
+
var init_chunk_45DJUNXI = __esm({
|
|
45112
|
+
"../version/dist/chunk-45DJUNXI.js"() {
|
|
45182
45113
|
"use strict";
|
|
45183
45114
|
init_chunk_Q3FHZORY();
|
|
45184
45115
|
init_chunk_LMPZV35Z();
|
|
45185
|
-
|
|
45116
|
+
import_semver3 = __toESM(require_semver2(), 1);
|
|
45186
45117
|
import_semver4 = __toESM(require_semver2(), 1);
|
|
45187
45118
|
init_src();
|
|
45188
45119
|
import_semver5 = __toESM(require_semver2(), 1);
|
|
@@ -45516,6 +45447,500 @@ var init_chunk_UBCKZYTO = __esm({
|
|
|
45516
45447
|
sharedEntries: void 0,
|
|
45517
45448
|
tags: []
|
|
45518
45449
|
};
|
|
45450
|
+
SCISSOR4 = "------------------------ >8 ------------------------";
|
|
45451
|
+
GitClient2 = class {
|
|
45452
|
+
cwd;
|
|
45453
|
+
debug;
|
|
45454
|
+
constructor(cwd3, debug3) {
|
|
45455
|
+
this.cwd = cwd3;
|
|
45456
|
+
this.debug = debug3;
|
|
45457
|
+
}
|
|
45458
|
+
formatArgs(...args) {
|
|
45459
|
+
const finalArgs = formatArgs2(...args);
|
|
45460
|
+
if (this.debug) {
|
|
45461
|
+
this.debug(finalArgs);
|
|
45462
|
+
}
|
|
45463
|
+
return finalArgs;
|
|
45464
|
+
}
|
|
45465
|
+
/**
|
|
45466
|
+
* Raw exec method to run git commands.
|
|
45467
|
+
* @param args
|
|
45468
|
+
* @returns Stdout string output of the command.
|
|
45469
|
+
*/
|
|
45470
|
+
async exec(...args) {
|
|
45471
|
+
return (await output2(spawn2("git", this.formatArgs(...args), {
|
|
45472
|
+
cwd: this.cwd
|
|
45473
|
+
}))).toString().trim();
|
|
45474
|
+
}
|
|
45475
|
+
/**
|
|
45476
|
+
* Raw exec method to run git commands with stream output.
|
|
45477
|
+
* @param args
|
|
45478
|
+
* @returns Stdout stream of the command.
|
|
45479
|
+
*/
|
|
45480
|
+
execStream(...args) {
|
|
45481
|
+
return outputStream2(spawn2("git", this.formatArgs(...args), {
|
|
45482
|
+
cwd: this.cwd
|
|
45483
|
+
}));
|
|
45484
|
+
}
|
|
45485
|
+
/**
|
|
45486
|
+
* Initialize a new git repository.
|
|
45487
|
+
* @returns Boolean result.
|
|
45488
|
+
*/
|
|
45489
|
+
async init() {
|
|
45490
|
+
try {
|
|
45491
|
+
await this.exec("init");
|
|
45492
|
+
return true;
|
|
45493
|
+
} catch (err) {
|
|
45494
|
+
return false;
|
|
45495
|
+
}
|
|
45496
|
+
}
|
|
45497
|
+
/**
|
|
45498
|
+
* Get raw commits stream.
|
|
45499
|
+
* @param params
|
|
45500
|
+
* @param params.path - Read commits from specific path.
|
|
45501
|
+
* @param params.from - Start commits range.
|
|
45502
|
+
* @param params.to - End commits range.
|
|
45503
|
+
* @param params.format - Commits format.
|
|
45504
|
+
* @yields Raw commits data.
|
|
45505
|
+
*/
|
|
45506
|
+
async *getRawCommits(params = {}) {
|
|
45507
|
+
const { path: path112, from = "", to = "HEAD", format: format2 = "%B", ignore, reverse: reverse2, merges, since } = params;
|
|
45508
|
+
const shouldNotIgnore = ignore ? (chunk2) => !ignore.test(chunk2) : () => true;
|
|
45509
|
+
const stdout = this.execStream("log", `--format=${format2}%n${SCISSOR4}`, since && `--since=${since instanceof Date ? since.toISOString() : since}`, reverse2 && "--reverse", merges && "--merges", merges === false && "--no-merges", [from, to].filter(Boolean).join(".."), ...path112 ? ["--", ...toArray5(path112)] : []);
|
|
45510
|
+
const commitsStream = splitStream2(stdout, `${SCISSOR4}
|
|
45511
|
+
`);
|
|
45512
|
+
let chunk;
|
|
45513
|
+
for await (chunk of commitsStream) {
|
|
45514
|
+
if (shouldNotIgnore(chunk)) {
|
|
45515
|
+
yield chunk;
|
|
45516
|
+
}
|
|
45517
|
+
}
|
|
45518
|
+
}
|
|
45519
|
+
/**
|
|
45520
|
+
* Get tags stream.
|
|
45521
|
+
* @param params
|
|
45522
|
+
* @yields Tags
|
|
45523
|
+
*/
|
|
45524
|
+
async *getTags(params = {}) {
|
|
45525
|
+
const { path: path112, from = "", to = "HEAD", since } = params;
|
|
45526
|
+
const tagRegex = /tag:\s*(.+?)[,)]/gi;
|
|
45527
|
+
const stdout = this.execStream("log", "--decorate", "--no-color", "--date-order", since && `--since=${since instanceof Date ? since.toISOString() : since}`, [from, to].filter(Boolean).join(".."), ...path112 ? ["--", ...toArray5(path112)] : []);
|
|
45528
|
+
let chunk;
|
|
45529
|
+
let matches;
|
|
45530
|
+
let tag;
|
|
45531
|
+
for await (chunk of stdout) {
|
|
45532
|
+
matches = chunk.toString().trim().matchAll(tagRegex);
|
|
45533
|
+
for ([, tag] of matches) {
|
|
45534
|
+
yield tag;
|
|
45535
|
+
}
|
|
45536
|
+
}
|
|
45537
|
+
}
|
|
45538
|
+
/**
|
|
45539
|
+
* Get last tag.
|
|
45540
|
+
* @param params
|
|
45541
|
+
* @returns Last tag, `null` if not found.
|
|
45542
|
+
*/
|
|
45543
|
+
async getLastTag(params) {
|
|
45544
|
+
return firstFromStream2(this.getTags(params));
|
|
45545
|
+
}
|
|
45546
|
+
/**
|
|
45547
|
+
* Check file is ignored via .gitignore.
|
|
45548
|
+
* @param file - Path to target file.
|
|
45549
|
+
* @returns Boolean value.
|
|
45550
|
+
*/
|
|
45551
|
+
async checkIgnore(file) {
|
|
45552
|
+
try {
|
|
45553
|
+
await this.exec("check-ignore", "--", file);
|
|
45554
|
+
return true;
|
|
45555
|
+
} catch (err) {
|
|
45556
|
+
return false;
|
|
45557
|
+
}
|
|
45558
|
+
}
|
|
45559
|
+
/**
|
|
45560
|
+
* Add files to git index.
|
|
45561
|
+
* @param files - Files to stage.
|
|
45562
|
+
*/
|
|
45563
|
+
async add(files) {
|
|
45564
|
+
await this.exec("add", "--", ...toArray5(files));
|
|
45565
|
+
}
|
|
45566
|
+
/**
|
|
45567
|
+
* Commit changes.
|
|
45568
|
+
* @param params
|
|
45569
|
+
* @param params.verify
|
|
45570
|
+
* @param params.sign
|
|
45571
|
+
* @param params.files
|
|
45572
|
+
* @param params.allowEmpty
|
|
45573
|
+
* @param params.message
|
|
45574
|
+
*/
|
|
45575
|
+
async commit(params) {
|
|
45576
|
+
const { verify = true, sign = false, files = [], allowEmpty = false, message } = params;
|
|
45577
|
+
await this.exec("commit", !verify && "--no-verify", sign && "-S", allowEmpty && "--allow-empty", "-m", message, "--", ...files);
|
|
45578
|
+
}
|
|
45579
|
+
/**
|
|
45580
|
+
* Create a tag for the current commit.
|
|
45581
|
+
* @param params
|
|
45582
|
+
* @param params.sign
|
|
45583
|
+
* @param params.name
|
|
45584
|
+
* @param params.message
|
|
45585
|
+
*/
|
|
45586
|
+
async tag(params) {
|
|
45587
|
+
let { sign = false, name, message } = params;
|
|
45588
|
+
if (sign) {
|
|
45589
|
+
message = "";
|
|
45590
|
+
}
|
|
45591
|
+
await this.exec("tag", sign && "-s", message && "-a", ...message ? ["-m", message] : [], "--", name);
|
|
45592
|
+
}
|
|
45593
|
+
/**
|
|
45594
|
+
* Get current branch name.
|
|
45595
|
+
* @returns Current branch name.
|
|
45596
|
+
*/
|
|
45597
|
+
async getCurrentBranch() {
|
|
45598
|
+
const branch = await this.exec("rev-parse", "--abbrev-ref", "HEAD");
|
|
45599
|
+
return branch;
|
|
45600
|
+
}
|
|
45601
|
+
/**
|
|
45602
|
+
* Get default branch name.
|
|
45603
|
+
* @returns Default branch name.
|
|
45604
|
+
*/
|
|
45605
|
+
async getDefaultBranch() {
|
|
45606
|
+
const branch = (await this.exec("rev-parse", "--abbrev-ref", "origin/HEAD")).replace(/^origin\//, "");
|
|
45607
|
+
return branch;
|
|
45608
|
+
}
|
|
45609
|
+
/**
|
|
45610
|
+
* Push changes to remote.
|
|
45611
|
+
* @param branch
|
|
45612
|
+
* @param params
|
|
45613
|
+
* @param params.verify
|
|
45614
|
+
*/
|
|
45615
|
+
async push(branch, params = {}) {
|
|
45616
|
+
const { verify = true, tags: tags2 = false, followTags = false, force = false } = params;
|
|
45617
|
+
await this.exec("push", followTags && "--follow-tags", tags2 && "--tags", !verify && "--no-verify", force && "--force", "origin", "--", branch);
|
|
45618
|
+
}
|
|
45619
|
+
/**
|
|
45620
|
+
* Verify rev exists.
|
|
45621
|
+
* @param rev
|
|
45622
|
+
* @param safe - If `true`, will not throw error if rev not found.
|
|
45623
|
+
* @returns Target hash.
|
|
45624
|
+
*/
|
|
45625
|
+
async verify(rev, safe) {
|
|
45626
|
+
let git = this.exec("rev-parse", "--verify", rev);
|
|
45627
|
+
if (safe) {
|
|
45628
|
+
git = git.catch(() => "");
|
|
45629
|
+
}
|
|
45630
|
+
return await git;
|
|
45631
|
+
}
|
|
45632
|
+
/**
|
|
45633
|
+
* Get config value by key.
|
|
45634
|
+
* @param key - Config key.
|
|
45635
|
+
* @returns Config value.
|
|
45636
|
+
*/
|
|
45637
|
+
async getConfig(key) {
|
|
45638
|
+
return await this.exec("config", "--get", "--", key);
|
|
45639
|
+
}
|
|
45640
|
+
/**
|
|
45641
|
+
* Set config value by key.
|
|
45642
|
+
* @param key - Config key.
|
|
45643
|
+
* @param value - Config value.
|
|
45644
|
+
*/
|
|
45645
|
+
async setConfig(key, value) {
|
|
45646
|
+
await this.exec("config", "--", key, value);
|
|
45647
|
+
}
|
|
45648
|
+
/**
|
|
45649
|
+
* Fetch changes from remote.
|
|
45650
|
+
* @param params
|
|
45651
|
+
*/
|
|
45652
|
+
async fetch(params = {}) {
|
|
45653
|
+
const { prune = false, unshallow = false, tags: tags2 = false, all = false, remote, branch } = params;
|
|
45654
|
+
await this.exec("fetch", prune && "--prune", unshallow && "--unshallow", tags2 && "--tags", all && "--all", ...remote && branch ? [
|
|
45655
|
+
"--",
|
|
45656
|
+
remote,
|
|
45657
|
+
branch
|
|
45658
|
+
] : []);
|
|
45659
|
+
}
|
|
45660
|
+
/**
|
|
45661
|
+
* Create a new branch.
|
|
45662
|
+
* @param branch - Branch name.
|
|
45663
|
+
*/
|
|
45664
|
+
async createBranch(branch) {
|
|
45665
|
+
await this.exec("checkout", "-b", branch);
|
|
45666
|
+
}
|
|
45667
|
+
/**
|
|
45668
|
+
* Delete a branch.
|
|
45669
|
+
* @param branch - Branch name.
|
|
45670
|
+
*/
|
|
45671
|
+
async deleteBranch(branch) {
|
|
45672
|
+
await this.exec("branch", "-D", "--", branch);
|
|
45673
|
+
}
|
|
45674
|
+
/**
|
|
45675
|
+
* Checkout a branch.
|
|
45676
|
+
* @param branch - Branch name.
|
|
45677
|
+
*/
|
|
45678
|
+
async checkout(branch) {
|
|
45679
|
+
await this.exec("checkout", branch);
|
|
45680
|
+
}
|
|
45681
|
+
};
|
|
45682
|
+
ConventionalGitClient2 = class extends GitClient2 {
|
|
45683
|
+
deps = null;
|
|
45684
|
+
loadDeps() {
|
|
45685
|
+
if (this.deps) {
|
|
45686
|
+
return this.deps;
|
|
45687
|
+
}
|
|
45688
|
+
this.deps = Promise.all([
|
|
45689
|
+
Promise.resolve().then(() => (init_dist_3B6ZXCEH(), dist_3B6ZXCEH_exports)).then(({ parseCommits: parseCommits3 }) => parseCommits3),
|
|
45690
|
+
Promise.resolve().then(() => (init_dist_XFQOB6BJ(), dist_XFQOB6BJ_exports)).then(({ filterRevertedCommits: filterRevertedCommits3 }) => filterRevertedCommits3)
|
|
45691
|
+
]);
|
|
45692
|
+
return this.deps;
|
|
45693
|
+
}
|
|
45694
|
+
/**
|
|
45695
|
+
* Get parsed commits stream.
|
|
45696
|
+
* @param params
|
|
45697
|
+
* @param params.path - Read commits from specific path.
|
|
45698
|
+
* @param params.from - Start commits range.
|
|
45699
|
+
* @param params.to - End commits range.
|
|
45700
|
+
* @param params.format - Commits format.
|
|
45701
|
+
* @param parserOptions - Commit parser options.
|
|
45702
|
+
* @yields Raw commits data.
|
|
45703
|
+
*/
|
|
45704
|
+
async *getCommits(params = {}, parserOptions = {}) {
|
|
45705
|
+
const { filterReverts, ...gitLogParams } = params;
|
|
45706
|
+
const [parseCommits3, filterRevertedCommits3] = await this.loadDeps();
|
|
45707
|
+
if (filterReverts) {
|
|
45708
|
+
yield* filterRevertedCommits3(this.getCommits(gitLogParams, parserOptions));
|
|
45709
|
+
return;
|
|
45710
|
+
}
|
|
45711
|
+
const parse22 = parseCommits3(parserOptions);
|
|
45712
|
+
const commitsStream = this.getRawCommits(gitLogParams);
|
|
45713
|
+
yield* parse22(commitsStream);
|
|
45714
|
+
}
|
|
45715
|
+
/**
|
|
45716
|
+
* Get semver tags stream.
|
|
45717
|
+
* @param params
|
|
45718
|
+
* @param params.prefix - Get semver tags with specific prefix.
|
|
45719
|
+
* @param params.skipUnstable - Skip semver tags with unstable versions.
|
|
45720
|
+
* @param params.clean - Clean version from prefix and trash.
|
|
45721
|
+
* @yields Semver tags.
|
|
45722
|
+
*/
|
|
45723
|
+
async *getSemverTags(params = {}) {
|
|
45724
|
+
const { prefix, skipUnstable, clean } = params;
|
|
45725
|
+
const tagsStream = this.getTags();
|
|
45726
|
+
const unstableTagRegex = /\d+\.\d+\.\d+-.+/;
|
|
45727
|
+
const cleanTag = clean ? (tag2, unprefixed2) => import_semver3.default.clean(unprefixed2 || tag2) : (tag2) => tag2;
|
|
45728
|
+
let unprefixed;
|
|
45729
|
+
let tag;
|
|
45730
|
+
for await (tag of tagsStream) {
|
|
45731
|
+
if (skipUnstable && unstableTagRegex.test(tag)) {
|
|
45732
|
+
continue;
|
|
45733
|
+
}
|
|
45734
|
+
if (prefix) {
|
|
45735
|
+
const isPrefixed = typeof prefix === "string" ? tag.startsWith(prefix) : prefix.test(tag);
|
|
45736
|
+
if (isPrefixed) {
|
|
45737
|
+
unprefixed = tag.replace(prefix, "");
|
|
45738
|
+
if (import_semver3.default.valid(unprefixed)) {
|
|
45739
|
+
tag = cleanTag(tag, unprefixed);
|
|
45740
|
+
if (tag) {
|
|
45741
|
+
yield tag;
|
|
45742
|
+
}
|
|
45743
|
+
}
|
|
45744
|
+
}
|
|
45745
|
+
} else if (import_semver3.default.valid(tag)) {
|
|
45746
|
+
tag = cleanTag(tag);
|
|
45747
|
+
if (tag) {
|
|
45748
|
+
yield tag;
|
|
45749
|
+
}
|
|
45750
|
+
}
|
|
45751
|
+
}
|
|
45752
|
+
}
|
|
45753
|
+
/**
|
|
45754
|
+
* Get last semver tag.
|
|
45755
|
+
* @param params - getSemverTags params.
|
|
45756
|
+
* @returns Last semver tag, `null` if not found.
|
|
45757
|
+
*/
|
|
45758
|
+
async getLastSemverTag(params = {}) {
|
|
45759
|
+
return firstFromStream2(this.getSemverTags(params));
|
|
45760
|
+
}
|
|
45761
|
+
/**
|
|
45762
|
+
* Get current sematic version from git tags.
|
|
45763
|
+
* @param params - Additional git params.
|
|
45764
|
+
* @returns Current sematic version, `null` if not found.
|
|
45765
|
+
*/
|
|
45766
|
+
async getVersionFromTags(params = {}) {
|
|
45767
|
+
const semverTagsStream = this.getSemverTags({
|
|
45768
|
+
clean: true,
|
|
45769
|
+
...params
|
|
45770
|
+
});
|
|
45771
|
+
const semverTags = [];
|
|
45772
|
+
for await (const tag of semverTagsStream) {
|
|
45773
|
+
semverTags.push(tag);
|
|
45774
|
+
}
|
|
45775
|
+
if (!semverTags.length) {
|
|
45776
|
+
return null;
|
|
45777
|
+
}
|
|
45778
|
+
return semverTags.sort(import_semver3.default.rcompare)[0] || null;
|
|
45779
|
+
}
|
|
45780
|
+
};
|
|
45781
|
+
loadPreset = createPresetLoader((preset) => import(preset));
|
|
45782
|
+
VERSIONS = [
|
|
45783
|
+
"major",
|
|
45784
|
+
"minor",
|
|
45785
|
+
"patch"
|
|
45786
|
+
];
|
|
45787
|
+
Bumper = class {
|
|
45788
|
+
gitClient;
|
|
45789
|
+
params;
|
|
45790
|
+
whatBump;
|
|
45791
|
+
tagGetter;
|
|
45792
|
+
commitsGetter;
|
|
45793
|
+
constructor(cwdOrGitClient = process.cwd()) {
|
|
45794
|
+
this.gitClient = typeof cwdOrGitClient === "string" ? new ConventionalGitClient2(cwdOrGitClient) : cwdOrGitClient;
|
|
45795
|
+
this.whatBump = null;
|
|
45796
|
+
this.params = Promise.resolve({
|
|
45797
|
+
commits: {
|
|
45798
|
+
format: "%B%n-hash-%n%H",
|
|
45799
|
+
filterReverts: true
|
|
45800
|
+
}
|
|
45801
|
+
});
|
|
45802
|
+
this.tagGetter = () => this.getLastSemverTag();
|
|
45803
|
+
this.commitsGetter = () => this.getCommits();
|
|
45804
|
+
}
|
|
45805
|
+
composeParams(params) {
|
|
45806
|
+
this.params = Promise.all([params, this.params]).then(([params2, prevParams]) => ({
|
|
45807
|
+
options: {
|
|
45808
|
+
...prevParams.options,
|
|
45809
|
+
...params2.options
|
|
45810
|
+
},
|
|
45811
|
+
tags: {
|
|
45812
|
+
...prevParams.tags,
|
|
45813
|
+
...params2.tags
|
|
45814
|
+
},
|
|
45815
|
+
commits: {
|
|
45816
|
+
...prevParams.commits,
|
|
45817
|
+
...params2.commits
|
|
45818
|
+
},
|
|
45819
|
+
parser: {
|
|
45820
|
+
...prevParams.parser,
|
|
45821
|
+
...params2.parser
|
|
45822
|
+
}
|
|
45823
|
+
}));
|
|
45824
|
+
}
|
|
45825
|
+
async getLastSemverTag() {
|
|
45826
|
+
const { tags: tags2 } = await this.params;
|
|
45827
|
+
return await this.gitClient.getLastSemverTag(tags2);
|
|
45828
|
+
}
|
|
45829
|
+
async *getCommits() {
|
|
45830
|
+
const { options, commits, parser } = await this.params;
|
|
45831
|
+
const parserParams = {
|
|
45832
|
+
...parser
|
|
45833
|
+
};
|
|
45834
|
+
if (!parserParams.warn && options?.warn) {
|
|
45835
|
+
parserParams.warn = bindLogNamespace("parser", options.warn);
|
|
45836
|
+
}
|
|
45837
|
+
yield* this.gitClient.getCommits({
|
|
45838
|
+
from: await this.tagGetter() || "",
|
|
45839
|
+
...commits
|
|
45840
|
+
}, parserParams);
|
|
45841
|
+
}
|
|
45842
|
+
/**
|
|
45843
|
+
* Load configs from a preset
|
|
45844
|
+
* @param preset
|
|
45845
|
+
* @param loader - Preset module loader, if not provided, will use default loader
|
|
45846
|
+
* @returns this
|
|
45847
|
+
*/
|
|
45848
|
+
loadPreset(preset, loader2) {
|
|
45849
|
+
const loadPreset2 = loader2 ? createPresetLoader(loader2) : loadPreset;
|
|
45850
|
+
const config = loadPreset2(preset).then((config2) => {
|
|
45851
|
+
if (!config2) {
|
|
45852
|
+
throw Error("Preset is not loaded or have incorrect exports");
|
|
45853
|
+
}
|
|
45854
|
+
return config2;
|
|
45855
|
+
});
|
|
45856
|
+
this.whatBump = async (commits) => {
|
|
45857
|
+
const { whatBump } = await config;
|
|
45858
|
+
return whatBump(commits);
|
|
45859
|
+
};
|
|
45860
|
+
this.composeParams(config);
|
|
45861
|
+
return this;
|
|
45862
|
+
}
|
|
45863
|
+
/**
|
|
45864
|
+
* Set config directly
|
|
45865
|
+
* @param config - Config object
|
|
45866
|
+
* @returns this
|
|
45867
|
+
*/
|
|
45868
|
+
config(config) {
|
|
45869
|
+
this.composeParams(config);
|
|
45870
|
+
return this;
|
|
45871
|
+
}
|
|
45872
|
+
/**
|
|
45873
|
+
* Set bumper options
|
|
45874
|
+
* @param options - Bumper options
|
|
45875
|
+
* @returns this
|
|
45876
|
+
*/
|
|
45877
|
+
options(options) {
|
|
45878
|
+
this.composeParams({
|
|
45879
|
+
options
|
|
45880
|
+
});
|
|
45881
|
+
return this;
|
|
45882
|
+
}
|
|
45883
|
+
/**
|
|
45884
|
+
* Set params to get the last semver tag
|
|
45885
|
+
* @param paramsOrTag - Params to get the last semver tag or a tag name
|
|
45886
|
+
* @returns this
|
|
45887
|
+
*/
|
|
45888
|
+
tag(paramsOrTag) {
|
|
45889
|
+
if (typeof paramsOrTag === "string") {
|
|
45890
|
+
this.tagGetter = () => paramsOrTag;
|
|
45891
|
+
} else {
|
|
45892
|
+
this.tagGetter = () => this.getLastSemverTag();
|
|
45893
|
+
this.composeParams({
|
|
45894
|
+
tags: paramsOrTag
|
|
45895
|
+
});
|
|
45896
|
+
}
|
|
45897
|
+
return this;
|
|
45898
|
+
}
|
|
45899
|
+
commits(paramsOrCommits, parserOptions) {
|
|
45900
|
+
if (isIterable2(paramsOrCommits)) {
|
|
45901
|
+
this.commitsGetter = () => paramsOrCommits;
|
|
45902
|
+
} else {
|
|
45903
|
+
this.commitsGetter = () => this.getCommits();
|
|
45904
|
+
this.composeParams({
|
|
45905
|
+
commits: paramsOrCommits,
|
|
45906
|
+
parser: parserOptions
|
|
45907
|
+
});
|
|
45908
|
+
}
|
|
45909
|
+
return this;
|
|
45910
|
+
}
|
|
45911
|
+
/**
|
|
45912
|
+
* Recommend a bump by `whatBump` function
|
|
45913
|
+
* @param whatBump - Function to recommend a bump from commits
|
|
45914
|
+
* @returns Bump recommendation
|
|
45915
|
+
*/
|
|
45916
|
+
async bump(whatBump = this.whatBump) {
|
|
45917
|
+
if (typeof whatBump !== "function") {
|
|
45918
|
+
throw Error("`whatBump` must be a function");
|
|
45919
|
+
}
|
|
45920
|
+
const { gitClient } = this;
|
|
45921
|
+
const { options } = await this.params;
|
|
45922
|
+
if (!gitClient.debug && options?.debug) {
|
|
45923
|
+
gitClient.debug = bindLogNamespace("git-client", options.debug);
|
|
45924
|
+
}
|
|
45925
|
+
const commitsStream = this.commitsGetter();
|
|
45926
|
+
const commits = [];
|
|
45927
|
+
let commit;
|
|
45928
|
+
for await (commit of commitsStream) {
|
|
45929
|
+
commits.push(commit);
|
|
45930
|
+
}
|
|
45931
|
+
const result = await whatBump(commits);
|
|
45932
|
+
if (result && "level" in result) {
|
|
45933
|
+
return {
|
|
45934
|
+
...result,
|
|
45935
|
+
releaseType: VERSIONS[result.level],
|
|
45936
|
+
commits
|
|
45937
|
+
};
|
|
45938
|
+
}
|
|
45939
|
+
return {
|
|
45940
|
+
commits
|
|
45941
|
+
};
|
|
45942
|
+
}
|
|
45943
|
+
};
|
|
45519
45944
|
STANDARD_BUMP_TYPES = ["major", "minor", "patch"];
|
|
45520
45945
|
VersionMismatchError = class extends Error {
|
|
45521
45946
|
constructor(message, severity) {
|
|
@@ -45679,7 +46104,7 @@ var init_chunk_UBCKZYTO = __esm({
|
|
|
45679
46104
|
}
|
|
45680
46105
|
let repoUrl;
|
|
45681
46106
|
try {
|
|
45682
|
-
const packageJsonPath2 =
|
|
46107
|
+
const packageJsonPath2 = path83.join(pkgPath, "package.json");
|
|
45683
46108
|
if (fs93.existsSync(packageJsonPath2)) {
|
|
45684
46109
|
const packageJson = JSON.parse(fs93.readFileSync(packageJsonPath2, "utf8"));
|
|
45685
46110
|
if (packageJson.repository) {
|
|
@@ -45707,7 +46132,7 @@ var init_chunk_UBCKZYTO = __esm({
|
|
|
45707
46132
|
repoUrl: repoUrl || null,
|
|
45708
46133
|
entries: changelogEntries
|
|
45709
46134
|
});
|
|
45710
|
-
const packageJsonPath =
|
|
46135
|
+
const packageJsonPath = path83.join(pkgPath, "package.json");
|
|
45711
46136
|
if (fs93.existsSync(packageJsonPath)) {
|
|
45712
46137
|
updatePackageVersion(packageJsonPath, nextVersion, this.dryRun);
|
|
45713
46138
|
}
|
|
@@ -45718,7 +46143,7 @@ var init_chunk_UBCKZYTO = __esm({
|
|
|
45718
46143
|
log6(`Cargo paths config for ${name}: ${JSON.stringify(cargoPaths)}`, "debug");
|
|
45719
46144
|
if (cargoPaths && cargoPaths.length > 0) {
|
|
45720
46145
|
for (const cargoPath of cargoPaths) {
|
|
45721
|
-
const resolvedCargoPath =
|
|
46146
|
+
const resolvedCargoPath = path83.resolve(pkgPath, cargoPath, "Cargo.toml");
|
|
45722
46147
|
log6(`Checking cargo path for ${name}: ${resolvedCargoPath}`, "debug");
|
|
45723
46148
|
if (fs93.existsSync(resolvedCargoPath)) {
|
|
45724
46149
|
log6(`Found Cargo.toml for ${name} at ${resolvedCargoPath}, updating...`, "debug");
|
|
@@ -45728,7 +46153,7 @@ var init_chunk_UBCKZYTO = __esm({
|
|
|
45728
46153
|
}
|
|
45729
46154
|
}
|
|
45730
46155
|
} else {
|
|
45731
|
-
const cargoTomlPath =
|
|
46156
|
+
const cargoTomlPath = path83.join(pkgPath, "Cargo.toml");
|
|
45732
46157
|
log6(`Checking default cargo path for ${name}: ${cargoTomlPath}`, "debug");
|
|
45733
46158
|
if (fs93.existsSync(cargoTomlPath)) {
|
|
45734
46159
|
log6(`Found Cargo.toml for ${name} at ${cargoTomlPath}, updating...`, "debug");
|
|
@@ -45916,10 +46341,10 @@ __export(dist_exports5, {
|
|
|
45916
46341
|
getJsonData: () => getJsonData,
|
|
45917
46342
|
loadConfig: () => loadConfig23
|
|
45918
46343
|
});
|
|
45919
|
-
var
|
|
46344
|
+
var init_dist10 = __esm({
|
|
45920
46345
|
"../version/dist/index.js"() {
|
|
45921
46346
|
"use strict";
|
|
45922
|
-
|
|
46347
|
+
init_chunk_45DJUNXI();
|
|
45923
46348
|
init_chunk_Q3FHZORY();
|
|
45924
46349
|
init_chunk_LMPZV35Z();
|
|
45925
46350
|
}
|
|
@@ -46031,7 +46456,7 @@ var EXIT_CODES = {
|
|
|
46031
46456
|
// src/dispatcher.ts
|
|
46032
46457
|
init_dist();
|
|
46033
46458
|
init_dist2();
|
|
46034
|
-
|
|
46459
|
+
init_dist10();
|
|
46035
46460
|
import { Command as Command7 } from "commander";
|
|
46036
46461
|
|
|
46037
46462
|
// src/init-command.ts
|
|
@@ -46527,9 +46952,9 @@ function resolveRepo(cliValue) {
|
|
|
46527
46952
|
|
|
46528
46953
|
// src/preview-detect.ts
|
|
46529
46954
|
import * as fs18 from "fs";
|
|
46530
|
-
import * as
|
|
46955
|
+
import * as path17 from "path";
|
|
46531
46956
|
function detectPrerelease(packagePaths, projectDir) {
|
|
46532
|
-
const paths = packagePaths.length > 0 ? packagePaths.map((p) =>
|
|
46957
|
+
const paths = packagePaths.length > 0 ? packagePaths.map((p) => path17.join(projectDir, p, "package.json")) : [path17.join(projectDir, "package.json")];
|
|
46533
46958
|
for (const pkgPath of paths) {
|
|
46534
46959
|
if (!fs18.existsSync(pkgPath)) continue;
|
|
46535
46960
|
try {
|
|
@@ -46828,7 +47253,7 @@ async function runRelease(inputOptions) {
|
|
|
46828
47253
|
return null;
|
|
46829
47254
|
}
|
|
46830
47255
|
if (!options.dryRun) {
|
|
46831
|
-
const { flushPendingWrites: flushPendingWrites2 } = await Promise.resolve().then(() => (
|
|
47256
|
+
const { flushPendingWrites: flushPendingWrites2 } = await Promise.resolve().then(() => (init_dist10(), dist_exports5));
|
|
46832
47257
|
flushPendingWrites2();
|
|
46833
47258
|
}
|
|
46834
47259
|
info(`Found ${versionOutput.updates.length} package update(s)`);
|
|
@@ -46857,7 +47282,7 @@ async function runRelease(inputOptions) {
|
|
|
46857
47282
|
return { versionOutput, notesGenerated, packageNotes, releaseNotes, publishOutput };
|
|
46858
47283
|
}
|
|
46859
47284
|
async function runVersionStep(options) {
|
|
46860
|
-
const { loadConfig: loadConfig6, VersionEngine: VersionEngine2, enableJsonOutput: enableJsonOutput2, getJsonData: getJsonData2 } = await Promise.resolve().then(() => (
|
|
47285
|
+
const { loadConfig: loadConfig6, VersionEngine: VersionEngine2, enableJsonOutput: enableJsonOutput2, getJsonData: getJsonData2 } = await Promise.resolve().then(() => (init_dist10(), dist_exports5));
|
|
46861
47286
|
enableJsonOutput2(options.dryRun);
|
|
46862
47287
|
const config = loadConfig6({ cwd: options.projectDir, configPath: options.config });
|
|
46863
47288
|
if (options.dryRun) config.dryRun = true;
|