@sentry/craft 2.24.0 → 2.24.2

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.
Files changed (2) hide show
  1. package/dist/craft +1192 -317
  2. package/package.json +5 -4
package/dist/craft CHANGED
@@ -44052,7 +44052,7 @@ var require_dist3 = __commonJS({
44052
44052
  }
44053
44053
  });
44054
44054
 
44055
- // node_modules/.pnpm/simple-git@3.30.0/node_modules/simple-git/dist/esm/index.js
44055
+ // node_modules/.pnpm/simple-git@3.33.0/node_modules/simple-git/dist/esm/index.js
44056
44056
  function pathspec(...paths) {
44057
44057
  const key = new String(paths);
44058
44058
  cache.set(key, paths);
@@ -45152,15 +45152,15 @@ function parser3(indexX, indexY, handler10) {
45152
45152
  return [`${indexX}${indexY}`, handler10];
45153
45153
  }
45154
45154
  function conflicts(indexX, ...indexY) {
45155
- return indexY.map((y4) => parser3(indexX, y4, (result, file) => append(result.conflicted, file)));
45155
+ return indexY.map((y4) => parser3(indexX, y4, (result, file) => result.conflicted.push(file)));
45156
45156
  }
45157
45157
  function splitLine(result, lineStr) {
45158
45158
  const trimmed2 = lineStr.trim();
45159
45159
  switch (" ") {
45160
45160
  case trimmed2.charAt(2):
45161
- return data2(trimmed2.charAt(0), trimmed2.charAt(1), trimmed2.substr(3));
45161
+ return data2(trimmed2.charAt(0), trimmed2.charAt(1), trimmed2.slice(3));
45162
45162
  case trimmed2.charAt(1):
45163
- return data2(" ", trimmed2.charAt(0), trimmed2.substr(2));
45163
+ return data2(" ", trimmed2.charAt(0), trimmed2.slice(2));
45164
45164
  default:
45165
45165
  return;
45166
45166
  }
@@ -45237,6 +45237,28 @@ function versionParser(stdOut) {
45237
45237
  }
45238
45238
  return parseStringResponse(versionResponse(0, 0, 0, stdOut), parsers7, stdOut);
45239
45239
  }
45240
+ function createCloneTask(api, task, repoPath, ...args) {
45241
+ if (!filterString(repoPath)) {
45242
+ return configurationErrorTask(`git.${api}() requires a string 'repoPath'`);
45243
+ }
45244
+ return task(repoPath, filterType(args[0], filterString), getTrailingOptions(arguments));
45245
+ }
45246
+ function clone_default() {
45247
+ return {
45248
+ clone(repo, ...rest) {
45249
+ return this._runTask(
45250
+ createCloneTask("clone", cloneTask, filterType(repo, filterString), ...rest),
45251
+ trailingFunctionArgument(arguments)
45252
+ );
45253
+ },
45254
+ mirror(repo, ...rest) {
45255
+ return this._runTask(
45256
+ createCloneTask("mirror", cloneMirrorTask, filterType(repo, filterString), ...rest),
45257
+ trailingFunctionArgument(arguments)
45258
+ );
45259
+ }
45260
+ };
45261
+ }
45240
45262
  function applyPatchTask(patches, customArgs) {
45241
45263
  return straightThroughStringTask(["apply", ...customArgs, ...patches]);
45242
45264
  }
@@ -45346,23 +45368,6 @@ function checkIgnoreTask(paths) {
45346
45368
  parser: parseCheckIgnore
45347
45369
  };
45348
45370
  }
45349
- function disallowedCommand(command10) {
45350
- return /^--upload-pack(=|$)/.test(command10);
45351
- }
45352
- function cloneTask(repo, directory, customArgs) {
45353
- const commands4 = ["clone", ...customArgs];
45354
- filterString(repo) && commands4.push(repo);
45355
- filterString(directory) && commands4.push(directory);
45356
- const banned = commands4.find(disallowedCommand);
45357
- if (banned) {
45358
- return configurationErrorTask(`git.fetch: potential exploit argument blocked.`);
45359
- }
45360
- return straightThroughStringTask(commands4);
45361
- }
45362
- function cloneMirrorTask(repo, directory, customArgs) {
45363
- append(customArgs, "--mirror");
45364
- return cloneTask(repo, directory, customArgs);
45365
- }
45366
45371
  function parseFetchResult(stdOut, stdErr) {
45367
45372
  const result = {
45368
45373
  raw: stdOut,
@@ -45374,7 +45379,7 @@ function parseFetchResult(stdOut, stdErr) {
45374
45379
  };
45375
45380
  return parseStringResponse(result, parsers10, [stdOut, stdErr]);
45376
45381
  }
45377
- function disallowedCommand2(command10) {
45382
+ function disallowedCommand(command10) {
45378
45383
  return /^--upload-pack(=|$)/.test(command10);
45379
45384
  }
45380
45385
  function fetchTask(remote, branch, customArgs) {
@@ -45382,7 +45387,7 @@ function fetchTask(remote, branch, customArgs) {
45382
45387
  if (remote && branch) {
45383
45388
  commands4.push(remote, branch);
45384
45389
  }
45385
- const banned = commands4.find(disallowedCommand2);
45390
+ const banned = commands4.find(disallowedCommand);
45386
45391
  if (banned) {
45387
45392
  return configurationErrorTask(`git.fetch: potential exploit argument blocked.`);
45388
45393
  }
@@ -45584,18 +45589,24 @@ function abortPlugin(signal) {
45584
45589
  function isConfigSwitch(arg) {
45585
45590
  return typeof arg === "string" && arg.trim().toLowerCase() === "-c";
45586
45591
  }
45587
- function preventProtocolOverride(arg, next) {
45588
- if (!isConfigSwitch(arg)) {
45589
- return;
45590
- }
45591
- if (!/^\s*protocol(.[a-z]+)?.allow/.test(next)) {
45592
- return;
45592
+ function isCloneUploadPackSwitch(char, arg) {
45593
+ if (typeof arg !== "string" || !arg.includes(char)) {
45594
+ return false;
45593
45595
  }
45594
- throw new GitPluginError(
45595
- void 0,
45596
- "unsafe",
45597
- "Configuring protocol.allow is not permitted without enabling allowUnsafeExtProtocol"
45598
- );
45596
+ const cleaned = arg.trim().replace(/\0/g, "");
45597
+ return /^(--no)?-{1,2}[\dlsqvnobucj]+(\s|$)/.test(cleaned);
45598
+ }
45599
+ function preventConfigBuilder(config3, setting, message = String(config3)) {
45600
+ const regex2 = typeof config3 === "string" ? new RegExp(`\\s*${config3}`, "i") : config3;
45601
+ return function preventCommand(options, arg, next) {
45602
+ if (options[setting] !== true && isConfigSwitch(arg) && regex2.test(next)) {
45603
+ throw new GitPluginError(
45604
+ void 0,
45605
+ "unsafe",
45606
+ `Configuring ${message} is not permitted without enabling ${setting}`
45607
+ );
45608
+ }
45609
+ };
45599
45610
  }
45600
45611
  function preventUploadPack(arg, method) {
45601
45612
  if (/^\s*--(upload|receive)-pack/.test(arg)) {
@@ -45605,7 +45616,7 @@ function preventUploadPack(arg, method) {
45605
45616
  `Use of --upload-pack or --receive-pack is not permitted without enabling allowUnsafePack`
45606
45617
  );
45607
45618
  }
45608
- if (method === "clone" && /^\s*-u\b/.test(arg)) {
45619
+ if (method === "clone" && isCloneUploadPackSwitch("u", arg)) {
45609
45620
  throw new GitPluginError(
45610
45621
  void 0,
45611
45622
  "unsafe",
@@ -45621,16 +45632,16 @@ function preventUploadPack(arg, method) {
45621
45632
  }
45622
45633
  }
45623
45634
  function blockUnsafeOperationsPlugin({
45624
- allowUnsafeProtocolOverride = false,
45625
- allowUnsafePack = false
45635
+ allowUnsafePack = false,
45636
+ ...options
45626
45637
  } = {}) {
45627
45638
  return {
45628
45639
  type: "spawn.args",
45629
45640
  action(args, context2) {
45630
45641
  args.forEach((current, index) => {
45631
45642
  const next = index < args.length ? args[index + 1] : "";
45632
- allowUnsafeProtocolOverride || preventProtocolOverride(current, next);
45633
45643
  allowUnsafePack || preventUploadPack(current, context2.method);
45644
+ preventUnsafeConfig.forEach((helper) => helper(options, current, next));
45634
45645
  });
45635
45646
  return args;
45636
45647
  }
@@ -45708,7 +45719,7 @@ function completionDetectionPlugin({
45708
45719
  };
45709
45720
  }
45710
45721
  function isBadArgument(arg) {
45711
- return !arg || !/^([a-z]:)?([a-z0-9/.\\_-]+)$/i.test(arg);
45722
+ return !arg || !/^([a-z]:)?([a-z0-9/.\\_~-]+)$/i.test(arg);
45712
45723
  }
45713
45724
  function toBinaryConfig(input, allowUnsafe) {
45714
45725
  if (input.length < 1 || input.length > 2) {
@@ -45896,20 +45907,20 @@ function gitInstanceFactory(baseDir, options) {
45896
45907
  plugins.add(commandConfigPrefixingPlugin(config3.config));
45897
45908
  }
45898
45909
  plugins.add(blockUnsafeOperationsPlugin(config3.unsafe));
45899
- plugins.add(suffixPathsPlugin());
45900
45910
  plugins.add(completionDetectionPlugin(config3.completion));
45901
45911
  config3.abort && plugins.add(abortPlugin(config3.abort));
45902
45912
  config3.progress && plugins.add(progressMonitorPlugin(config3.progress));
45903
45913
  config3.timeout && plugins.add(timeoutPlugin(config3.timeout));
45904
45914
  config3.spawnOptions && plugins.add(spawnOptionsPlugin(config3.spawnOptions));
45915
+ plugins.add(suffixPathsPlugin());
45905
45916
  plugins.add(errorDetectionPlugin(errorDetectionHandler(true)));
45906
45917
  config3.errors && plugins.add(errorDetectionPlugin(config3.errors));
45907
45918
  customBinaryPlugin(plugins, config3.binary, config3.unsafe?.allowUnsafeCustomBinary);
45908
45919
  return new Git(config3, plugins);
45909
45920
  }
45910
- var import_node_buffer, import_file_exists, import_debug3, import_child_process, import_promise_deferred, import_node_path4, import_promise_deferred2, import_node_events2, __defProp2, __getOwnPropDesc2, __getOwnPropNames2, __hasOwnProp2, __esm2, __commonJS2, __export2, __copyProps2, __toCommonJS2, cache, init_pathspec, GitError, init_git_error, GitResponseError, init_git_response_error, TaskConfigurationError, init_task_configuration_error, NULL, NOOP, objectToString2, init_util, filterArray, filterNumber, filterString, filterStringOrStringArray, filterHasLength, init_argument_filters, ExitCodes, init_exit_codes, GitOutputStreams, init_git_output_streams, LineParser, RemoteLineParser, init_line_parser, defaultOptions, init_simple_git_options, init_task_options, init_task_parser, utils_exports, init_utils13, check_is_repo_exports, CheckRepoActions, onError, parser, init_check_is_repo, CleanResponse, removalRegexp, dryRunRemovalRegexp, isFolderRegexp, init_CleanSummary, task_exports, EMPTY_COMMANDS, init_task, clean_exports, CONFIG_ERROR_INTERACTIVE_MODE, CONFIG_ERROR_MODE_REQUIRED, CONFIG_ERROR_UNKNOWN_OPTION, CleanOptions, CleanOptionValues, init_clean, ConfigList, init_ConfigList, GitConfigScope, init_config, DiffNameStatus, diffNameStatus, init_diff_name_status, disallowedOptions, Query, _a2, GrepQuery, init_grep, reset_exports, ResetMode, validResetModes, init_reset, init_git_logger, TasksPendingQueue, init_tasks_pending_queue, GitExecutorChain, init_git_executor_chain, git_executor_exports, GitExecutor, init_git_executor, init_task_callback, init_change_working_directory, init_checkout, parser2, init_count_objects, parsers, init_parse_commit, init_commit, init_first_commit, init_hash_object, InitSummary, initResponseRegex, reInitResponseRegex, init_InitSummary, bareCommand, init_init, logFormatRegex, init_log_format, DiffSummary, init_DiffSummary, statParser, numStatParser, nameOnlyParser, nameStatusParser, diffSummaryParsers, init_parse_diff_summary, START_BOUNDARY, COMMIT_BOUNDARY, SPLITTER, defaultFieldNames, init_parse_list_log_summary, diff_exports, init_diff, excludeOptions, init_log, MergeSummaryConflict, MergeSummaryDetail, init_MergeSummary, PullSummary, PullFailedSummary, init_PullSummary, remoteMessagesObjectParsers, init_parse_remote_objects, parsers2, RemoteMessageSummary, init_parse_remote_messages, FILE_UPDATE_REGEX, SUMMARY_REGEX, ACTION_REGEX, parsers3, errorParsers, parsePullDetail, parsePullResult, init_parse_pull, parsers4, parseMergeResult, parseMergeDetail, init_parse_merge, init_merge2, parsers5, parsePushResult, parsePushDetail, init_parse_push, push_exports, init_push, init_show, fromPathRegex, FileStatusSummary, init_FileStatusSummary, StatusSummary, parsers6, parseStatusSummary, init_StatusSummary, ignoredOptions, init_status2, NOT_INSTALLED, parsers7, init_version3, simple_git_api_exports, SimpleGitApi, init_simple_git_api, scheduler_exports, createScheduledTask, Scheduler, init_scheduler, apply_patch_exports, init_apply_patch, BranchDeletionBatch, init_BranchDeleteSummary, deleteSuccessRegex, deleteErrorRegex, parsers8, parseBranchDeletions, init_parse_branch_delete, BranchSummaryResult, init_BranchSummary, parsers9, currentBranchParser, init_parse_branch, branch_exports, init_branch, parseCheckIgnore, init_CheckIgnore, check_ignore_exports, init_check_ignore, clone_exports, init_clone, parsers10, init_parse_fetch, fetch_exports, init_fetch, parsers11, init_parse_move, move_exports, init_move, pull_exports, init_pull, init_GetRemoteSummary, remote_exports, init_remote, stash_list_exports, init_stash_list, sub_module_exports, init_sub_module, TagList, parseTagList, init_TagList, tag_exports, init_tag, require_git, GitConstructError, GitPluginError, never, WRONG_NUMBER_ERR, WRONG_CHARS_ERR, PluginStore, Git, esm_default2;
45921
+ var import_node_buffer, import_file_exists, import_debug3, import_child_process, import_promise_deferred, import_node_path4, import_promise_deferred2, import_node_events2, __defProp2, __getOwnPropDesc2, __getOwnPropNames2, __hasOwnProp2, __esm2, __commonJS2, __export2, __copyProps2, __toCommonJS2, cache, init_pathspec, GitError, init_git_error, GitResponseError, init_git_response_error, TaskConfigurationError, init_task_configuration_error, NULL, NOOP, objectToString2, init_util, filterArray, filterNumber, filterString, filterStringOrStringArray, filterHasLength, init_argument_filters, ExitCodes, init_exit_codes, GitOutputStreams, init_git_output_streams, LineParser, RemoteLineParser, init_line_parser, defaultOptions, init_simple_git_options, init_task_options, init_task_parser, utils_exports, init_utils13, check_is_repo_exports, CheckRepoActions, onError, parser, init_check_is_repo, CleanResponse, removalRegexp, dryRunRemovalRegexp, isFolderRegexp, init_CleanSummary, task_exports, EMPTY_COMMANDS, init_task, clean_exports, CONFIG_ERROR_INTERACTIVE_MODE, CONFIG_ERROR_MODE_REQUIRED, CONFIG_ERROR_UNKNOWN_OPTION, CleanOptions, CleanOptionValues, init_clean, ConfigList, init_ConfigList, GitConfigScope, init_config, DiffNameStatus, diffNameStatus, init_diff_name_status, disallowedOptions, Query, _a2, GrepQuery, init_grep, reset_exports, ResetMode, validResetModes, init_reset, init_git_logger, TasksPendingQueue, init_tasks_pending_queue, GitExecutorChain, init_git_executor_chain, git_executor_exports, GitExecutor, init_git_executor, init_task_callback, init_change_working_directory, init_checkout, parser2, init_count_objects, parsers, init_parse_commit, init_commit, init_first_commit, init_hash_object, InitSummary, initResponseRegex, reInitResponseRegex, init_InitSummary, bareCommand, init_init, logFormatRegex, init_log_format, DiffSummary, init_DiffSummary, statParser, numStatParser, nameOnlyParser, nameStatusParser, diffSummaryParsers, init_parse_diff_summary, START_BOUNDARY, COMMIT_BOUNDARY, SPLITTER, defaultFieldNames, init_parse_list_log_summary, diff_exports, init_diff, excludeOptions, init_log, MergeSummaryConflict, MergeSummaryDetail, init_MergeSummary, PullSummary, PullFailedSummary, init_PullSummary, remoteMessagesObjectParsers, init_parse_remote_objects, parsers2, RemoteMessageSummary, init_parse_remote_messages, FILE_UPDATE_REGEX, SUMMARY_REGEX, ACTION_REGEX, parsers3, errorParsers, parsePullDetail, parsePullResult, init_parse_pull, parsers4, parseMergeResult, parseMergeDetail, init_parse_merge, init_merge2, parsers5, parsePushResult, parsePushDetail, init_parse_push, push_exports, init_push, init_show, fromPathRegex, FileStatusSummary, init_FileStatusSummary, StatusSummary, parsers6, parseStatusSummary, init_StatusSummary, ignoredOptions, init_status2, NOT_INSTALLED, parsers7, init_version3, cloneTask, cloneMirrorTask, init_clone, simple_git_api_exports, SimpleGitApi, init_simple_git_api, scheduler_exports, createScheduledTask, Scheduler, init_scheduler, apply_patch_exports, init_apply_patch, BranchDeletionBatch, init_BranchDeleteSummary, deleteSuccessRegex, deleteErrorRegex, parsers8, parseBranchDeletions, init_parse_branch_delete, BranchSummaryResult, init_BranchSummary, parsers9, currentBranchParser, init_parse_branch, branch_exports, init_branch, parseCheckIgnore, init_CheckIgnore, check_ignore_exports, init_check_ignore, parsers10, init_parse_fetch, fetch_exports, init_fetch, parsers11, init_parse_move, move_exports, init_move, pull_exports, init_pull, init_GetRemoteSummary, remote_exports, init_remote, stash_list_exports, init_stash_list, sub_module_exports, init_sub_module, TagList, parseTagList, init_TagList, tag_exports, init_tag, require_git, GitConstructError, GitPluginError, preventUnsafeConfig, never, WRONG_NUMBER_ERR, WRONG_CHARS_ERR, PluginStore, Git, esm_default2;
45911
45922
  var init_esm10 = __esm({
45912
- "node_modules/.pnpm/simple-git@3.30.0/node_modules/simple-git/dist/esm/index.js"() {
45923
+ "node_modules/.pnpm/simple-git@3.33.0/node_modules/simple-git/dist/esm/index.js"() {
45913
45924
  init_import_meta_url();
45914
45925
  import_node_buffer = require("node:buffer");
45915
45926
  import_file_exists = __toESM(require_dist2(), 1);
@@ -46005,7 +46016,7 @@ var init_esm10 = __esm({
46005
46016
  return typeof input === "number";
46006
46017
  };
46007
46018
  filterString = (input) => {
46008
- return typeof input === "string";
46019
+ return typeof input === "string" || isPathSpec(input);
46009
46020
  };
46010
46021
  filterStringOrStringArray = (input) => {
46011
46022
  return filterString(input) || Array.isArray(input) && input.every(filterString);
@@ -47384,58 +47395,54 @@ var init_esm10 = __esm({
47384
47395
  parser3(
47385
47396
  " ",
47386
47397
  "A",
47387
- (result, file) => append(result.created, file)
47398
+ (result, file) => result.created.push(file)
47388
47399
  ),
47389
47400
  parser3(
47390
47401
  " ",
47391
47402
  "D",
47392
- (result, file) => append(result.deleted, file)
47403
+ (result, file) => result.deleted.push(file)
47393
47404
  ),
47394
47405
  parser3(
47395
47406
  " ",
47396
47407
  "M",
47397
- (result, file) => append(result.modified, file)
47398
- ),
47399
- parser3(
47400
- "A",
47401
- " ",
47402
- (result, file) => append(result.created, file) && append(result.staged, file)
47403
- ),
47404
- parser3(
47405
- "A",
47406
- "M",
47407
- (result, file) => append(result.created, file) && append(result.staged, file) && append(result.modified, file)
47408
- ),
47409
- parser3(
47410
- "D",
47411
- " ",
47412
- (result, file) => append(result.deleted, file) && append(result.staged, file)
47413
- ),
47414
- parser3(
47415
- "M",
47416
- " ",
47417
- (result, file) => append(result.modified, file) && append(result.staged, file)
47418
- ),
47419
- parser3(
47420
- "M",
47421
- "M",
47422
- (result, file) => append(result.modified, file) && append(result.staged, file)
47408
+ (result, file) => result.modified.push(file)
47423
47409
  ),
47410
+ parser3("A", " ", (result, file) => {
47411
+ result.created.push(file);
47412
+ result.staged.push(file);
47413
+ }),
47414
+ parser3("A", "M", (result, file) => {
47415
+ result.created.push(file);
47416
+ result.staged.push(file);
47417
+ result.modified.push(file);
47418
+ }),
47419
+ parser3("D", " ", (result, file) => {
47420
+ result.deleted.push(file);
47421
+ result.staged.push(file);
47422
+ }),
47423
+ parser3("M", " ", (result, file) => {
47424
+ result.modified.push(file);
47425
+ result.staged.push(file);
47426
+ }),
47427
+ parser3("M", "M", (result, file) => {
47428
+ result.modified.push(file);
47429
+ result.staged.push(file);
47430
+ }),
47424
47431
  parser3("R", " ", (result, file) => {
47425
- append(result.renamed, renamedFile(file));
47432
+ result.renamed.push(renamedFile(file));
47426
47433
  }),
47427
47434
  parser3("R", "M", (result, file) => {
47428
47435
  const renamed2 = renamedFile(file);
47429
- append(result.renamed, renamed2);
47430
- append(result.modified, renamed2.to);
47436
+ result.renamed.push(renamed2);
47437
+ result.modified.push(renamed2.to);
47431
47438
  }),
47432
47439
  parser3("!", "!", (_result, _file) => {
47433
- append(_result.ignored = _result.ignored || [], _file);
47440
+ (_result.ignored = _result.ignored || []).push(_file);
47434
47441
  }),
47435
47442
  parser3(
47436
47443
  "?",
47437
47444
  "?",
47438
- (result, file) => append(result.not_added, file)
47445
+ (result, file) => result.not_added.push(file)
47439
47446
  ),
47440
47447
  ...conflicts(
47441
47448
  "A",
@@ -47528,6 +47535,24 @@ var init_esm10 = __esm({
47528
47535
  ];
47529
47536
  }
47530
47537
  });
47538
+ init_clone = __esm2({
47539
+ "src/lib/tasks/clone.ts"() {
47540
+ "use strict";
47541
+ init_task();
47542
+ init_utils13();
47543
+ init_pathspec();
47544
+ cloneTask = (repo, directory, customArgs) => {
47545
+ const commands4 = ["clone", ...customArgs];
47546
+ filterString(repo) && commands4.push(pathspec(repo));
47547
+ filterString(directory) && commands4.push(pathspec(directory));
47548
+ return straightThroughStringTask(commands4);
47549
+ };
47550
+ cloneMirrorTask = (repo, directory, customArgs) => {
47551
+ append(customArgs, "--mirror");
47552
+ return cloneTask(repo, directory, customArgs);
47553
+ };
47554
+ }
47555
+ });
47531
47556
  simple_git_api_exports = {};
47532
47557
  __export2(simple_git_api_exports, {
47533
47558
  SimpleGitApi: () => SimpleGitApi
@@ -47553,6 +47578,7 @@ var init_esm10 = __esm({
47553
47578
  init_task();
47554
47579
  init_version3();
47555
47580
  init_utils13();
47581
+ init_clone();
47556
47582
  SimpleGitApi = class {
47557
47583
  constructor(_executor) {
47558
47584
  this._executor = _executor;
@@ -47655,6 +47681,7 @@ var init_esm10 = __esm({
47655
47681
  Object.assign(
47656
47682
  SimpleGitApi.prototype,
47657
47683
  checkout_default(),
47684
+ clone_default(),
47658
47685
  commit_default(),
47659
47686
  config_default(),
47660
47687
  count_objects_default(),
@@ -47858,18 +47885,6 @@ var init_esm10 = __esm({
47858
47885
  init_CheckIgnore();
47859
47886
  }
47860
47887
  });
47861
- clone_exports = {};
47862
- __export2(clone_exports, {
47863
- cloneMirrorTask: () => cloneMirrorTask,
47864
- cloneTask: () => cloneTask
47865
- });
47866
- init_clone = __esm2({
47867
- "src/lib/tasks/clone.ts"() {
47868
- "use strict";
47869
- init_task();
47870
- init_utils13();
47871
- }
47872
- });
47873
47888
  init_parse_fetch = __esm2({
47874
47889
  "src/lib/parsers/parse-fetch.ts"() {
47875
47890
  "use strict";
@@ -48051,7 +48066,7 @@ var init_esm10 = __esm({
48051
48066
  var { GitExecutor: GitExecutor2 } = (init_git_executor(), __toCommonJS2(git_executor_exports));
48052
48067
  var { SimpleGitApi: SimpleGitApi2 } = (init_simple_git_api(), __toCommonJS2(simple_git_api_exports));
48053
48068
  var { Scheduler: Scheduler2 } = (init_scheduler(), __toCommonJS2(scheduler_exports));
48054
- var { configurationErrorTask: configurationErrorTask2 } = (init_task(), __toCommonJS2(task_exports));
48069
+ var { adhocExecTask: adhocExecTask2, configurationErrorTask: configurationErrorTask2 } = (init_task(), __toCommonJS2(task_exports));
48055
48070
  var {
48056
48071
  asArray: asArray2,
48057
48072
  filterArray: filterArray2,
@@ -48072,7 +48087,6 @@ var init_esm10 = __esm({
48072
48087
  } = (init_branch(), __toCommonJS2(branch_exports));
48073
48088
  var { checkIgnoreTask: checkIgnoreTask2 } = (init_check_ignore(), __toCommonJS2(check_ignore_exports));
48074
48089
  var { checkIsRepoTask: checkIsRepoTask2 } = (init_check_is_repo(), __toCommonJS2(check_is_repo_exports));
48075
- var { cloneTask: cloneTask2, cloneMirrorTask: cloneMirrorTask2 } = (init_clone(), __toCommonJS2(clone_exports));
48076
48090
  var { cleanWithOptionsTask: cleanWithOptionsTask2, isCleanOptionsArray: isCleanOptionsArray2 } = (init_clean(), __toCommonJS2(clean_exports));
48077
48091
  var { diffSummaryTask: diffSummaryTask2 } = (init_diff(), __toCommonJS2(diff_exports));
48078
48092
  var { fetchTask: fetchTask2 } = (init_fetch(), __toCommonJS2(fetch_exports));
@@ -48127,24 +48141,6 @@ var init_esm10 = __esm({
48127
48141
  trailingFunctionArgument2(arguments)
48128
48142
  );
48129
48143
  };
48130
- function createCloneTask(api, task, repoPath, localPath) {
48131
- if (typeof repoPath !== "string") {
48132
- return configurationErrorTask2(`git.${api}() requires a string 'repoPath'`);
48133
- }
48134
- return task(repoPath, filterType2(localPath, filterString2), getTrailingOptions2(arguments));
48135
- }
48136
- Git2.prototype.clone = function() {
48137
- return this._runTask(
48138
- createCloneTask("clone", cloneTask2, ...arguments),
48139
- trailingFunctionArgument2(arguments)
48140
- );
48141
- };
48142
- Git2.prototype.mirror = function() {
48143
- return this._runTask(
48144
- createCloneTask("mirror", cloneMirrorTask2, ...arguments),
48145
- trailingFunctionArgument2(arguments)
48146
- );
48147
- };
48148
48144
  Git2.prototype.mv = function(from, to2) {
48149
48145
  return this._runTask(moveTask2(from, to2), trailingFunctionArgument2(arguments));
48150
48146
  };
@@ -48177,10 +48173,13 @@ var init_esm10 = __esm({
48177
48173
  );
48178
48174
  };
48179
48175
  Git2.prototype.silent = function(silence) {
48180
- console.warn(
48181
- "simple-git deprecation notice: git.silent: logging should be configured using the `debug` library / `DEBUG` environment variable, this will be an error in version 3"
48176
+ return this._runTask(
48177
+ adhocExecTask2(
48178
+ () => console.warn(
48179
+ "simple-git deprecation notice: git.silent: logging should be configured using the `debug` library / `DEBUG` environment variable, this method will be removed."
48180
+ )
48181
+ )
48182
48182
  );
48183
- return this;
48184
48183
  };
48185
48184
  Git2.prototype.tags = function(options, then) {
48186
48185
  return this._runTask(
@@ -48406,7 +48405,13 @@ var init_esm10 = __esm({
48406
48405
  return this._runTask(task);
48407
48406
  };
48408
48407
  Git2.prototype.clearQueue = function() {
48409
- return this;
48408
+ return this._runTask(
48409
+ adhocExecTask2(
48410
+ () => console.warn(
48411
+ "simple-git deprecation notice: clearQueue() is deprecated and will be removed, switch to using the abortPlugin instead."
48412
+ )
48413
+ )
48414
+ );
48410
48415
  };
48411
48416
  Git2.prototype.checkIgnore = function(pathnames, then) {
48412
48417
  return this._runTask(
@@ -48449,6 +48454,17 @@ var init_esm10 = __esm({
48449
48454
  init_diff_name_status();
48450
48455
  init_grep();
48451
48456
  init_reset();
48457
+ preventUnsafeConfig = [
48458
+ preventConfigBuilder(
48459
+ /^\s*protocol(.[a-z]+)?.allow/i,
48460
+ "allowUnsafeProtocolOverride",
48461
+ "protocol.allow"
48462
+ ),
48463
+ preventConfigBuilder("core.sshCommand", "allowUnsafeSshCommand"),
48464
+ preventConfigBuilder("core.gitProxy", "allowUnsafeGitProxy"),
48465
+ preventConfigBuilder("core.hooksPath", "allowUnsafeHooksPath"),
48466
+ preventConfigBuilder("diff.external", "allowUnsafeDiffExternal")
48467
+ ];
48452
48468
  init_utils13();
48453
48469
  init_utils13();
48454
48470
  never = (0, import_promise_deferred2.deferred)().promise;
@@ -50855,12 +50871,12 @@ var require_prompt = __commonJS({
50855
50871
  var readline = require("readline");
50856
50872
  var _require = require_util();
50857
50873
  var action = _require.action;
50858
- var EventEmitter4 = require("events");
50874
+ var EventEmitter5 = require("events");
50859
50875
  var _require2 = require_src30();
50860
50876
  var beep = _require2.beep;
50861
50877
  var cursor2 = _require2.cursor;
50862
50878
  var color = require_kleur();
50863
- var Prompt = class extends EventEmitter4 {
50879
+ var Prompt = class extends EventEmitter5 {
50864
50880
  constructor(opts = {}) {
50865
50881
  super();
50866
50882
  this.firstRender = true;
@@ -53350,10 +53366,10 @@ var require_prompt2 = __commonJS({
53350
53366
  init_import_meta_url();
53351
53367
  var readline = require("readline");
53352
53368
  var { action } = require_util2();
53353
- var EventEmitter4 = require("events");
53369
+ var EventEmitter5 = require("events");
53354
53370
  var { beep, cursor: cursor2 } = require_src30();
53355
53371
  var color = require_kleur();
53356
- var Prompt = class extends EventEmitter4 {
53372
+ var Prompt = class extends EventEmitter5 {
53357
53373
  constructor(opts = {}) {
53358
53374
  super();
53359
53375
  this.firstRender = true;
@@ -62194,14 +62210,14 @@ var require_lib9 = __commonJS({
62194
62210
  function _interopDefault(ex) {
62195
62211
  return ex && typeof ex === "object" && "default" in ex ? ex["default"] : ex;
62196
62212
  }
62197
- var Stream2 = _interopDefault(require("stream"));
62213
+ var Stream3 = _interopDefault(require("stream"));
62198
62214
  var http4 = _interopDefault(require("http"));
62199
62215
  var Url = _interopDefault(require("url"));
62200
62216
  var whatwgUrl = _interopDefault(require_public_api());
62201
62217
  var https2 = _interopDefault(require("https"));
62202
62218
  var zlib2 = _interopDefault(require("zlib"));
62203
- var Readable5 = Stream2.Readable;
62204
- var BUFFER2 = Symbol("buffer");
62219
+ var Readable5 = Stream3.Readable;
62220
+ var BUFFER3 = Symbol("buffer");
62205
62221
  var TYPE2 = Symbol("type");
62206
62222
  var Blob2 = class _Blob {
62207
62223
  constructor() {
@@ -62223,7 +62239,7 @@ var require_lib9 = __commonJS({
62223
62239
  } else if (element instanceof ArrayBuffer) {
62224
62240
  buffer = Buffer.from(element);
62225
62241
  } else if (element instanceof _Blob) {
62226
- buffer = element[BUFFER2];
62242
+ buffer = element[BUFFER3];
62227
62243
  } else {
62228
62244
  buffer = Buffer.from(typeof element === "string" ? element : String(element));
62229
62245
  }
@@ -62231,23 +62247,23 @@ var require_lib9 = __commonJS({
62231
62247
  buffers.push(buffer);
62232
62248
  }
62233
62249
  }
62234
- this[BUFFER2] = Buffer.concat(buffers);
62250
+ this[BUFFER3] = Buffer.concat(buffers);
62235
62251
  let type2 = options && options.type !== void 0 && String(options.type).toLowerCase();
62236
62252
  if (type2 && !/[^\u0020-\u007E]/.test(type2)) {
62237
62253
  this[TYPE2] = type2;
62238
62254
  }
62239
62255
  }
62240
62256
  get size() {
62241
- return this[BUFFER2].length;
62257
+ return this[BUFFER3].length;
62242
62258
  }
62243
62259
  get type() {
62244
62260
  return this[TYPE2];
62245
62261
  }
62246
62262
  text() {
62247
- return Promise.resolve(this[BUFFER2].toString());
62263
+ return Promise.resolve(this[BUFFER3].toString());
62248
62264
  }
62249
62265
  arrayBuffer() {
62250
- const buf = this[BUFFER2];
62266
+ const buf = this[BUFFER3];
62251
62267
  const ab = buf.buffer.slice(buf.byteOffset, buf.byteOffset + buf.byteLength);
62252
62268
  return Promise.resolve(ab);
62253
62269
  }
@@ -62255,7 +62271,7 @@ var require_lib9 = __commonJS({
62255
62271
  const readable = new Readable5();
62256
62272
  readable._read = function() {
62257
62273
  };
62258
- readable.push(this[BUFFER2]);
62274
+ readable.push(this[BUFFER3]);
62259
62275
  readable.push(null);
62260
62276
  return readable;
62261
62277
  }
@@ -62282,10 +62298,10 @@ var require_lib9 = __commonJS({
62282
62298
  relativeEnd = Math.min(end, size);
62283
62299
  }
62284
62300
  const span = Math.max(relativeEnd - relativeStart, 0);
62285
- const buffer = this[BUFFER2];
62301
+ const buffer = this[BUFFER3];
62286
62302
  const slicedBuffer = buffer.slice(relativeStart, relativeStart + span);
62287
62303
  const blob = new _Blob([], { type: arguments[2] });
62288
- blob[BUFFER2] = slicedBuffer;
62304
+ blob[BUFFER3] = slicedBuffer;
62289
62305
  return blob;
62290
62306
  }
62291
62307
  };
@@ -62318,7 +62334,7 @@ var require_lib9 = __commonJS({
62318
62334
  } catch (e4) {
62319
62335
  }
62320
62336
  var INTERNALS = Symbol("Body internals");
62321
- var PassThrough2 = Stream2.PassThrough;
62337
+ var PassThrough2 = Stream3.PassThrough;
62322
62338
  function Body(body) {
62323
62339
  var _this = this;
62324
62340
  var _ref = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, _ref$size = _ref.size;
@@ -62335,7 +62351,7 @@ var require_lib9 = __commonJS({
62335
62351
  body = Buffer.from(body);
62336
62352
  } else if (ArrayBuffer.isView(body)) {
62337
62353
  body = Buffer.from(body.buffer, body.byteOffset, body.byteLength);
62338
- } else if (body instanceof Stream2) ;
62354
+ } else if (body instanceof Stream3) ;
62339
62355
  else {
62340
62356
  body = Buffer.from(String(body));
62341
62357
  }
@@ -62346,7 +62362,7 @@ var require_lib9 = __commonJS({
62346
62362
  };
62347
62363
  this.size = size;
62348
62364
  this.timeout = timeout;
62349
- if (body instanceof Stream2) {
62365
+ if (body instanceof Stream3) {
62350
62366
  body.on("error", function(err) {
62351
62367
  const error3 = err.name === "AbortError" ? err : new FetchError(`Invalid response body while trying to fetch ${_this.url}: ${err.message}`, "system", err);
62352
62368
  _this[INTERNALS].error = error3;
@@ -62384,7 +62400,7 @@ var require_lib9 = __commonJS({
62384
62400
  type: ct2.toLowerCase()
62385
62401
  }),
62386
62402
  {
62387
- [BUFFER2]: buf
62403
+ [BUFFER3]: buf
62388
62404
  }
62389
62405
  );
62390
62406
  });
@@ -62470,7 +62486,7 @@ var require_lib9 = __commonJS({
62470
62486
  if (Buffer.isBuffer(body)) {
62471
62487
  return Body.Promise.resolve(body);
62472
62488
  }
62473
- if (!(body instanceof Stream2)) {
62489
+ if (!(body instanceof Stream3)) {
62474
62490
  return Body.Promise.resolve(Buffer.alloc(0));
62475
62491
  }
62476
62492
  let accum = [];
@@ -62569,7 +62585,7 @@ var require_lib9 = __commonJS({
62569
62585
  if (instance.bodyUsed) {
62570
62586
  throw new Error("cannot clone body after it is used");
62571
62587
  }
62572
- if (body instanceof Stream2 && typeof body.getBoundary !== "function") {
62588
+ if (body instanceof Stream3 && typeof body.getBoundary !== "function") {
62573
62589
  p1 = new PassThrough2();
62574
62590
  p22 = new PassThrough2();
62575
62591
  body.pipe(p1);
@@ -62596,7 +62612,7 @@ var require_lib9 = __commonJS({
62596
62612
  return null;
62597
62613
  } else if (typeof body.getBoundary === "function") {
62598
62614
  return `multipart/form-data;boundary=${body.getBoundary()}`;
62599
- } else if (body instanceof Stream2) {
62615
+ } else if (body instanceof Stream3) {
62600
62616
  return null;
62601
62617
  } else {
62602
62618
  return "text/plain;charset=UTF-8";
@@ -63020,7 +63036,7 @@ var require_lib9 = __commonJS({
63020
63036
  }
63021
63037
  return parse_url(urlStr);
63022
63038
  }
63023
- var streamDestructionSupported = "destroy" in Stream2.Readable.prototype;
63039
+ var streamDestructionSupported = "destroy" in Stream3.Readable.prototype;
63024
63040
  function isRequest(input) {
63025
63041
  return typeof input === "object" && typeof input[INTERNALS$2] === "object";
63026
63042
  }
@@ -63127,7 +63143,7 @@ var require_lib9 = __commonJS({
63127
63143
  if (!/^https?:$/.test(parsedURL.protocol)) {
63128
63144
  throw new TypeError("Only HTTP(S) protocols are supported");
63129
63145
  }
63130
- if (request3.signal && request3.body instanceof Stream2.Readable && !streamDestructionSupported) {
63146
+ if (request3.signal && request3.body instanceof Stream3.Readable && !streamDestructionSupported) {
63131
63147
  throw new Error("Cancellation of streamed requests with AbortSignal is not supported in node < 8");
63132
63148
  }
63133
63149
  let contentLengthValue = null;
@@ -63169,7 +63185,7 @@ var require_lib9 = __commonJS({
63169
63185
  AbortError.prototype.constructor = AbortError;
63170
63186
  AbortError.prototype.name = "AbortError";
63171
63187
  var URL$1 = Url.URL || whatwgUrl.URL;
63172
- var PassThrough$1 = Stream2.PassThrough;
63188
+ var PassThrough$1 = Stream3.PassThrough;
63173
63189
  var isDomainOrSubdomain = function isDomainOrSubdomain2(destination, original) {
63174
63190
  const orig = new URL$1(original).hostname;
63175
63191
  const dest = new URL$1(destination).hostname;
@@ -63194,7 +63210,7 @@ var require_lib9 = __commonJS({
63194
63210
  const abort = function abort2() {
63195
63211
  let error3 = new AbortError("The user aborted a request.");
63196
63212
  reject(error3);
63197
- if (request3.body && request3.body instanceof Stream2.Readable) {
63213
+ if (request3.body && request3.body instanceof Stream3.Readable) {
63198
63214
  destroyStream(request3.body, error3);
63199
63215
  }
63200
63216
  if (!response || !response.body) return;
@@ -63580,7 +63596,7 @@ var init_p_limit = __esm({
63580
63596
  var require_through = __commonJS({
63581
63597
  "node_modules/.pnpm/through@2.3.8/node_modules/through/index.js"(exports2, module2) {
63582
63598
  init_import_meta_url();
63583
- var Stream2 = require("stream");
63599
+ var Stream3 = require("stream");
63584
63600
  exports2 = module2.exports = through;
63585
63601
  through.through = through;
63586
63602
  function through(write, end, opts) {
@@ -63591,7 +63607,7 @@ var require_through = __commonJS({
63591
63607
  this.queue(null);
63592
63608
  };
63593
63609
  var ended = false, destroyed = false, buffer = [], _ended = false;
63594
- var stream2 = new Stream2();
63610
+ var stream2 = new Stream3();
63595
63611
  stream2.readable = stream2.writable = true;
63596
63612
  stream2.paused = false;
63597
63613
  stream2.autoDestroy = !(opts && opts.autoDestroy === false);
@@ -63718,7 +63734,7 @@ var require_split = __commonJS({
63718
63734
  }
63719
63735
  });
63720
63736
 
63721
- // node_modules/.pnpm/tar@7.5.10/node_modules/tar/dist/esm/index.min.js
63737
+ // node_modules/.pnpm/tar@7.5.11/node_modules/tar/dist/esm/index.min.js
63722
63738
  function Cn(s6, t4, e4) {
63723
63739
  let i4 = t4, r4 = t4 ? t4.next : s6.head, n4 = new ue(e4, i4, r4, s6);
63724
63740
  return n4.next === void 0 && (s6.tail = n4), n4.prev === void 0 && (s6.head = n4), s6.length++, n4;
@@ -63731,7 +63747,7 @@ function kn(s6, t4) {
63731
63747
  }
63732
63748
  var import_events, import_fs4, import_node_events3, import_node_stream2, import_node_string_decoder, import_node_path5, import_node_fs4, import_path5, import_events2, import_assert, import_buffer, vs, import_zlib, import_node_path6, import_node_path7, import_fs5, import_fs6, import_path6, import_node_path8, import_path7, import_node_fs5, import_node_assert, import_node_crypto, import_node_fs6, import_node_path9, import_fs7, import_node_fs7, import_node_path10, import_node_fs8, import_promises2, import_node_path11, import_node_path12, import_node_fs9, import_node_path13, Dr, Ar, Ts, Cr, Fr, kr, q, j, rt, xe, jt, Le, xs, Ne, Ls, z, Mt, b, Qt, Bt, g, D, _, Si, De, L, w, yi, Ri, Ns, bi, Z, gi, Ae, Jt, yt, C, te, vr, Mr, Br, Pr, Ie, _i, zr, Ur, A, Wr, ot, H, ee, m, Ti, J, xi, Ai, Ii, se, Ce, Ut, Ht, Li, Pt, ht, U, nt, Y, zt, Ni, Q, ie, Di, Fe, Rt, ke, bt, gt, ve, tt, Wt, Gr, As, Is, Cs, Fs, ks, Zr, re2, K, Kr, M, Vr, Ms, $r, Fi, Ot, Gt, ki, ne, Me, Be, Pe, ze, Ue, He, We, Ge, Ze, Bs, qr, jr, Ps, Qr, Jr, zs, Us, Mi, oe, en, he, Ye, F, sn, Tt, Bi, rn, at, nn, on, hn, lt, an, ln, cn, Pi, fn, xt, ct, un, mn, pn, En, f, Yt, Lt, Sn, Gi, Zi, yn, B, Nt, et, zi, Hs, V, ae, ft, Ws, p, it, dt, Ui, Dt, y, Ke, Ve, Hi, Gs, Zs, le, Wi, $e, Kt, ut, Xe, At, qe, je, Ys, Rn, st, mt, _n, Yi, On, Tn, It, Ki, Ln, Ks, ce, Qe, Vi, Nn, Dn, $i, Vs, tr, An, qs, js, Qs, qi, Js, fe, Je, ji, ti, Qi, Ji, ts, es, pt, ei, is, Xi, X, de, ii, si, In, ri, ue, fi, er, ni, me, W, Ct, Ft, pe, ss, G, rs, oi, ir, hs, as, hi, ai, sr, ns, li, nr, os3, Et, kt, vn, Mn, hr, ar, Bn, Pn, zn, Un, Hn, Wn, Gn, Zn, cr, Yn, Kn, Vn, ls, cs, di, $n, fs2, Xn, ds, we, wt, jn, fr, us, dr, Qn, ur, ms, mr, $t, pr, Jn, to, eo, pi, wr, Sr, Ss, yr, ys, P, Rs, bs, wi, Rr, br, ye, gr, _r, ps, St, O, Ei, Or, Xt, Es, ws, gs, Re, be, ge, _e, so, Oe, ro, no, oo, Tr, qt, Se, Te, ho, ao, lo, co, fo, uo, mo, po, vt, Eo, wo;
63733
63749
  var init_index_min = __esm({
63734
- "node_modules/.pnpm/tar@7.5.10/node_modules/tar/dist/esm/index.min.js"() {
63750
+ "node_modules/.pnpm/tar@7.5.11/node_modules/tar/dist/esm/index.min.js"() {
63735
63751
  init_import_meta_url();
63736
63752
  import_events = __toESM(require("events"), 1);
63737
63753
  import_fs4 = __toESM(require("fs"), 1);
@@ -66155,7 +66171,7 @@ var init_index_min = __esm({
66155
66171
  if (h4.includes("..") || Oe && /^[a-z]:\.\.$/i.test(h4[0] ?? "")) {
66156
66172
  if (e4 === "path" || r4 === "Link") return this.warn("TAR_ENTRY_ERROR", `${e4} contains '..'`, { entry: t4, [e4]: i4 }), false;
66157
66173
  {
66158
- let a4 = import_node_path9.default.posix.dirname(t4.path), l4 = import_node_path9.default.posix.normalize(import_node_path9.default.posix.join(a4, i4));
66174
+ let a4 = import_node_path9.default.posix.dirname(t4.path), l4 = import_node_path9.default.posix.normalize(import_node_path9.default.posix.join(a4, h4.join("/")));
66159
66175
  if (l4.startsWith("../") || l4 === "..") return this.warn("TAR_ENTRY_ERROR", `${e4} escapes extraction directory`, { entry: t4, [e4]: i4 }), false;
66160
66176
  }
66161
66177
  }
@@ -67032,15 +67048,15 @@ var require_fd_slicer = __commonJS({
67032
67048
  var Writable3 = stream2.Writable;
67033
67049
  var PassThrough2 = stream2.PassThrough;
67034
67050
  var Pend = require_pend();
67035
- var EventEmitter4 = require("events").EventEmitter;
67051
+ var EventEmitter5 = require("events").EventEmitter;
67036
67052
  exports2.createFromBuffer = createFromBuffer;
67037
67053
  exports2.createFromFd = createFromFd;
67038
67054
  exports2.BufferSlicer = BufferSlicer;
67039
67055
  exports2.FdSlicer = FdSlicer;
67040
- util6.inherits(FdSlicer, EventEmitter4);
67056
+ util6.inherits(FdSlicer, EventEmitter5);
67041
67057
  function FdSlicer(fd, options) {
67042
67058
  options = options || {};
67043
- EventEmitter4.call(this);
67059
+ EventEmitter5.call(this);
67044
67060
  this.fd = fd;
67045
67061
  this.pend = new Pend();
67046
67062
  this.pend.max = 1;
@@ -67184,9 +67200,9 @@ var require_fd_slicer = __commonJS({
67184
67200
  this.destroyed = true;
67185
67201
  this.context.unref();
67186
67202
  };
67187
- util6.inherits(BufferSlicer, EventEmitter4);
67203
+ util6.inherits(BufferSlicer, EventEmitter5);
67188
67204
  function BufferSlicer(buffer, options) {
67189
- EventEmitter4.call(this);
67205
+ EventEmitter5.call(this);
67190
67206
  options = options || {};
67191
67207
  this.refCount = 0;
67192
67208
  this.buffer = buffer;
@@ -67598,7 +67614,7 @@ var require_yauzl = __commonJS({
67598
67614
  var fd_slicer = require_fd_slicer();
67599
67615
  var crc32 = require_buffer_crc32();
67600
67616
  var util6 = require("util");
67601
- var EventEmitter4 = require("events").EventEmitter;
67617
+ var EventEmitter5 = require("events").EventEmitter;
67602
67618
  var Transform3 = require("stream").Transform;
67603
67619
  var PassThrough2 = require("stream").PassThrough;
67604
67620
  var Writable3 = require("stream").Writable;
@@ -67730,10 +67746,10 @@ var require_yauzl = __commonJS({
67730
67746
  callback(new Error("end of central directory record signature not found"));
67731
67747
  });
67732
67748
  }
67733
- util6.inherits(ZipFile, EventEmitter4);
67749
+ util6.inherits(ZipFile, EventEmitter5);
67734
67750
  function ZipFile(reader, centralDirectoryOffset, fileSize, entryCount, comment, autoClose, lazyEntries, decodeStrings, validateEntrySizes, strictFileNames) {
67735
67751
  var self2 = this;
67736
- EventEmitter4.call(self2);
67752
+ EventEmitter5.call(self2);
67737
67753
  self2.reader = reader;
67738
67754
  self2.reader.on("error", function(err) {
67739
67755
  emitError(self2, err);
@@ -68094,9 +68110,9 @@ var require_yauzl = __commonJS({
68094
68110
  }
68095
68111
  cb();
68096
68112
  };
68097
- util6.inherits(RandomAccessReader, EventEmitter4);
68113
+ util6.inherits(RandomAccessReader, EventEmitter5);
68098
68114
  function RandomAccessReader() {
68099
- EventEmitter4.call(this);
68115
+ EventEmitter5.call(this);
68100
68116
  this.refCount = 0;
68101
68117
  }
68102
68118
  RandomAccessReader.prototype.ref = function() {
@@ -76396,12 +76412,12 @@ var require_is_stream = __commonJS({
76396
76412
  "node_modules/.pnpm/is-stream@2.0.1/node_modules/is-stream/index.js"(exports2, module2) {
76397
76413
  "use strict";
76398
76414
  init_import_meta_url();
76399
- var isStream2 = (stream2) => stream2 !== null && typeof stream2 === "object" && typeof stream2.pipe === "function";
76400
- isStream2.writable = (stream2) => isStream2(stream2) && stream2.writable !== false && typeof stream2._write === "function" && typeof stream2._writableState === "object";
76401
- isStream2.readable = (stream2) => isStream2(stream2) && stream2.readable !== false && typeof stream2._read === "function" && typeof stream2._readableState === "object";
76402
- isStream2.duplex = (stream2) => isStream2.writable(stream2) && isStream2.readable(stream2);
76403
- isStream2.transform = (stream2) => isStream2.duplex(stream2) && typeof stream2._transform === "function";
76404
- module2.exports = isStream2;
76415
+ var isStream3 = (stream2) => stream2 !== null && typeof stream2 === "object" && typeof stream2.pipe === "function";
76416
+ isStream3.writable = (stream2) => isStream3(stream2) && stream2.writable !== false && typeof stream2._write === "function" && typeof stream2._writableState === "object";
76417
+ isStream3.readable = (stream2) => isStream3(stream2) && stream2.readable !== false && typeof stream2._read === "function" && typeof stream2._readableState === "object";
76418
+ isStream3.duplex = (stream2) => isStream3.writable(stream2) && isStream3.readable(stream2);
76419
+ isStream3.transform = (stream2) => isStream3.duplex(stream2) && typeof stream2._transform === "function";
76420
+ module2.exports = isStream3;
76405
76421
  }
76406
76422
  });
76407
76423
 
@@ -82333,7 +82349,7 @@ var require_data_stream = __commonJS({
82333
82349
  "node_modules/.pnpm/jws@4.0.1/node_modules/jws/lib/data-stream.js"(exports2, module2) {
82334
82350
  init_import_meta_url();
82335
82351
  var Buffer3 = require_safe_buffer().Buffer;
82336
- var Stream2 = require("stream");
82352
+ var Stream3 = require("stream");
82337
82353
  var util6 = require("util");
82338
82354
  function DataStream(data2) {
82339
82355
  this.buffer = null;
@@ -82360,7 +82376,7 @@ var require_data_stream = __commonJS({
82360
82376
  }
82361
82377
  throw new TypeError("Unexpected data type (" + typeof data2 + ")");
82362
82378
  }
82363
- util6.inherits(DataStream, Stream2);
82379
+ util6.inherits(DataStream, Stream3);
82364
82380
  DataStream.prototype.write = function write(data2) {
82365
82381
  this.buffer = Buffer3.concat([this.buffer, Buffer3.from(data2)]);
82366
82382
  this.emit("data", data2);
@@ -82659,7 +82675,7 @@ var require_sign_stream = __commonJS({
82659
82675
  var Buffer3 = require_safe_buffer().Buffer;
82660
82676
  var DataStream = require_data_stream();
82661
82677
  var jwa = require_jwa();
82662
- var Stream2 = require("stream");
82678
+ var Stream3 = require("stream");
82663
82679
  var toString2 = require_tostring();
82664
82680
  var util6 = require("util");
82665
82681
  function base64url(string, encoding) {
@@ -82703,7 +82719,7 @@ var require_sign_stream = __commonJS({
82703
82719
  this.sign();
82704
82720
  }.bind(this));
82705
82721
  }
82706
- util6.inherits(SignStream, Stream2);
82722
+ util6.inherits(SignStream, Stream3);
82707
82723
  SignStream.prototype.sign = function sign() {
82708
82724
  try {
82709
82725
  var signature = jwsSign({
@@ -82735,7 +82751,7 @@ var require_verify_stream = __commonJS({
82735
82751
  var Buffer3 = require_safe_buffer().Buffer;
82736
82752
  var DataStream = require_data_stream();
82737
82753
  var jwa = require_jwa();
82738
- var Stream2 = require("stream");
82754
+ var Stream3 = require("stream");
82739
82755
  var toString2 = require_tostring();
82740
82756
  var util6 = require("util");
82741
82757
  var JWS_REGEX = /^[a-zA-Z0-9\-_]+?\.[a-zA-Z0-9\-_]+?\.([a-zA-Z0-9\-_]+)?$/;
@@ -82821,7 +82837,7 @@ var require_verify_stream = __commonJS({
82821
82837
  this.verify();
82822
82838
  }.bind(this));
82823
82839
  }
82824
- util6.inherits(VerifyStream, Stream2);
82840
+ util6.inherits(VerifyStream, Stream3);
82825
82841
  VerifyStream.prototype.verify = function verify() {
82826
82842
  try {
82827
82843
  var valid = jwsVerify(this.signature.buffer, this.algorithm, this.key.buffer);
@@ -89212,7 +89228,7 @@ var require_stream_writable = __commonJS({
89212
89228
  var internalUtil = {
89213
89229
  deprecate: require_node8()
89214
89230
  };
89215
- var Stream2 = require_stream();
89231
+ var Stream3 = require_stream();
89216
89232
  var Buffer3 = require("buffer").Buffer;
89217
89233
  var OurUint8Array = (typeof global !== "undefined" ? global : typeof window !== "undefined" ? window : typeof self !== "undefined" ? self : {}).Uint8Array || function() {
89218
89234
  };
@@ -89235,7 +89251,7 @@ var require_stream_writable = __commonJS({
89235
89251
  var ERR_STREAM_WRITE_AFTER_END = _require$codes.ERR_STREAM_WRITE_AFTER_END;
89236
89252
  var ERR_UNKNOWN_ENCODING = _require$codes.ERR_UNKNOWN_ENCODING;
89237
89253
  var errorOrDestroy = destroyImpl.errorOrDestroy;
89238
- require_inherits()(Writable3, Stream2);
89254
+ require_inherits()(Writable3, Stream3);
89239
89255
  function nop() {
89240
89256
  }
89241
89257
  function WritableState(options, stream2, isDuplex) {
@@ -89320,7 +89336,7 @@ var require_stream_writable = __commonJS({
89320
89336
  if (typeof options.destroy === "function") this._destroy = options.destroy;
89321
89337
  if (typeof options.final === "function") this._final = options.final;
89322
89338
  }
89323
- Stream2.call(this);
89339
+ Stream3.call(this);
89324
89340
  }
89325
89341
  Writable3.prototype.pipe = function() {
89326
89342
  errorOrDestroy(this, new ERR_STREAM_CANNOT_PIPE());
@@ -89816,8 +89832,8 @@ var require_string_decoder = __commonJS({
89816
89832
  if (typeof nenc !== "string" && (Buffer3.isEncoding === isEncoding || !isEncoding(enc))) throw new Error("Unknown encoding: " + enc);
89817
89833
  return nenc || enc;
89818
89834
  }
89819
- exports2.StringDecoder = StringDecoder2;
89820
- function StringDecoder2(encoding) {
89835
+ exports2.StringDecoder = StringDecoder3;
89836
+ function StringDecoder3(encoding) {
89821
89837
  this.encoding = normalizeEncoding(encoding);
89822
89838
  var nb;
89823
89839
  switch (this.encoding) {
@@ -89844,7 +89860,7 @@ var require_string_decoder = __commonJS({
89844
89860
  this.lastTotal = 0;
89845
89861
  this.lastChar = Buffer3.allocUnsafe(nb);
89846
89862
  }
89847
- StringDecoder2.prototype.write = function(buf) {
89863
+ StringDecoder3.prototype.write = function(buf) {
89848
89864
  if (buf.length === 0) return "";
89849
89865
  var r4;
89850
89866
  var i4;
@@ -89859,9 +89875,9 @@ var require_string_decoder = __commonJS({
89859
89875
  if (i4 < buf.length) return r4 ? r4 + this.text(buf, i4) : this.text(buf, i4);
89860
89876
  return r4 || "";
89861
89877
  };
89862
- StringDecoder2.prototype.end = utf8End;
89863
- StringDecoder2.prototype.text = utf8Text;
89864
- StringDecoder2.prototype.fillLast = function(buf) {
89878
+ StringDecoder3.prototype.end = utf8End;
89879
+ StringDecoder3.prototype.text = utf8Text;
89880
+ StringDecoder3.prototype.fillLast = function(buf) {
89865
89881
  if (this.lastNeed <= buf.length) {
89866
89882
  buf.copy(this.lastChar, this.lastTotal - this.lastNeed, 0, this.lastNeed);
89867
89883
  return this.lastChar.toString(this.encoding, 0, this.lastTotal);
@@ -90406,7 +90422,7 @@ var require_stream_readable = __commonJS({
90406
90422
  var EElistenerCount = function EElistenerCount2(emitter, type2) {
90407
90423
  return emitter.listeners(type2).length;
90408
90424
  };
90409
- var Stream2 = require_stream();
90425
+ var Stream3 = require_stream();
90410
90426
  var Buffer3 = require("buffer").Buffer;
90411
90427
  var OurUint8Array = (typeof global !== "undefined" ? global : typeof window !== "undefined" ? window : typeof self !== "undefined" ? self : {}).Uint8Array || function() {
90412
90428
  };
@@ -90433,10 +90449,10 @@ var require_stream_readable = __commonJS({
90433
90449
  var ERR_STREAM_PUSH_AFTER_EOF = _require$codes.ERR_STREAM_PUSH_AFTER_EOF;
90434
90450
  var ERR_METHOD_NOT_IMPLEMENTED = _require$codes.ERR_METHOD_NOT_IMPLEMENTED;
90435
90451
  var ERR_STREAM_UNSHIFT_AFTER_END_EVENT = _require$codes.ERR_STREAM_UNSHIFT_AFTER_END_EVENT;
90436
- var StringDecoder2;
90452
+ var StringDecoder3;
90437
90453
  var createReadableStreamAsyncIterator;
90438
90454
  var from;
90439
- require_inherits()(Readable5, Stream2);
90455
+ require_inherits()(Readable5, Stream3);
90440
90456
  var errorOrDestroy = destroyImpl.errorOrDestroy;
90441
90457
  var kProxyEvents = ["error", "close", "destroy", "pause", "resume"];
90442
90458
  function prependListener(emitter, event, fn2) {
@@ -90475,8 +90491,8 @@ var require_stream_readable = __commonJS({
90475
90491
  this.decoder = null;
90476
90492
  this.encoding = null;
90477
90493
  if (options.encoding) {
90478
- if (!StringDecoder2) StringDecoder2 = require_string_decoder().StringDecoder;
90479
- this.decoder = new StringDecoder2(options.encoding);
90494
+ if (!StringDecoder3) StringDecoder3 = require_string_decoder().StringDecoder;
90495
+ this.decoder = new StringDecoder3(options.encoding);
90480
90496
  this.encoding = options.encoding;
90481
90497
  }
90482
90498
  }
@@ -90490,7 +90506,7 @@ var require_stream_readable = __commonJS({
90490
90506
  if (typeof options.read === "function") this._read = options.read;
90491
90507
  if (typeof options.destroy === "function") this._destroy = options.destroy;
90492
90508
  }
90493
- Stream2.call(this);
90509
+ Stream3.call(this);
90494
90510
  }
90495
90511
  Object.defineProperty(Readable5.prototype, "destroyed", {
90496
90512
  // making it explicit this property is not enumerable
@@ -90597,8 +90613,8 @@ var require_stream_readable = __commonJS({
90597
90613
  return this._readableState.flowing === false;
90598
90614
  };
90599
90615
  Readable5.prototype.setEncoding = function(enc) {
90600
- if (!StringDecoder2) StringDecoder2 = require_string_decoder().StringDecoder;
90601
- var decoder = new StringDecoder2(enc);
90616
+ if (!StringDecoder3) StringDecoder3 = require_string_decoder().StringDecoder;
90617
+ var decoder = new StringDecoder3(enc);
90602
90618
  this._readableState.decoder = decoder;
90603
90619
  this._readableState.encoding = this._readableState.decoder.encoding;
90604
90620
  var p5 = this._readableState.buffer.head;
@@ -90892,7 +90908,7 @@ var require_stream_readable = __commonJS({
90892
90908
  return this;
90893
90909
  };
90894
90910
  Readable5.prototype.on = function(ev, fn2) {
90895
- var res = Stream2.prototype.on.call(this, ev, fn2);
90911
+ var res = Stream3.prototype.on.call(this, ev, fn2);
90896
90912
  var state2 = this._readableState;
90897
90913
  if (ev === "data") {
90898
90914
  state2.readableListening = this.listenerCount("readable") > 0;
@@ -90914,14 +90930,14 @@ var require_stream_readable = __commonJS({
90914
90930
  };
90915
90931
  Readable5.prototype.addListener = Readable5.prototype.on;
90916
90932
  Readable5.prototype.removeListener = function(ev, fn2) {
90917
- var res = Stream2.prototype.removeListener.call(this, ev, fn2);
90933
+ var res = Stream3.prototype.removeListener.call(this, ev, fn2);
90918
90934
  if (ev === "readable") {
90919
90935
  process.nextTick(updateReadableListening, this);
90920
90936
  }
90921
90937
  return res;
90922
90938
  };
90923
90939
  Readable5.prototype.removeAllListeners = function(ev) {
90924
- var res = Stream2.prototype.removeAllListeners.apply(this, arguments);
90940
+ var res = Stream3.prototype.removeAllListeners.apply(this, arguments);
90925
90941
  if (ev === "readable" || ev === void 0) {
90926
90942
  process.nextTick(updateReadableListening, this);
90927
90943
  }
@@ -91338,14 +91354,14 @@ var require_pipeline = __commonJS({
91338
91354
  var require_readable = __commonJS({
91339
91355
  "node_modules/.pnpm/readable-stream@3.6.2/node_modules/readable-stream/readable.js"(exports2, module2) {
91340
91356
  init_import_meta_url();
91341
- var Stream2 = require("stream");
91342
- if (process.env.READABLE_STREAM === "disable" && Stream2) {
91343
- module2.exports = Stream2.Readable;
91344
- Object.assign(module2.exports, Stream2);
91345
- module2.exports.Stream = Stream2;
91357
+ var Stream3 = require("stream");
91358
+ if (process.env.READABLE_STREAM === "disable" && Stream3) {
91359
+ module2.exports = Stream3.Readable;
91360
+ Object.assign(module2.exports, Stream3);
91361
+ module2.exports.Stream = Stream3;
91346
91362
  } else {
91347
91363
  exports2 = module2.exports = require_stream_readable();
91348
- exports2.Stream = Stream2 || exports2;
91364
+ exports2.Stream = Stream3 || exports2;
91349
91365
  exports2.Readable = exports2;
91350
91366
  exports2.Writable = require_stream_writable();
91351
91367
  exports2.Duplex = require_stream_duplex();
@@ -111158,8 +111174,8 @@ var require_async = __commonJS({
111158
111174
  function fallback(fn2) {
111159
111175
  setTimeout(fn2, 0);
111160
111176
  }
111161
- function wrap(defer2) {
111162
- return (fn2, ...args) => defer2(() => fn2(...args));
111177
+ function wrap(defer3) {
111178
+ return (fn2, ...args) => defer3(() => fn2(...args));
111163
111179
  }
111164
111180
  var _defer;
111165
111181
  if (hasQueueMicrotask) {
@@ -115763,6 +115779,15 @@ function extractChangelogEntry(prBody) {
115763
115779
  }
115764
115780
  return parseTokensToEntries(contentTokens);
115765
115781
  }
115782
+ function renderIndentedCodeBlock(codeToken, indent = " ") {
115783
+ const fence = codeToken.lang ? `\`\`\`${codeToken.lang}` : "```";
115784
+ const lines = [`${indent}${fence}`];
115785
+ for (const line of codeToken.text.split("\n")) {
115786
+ lines.push(`${indent}${line}`);
115787
+ }
115788
+ lines.push(`${indent}\`\`\``);
115789
+ return lines;
115790
+ }
115766
115791
  function extractNestedContent(tokens) {
115767
115792
  const nestedLines = [];
115768
115793
  for (const token of tokens) {
@@ -115777,6 +115802,8 @@ function extractNestedContent(tokens) {
115777
115802
  nestedLines.push(indentedDeeper);
115778
115803
  }
115779
115804
  }
115805
+ } else if (token.type === "code") {
115806
+ nestedLines.push(...renderIndentedCodeBlock(token));
115780
115807
  }
115781
115808
  }
115782
115809
  return nestedLines.join("\n");
@@ -115809,6 +115836,15 @@ function parseTokensToEntries(tokens) {
115809
115836
  if (text) {
115810
115837
  entries.push({ text });
115811
115838
  }
115839
+ } else if (token.type === "code") {
115840
+ const codeBlock = renderIndentedCodeBlock(token).join(
115841
+ "\n"
115842
+ );
115843
+ if (entries.length > 0) {
115844
+ const prev = entries[entries.length - 1];
115845
+ prev.nestedContent = prev.nestedContent ? `${prev.nestedContent}
115846
+ ${codeBlock}` : codeBlock;
115847
+ }
115812
115848
  }
115813
115849
  }
115814
115850
  return entries.length > 0 ? entries : null;
@@ -118605,10 +118641,10 @@ var init_esm12 = __esm({
118605
118641
  }
118606
118642
  });
118607
118643
 
118608
- // node_modules/.pnpm/minipass@7.1.2/node_modules/minipass/dist/esm/index.js
118644
+ // node_modules/.pnpm/minipass@7.1.3/node_modules/minipass/dist/esm/index.js
118609
118645
  var import_node_events4, import_node_stream3, import_node_string_decoder2, proc, isStream, isReadable, isWritable, EOF, MAYBE_EMIT_END, EMITTED_END, EMITTING_END, EMITTED_ERROR, CLOSED, READ, FLUSH, FLUSHCHUNK, ENCODING, DECODER, FLOWING, PAUSED, RESUME, BUFFER, PIPES, BUFFERLENGTH, BUFFERPUSH, BUFFERSHIFT, OBJECTMODE, DESTROYED, ERROR, EMITDATA, EMITEND, EMITEND2, ASYNC, ABORT, ABORTED, SIGNAL, DATALISTENERS, DISCARDED, defer, nodefer, isEndish, isArrayBufferLike, isArrayBufferView, Pipe, PipeProxyErrors, isObjectModeOptions, isEncodingOptions, Minipass;
118610
118646
  var init_esm13 = __esm({
118611
- "node_modules/.pnpm/minipass@7.1.2/node_modules/minipass/dist/esm/index.js"() {
118647
+ "node_modules/.pnpm/minipass@7.1.3/node_modules/minipass/dist/esm/index.js"() {
118612
118648
  init_import_meta_url();
118613
118649
  import_node_events4 = require("node:events");
118614
118650
  import_node_stream3 = __toESM(require("node:stream"), 1);
@@ -118690,7 +118726,7 @@ var init_esm13 = __esm({
118690
118726
  }
118691
118727
  constructor(src, dest, opts) {
118692
118728
  super(src, dest, opts);
118693
- this.proxyErrors = (er2) => dest.emit("error", er2);
118729
+ this.proxyErrors = (er2) => this.dest.emit("error", er2);
118694
118730
  src.on("error", this.proxyErrors);
118695
118731
  }
118696
118732
  };
@@ -119404,6 +119440,8 @@ var init_esm13 = __esm({
119404
119440
  return: stop,
119405
119441
  [Symbol.asyncIterator]() {
119406
119442
  return this;
119443
+ },
119444
+ [Symbol.asyncDispose]: async () => {
119407
119445
  }
119408
119446
  };
119409
119447
  }
@@ -119439,6 +119477,8 @@ var init_esm13 = __esm({
119439
119477
  return: stop,
119440
119478
  [Symbol.iterator]() {
119441
119479
  return this;
119480
+ },
119481
+ [Symbol.dispose]: () => {
119442
119482
  }
119443
119483
  };
119444
119484
  }
@@ -121402,6 +121442,890 @@ var init_pattern = __esm({
121402
121442
  }
121403
121443
  });
121404
121444
 
121445
+ // node_modules/.pnpm/minipass@7.1.2/node_modules/minipass/dist/esm/index.js
121446
+ var import_node_events5, import_node_stream4, import_node_string_decoder3, proc2, isStream2, isReadable2, isWritable2, EOF2, MAYBE_EMIT_END2, EMITTED_END2, EMITTING_END2, EMITTED_ERROR2, CLOSED2, READ2, FLUSH2, FLUSHCHUNK2, ENCODING2, DECODER2, FLOWING2, PAUSED2, RESUME2, BUFFER2, PIPES2, BUFFERLENGTH2, BUFFERPUSH2, BUFFERSHIFT2, OBJECTMODE2, DESTROYED2, ERROR2, EMITDATA2, EMITEND3, EMITEND22, ASYNC2, ABORT2, ABORTED2, SIGNAL2, DATALISTENERS2, DISCARDED2, defer2, nodefer2, isEndish2, isArrayBufferLike2, isArrayBufferView2, Pipe2, PipeProxyErrors2, isObjectModeOptions2, isEncodingOptions2, Minipass2;
121447
+ var init_esm15 = __esm({
121448
+ "node_modules/.pnpm/minipass@7.1.2/node_modules/minipass/dist/esm/index.js"() {
121449
+ init_import_meta_url();
121450
+ import_node_events5 = require("node:events");
121451
+ import_node_stream4 = __toESM(require("node:stream"), 1);
121452
+ import_node_string_decoder3 = require("node:string_decoder");
121453
+ proc2 = typeof process === "object" && process ? process : {
121454
+ stdout: null,
121455
+ stderr: null
121456
+ };
121457
+ isStream2 = (s6) => !!s6 && typeof s6 === "object" && (s6 instanceof Minipass2 || s6 instanceof import_node_stream4.default || isReadable2(s6) || isWritable2(s6));
121458
+ isReadable2 = (s6) => !!s6 && typeof s6 === "object" && s6 instanceof import_node_events5.EventEmitter && typeof s6.pipe === "function" && // node core Writable streams have a pipe() method, but it throws
121459
+ s6.pipe !== import_node_stream4.default.Writable.prototype.pipe;
121460
+ isWritable2 = (s6) => !!s6 && typeof s6 === "object" && s6 instanceof import_node_events5.EventEmitter && typeof s6.write === "function" && typeof s6.end === "function";
121461
+ EOF2 = Symbol("EOF");
121462
+ MAYBE_EMIT_END2 = Symbol("maybeEmitEnd");
121463
+ EMITTED_END2 = Symbol("emittedEnd");
121464
+ EMITTING_END2 = Symbol("emittingEnd");
121465
+ EMITTED_ERROR2 = Symbol("emittedError");
121466
+ CLOSED2 = Symbol("closed");
121467
+ READ2 = Symbol("read");
121468
+ FLUSH2 = Symbol("flush");
121469
+ FLUSHCHUNK2 = Symbol("flushChunk");
121470
+ ENCODING2 = Symbol("encoding");
121471
+ DECODER2 = Symbol("decoder");
121472
+ FLOWING2 = Symbol("flowing");
121473
+ PAUSED2 = Symbol("paused");
121474
+ RESUME2 = Symbol("resume");
121475
+ BUFFER2 = Symbol("buffer");
121476
+ PIPES2 = Symbol("pipes");
121477
+ BUFFERLENGTH2 = Symbol("bufferLength");
121478
+ BUFFERPUSH2 = Symbol("bufferPush");
121479
+ BUFFERSHIFT2 = Symbol("bufferShift");
121480
+ OBJECTMODE2 = Symbol("objectMode");
121481
+ DESTROYED2 = Symbol("destroyed");
121482
+ ERROR2 = Symbol("error");
121483
+ EMITDATA2 = Symbol("emitData");
121484
+ EMITEND3 = Symbol("emitEnd");
121485
+ EMITEND22 = Symbol("emitEnd2");
121486
+ ASYNC2 = Symbol("async");
121487
+ ABORT2 = Symbol("abort");
121488
+ ABORTED2 = Symbol("aborted");
121489
+ SIGNAL2 = Symbol("signal");
121490
+ DATALISTENERS2 = Symbol("dataListeners");
121491
+ DISCARDED2 = Symbol("discarded");
121492
+ defer2 = (fn2) => Promise.resolve().then(fn2);
121493
+ nodefer2 = (fn2) => fn2();
121494
+ isEndish2 = (ev) => ev === "end" || ev === "finish" || ev === "prefinish";
121495
+ isArrayBufferLike2 = (b6) => b6 instanceof ArrayBuffer || !!b6 && typeof b6 === "object" && b6.constructor && b6.constructor.name === "ArrayBuffer" && b6.byteLength >= 0;
121496
+ isArrayBufferView2 = (b6) => !Buffer.isBuffer(b6) && ArrayBuffer.isView(b6);
121497
+ Pipe2 = class {
121498
+ src;
121499
+ dest;
121500
+ opts;
121501
+ ondrain;
121502
+ constructor(src, dest, opts) {
121503
+ this.src = src;
121504
+ this.dest = dest;
121505
+ this.opts = opts;
121506
+ this.ondrain = () => src[RESUME2]();
121507
+ this.dest.on("drain", this.ondrain);
121508
+ }
121509
+ unpipe() {
121510
+ this.dest.removeListener("drain", this.ondrain);
121511
+ }
121512
+ // only here for the prototype
121513
+ /* c8 ignore start */
121514
+ proxyErrors(_er) {
121515
+ }
121516
+ /* c8 ignore stop */
121517
+ end() {
121518
+ this.unpipe();
121519
+ if (this.opts.end)
121520
+ this.dest.end();
121521
+ }
121522
+ };
121523
+ PipeProxyErrors2 = class extends Pipe2 {
121524
+ unpipe() {
121525
+ this.src.removeListener("error", this.proxyErrors);
121526
+ super.unpipe();
121527
+ }
121528
+ constructor(src, dest, opts) {
121529
+ super(src, dest, opts);
121530
+ this.proxyErrors = (er2) => dest.emit("error", er2);
121531
+ src.on("error", this.proxyErrors);
121532
+ }
121533
+ };
121534
+ isObjectModeOptions2 = (o4) => !!o4.objectMode;
121535
+ isEncodingOptions2 = (o4) => !o4.objectMode && !!o4.encoding && o4.encoding !== "buffer";
121536
+ Minipass2 = class extends import_node_events5.EventEmitter {
121537
+ [FLOWING2] = false;
121538
+ [PAUSED2] = false;
121539
+ [PIPES2] = [];
121540
+ [BUFFER2] = [];
121541
+ [OBJECTMODE2];
121542
+ [ENCODING2];
121543
+ [ASYNC2];
121544
+ [DECODER2];
121545
+ [EOF2] = false;
121546
+ [EMITTED_END2] = false;
121547
+ [EMITTING_END2] = false;
121548
+ [CLOSED2] = false;
121549
+ [EMITTED_ERROR2] = null;
121550
+ [BUFFERLENGTH2] = 0;
121551
+ [DESTROYED2] = false;
121552
+ [SIGNAL2];
121553
+ [ABORTED2] = false;
121554
+ [DATALISTENERS2] = 0;
121555
+ [DISCARDED2] = false;
121556
+ /**
121557
+ * true if the stream can be written
121558
+ */
121559
+ writable = true;
121560
+ /**
121561
+ * true if the stream can be read
121562
+ */
121563
+ readable = true;
121564
+ /**
121565
+ * If `RType` is Buffer, then options do not need to be provided.
121566
+ * Otherwise, an options object must be provided to specify either
121567
+ * {@link Minipass.SharedOptions.objectMode} or
121568
+ * {@link Minipass.SharedOptions.encoding}, as appropriate.
121569
+ */
121570
+ constructor(...args) {
121571
+ const options = args[0] || {};
121572
+ super();
121573
+ if (options.objectMode && typeof options.encoding === "string") {
121574
+ throw new TypeError("Encoding and objectMode may not be used together");
121575
+ }
121576
+ if (isObjectModeOptions2(options)) {
121577
+ this[OBJECTMODE2] = true;
121578
+ this[ENCODING2] = null;
121579
+ } else if (isEncodingOptions2(options)) {
121580
+ this[ENCODING2] = options.encoding;
121581
+ this[OBJECTMODE2] = false;
121582
+ } else {
121583
+ this[OBJECTMODE2] = false;
121584
+ this[ENCODING2] = null;
121585
+ }
121586
+ this[ASYNC2] = !!options.async;
121587
+ this[DECODER2] = this[ENCODING2] ? new import_node_string_decoder3.StringDecoder(this[ENCODING2]) : null;
121588
+ if (options && options.debugExposeBuffer === true) {
121589
+ Object.defineProperty(this, "buffer", { get: () => this[BUFFER2] });
121590
+ }
121591
+ if (options && options.debugExposePipes === true) {
121592
+ Object.defineProperty(this, "pipes", { get: () => this[PIPES2] });
121593
+ }
121594
+ const { signal } = options;
121595
+ if (signal) {
121596
+ this[SIGNAL2] = signal;
121597
+ if (signal.aborted) {
121598
+ this[ABORT2]();
121599
+ } else {
121600
+ signal.addEventListener("abort", () => this[ABORT2]());
121601
+ }
121602
+ }
121603
+ }
121604
+ /**
121605
+ * The amount of data stored in the buffer waiting to be read.
121606
+ *
121607
+ * For Buffer strings, this will be the total byte length.
121608
+ * For string encoding streams, this will be the string character length,
121609
+ * according to JavaScript's `string.length` logic.
121610
+ * For objectMode streams, this is a count of the items waiting to be
121611
+ * emitted.
121612
+ */
121613
+ get bufferLength() {
121614
+ return this[BUFFERLENGTH2];
121615
+ }
121616
+ /**
121617
+ * The `BufferEncoding` currently in use, or `null`
121618
+ */
121619
+ get encoding() {
121620
+ return this[ENCODING2];
121621
+ }
121622
+ /**
121623
+ * @deprecated - This is a read only property
121624
+ */
121625
+ set encoding(_enc) {
121626
+ throw new Error("Encoding must be set at instantiation time");
121627
+ }
121628
+ /**
121629
+ * @deprecated - Encoding may only be set at instantiation time
121630
+ */
121631
+ setEncoding(_enc) {
121632
+ throw new Error("Encoding must be set at instantiation time");
121633
+ }
121634
+ /**
121635
+ * True if this is an objectMode stream
121636
+ */
121637
+ get objectMode() {
121638
+ return this[OBJECTMODE2];
121639
+ }
121640
+ /**
121641
+ * @deprecated - This is a read-only property
121642
+ */
121643
+ set objectMode(_om) {
121644
+ throw new Error("objectMode must be set at instantiation time");
121645
+ }
121646
+ /**
121647
+ * true if this is an async stream
121648
+ */
121649
+ get ["async"]() {
121650
+ return this[ASYNC2];
121651
+ }
121652
+ /**
121653
+ * Set to true to make this stream async.
121654
+ *
121655
+ * Once set, it cannot be unset, as this would potentially cause incorrect
121656
+ * behavior. Ie, a sync stream can be made async, but an async stream
121657
+ * cannot be safely made sync.
121658
+ */
121659
+ set ["async"](a4) {
121660
+ this[ASYNC2] = this[ASYNC2] || !!a4;
121661
+ }
121662
+ // drop everything and get out of the flow completely
121663
+ [ABORT2]() {
121664
+ this[ABORTED2] = true;
121665
+ this.emit("abort", this[SIGNAL2]?.reason);
121666
+ this.destroy(this[SIGNAL2]?.reason);
121667
+ }
121668
+ /**
121669
+ * True if the stream has been aborted.
121670
+ */
121671
+ get aborted() {
121672
+ return this[ABORTED2];
121673
+ }
121674
+ /**
121675
+ * No-op setter. Stream aborted status is set via the AbortSignal provided
121676
+ * in the constructor options.
121677
+ */
121678
+ set aborted(_3) {
121679
+ }
121680
+ write(chunk, encoding, cb) {
121681
+ if (this[ABORTED2])
121682
+ return false;
121683
+ if (this[EOF2])
121684
+ throw new Error("write after end");
121685
+ if (this[DESTROYED2]) {
121686
+ this.emit("error", Object.assign(new Error("Cannot call write after a stream was destroyed"), { code: "ERR_STREAM_DESTROYED" }));
121687
+ return true;
121688
+ }
121689
+ if (typeof encoding === "function") {
121690
+ cb = encoding;
121691
+ encoding = "utf8";
121692
+ }
121693
+ if (!encoding)
121694
+ encoding = "utf8";
121695
+ const fn2 = this[ASYNC2] ? defer2 : nodefer2;
121696
+ if (!this[OBJECTMODE2] && !Buffer.isBuffer(chunk)) {
121697
+ if (isArrayBufferView2(chunk)) {
121698
+ chunk = Buffer.from(chunk.buffer, chunk.byteOffset, chunk.byteLength);
121699
+ } else if (isArrayBufferLike2(chunk)) {
121700
+ chunk = Buffer.from(chunk);
121701
+ } else if (typeof chunk !== "string") {
121702
+ throw new Error("Non-contiguous data written to non-objectMode stream");
121703
+ }
121704
+ }
121705
+ if (this[OBJECTMODE2]) {
121706
+ if (this[FLOWING2] && this[BUFFERLENGTH2] !== 0)
121707
+ this[FLUSH2](true);
121708
+ if (this[FLOWING2])
121709
+ this.emit("data", chunk);
121710
+ else
121711
+ this[BUFFERPUSH2](chunk);
121712
+ if (this[BUFFERLENGTH2] !== 0)
121713
+ this.emit("readable");
121714
+ if (cb)
121715
+ fn2(cb);
121716
+ return this[FLOWING2];
121717
+ }
121718
+ if (!chunk.length) {
121719
+ if (this[BUFFERLENGTH2] !== 0)
121720
+ this.emit("readable");
121721
+ if (cb)
121722
+ fn2(cb);
121723
+ return this[FLOWING2];
121724
+ }
121725
+ if (typeof chunk === "string" && // unless it is a string already ready for us to use
121726
+ !(encoding === this[ENCODING2] && !this[DECODER2]?.lastNeed)) {
121727
+ chunk = Buffer.from(chunk, encoding);
121728
+ }
121729
+ if (Buffer.isBuffer(chunk) && this[ENCODING2]) {
121730
+ chunk = this[DECODER2].write(chunk);
121731
+ }
121732
+ if (this[FLOWING2] && this[BUFFERLENGTH2] !== 0)
121733
+ this[FLUSH2](true);
121734
+ if (this[FLOWING2])
121735
+ this.emit("data", chunk);
121736
+ else
121737
+ this[BUFFERPUSH2](chunk);
121738
+ if (this[BUFFERLENGTH2] !== 0)
121739
+ this.emit("readable");
121740
+ if (cb)
121741
+ fn2(cb);
121742
+ return this[FLOWING2];
121743
+ }
121744
+ /**
121745
+ * Low-level explicit read method.
121746
+ *
121747
+ * In objectMode, the argument is ignored, and one item is returned if
121748
+ * available.
121749
+ *
121750
+ * `n` is the number of bytes (or in the case of encoding streams,
121751
+ * characters) to consume. If `n` is not provided, then the entire buffer
121752
+ * is returned, or `null` is returned if no data is available.
121753
+ *
121754
+ * If `n` is greater that the amount of data in the internal buffer,
121755
+ * then `null` is returned.
121756
+ */
121757
+ read(n4) {
121758
+ if (this[DESTROYED2])
121759
+ return null;
121760
+ this[DISCARDED2] = false;
121761
+ if (this[BUFFERLENGTH2] === 0 || n4 === 0 || n4 && n4 > this[BUFFERLENGTH2]) {
121762
+ this[MAYBE_EMIT_END2]();
121763
+ return null;
121764
+ }
121765
+ if (this[OBJECTMODE2])
121766
+ n4 = null;
121767
+ if (this[BUFFER2].length > 1 && !this[OBJECTMODE2]) {
121768
+ this[BUFFER2] = [
121769
+ this[ENCODING2] ? this[BUFFER2].join("") : Buffer.concat(this[BUFFER2], this[BUFFERLENGTH2])
121770
+ ];
121771
+ }
121772
+ const ret = this[READ2](n4 || null, this[BUFFER2][0]);
121773
+ this[MAYBE_EMIT_END2]();
121774
+ return ret;
121775
+ }
121776
+ [READ2](n4, chunk) {
121777
+ if (this[OBJECTMODE2])
121778
+ this[BUFFERSHIFT2]();
121779
+ else {
121780
+ const c4 = chunk;
121781
+ if (n4 === c4.length || n4 === null)
121782
+ this[BUFFERSHIFT2]();
121783
+ else if (typeof c4 === "string") {
121784
+ this[BUFFER2][0] = c4.slice(n4);
121785
+ chunk = c4.slice(0, n4);
121786
+ this[BUFFERLENGTH2] -= n4;
121787
+ } else {
121788
+ this[BUFFER2][0] = c4.subarray(n4);
121789
+ chunk = c4.subarray(0, n4);
121790
+ this[BUFFERLENGTH2] -= n4;
121791
+ }
121792
+ }
121793
+ this.emit("data", chunk);
121794
+ if (!this[BUFFER2].length && !this[EOF2])
121795
+ this.emit("drain");
121796
+ return chunk;
121797
+ }
121798
+ end(chunk, encoding, cb) {
121799
+ if (typeof chunk === "function") {
121800
+ cb = chunk;
121801
+ chunk = void 0;
121802
+ }
121803
+ if (typeof encoding === "function") {
121804
+ cb = encoding;
121805
+ encoding = "utf8";
121806
+ }
121807
+ if (chunk !== void 0)
121808
+ this.write(chunk, encoding);
121809
+ if (cb)
121810
+ this.once("end", cb);
121811
+ this[EOF2] = true;
121812
+ this.writable = false;
121813
+ if (this[FLOWING2] || !this[PAUSED2])
121814
+ this[MAYBE_EMIT_END2]();
121815
+ return this;
121816
+ }
121817
+ // don't let the internal resume be overwritten
121818
+ [RESUME2]() {
121819
+ if (this[DESTROYED2])
121820
+ return;
121821
+ if (!this[DATALISTENERS2] && !this[PIPES2].length) {
121822
+ this[DISCARDED2] = true;
121823
+ }
121824
+ this[PAUSED2] = false;
121825
+ this[FLOWING2] = true;
121826
+ this.emit("resume");
121827
+ if (this[BUFFER2].length)
121828
+ this[FLUSH2]();
121829
+ else if (this[EOF2])
121830
+ this[MAYBE_EMIT_END2]();
121831
+ else
121832
+ this.emit("drain");
121833
+ }
121834
+ /**
121835
+ * Resume the stream if it is currently in a paused state
121836
+ *
121837
+ * If called when there are no pipe destinations or `data` event listeners,
121838
+ * this will place the stream in a "discarded" state, where all data will
121839
+ * be thrown away. The discarded state is removed if a pipe destination or
121840
+ * data handler is added, if pause() is called, or if any synchronous or
121841
+ * asynchronous iteration is started.
121842
+ */
121843
+ resume() {
121844
+ return this[RESUME2]();
121845
+ }
121846
+ /**
121847
+ * Pause the stream
121848
+ */
121849
+ pause() {
121850
+ this[FLOWING2] = false;
121851
+ this[PAUSED2] = true;
121852
+ this[DISCARDED2] = false;
121853
+ }
121854
+ /**
121855
+ * true if the stream has been forcibly destroyed
121856
+ */
121857
+ get destroyed() {
121858
+ return this[DESTROYED2];
121859
+ }
121860
+ /**
121861
+ * true if the stream is currently in a flowing state, meaning that
121862
+ * any writes will be immediately emitted.
121863
+ */
121864
+ get flowing() {
121865
+ return this[FLOWING2];
121866
+ }
121867
+ /**
121868
+ * true if the stream is currently in a paused state
121869
+ */
121870
+ get paused() {
121871
+ return this[PAUSED2];
121872
+ }
121873
+ [BUFFERPUSH2](chunk) {
121874
+ if (this[OBJECTMODE2])
121875
+ this[BUFFERLENGTH2] += 1;
121876
+ else
121877
+ this[BUFFERLENGTH2] += chunk.length;
121878
+ this[BUFFER2].push(chunk);
121879
+ }
121880
+ [BUFFERSHIFT2]() {
121881
+ if (this[OBJECTMODE2])
121882
+ this[BUFFERLENGTH2] -= 1;
121883
+ else
121884
+ this[BUFFERLENGTH2] -= this[BUFFER2][0].length;
121885
+ return this[BUFFER2].shift();
121886
+ }
121887
+ [FLUSH2](noDrain = false) {
121888
+ do {
121889
+ } while (this[FLUSHCHUNK2](this[BUFFERSHIFT2]()) && this[BUFFER2].length);
121890
+ if (!noDrain && !this[BUFFER2].length && !this[EOF2])
121891
+ this.emit("drain");
121892
+ }
121893
+ [FLUSHCHUNK2](chunk) {
121894
+ this.emit("data", chunk);
121895
+ return this[FLOWING2];
121896
+ }
121897
+ /**
121898
+ * Pipe all data emitted by this stream into the destination provided.
121899
+ *
121900
+ * Triggers the flow of data.
121901
+ */
121902
+ pipe(dest, opts) {
121903
+ if (this[DESTROYED2])
121904
+ return dest;
121905
+ this[DISCARDED2] = false;
121906
+ const ended = this[EMITTED_END2];
121907
+ opts = opts || {};
121908
+ if (dest === proc2.stdout || dest === proc2.stderr)
121909
+ opts.end = false;
121910
+ else
121911
+ opts.end = opts.end !== false;
121912
+ opts.proxyErrors = !!opts.proxyErrors;
121913
+ if (ended) {
121914
+ if (opts.end)
121915
+ dest.end();
121916
+ } else {
121917
+ this[PIPES2].push(!opts.proxyErrors ? new Pipe2(this, dest, opts) : new PipeProxyErrors2(this, dest, opts));
121918
+ if (this[ASYNC2])
121919
+ defer2(() => this[RESUME2]());
121920
+ else
121921
+ this[RESUME2]();
121922
+ }
121923
+ return dest;
121924
+ }
121925
+ /**
121926
+ * Fully unhook a piped destination stream.
121927
+ *
121928
+ * If the destination stream was the only consumer of this stream (ie,
121929
+ * there are no other piped destinations or `'data'` event listeners)
121930
+ * then the flow of data will stop until there is another consumer or
121931
+ * {@link Minipass#resume} is explicitly called.
121932
+ */
121933
+ unpipe(dest) {
121934
+ const p5 = this[PIPES2].find((p6) => p6.dest === dest);
121935
+ if (p5) {
121936
+ if (this[PIPES2].length === 1) {
121937
+ if (this[FLOWING2] && this[DATALISTENERS2] === 0) {
121938
+ this[FLOWING2] = false;
121939
+ }
121940
+ this[PIPES2] = [];
121941
+ } else
121942
+ this[PIPES2].splice(this[PIPES2].indexOf(p5), 1);
121943
+ p5.unpipe();
121944
+ }
121945
+ }
121946
+ /**
121947
+ * Alias for {@link Minipass#on}
121948
+ */
121949
+ addListener(ev, handler10) {
121950
+ return this.on(ev, handler10);
121951
+ }
121952
+ /**
121953
+ * Mostly identical to `EventEmitter.on`, with the following
121954
+ * behavior differences to prevent data loss and unnecessary hangs:
121955
+ *
121956
+ * - Adding a 'data' event handler will trigger the flow of data
121957
+ *
121958
+ * - Adding a 'readable' event handler when there is data waiting to be read
121959
+ * will cause 'readable' to be emitted immediately.
121960
+ *
121961
+ * - Adding an 'endish' event handler ('end', 'finish', etc.) which has
121962
+ * already passed will cause the event to be emitted immediately and all
121963
+ * handlers removed.
121964
+ *
121965
+ * - Adding an 'error' event handler after an error has been emitted will
121966
+ * cause the event to be re-emitted immediately with the error previously
121967
+ * raised.
121968
+ */
121969
+ on(ev, handler10) {
121970
+ const ret = super.on(ev, handler10);
121971
+ if (ev === "data") {
121972
+ this[DISCARDED2] = false;
121973
+ this[DATALISTENERS2]++;
121974
+ if (!this[PIPES2].length && !this[FLOWING2]) {
121975
+ this[RESUME2]();
121976
+ }
121977
+ } else if (ev === "readable" && this[BUFFERLENGTH2] !== 0) {
121978
+ super.emit("readable");
121979
+ } else if (isEndish2(ev) && this[EMITTED_END2]) {
121980
+ super.emit(ev);
121981
+ this.removeAllListeners(ev);
121982
+ } else if (ev === "error" && this[EMITTED_ERROR2]) {
121983
+ const h4 = handler10;
121984
+ if (this[ASYNC2])
121985
+ defer2(() => h4.call(this, this[EMITTED_ERROR2]));
121986
+ else
121987
+ h4.call(this, this[EMITTED_ERROR2]);
121988
+ }
121989
+ return ret;
121990
+ }
121991
+ /**
121992
+ * Alias for {@link Minipass#off}
121993
+ */
121994
+ removeListener(ev, handler10) {
121995
+ return this.off(ev, handler10);
121996
+ }
121997
+ /**
121998
+ * Mostly identical to `EventEmitter.off`
121999
+ *
122000
+ * If a 'data' event handler is removed, and it was the last consumer
122001
+ * (ie, there are no pipe destinations or other 'data' event listeners),
122002
+ * then the flow of data will stop until there is another consumer or
122003
+ * {@link Minipass#resume} is explicitly called.
122004
+ */
122005
+ off(ev, handler10) {
122006
+ const ret = super.off(ev, handler10);
122007
+ if (ev === "data") {
122008
+ this[DATALISTENERS2] = this.listeners("data").length;
122009
+ if (this[DATALISTENERS2] === 0 && !this[DISCARDED2] && !this[PIPES2].length) {
122010
+ this[FLOWING2] = false;
122011
+ }
122012
+ }
122013
+ return ret;
122014
+ }
122015
+ /**
122016
+ * Mostly identical to `EventEmitter.removeAllListeners`
122017
+ *
122018
+ * If all 'data' event handlers are removed, and they were the last consumer
122019
+ * (ie, there are no pipe destinations), then the flow of data will stop
122020
+ * until there is another consumer or {@link Minipass#resume} is explicitly
122021
+ * called.
122022
+ */
122023
+ removeAllListeners(ev) {
122024
+ const ret = super.removeAllListeners(ev);
122025
+ if (ev === "data" || ev === void 0) {
122026
+ this[DATALISTENERS2] = 0;
122027
+ if (!this[DISCARDED2] && !this[PIPES2].length) {
122028
+ this[FLOWING2] = false;
122029
+ }
122030
+ }
122031
+ return ret;
122032
+ }
122033
+ /**
122034
+ * true if the 'end' event has been emitted
122035
+ */
122036
+ get emittedEnd() {
122037
+ return this[EMITTED_END2];
122038
+ }
122039
+ [MAYBE_EMIT_END2]() {
122040
+ if (!this[EMITTING_END2] && !this[EMITTED_END2] && !this[DESTROYED2] && this[BUFFER2].length === 0 && this[EOF2]) {
122041
+ this[EMITTING_END2] = true;
122042
+ this.emit("end");
122043
+ this.emit("prefinish");
122044
+ this.emit("finish");
122045
+ if (this[CLOSED2])
122046
+ this.emit("close");
122047
+ this[EMITTING_END2] = false;
122048
+ }
122049
+ }
122050
+ /**
122051
+ * Mostly identical to `EventEmitter.emit`, with the following
122052
+ * behavior differences to prevent data loss and unnecessary hangs:
122053
+ *
122054
+ * If the stream has been destroyed, and the event is something other
122055
+ * than 'close' or 'error', then `false` is returned and no handlers
122056
+ * are called.
122057
+ *
122058
+ * If the event is 'end', and has already been emitted, then the event
122059
+ * is ignored. If the stream is in a paused or non-flowing state, then
122060
+ * the event will be deferred until data flow resumes. If the stream is
122061
+ * async, then handlers will be called on the next tick rather than
122062
+ * immediately.
122063
+ *
122064
+ * If the event is 'close', and 'end' has not yet been emitted, then
122065
+ * the event will be deferred until after 'end' is emitted.
122066
+ *
122067
+ * If the event is 'error', and an AbortSignal was provided for the stream,
122068
+ * and there are no listeners, then the event is ignored, matching the
122069
+ * behavior of node core streams in the presense of an AbortSignal.
122070
+ *
122071
+ * If the event is 'finish' or 'prefinish', then all listeners will be
122072
+ * removed after emitting the event, to prevent double-firing.
122073
+ */
122074
+ emit(ev, ...args) {
122075
+ const data2 = args[0];
122076
+ if (ev !== "error" && ev !== "close" && ev !== DESTROYED2 && this[DESTROYED2]) {
122077
+ return false;
122078
+ } else if (ev === "data") {
122079
+ return !this[OBJECTMODE2] && !data2 ? false : this[ASYNC2] ? (defer2(() => this[EMITDATA2](data2)), true) : this[EMITDATA2](data2);
122080
+ } else if (ev === "end") {
122081
+ return this[EMITEND3]();
122082
+ } else if (ev === "close") {
122083
+ this[CLOSED2] = true;
122084
+ if (!this[EMITTED_END2] && !this[DESTROYED2])
122085
+ return false;
122086
+ const ret2 = super.emit("close");
122087
+ this.removeAllListeners("close");
122088
+ return ret2;
122089
+ } else if (ev === "error") {
122090
+ this[EMITTED_ERROR2] = data2;
122091
+ super.emit(ERROR2, data2);
122092
+ const ret2 = !this[SIGNAL2] || this.listeners("error").length ? super.emit("error", data2) : false;
122093
+ this[MAYBE_EMIT_END2]();
122094
+ return ret2;
122095
+ } else if (ev === "resume") {
122096
+ const ret2 = super.emit("resume");
122097
+ this[MAYBE_EMIT_END2]();
122098
+ return ret2;
122099
+ } else if (ev === "finish" || ev === "prefinish") {
122100
+ const ret2 = super.emit(ev);
122101
+ this.removeAllListeners(ev);
122102
+ return ret2;
122103
+ }
122104
+ const ret = super.emit(ev, ...args);
122105
+ this[MAYBE_EMIT_END2]();
122106
+ return ret;
122107
+ }
122108
+ [EMITDATA2](data2) {
122109
+ for (const p5 of this[PIPES2]) {
122110
+ if (p5.dest.write(data2) === false)
122111
+ this.pause();
122112
+ }
122113
+ const ret = this[DISCARDED2] ? false : super.emit("data", data2);
122114
+ this[MAYBE_EMIT_END2]();
122115
+ return ret;
122116
+ }
122117
+ [EMITEND3]() {
122118
+ if (this[EMITTED_END2])
122119
+ return false;
122120
+ this[EMITTED_END2] = true;
122121
+ this.readable = false;
122122
+ return this[ASYNC2] ? (defer2(() => this[EMITEND22]()), true) : this[EMITEND22]();
122123
+ }
122124
+ [EMITEND22]() {
122125
+ if (this[DECODER2]) {
122126
+ const data2 = this[DECODER2].end();
122127
+ if (data2) {
122128
+ for (const p5 of this[PIPES2]) {
122129
+ p5.dest.write(data2);
122130
+ }
122131
+ if (!this[DISCARDED2])
122132
+ super.emit("data", data2);
122133
+ }
122134
+ }
122135
+ for (const p5 of this[PIPES2]) {
122136
+ p5.end();
122137
+ }
122138
+ const ret = super.emit("end");
122139
+ this.removeAllListeners("end");
122140
+ return ret;
122141
+ }
122142
+ /**
122143
+ * Return a Promise that resolves to an array of all emitted data once
122144
+ * the stream ends.
122145
+ */
122146
+ async collect() {
122147
+ const buf = Object.assign([], {
122148
+ dataLength: 0
122149
+ });
122150
+ if (!this[OBJECTMODE2])
122151
+ buf.dataLength = 0;
122152
+ const p5 = this.promise();
122153
+ this.on("data", (c4) => {
122154
+ buf.push(c4);
122155
+ if (!this[OBJECTMODE2])
122156
+ buf.dataLength += c4.length;
122157
+ });
122158
+ await p5;
122159
+ return buf;
122160
+ }
122161
+ /**
122162
+ * Return a Promise that resolves to the concatenation of all emitted data
122163
+ * once the stream ends.
122164
+ *
122165
+ * Not allowed on objectMode streams.
122166
+ */
122167
+ async concat() {
122168
+ if (this[OBJECTMODE2]) {
122169
+ throw new Error("cannot concat in objectMode");
122170
+ }
122171
+ const buf = await this.collect();
122172
+ return this[ENCODING2] ? buf.join("") : Buffer.concat(buf, buf.dataLength);
122173
+ }
122174
+ /**
122175
+ * Return a void Promise that resolves once the stream ends.
122176
+ */
122177
+ async promise() {
122178
+ return new Promise((resolve7, reject) => {
122179
+ this.on(DESTROYED2, () => reject(new Error("stream destroyed")));
122180
+ this.on("error", (er2) => reject(er2));
122181
+ this.on("end", () => resolve7());
122182
+ });
122183
+ }
122184
+ /**
122185
+ * Asynchronous `for await of` iteration.
122186
+ *
122187
+ * This will continue emitting all chunks until the stream terminates.
122188
+ */
122189
+ [Symbol.asyncIterator]() {
122190
+ this[DISCARDED2] = false;
122191
+ let stopped = false;
122192
+ const stop = async () => {
122193
+ this.pause();
122194
+ stopped = true;
122195
+ return { value: void 0, done: true };
122196
+ };
122197
+ const next = () => {
122198
+ if (stopped)
122199
+ return stop();
122200
+ const res = this.read();
122201
+ if (res !== null)
122202
+ return Promise.resolve({ done: false, value: res });
122203
+ if (this[EOF2])
122204
+ return stop();
122205
+ let resolve7;
122206
+ let reject;
122207
+ const onerr = (er2) => {
122208
+ this.off("data", ondata);
122209
+ this.off("end", onend);
122210
+ this.off(DESTROYED2, ondestroy);
122211
+ stop();
122212
+ reject(er2);
122213
+ };
122214
+ const ondata = (value) => {
122215
+ this.off("error", onerr);
122216
+ this.off("end", onend);
122217
+ this.off(DESTROYED2, ondestroy);
122218
+ this.pause();
122219
+ resolve7({ value, done: !!this[EOF2] });
122220
+ };
122221
+ const onend = () => {
122222
+ this.off("error", onerr);
122223
+ this.off("data", ondata);
122224
+ this.off(DESTROYED2, ondestroy);
122225
+ stop();
122226
+ resolve7({ done: true, value: void 0 });
122227
+ };
122228
+ const ondestroy = () => onerr(new Error("stream destroyed"));
122229
+ return new Promise((res2, rej) => {
122230
+ reject = rej;
122231
+ resolve7 = res2;
122232
+ this.once(DESTROYED2, ondestroy);
122233
+ this.once("error", onerr);
122234
+ this.once("end", onend);
122235
+ this.once("data", ondata);
122236
+ });
122237
+ };
122238
+ return {
122239
+ next,
122240
+ throw: stop,
122241
+ return: stop,
122242
+ [Symbol.asyncIterator]() {
122243
+ return this;
122244
+ }
122245
+ };
122246
+ }
122247
+ /**
122248
+ * Synchronous `for of` iteration.
122249
+ *
122250
+ * The iteration will terminate when the internal buffer runs out, even
122251
+ * if the stream has not yet terminated.
122252
+ */
122253
+ [Symbol.iterator]() {
122254
+ this[DISCARDED2] = false;
122255
+ let stopped = false;
122256
+ const stop = () => {
122257
+ this.pause();
122258
+ this.off(ERROR2, stop);
122259
+ this.off(DESTROYED2, stop);
122260
+ this.off("end", stop);
122261
+ stopped = true;
122262
+ return { done: true, value: void 0 };
122263
+ };
122264
+ const next = () => {
122265
+ if (stopped)
122266
+ return stop();
122267
+ const value = this.read();
122268
+ return value === null ? stop() : { done: false, value };
122269
+ };
122270
+ this.once("end", stop);
122271
+ this.once(ERROR2, stop);
122272
+ this.once(DESTROYED2, stop);
122273
+ return {
122274
+ next,
122275
+ throw: stop,
122276
+ return: stop,
122277
+ [Symbol.iterator]() {
122278
+ return this;
122279
+ }
122280
+ };
122281
+ }
122282
+ /**
122283
+ * Destroy a stream, preventing it from being used for any further purpose.
122284
+ *
122285
+ * If the stream has a `close()` method, then it will be called on
122286
+ * destruction.
122287
+ *
122288
+ * After destruction, any attempt to write data, read data, or emit most
122289
+ * events will be ignored.
122290
+ *
122291
+ * If an error argument is provided, then it will be emitted in an
122292
+ * 'error' event.
122293
+ */
122294
+ destroy(er2) {
122295
+ if (this[DESTROYED2]) {
122296
+ if (er2)
122297
+ this.emit("error", er2);
122298
+ else
122299
+ this.emit(DESTROYED2);
122300
+ return this;
122301
+ }
122302
+ this[DESTROYED2] = true;
122303
+ this[DISCARDED2] = true;
122304
+ this[BUFFER2].length = 0;
122305
+ this[BUFFERLENGTH2] = 0;
122306
+ const wc = this;
122307
+ if (typeof wc.close === "function" && !this[CLOSED2])
122308
+ wc.close();
122309
+ if (er2)
122310
+ this.emit("error", er2);
122311
+ else
122312
+ this.emit(DESTROYED2);
122313
+ return this;
122314
+ }
122315
+ /**
122316
+ * Alias for {@link isStream}
122317
+ *
122318
+ * Former export location, maintained for backwards compatibility.
122319
+ *
122320
+ * @deprecated
122321
+ */
122322
+ static get isStream() {
122323
+ return isStream2;
122324
+ }
122325
+ };
122326
+ }
122327
+ });
122328
+
121405
122329
  // node_modules/.pnpm/glob@11.1.0/node_modules/glob/dist/esm/ignore.js
121406
122330
  var defaultPlatform2, Ignore2;
121407
122331
  var init_ignore = __esm({
@@ -121730,7 +122654,7 @@ var makeIgnore, GlobUtil, GlobWalker, GlobStream;
121730
122654
  var init_walker = __esm({
121731
122655
  "node_modules/.pnpm/glob@11.1.0/node_modules/glob/dist/esm/walker.js"() {
121732
122656
  init_import_meta_url();
121733
- init_esm13();
122657
+ init_esm15();
121734
122658
  init_ignore();
121735
122659
  init_processor();
121736
122660
  makeIgnore = (ignore2, opts) => typeof ignore2 === "string" ? new Ignore2([ignore2], opts) : Array.isArray(ignore2) ? new Ignore2(ignore2, opts) : ignore2;
@@ -122027,7 +122951,7 @@ var init_walker = __esm({
122027
122951
  results;
122028
122952
  constructor(patterns, path19, opts) {
122029
122953
  super(patterns, path19, opts);
122030
- this.results = new Minipass({
122954
+ this.results = new Minipass2({
122031
122955
  signal: this.signal,
122032
122956
  objectMode: true
122033
122957
  });
@@ -122311,7 +123235,7 @@ function globIterate(pattern, options = {}) {
122311
123235
  return new Glob(pattern, options).iterate();
122312
123236
  }
122313
123237
  var streamSync, stream, iterateSync, iterate, sync, glob;
122314
- var init_esm15 = __esm({
123238
+ var init_esm16 = __esm({
122315
123239
  "node_modules/.pnpm/glob@11.1.0/node_modules/glob/dist/esm/index.js"() {
122316
123240
  init_import_meta_url();
122317
123241
  init_esm8();
@@ -122557,7 +123481,7 @@ var init_workspaces = __esm({
122557
123481
  import_fs12 = require("fs");
122558
123482
  path11 = __toESM(require("path"));
122559
123483
  init_js_yaml();
122560
- init_esm15();
123484
+ init_esm16();
122561
123485
  init_logger2();
122562
123486
  }
122563
123487
  });
@@ -156972,7 +157896,7 @@ var require_package6 = __commonJS({
156972
157896
  "package.json"(exports2, module2) {
156973
157897
  module2.exports = {
156974
157898
  name: "@sentry/craft",
156975
- version: "2.24.0",
157899
+ version: "2.24.2",
156976
157900
  description: "The universal sentry workflow CLI",
156977
157901
  main: "dist/craft",
156978
157902
  repository: "https://github.com/getsentry/craft",
@@ -157032,11 +157956,11 @@ var require_package6 = __commonJS({
157032
157956
  prettier: "^3.4.2",
157033
157957
  prompts: "2.4.1",
157034
157958
  "shell-quote": "1.7.3",
157035
- "simple-git": "^3.6.0",
157959
+ "simple-git": "^3.33.0",
157036
157960
  "source-map-support": "^0.5.20",
157037
157961
  split: "1.0.1",
157038
157962
  "string-length": "3.1.0",
157039
- tar: "7.5.10",
157963
+ tar: "7.5.11",
157040
157964
  tmp: "0.2.4",
157041
157965
  tslib: "^2.8.1",
157042
157966
  typescript: "^5.7.2",
@@ -157076,7 +158000,8 @@ var require_package6 = __commonJS({
157076
158000
  "fast-xml-parser": "^5.3.4",
157077
158001
  minimatch: "^10.2.1",
157078
158002
  "ajv@<6.14.0": "^6.14.0",
157079
- rollup: "^4.59.0"
158003
+ rollup: "^4.59.0",
158004
+ flatted: "^3.4.0"
157080
158005
  }
157081
158006
  }
157082
158007
  };
@@ -157140,7 +158065,7 @@ function getPackage() {
157140
158065
  }
157141
158066
  function getPackageVersion() {
157142
158067
  const { version: version2 } = getPackage();
157143
- const buildInfo = "41c598a46bba929ea51a3923e1117a4a13b619a2";
158068
+ const buildInfo = "78da70b88de5cf6245d5d7e3263a9e8952667dec";
157144
158069
  return buildInfo ? `${version2} (${buildInfo})` : version2;
157145
158070
  }
157146
158071
  function semVerToString(s6) {
@@ -165054,55 +165979,12 @@ __export(prepare_exports, {
165054
165979
  init_import_meta_url();
165055
165980
  var import_fs30 = require("fs");
165056
165981
  var import_path28 = require("path");
165057
- init_dryRun();
165058
165982
  var shellQuote2 = __toESM(require_shell_quote());
165983
+ init_dryRun();
165059
165984
  init_config2();
165060
165985
  init_logger2();
165061
165986
  init_project_config();
165062
-
165063
- // src/utils/calver.ts
165064
- init_import_meta_url();
165065
- init_config2();
165066
- init_logger2();
165067
- var DEFAULT_CALVER_CONFIG = {
165068
- offset: 14,
165069
- format: "%y.%-m"
165070
- };
165071
- function formatCalVerDate(date2, format5) {
165072
- const year2 = date2.getFullYear();
165073
- const month = date2.getMonth() + 1;
165074
- const day = date2.getDate();
165075
- return format5.replace("%Y", String(year2)).replace("%y", String(year2).slice(-2)).replace("%-m", String(month)).replace("%m", String(month).padStart(2, "0")).replace("%-d", String(day)).replace("%d", String(day).padStart(2, "0"));
165076
- }
165077
- async function calculateCalVer(git, config3) {
165078
- const date2 = /* @__PURE__ */ new Date();
165079
- date2.setDate(date2.getDate() - config3.offset);
165080
- const datePart = formatCalVerDate(date2, config3.format);
165081
- logger.debug(`CalVer: using date ${date2.toISOString()}, date part: ${datePart}`);
165082
- const gitTagPrefix = getGitTagPrefix();
165083
- const searchPrefix = `${gitTagPrefix}${datePart}.`;
165084
- logger.debug(`CalVer: searching for tags with prefix: ${searchPrefix}`);
165085
- const tags = await git.tags();
165086
- let patch = 0;
165087
- for (const tag2 of tags.all) {
165088
- if (tag2.startsWith(searchPrefix)) {
165089
- const patchStr = tag2.slice(searchPrefix.length);
165090
- const patchNum = parseInt(patchStr, 10);
165091
- if (!isNaN(patchNum) && patchNum >= patch) {
165092
- patch = patchNum + 1;
165093
- }
165094
- }
165095
- }
165096
- const version2 = `${datePart}.${patch}`;
165097
- logger.info(`CalVer: determined version ${version2}`);
165098
- return version2;
165099
- }
165100
-
165101
- // src/commands/prepare.ts
165102
165987
  init_async();
165103
- init_changelog();
165104
- init_errors2();
165105
- init_git();
165106
165988
 
165107
165989
  // src/utils/autoVersion.ts
165108
165990
  init_import_meta_url();
@@ -165144,10 +166026,52 @@ function validateBumpType(result) {
165144
166026
  }
165145
166027
  }
165146
166028
 
166029
+ // src/utils/calver.ts
166030
+ init_import_meta_url();
166031
+ init_config2();
166032
+ init_logger2();
166033
+ var DEFAULT_CALVER_CONFIG = {
166034
+ offset: 14,
166035
+ format: "%y.%-m"
166036
+ };
166037
+ function formatCalVerDate(date2, format5) {
166038
+ const year2 = date2.getFullYear();
166039
+ const month = date2.getMonth() + 1;
166040
+ const day = date2.getDate();
166041
+ return format5.replace("%Y", String(year2)).replace("%y", String(year2).slice(-2)).replace("%-m", String(month)).replace("%m", String(month).padStart(2, "0")).replace("%-d", String(day)).replace("%d", String(day).padStart(2, "0"));
166042
+ }
166043
+ async function calculateCalVer(git, config3) {
166044
+ const date2 = /* @__PURE__ */ new Date();
166045
+ date2.setDate(date2.getDate() - config3.offset);
166046
+ const datePart = formatCalVerDate(date2, config3.format);
166047
+ logger.debug(`CalVer: using date ${date2.toISOString()}, date part: ${datePart}`);
166048
+ const gitTagPrefix = getGitTagPrefix();
166049
+ const searchPrefix = `${gitTagPrefix}${datePart}.`;
166050
+ logger.debug(`CalVer: searching for tags with prefix: ${searchPrefix}`);
166051
+ const tags = await git.tags();
166052
+ let patch = 0;
166053
+ for (const tag2 of tags.all) {
166054
+ if (tag2.startsWith(searchPrefix)) {
166055
+ const patchStr = tag2.slice(searchPrefix.length);
166056
+ const patchNum = parseInt(patchStr, 10);
166057
+ if (!isNaN(patchNum) && patchNum >= patch) {
166058
+ patch = patchNum + 1;
166059
+ }
166060
+ }
166061
+ }
166062
+ const version2 = `${datePart}.${patch}`;
166063
+ logger.info(`CalVer: determined version ${version2}`);
166064
+ return version2;
166065
+ }
166066
+
165147
166067
  // src/commands/prepare.ts
166068
+ init_changelog();
166069
+ init_errors2();
166070
+ init_git();
165148
166071
  init_helpers();
165149
166072
  init_strings();
165150
166073
  init_system();
166074
+ init_tracing3();
165151
166075
  init_version9();
165152
166076
 
165153
166077
  // src/utils/versionBump.ts
@@ -165200,9 +166124,6 @@ async function runAutomaticVersionBumps(targets, rootDir, newVersion) {
165200
166124
  return { anyBumped, bumpableTargets, skippedTargets };
165201
166125
  }
165202
166126
 
165203
- // src/commands/prepare.ts
165204
- init_tracing3();
165205
-
165206
166127
  // src/commands/publish.ts
165207
166128
  var publish_exports = {};
165208
166129
  __export(publish_exports, {
@@ -165785,11 +166706,7 @@ async function runPreReleaseCommand(options) {
165785
166706
  return false;
165786
166707
  }
165787
166708
  if (preReleaseCommand) {
165788
- return runCustomPreReleaseCommand(
165789
- oldVersion,
165790
- newVersion,
165791
- preReleaseCommand
165792
- );
166709
+ return runCustomPreReleaseCommand(oldVersion, newVersion, preReleaseCommand);
165793
166710
  }
165794
166711
  if (requiresMinVersion(AUTO_BUMP_MIN_VERSION) && targets && targets.length > 0) {
165795
166712
  logger.info("Running automatic version bumping from targets...");
@@ -165834,15 +166751,10 @@ function checkGitStatus(repoStatus, rev) {
165834
166751
  logger.info("Checking the local repository status...");
165835
166752
  logger.debug("Repository status:", formatJson(repoStatus));
165836
166753
  if (isRepoDirty(repoStatus)) {
165837
- reportError(
165838
- "Your repository is in a dirty state. Please stash or commit the pending changes.",
165839
- logger
165840
- );
166754
+ reportError("Your repository is in a dirty state. Please stash or commit the pending changes.", logger);
165841
166755
  }
165842
166756
  if (repoStatus.current !== rev) {
165843
- logger.warn(
165844
- `You are releasing from '${rev}', not '${repoStatus.current}' which you are currently on.`
165845
- );
166757
+ logger.warn(`You are releasing from '${rev}', not '${repoStatus.current}' which you are currently on.`);
165846
166758
  }
165847
166759
  }
165848
166760
  async function execPublish(remote, newVersion, noGitChecks) {
@@ -165856,9 +166768,7 @@ async function execPublish(remote, newVersion, noGitChecks) {
165856
166768
  noStatusCheck: false,
165857
166769
  noGitChecks
165858
166770
  };
165859
- logger.info(
165860
- `Sleeping for ${SLEEP_BEFORE_PUBLISH_SECONDS} seconds before publishing...`
165861
- );
166771
+ logger.info(`Sleeping for ${SLEEP_BEFORE_PUBLISH_SECONDS} seconds before publishing...`);
165862
166772
  if (!isDryRun()) {
165863
166773
  await sleep(SLEEP_BEFORE_PUBLISH_SECONDS * 1e3);
165864
166774
  } else {
@@ -165878,15 +166788,11 @@ async function execPublish(remote, newVersion, noGitChecks) {
165878
166788
  }
165879
166789
  async function prepareChangelog(git, oldVersion, newVersion, changelogPolicy = "none" /* None */, changelogPath = DEFAULT_CHANGELOG_PATH) {
165880
166790
  if (changelogPolicy === "none" /* None */) {
165881
- logger.debug(
165882
- `Changelog policy is set to "${changelogPolicy}", nothing to do.`
165883
- );
166791
+ logger.debug(`Changelog policy is set to "${changelogPolicy}", nothing to do.`);
165884
166792
  return void 0;
165885
166793
  }
165886
166794
  if (changelogPolicy !== "auto" /* Auto */ && changelogPolicy !== "simple" /* Simple */) {
165887
- throw new ConfigurationError(
165888
- `Invalid changelog policy: "${changelogPolicy}"`
165889
- );
166795
+ throw new ConfigurationError(`Invalid changelog policy: "${changelogPolicy}"`);
165890
166796
  }
165891
166797
  logger.info("Checking the changelog...");
165892
166798
  logger.debug(`Changelog policy: "${changelogPolicy}".`);
@@ -165900,17 +166806,11 @@ async function prepareChangelog(git, oldVersion, newVersion, changelogPolicy = "
165900
166806
  logger.info(`Creating changelog file: ${relativePath}`);
165901
166807
  await safeFs.writeFile(relativePath, "# Changelog\n");
165902
166808
  } else {
165903
- throw new ConfigurationError(
165904
- `Changelog does not exist: "${changelogPath}"`
165905
- );
166809
+ throw new ConfigurationError(`Changelog does not exist: "${changelogPath}"`);
165906
166810
  }
165907
166811
  }
165908
166812
  let changelogString = (await import_fs30.promises.readFile(relativePath)).toString();
165909
- let changeset = findChangeset(
165910
- changelogString,
165911
- newVersion,
165912
- changelogPolicy === "auto" /* Auto */
165913
- );
166813
+ let changeset = findChangeset(changelogString, newVersion, changelogPolicy === "auto" /* Auto */);
165914
166814
  switch (changelogPolicy) {
165915
166815
  case "auto" /* Auto */:
165916
166816
  let replaceSection;
@@ -165926,9 +166826,7 @@ async function prepareChangelog(git, oldVersion, newVersion, changelogPolicy = "
165926
166826
  replaceSection = changeset.name;
165927
166827
  changeset.name = newVersion;
165928
166828
  }
165929
- logger.debug(
165930
- `Updating the changelog file for the new version: ${newVersion}`
165931
- );
166829
+ logger.debug(`Updating the changelog file for the new version: ${newVersion}`);
165932
166830
  if (replaceSection) {
165933
166831
  changelogString = removeChangeset(changelogString, replaceSection);
165934
166832
  changelogString = prependChangeset(changelogString, changeset);
@@ -165937,9 +166835,7 @@ async function prepareChangelog(git, oldVersion, newVersion, changelogPolicy = "
165937
166835
  break;
165938
166836
  default:
165939
166837
  if (!changeset?.body) {
165940
- throw new ConfigurationError(
165941
- `No changelog entry found for version "${newVersion}"`
165942
- );
166838
+ throw new ConfigurationError(`No changelog entry found for version "${newVersion}"`);
165943
166839
  }
165944
166840
  }
165945
166841
  logger.debug("Changelog entry found:", changeset.name);
@@ -165950,9 +166846,7 @@ async function getChangelogLineRange(git, changelogPath, version2) {
165950
166846
  try {
165951
166847
  const content = await git.show([`HEAD:${changelogPath}`]);
165952
166848
  const lines = content.split("\n");
165953
- const startIdx = lines.findIndex(
165954
- (l4) => l4.trimEnd() === `## ${version2}` || l4.trimEnd() === version2
165955
- );
166849
+ const startIdx = lines.findIndex((l4) => l4.trimEnd() === `## ${version2}` || l4.trimEnd() === version2);
165956
166850
  if (startIdx < 0) {
165957
166851
  return "";
165958
166852
  }
@@ -166005,7 +166899,7 @@ async function resolveVersion(git, options) {
166005
166899
  `CalVer versioning requires minVersion >= ${AUTO_VERSION_MIN_VERSION2} in .craft.yml. Please update your configuration or specify the version explicitly.`
166006
166900
  );
166007
166901
  }
166008
- const calverOffset = options.calverOffset ?? (process.env.CRAFT_CALVER_OFFSET ? parseInt(process.env.CRAFT_CALVER_OFFSET, 10) : void 0) ?? config3.versioning?.calver?.offset ?? DEFAULT_CALVER_CONFIG.offset;
166902
+ const calverOffset = options.calverOffset ?? (process.env.CRAFT_CALVER_OFFSET ? Number.parseInt(process.env.CRAFT_CALVER_OFFSET, 10) : void 0) ?? config3.versioning?.calver?.offset ?? DEFAULT_CALVER_CONFIG.offset;
166009
166903
  const calverFormat = config3.versioning?.calver?.format ?? DEFAULT_CALVER_CONFIG.format;
166010
166904
  return calculateCalVer(git, {
166011
166905
  offset: calverOffset,
@@ -166028,11 +166922,9 @@ async function resolveVersion(git, options) {
166028
166922
  } else {
166029
166923
  bumpType = version2;
166030
166924
  }
166031
- const currentVersion = latestTag && latestTag.replace(/^v/, "").match(/^\d/) ? latestTag.replace(/^v/, "") : "0.0.0";
166925
+ const currentVersion = latestTag && getVersion(latestTag) || "0.0.0";
166032
166926
  const newVersion = calculateNextVersion(currentVersion, bumpType);
166033
- logger.info(
166034
- `Version bump: ${currentVersion} -> ${newVersion} (${bumpType} bump)`
166035
- );
166927
+ logger.info(`Version bump: ${currentVersion} -> ${newVersion} (${bumpType} bump)`);
166036
166928
  return newVersion;
166037
166929
  }
166038
166930
  return version2;
@@ -166043,9 +166935,7 @@ async function prepareMain(argv) {
166043
166935
  logger.info(`Loading configuration from remote branch: ${argv.configFrom}`);
166044
166936
  try {
166045
166937
  await git.fetch([argv.remote, argv.configFrom]);
166046
- const configContent = await git.show([
166047
- `${argv.remote}/${argv.configFrom}:${CONFIG_FILE_NAME}`
166048
- ]);
166938
+ const configContent = await git.show([`${argv.remote}/${argv.configFrom}:${CONFIG_FILE_NAME}`]);
166049
166939
  loadConfigurationFromString(configContent);
166050
166940
  } catch (error3) {
166051
166941
  throw new ConfigurationError(
@@ -166078,13 +166968,7 @@ async function prepareMain(argv) {
166078
166968
  const isolation = await createDryRunIsolation(git, rev);
166079
166969
  git = isolation.git;
166080
166970
  try {
166081
- const branchName = await createReleaseBranch(
166082
- git,
166083
- rev,
166084
- newVersion,
166085
- argv.remote,
166086
- config3.releaseBranchPrefix
166087
- );
166971
+ const branchName = await createReleaseBranch(git, rev, newVersion, argv.remote, config3.releaseBranchPrefix);
166088
166972
  const oldVersion = await getLatestTag(git);
166089
166973
  const changelogPath = typeof config3.changelog === "string" ? config3.changelog : config3.changelog?.filePath;
166090
166974
  const changelogPolicy = typeof config3.changelog === "object" && config3.changelog?.policy ? config3.changelog.policy : config3.changelogPolicy;
@@ -166119,20 +167003,11 @@ async function prepareMain(argv) {
166119
167003
  const issueChangelog = isCalVer ? disableChangelogMentions(changelogBody) : changelogBody;
166120
167004
  writeGitHubActionsFile("changelog", issueChangelog);
166121
167005
  const resolvedChangelogPath = changelogPath || DEFAULT_CHANGELOG_PATH;
166122
- const lineRange = await getChangelogLineRange(
166123
- git,
166124
- resolvedChangelogPath,
166125
- newVersion
166126
- );
167006
+ const lineRange = await getChangelogLineRange(git, resolvedChangelogPath, newVersion);
166127
167007
  const changelogFileUrl = `https://github.com/${githubConfig.owner}/${githubConfig.repo}/blob/${branchName}/${resolvedChangelogPath}` + lineRange;
166128
- setGitHubActionsOutput(
166129
- "changelog",
166130
- truncateForOutput(issueChangelog, changelogFileUrl)
166131
- );
167008
+ setGitHubActionsOutput("changelog", truncateForOutput(issueChangelog, changelogFileUrl));
166132
167009
  }
166133
- logger.info(
166134
- `View diff at: https://github.com/${githubConfig.owner}/${githubConfig.repo}/compare/${branchName}`
166135
- );
167010
+ logger.info(`View diff at: https://github.com/${githubConfig.owner}/${githubConfig.repo}/compare/${branchName}`);
166136
167011
  if (argv.publish) {
166137
167012
  if (isolation.isIsolated) {
166138
167013
  logger.info(`[dry-run] Would run: craft publish ${newVersion}`);