release-note 0.0.3 → 0.0.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/bin.mjs CHANGED
@@ -1,6 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import { i as init_objectSpread2, n as init_asyncToGenerator, r as _objectSpread2, t as _asyncToGenerator } from "./asyncToGenerator-J8hMsHFb.mjs";
3
- import { C as resolveConfig, t as generateReleaseNote } from "./generate-omq2Fgxt.mjs";
2
+ import { C as resolveConfig, t as generateReleaseNote } from "./generate-CLz75nUt.mjs";
4
3
  import { EventEmitter } from "node:events";
5
4
  import childProcess from "node:child_process";
6
5
  import path from "node:path";
@@ -189,8 +188,7 @@ var Help = class {
189
188
  * @param {{ error?: boolean, helpWidth?: number, outputHasColors?: boolean }} contextOptions
190
189
  */
191
190
  prepareContext(contextOptions) {
192
- var _ref, _this$helpWidth;
193
- this.helpWidth = (_ref = (_this$helpWidth = this.helpWidth) !== null && _this$helpWidth !== void 0 ? _this$helpWidth : contextOptions.helpWidth) !== null && _ref !== void 0 ? _ref : 80;
191
+ this.helpWidth = this.helpWidth ?? contextOptions.helpWidth ?? 80;
194
192
  }
195
193
  /**
196
194
  * Get an array of the visible subcommands. Includes a placeholder for the implicit help command, if there is one.
@@ -459,9 +457,8 @@ var Help = class {
459
457
  * @returns {string}
460
458
  */
461
459
  formatHelp(cmd, helper) {
462
- var _helper$helpWidth;
463
460
  const termWidth = helper.padWidth(cmd, helper);
464
- const helpWidth = (_helper$helpWidth = helper.helpWidth) !== null && _helper$helpWidth !== void 0 ? _helper$helpWidth : 80;
461
+ const helpWidth = helper.helpWidth ?? 80;
465
462
  function callFormatItem(term, description) {
466
463
  return helper.formatItem(term, termWidth, description, helper);
467
464
  }
@@ -472,10 +469,7 @@ var Help = class {
472
469
  return callFormatItem(helper.styleArgumentTerm(helper.argumentTerm(argument)), helper.styleArgumentDescription(helper.argumentDescription(argument)));
473
470
  });
474
471
  output = output.concat(this.formatItemList("Arguments:", argumentList, helper));
475
- this.groupItems(cmd.options, helper.visibleOptions(cmd), (option) => {
476
- var _option$helpGroupHead;
477
- return (_option$helpGroupHead = option.helpGroupHeading) !== null && _option$helpGroupHead !== void 0 ? _option$helpGroupHead : "Options:";
478
- }).forEach((options, group) => {
472
+ this.groupItems(cmd.options, helper.visibleOptions(cmd), (option) => option.helpGroupHeading ?? "Options:").forEach((options, group) => {
479
473
  const optionList = options.map((option) => {
480
474
  return callFormatItem(helper.styleOptionTerm(helper.optionTerm(option)), helper.styleOptionDescription(helper.optionDescription(option)));
481
475
  });
@@ -594,13 +588,12 @@ var Help = class {
594
588
  * @returns {string}
595
589
  */
596
590
  formatItem(term, termWidth, description, helper) {
597
- var _this$helpWidth2;
598
591
  const itemIndent = 2;
599
592
  const itemIndentStr = " ".repeat(itemIndent);
600
593
  if (!description) return itemIndentStr + term;
601
594
  const paddedTerm = term.padEnd(termWidth + term.length - helper.displayWidth(term));
602
595
  const spacerWidth = 2;
603
- const remainingWidth = ((_this$helpWidth2 = this.helpWidth) !== null && _this$helpWidth2 !== void 0 ? _this$helpWidth2 : 80) - termWidth - spacerWidth - itemIndent;
596
+ const remainingWidth = (this.helpWidth ?? 80) - termWidth - spacerWidth - itemIndent;
604
597
  let formattedDescription;
605
598
  if (remainingWidth < this.minWidthToWrap || helper.preformatted(description)) formattedDescription = description;
606
599
  else formattedDescription = helper.boxWrap(description, remainingWidth).replace(/\n/g, "\n" + " ".repeat(termWidth + spacerWidth));
@@ -996,8 +989,6 @@ function suggestSimilar(word, candidates) {
996
989
  }
997
990
  //#endregion
998
991
  //#region node_modules/.pnpm/commander@15.0.0/node_modules/commander/lib/command.js
999
- init_objectSpread2();
1000
- init_asyncToGenerator();
1001
992
  var Command = class Command extends EventEmitter {
1002
993
  /**
1003
994
  * Initialize a new `Command`.
@@ -1049,14 +1040,8 @@ var Command = class Command extends EventEmitter {
1049
1040
  outputError: (str, write) => write(str),
1050
1041
  getOutHelpWidth: () => process$1.stdout.isTTY ? process$1.stdout.columns : void 0,
1051
1042
  getErrHelpWidth: () => process$1.stderr.isTTY ? process$1.stderr.columns : void 0,
1052
- getOutHasColors: () => {
1053
- var _useColor, _process$stdout$hasCo, _process$stdout;
1054
- return (_useColor = useColor()) !== null && _useColor !== void 0 ? _useColor : process$1.stdout.isTTY && ((_process$stdout$hasCo = (_process$stdout = process$1.stdout).hasColors) === null || _process$stdout$hasCo === void 0 ? void 0 : _process$stdout$hasCo.call(_process$stdout));
1055
- },
1056
- getErrHasColors: () => {
1057
- var _useColor2, _process$stderr$hasCo, _process$stderr;
1058
- return (_useColor2 = useColor()) !== null && _useColor2 !== void 0 ? _useColor2 : process$1.stderr.isTTY && ((_process$stderr$hasCo = (_process$stderr = process$1.stderr).hasColors) === null || _process$stderr$hasCo === void 0 ? void 0 : _process$stderr$hasCo.call(_process$stderr));
1059
- },
1043
+ getOutHasColors: () => useColor() ?? (process$1.stdout.isTTY && process$1.stdout.hasColors?.()),
1044
+ getErrHasColors: () => useColor() ?? (process$1.stderr.isTTY && process$1.stderr.hasColors?.()),
1060
1045
  stripColor: (str) => stripVTControlCharacters(str)
1061
1046
  };
1062
1047
  this._hidden = false;
@@ -1209,7 +1194,10 @@ var Command = class Command extends EventEmitter {
1209
1194
  */
1210
1195
  configureOutput(configuration) {
1211
1196
  if (configuration === void 0) return this._outputConfiguration;
1212
- this._outputConfiguration = _objectSpread2(_objectSpread2({}, this._outputConfiguration), configuration);
1197
+ this._outputConfiguration = {
1198
+ ...this._outputConfiguration,
1199
+ ...configuration
1200
+ };
1213
1201
  return this;
1214
1202
  }
1215
1203
  /**
@@ -1314,7 +1302,7 @@ var Command = class Command extends EventEmitter {
1314
1302
  */
1315
1303
  addArgument(argument) {
1316
1304
  const previousArgument = this.registeredArguments.slice(-1)[0];
1317
- if (previousArgument === null || previousArgument === void 0 ? void 0 : previousArgument.variadic) throw new Error(`only the last argument can be variadic '${previousArgument.name()}'`);
1305
+ if (previousArgument?.variadic) throw new Error(`only the last argument can be variadic '${previousArgument.name()}'`);
1318
1306
  if (argument.required && argument.defaultValue !== void 0 && argument.parseArg === void 0) throw new Error(`a default value for a required argument is never used: '${argument.name()}'`);
1319
1307
  this.registeredArguments.push(argument);
1320
1308
  return this;
@@ -1338,8 +1326,8 @@ var Command = class Command extends EventEmitter {
1338
1326
  if (enableOrNameAndArgs && this._defaultCommandGroup) this._initCommandGroup(this._getHelpCommand());
1339
1327
  return this;
1340
1328
  }
1341
- const [, helpName, helpArgs] = (enableOrNameAndArgs !== null && enableOrNameAndArgs !== void 0 ? enableOrNameAndArgs : "help [command]").match(/([^ ]+) *(.*)/);
1342
- const helpDescription = description !== null && description !== void 0 ? description : "display help for command";
1329
+ const [, helpName, helpArgs] = (enableOrNameAndArgs ?? "help [command]").match(/([^ ]+) *(.*)/);
1330
+ const helpDescription = description ?? "display help for command";
1343
1331
  const helpCommand = this.createCommand(helpName);
1344
1332
  helpCommand.helpOption(false);
1345
1333
  if (helpArgs) helpCommand.arguments(helpArgs);
@@ -1373,8 +1361,7 @@ var Command = class Command extends EventEmitter {
1373
1361
  * @package
1374
1362
  */
1375
1363
  _getHelpCommand() {
1376
- var _this$_addImplicitHel;
1377
- if ((_this$_addImplicitHel = this._addImplicitHelpCommand) !== null && _this$_addImplicitHel !== void 0 ? _this$_addImplicitHel : this.commands.length && !this._actionHandler && !this._findCommand("help")) {
1364
+ if (this._addImplicitHelpCommand ?? (this.commands.length && !this._actionHandler && !this._findCommand("help"))) {
1378
1365
  if (this._helpCommand === void 0) this.helpCommand(void 0, void 0);
1379
1366
  return this._helpCommand;
1380
1367
  }
@@ -1761,9 +1748,8 @@ Expecting one of '${allowedValues.join("', '")}'`);
1761
1748
  if (argv !== void 0 && !Array.isArray(argv)) throw new Error("first parameter to parse must be array or undefined");
1762
1749
  parseOptions = parseOptions || {};
1763
1750
  if (argv === void 0 && parseOptions.from === void 0) {
1764
- var _process$versions, _process$execArgv;
1765
- if ((_process$versions = process$1.versions) === null || _process$versions === void 0 ? void 0 : _process$versions.electron) parseOptions.from = "electron";
1766
- const execArgv = (_process$execArgv = process$1.execArgv) !== null && _process$execArgv !== void 0 ? _process$execArgv : [];
1751
+ if (process$1.versions?.electron) parseOptions.from = "electron";
1752
+ const execArgv = process$1.execArgv ?? [];
1767
1753
  if (execArgv.includes("-e") || execArgv.includes("--eval") || execArgv.includes("-p") || execArgv.includes("--print")) parseOptions.from = "eval";
1768
1754
  }
1769
1755
  if (argv === void 0) argv = process$1.argv;
@@ -1841,14 +1827,11 @@ Expecting one of '${allowedValues.join("', '")}'`);
1841
1827
  * @param {string} parseOptions.from - where the args are from: 'node', 'user', 'electron'
1842
1828
  * @return {Promise}
1843
1829
  */
1844
- parseAsync(argv, parseOptions) {
1845
- var _this = this;
1846
- return _asyncToGenerator(function* () {
1847
- _this._prepareForParse();
1848
- const userArgs = _this._prepareUserArgs(argv, parseOptions);
1849
- yield _this._parseCommand([], userArgs);
1850
- return _this;
1851
- })();
1830
+ async parseAsync(argv, parseOptions) {
1831
+ this._prepareForParse();
1832
+ const userArgs = this._prepareUserArgs(argv, parseOptions);
1833
+ await this._parseCommand([], userArgs);
1834
+ return this;
1852
1835
  }
1853
1836
  _prepareForParse() {
1854
1837
  if (this._savedState === null) {
@@ -1868,8 +1851,8 @@ Expecting one of '${allowedValues.join("', '")}'`);
1868
1851
  saveStateBeforeParse() {
1869
1852
  this._savedState = {
1870
1853
  _name: this._name,
1871
- _optionValues: _objectSpread2({}, this._optionValues),
1872
- _optionValueSources: _objectSpread2({}, this._optionValueSources)
1854
+ _optionValues: { ...this._optionValues },
1855
+ _optionValueSources: { ...this._optionValueSources }
1873
1856
  };
1874
1857
  }
1875
1858
  /**
@@ -1884,8 +1867,8 @@ Expecting one of '${allowedValues.join("', '")}'`);
1884
1867
  this._name = this._savedState._name;
1885
1868
  this._scriptPath = null;
1886
1869
  this.rawArgs = [];
1887
- this._optionValues = _objectSpread2({}, this._savedState._optionValues);
1888
- this._optionValueSources = _objectSpread2({}, this._savedState._optionValueSources);
1870
+ this._optionValues = { ...this._savedState._optionValues };
1871
+ this._optionValueSources = { ...this._savedState._optionValueSources };
1889
1872
  this.args = [];
1890
1873
  this.processedArgs = [];
1891
1874
  }
@@ -1933,7 +1916,7 @@ Expecting one of '${allowedValues.join("', '")}'`);
1933
1916
  let resolvedScriptPath;
1934
1917
  try {
1935
1918
  resolvedScriptPath = fs.realpathSync(this._scriptPath);
1936
- } catch (_unused) {
1919
+ } catch {
1937
1920
  resolvedScriptPath = this._scriptPath;
1938
1921
  }
1939
1922
  executableDir = path.resolve(path.dirname(resolvedScriptPath), executableDir);
@@ -1972,8 +1955,7 @@ Expecting one of '${allowedValues.join("', '")}'`);
1972
1955
  });
1973
1956
  const exitCallback = this._exitCallback;
1974
1957
  proc.on("close", (code) => {
1975
- var _code;
1976
- code = (_code = code) !== null && _code !== void 0 ? _code : 1;
1958
+ code = code ?? 1;
1977
1959
  if (!exitCallback) process$1.exit(code);
1978
1960
  else exitCallback(new CommanderError(code, "commander.executeSubCommandAsync", "(close)"));
1979
1961
  });
@@ -2011,11 +1993,10 @@ Expecting one of '${allowedValues.join("', '")}'`);
2011
1993
  * @private
2012
1994
  */
2013
1995
  _dispatchHelpCommand(subcommandName) {
2014
- var _ref, _this$_getHelpOption$, _this$_getHelpOption, _this$_getHelpOption2;
2015
1996
  if (!subcommandName) this.help();
2016
1997
  const subCommand = this._findCommand(subcommandName);
2017
1998
  if (subCommand && !subCommand._executableHandler) subCommand.help();
2018
- return this._dispatchSubcommand(subcommandName, [], [(_ref = (_this$_getHelpOption$ = (_this$_getHelpOption = this._getHelpOption()) === null || _this$_getHelpOption === void 0 ? void 0 : _this$_getHelpOption.long) !== null && _this$_getHelpOption$ !== void 0 ? _this$_getHelpOption$ : (_this$_getHelpOption2 = this._getHelpOption()) === null || _this$_getHelpOption2 === void 0 ? void 0 : _this$_getHelpOption2.short) !== null && _ref !== void 0 ? _ref : "--help"]);
1999
+ return this._dispatchSubcommand(subcommandName, [], [this._getHelpOption()?.long ?? this._getHelpOption()?.short ?? "--help"]);
2019
2000
  }
2020
2001
  /**
2021
2002
  * Check this.args against expected this.registeredArguments.
@@ -2071,7 +2052,7 @@ Expecting one of '${allowedValues.join("', '")}'`);
2071
2052
  * @private
2072
2053
  */
2073
2054
  _chainOrCall(promise, fn) {
2074
- if ((promise === null || promise === void 0 ? void 0 : promise.then) && typeof promise.then === "function") return promise.then(() => fn());
2055
+ if (promise?.then && typeof promise.then === "function") return promise.then(() => fn());
2075
2056
  return fn();
2076
2057
  }
2077
2058
  /**
@@ -2124,7 +2105,6 @@ Expecting one of '${allowedValues.join("', '")}'`);
2124
2105
  * @private
2125
2106
  */
2126
2107
  _parseCommand(operands, unknown) {
2127
- var _this$parent;
2128
2108
  const parsed = this.parseOptions(unknown);
2129
2109
  this._parseOptionsEnv();
2130
2110
  this._parseOptionsImplied();
@@ -2157,7 +2137,7 @@ Expecting one of '${allowedValues.join("', '")}'`);
2157
2137
  promiseChain = this._chainOrCallHooks(promiseChain, "postAction");
2158
2138
  return promiseChain;
2159
2139
  }
2160
- if ((_this$parent = this.parent) === null || _this$parent === void 0 ? void 0 : _this$parent.listenerCount(commandEvent)) {
2140
+ if (this.parent?.listenerCount(commandEvent)) {
2161
2141
  checkForUnknownOptions();
2162
2142
  this._processArguments();
2163
2143
  this.parent.emit(commandEvent, operands, unknown);
@@ -2269,8 +2249,7 @@ Expecting one of '${allowedValues.join("', '")}'`);
2269
2249
  let activeGroup = null;
2270
2250
  let i = 0;
2271
2251
  while (i < args.length || activeGroup) {
2272
- var _activeGroup;
2273
- const arg = (_activeGroup = activeGroup) !== null && _activeGroup !== void 0 ? _activeGroup : args[i++];
2252
+ const arg = activeGroup ?? args[i++];
2274
2253
  activeGroup = null;
2275
2254
  if (arg === "--") {
2276
2255
  if (dest === unknown) dest.push(arg);
@@ -2591,13 +2570,12 @@ Expecting one of '${allowedValues.join("', '")}'`);
2591
2570
  * @return {(string|Command)}
2592
2571
  */
2593
2572
  alias(alias) {
2594
- var _this$parent2;
2595
2573
  if (alias === void 0) return this._aliases[0];
2596
2574
  /** @type {Command} */
2597
2575
  let command = this;
2598
2576
  if (this.commands.length !== 0 && this.commands[this.commands.length - 1]._executableHandler) command = this.commands[this.commands.length - 1];
2599
2577
  if (alias === command._name) throw new Error("Command alias can't be the same as its name");
2600
- const matchingCommand = (_this$parent2 = this.parent) === null || _this$parent2 === void 0 ? void 0 : _this$parent2._findCommand(alias);
2578
+ const matchingCommand = this.parent?._findCommand(alias);
2601
2579
  if (matchingCommand) {
2602
2580
  const existingCmd = [matchingCommand.name()].concat(matchingCommand.aliases()).join("|");
2603
2581
  throw new Error(`cannot add alias '${alias}' to command '${this.name()}' as already have command '${existingCmd}'`);
@@ -2653,8 +2631,7 @@ Expecting one of '${allowedValues.join("', '")}'`);
2653
2631
  * @return {Command | string}
2654
2632
  */
2655
2633
  helpGroup(heading) {
2656
- var _this$_helpGroupHeadi;
2657
- if (heading === void 0) return (_this$_helpGroupHeadi = this._helpGroupHeading) !== null && _this$_helpGroupHeadi !== void 0 ? _this$_helpGroupHeadi : "";
2634
+ if (heading === void 0) return this._helpGroupHeading ?? "";
2658
2635
  this._helpGroupHeading = heading;
2659
2636
  return this;
2660
2637
  }
@@ -2672,8 +2649,7 @@ Expecting one of '${allowedValues.join("', '")}'`);
2672
2649
  * @returns {Command | string}
2673
2650
  */
2674
2651
  commandsGroup(heading) {
2675
- var _this$_defaultCommand;
2676
- if (heading === void 0) return (_this$_defaultCommand = this._defaultCommandGroup) !== null && _this$_defaultCommand !== void 0 ? _this$_defaultCommand : "";
2652
+ if (heading === void 0) return this._defaultCommandGroup ?? "";
2677
2653
  this._defaultCommandGroup = heading;
2678
2654
  return this;
2679
2655
  }
@@ -2691,8 +2667,7 @@ Expecting one of '${allowedValues.join("', '")}'`);
2691
2667
  * @returns {Command | string}
2692
2668
  */
2693
2669
  optionsGroup(heading) {
2694
- var _this$_defaultOptionG;
2695
- if (heading === void 0) return (_this$_defaultOptionG = this._defaultOptionGroup) !== null && _this$_defaultOptionG !== void 0 ? _this$_defaultOptionG : "";
2670
+ if (heading === void 0) return this._defaultOptionGroup ?? "";
2696
2671
  this._defaultOptionGroup = heading;
2697
2672
  return this;
2698
2673
  }
@@ -2805,7 +2780,6 @@ Expecting one of '${allowedValues.join("', '")}'`);
2805
2780
  * @param {{ error: boolean } | Function} [contextOptions] - pass {error:true} to write to stderr instead of stdout
2806
2781
  */
2807
2782
  outputHelp(contextOptions) {
2808
- var _this$_getHelpOption3;
2809
2783
  let deprecatedCallback;
2810
2784
  if (typeof contextOptions === "function") {
2811
2785
  deprecatedCallback = contextOptions;
@@ -2826,7 +2800,7 @@ Expecting one of '${allowedValues.join("', '")}'`);
2826
2800
  if (typeof helpInformation !== "string" && !Buffer.isBuffer(helpInformation)) throw new Error("outputHelp callback must return a string or a Buffer");
2827
2801
  }
2828
2802
  outputContext.write(helpInformation);
2829
- if ((_this$_getHelpOption3 = this._getHelpOption()) === null || _this$_getHelpOption3 === void 0 ? void 0 : _this$_getHelpOption3.long) this.emit(this._getHelpOption().long);
2803
+ if (this._getHelpOption()?.long) this.emit(this._getHelpOption().long);
2830
2804
  this.emit("afterHelp", eventContext);
2831
2805
  this._getCommandAndAncestors().forEach((command) => command.emit("afterAllHelp", eventContext));
2832
2806
  }
@@ -2850,7 +2824,7 @@ Expecting one of '${allowedValues.join("', '")}'`);
2850
2824
  } else this._helpOption = null;
2851
2825
  return this;
2852
2826
  }
2853
- this._helpOption = this.createOption(flags !== null && flags !== void 0 ? flags : "-h, --help", description !== null && description !== void 0 ? description : "display help for command");
2827
+ this._helpOption = this.createOption(flags ?? "-h, --help", description ?? "display help for command");
2854
2828
  if (flags || description) this._initOptionGroup(this._helpOption);
2855
2829
  return this;
2856
2830
  }
@@ -2885,9 +2859,8 @@ Expecting one of '${allowedValues.join("', '")}'`);
2885
2859
  * @param {{ error: boolean }} [contextOptions] - pass {error:true} to write to stderr instead of stdout
2886
2860
  */
2887
2861
  help(contextOptions) {
2888
- var _process$exitCode;
2889
2862
  this.outputHelp(contextOptions);
2890
- let exitCode = Number((_process$exitCode = process$1.exitCode) !== null && _process$exitCode !== void 0 ? _process$exitCode : 0);
2863
+ let exitCode = Number(process$1.exitCode ?? 0);
2891
2864
  if (exitCode === 0 && contextOptions && typeof contextOptions !== "function" && contextOptions.error) exitCode = 1;
2892
2865
  this._exit(exitCode, "commander.help", "(outputHelp)");
2893
2866
  }
@@ -2985,36 +2958,21 @@ function useColor() {
2985
2958
  new Command();
2986
2959
  //#endregion
2987
2960
  //#region src/args.ts
2988
- init_objectSpread2();
2989
- init_asyncToGenerator();
2990
- function createArgs() {
2991
- return _createArgs.apply(this, arguments);
2992
- }
2993
- function _createArgs() {
2994
- _createArgs = _asyncToGenerator(function* () {
2995
- const program = new Command("release-note");
2996
- program.command("generate").description("Generate release notes between two versions").option("--cwd [string]", "Current working directory").option("--config [string]", "Path to release-note config file").option("--outFile [string]", "Path to output file (defaults to stdout)").action(function() {
2997
- var _ref = _asyncToGenerator(function* (options) {
2998
- const resolvedCwd = typeof options.cwd === "string" ? options.cwd : process.cwd();
2999
- const result = yield generateReleaseNote(resolvedCwd, _objectSpread2({}, yield resolveConfig(resolvedCwd, typeof options.config === "string" ? [options.config] : void 0)));
3000
- if (typeof options.outFile === "string") {
3001
- const outPath = path$1.join(resolvedCwd, options.outFile);
3002
- yield fs$1.promises.writeFile(outPath, result.note, "utf8");
3003
- console.log(`Release note written to ${outPath}`);
3004
- } else process.stdout.write(result.note);
3005
- });
3006
- return function(_x) {
3007
- return _ref.apply(this, arguments);
3008
- };
3009
- }());
3010
- return program;
2961
+ async function createArgs() {
2962
+ const program = new Command("release-note");
2963
+ program.command("generate").description("Generate release notes between two versions").option("--cwd [string]", "Current working directory").option("--config [string]", "Path to release-note config file").option("--outFile [string]", "Path to output file (defaults to stdout)").action(async (options) => {
2964
+ const resolvedCwd = typeof options.cwd === "string" ? options.cwd : process.cwd();
2965
+ const result = await generateReleaseNote(resolvedCwd, { ...await resolveConfig(resolvedCwd, typeof options.config === "string" ? [options.config] : void 0) });
2966
+ if (typeof options.outFile === "string") {
2967
+ const outPath = path$1.join(resolvedCwd, options.outFile);
2968
+ await fs$1.promises.writeFile(outPath, result.note, "utf8");
2969
+ console.log(`Release note written to ${outPath}`);
2970
+ } else process.stdout.write(result.note);
3011
2971
  });
3012
- return _createArgs.apply(this, arguments);
2972
+ return program;
3013
2973
  }
3014
2974
  //#endregion
3015
2975
  //#region src/bin.ts
3016
2976
  createArgs().then((p) => p.parse());
3017
2977
  //#endregion
3018
2978
  export {};
3019
-
3020
- //# sourceMappingURL=bin.mjs.map
@@ -0,0 +1,37 @@
1
+ import { createRequire } from "node:module";
2
+ //#region \0rolldown/runtime.js
3
+ var __create = Object.create;
4
+ var __defProp = Object.defineProperty;
5
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
6
+ var __getOwnPropNames = Object.getOwnPropertyNames;
7
+ var __getProtoOf = Object.getPrototypeOf;
8
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
9
+ var __esmMin = (fn, res) => () => (fn && (res = fn(fn = 0)), res);
10
+ var __commonJSMin = (cb, mod) => () => (mod || (cb((mod = { exports: {} }).exports, mod), cb = null), mod.exports);
11
+ var __exportAll = (all, no_symbols) => {
12
+ let target = {};
13
+ for (var name in all) __defProp(target, name, {
14
+ get: all[name],
15
+ enumerable: true
16
+ });
17
+ if (!no_symbols) __defProp(target, Symbol.toStringTag, { value: "Module" });
18
+ return target;
19
+ };
20
+ var __copyProps = (to, from, except, desc) => {
21
+ if (from && typeof from === "object" || typeof from === "function") for (var keys = __getOwnPropNames(from), i = 0, n = keys.length, key; i < n; i++) {
22
+ key = keys[i];
23
+ if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
24
+ get: ((k) => from[k]).bind(null, key),
25
+ enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
26
+ });
27
+ }
28
+ return to;
29
+ };
30
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
31
+ value: mod,
32
+ enumerable: true
33
+ }) : target, mod));
34
+ var __toCommonJS = (mod) => __hasOwnProp.call(mod, "module.exports") ? mod["module.exports"] : __copyProps(__defProp({}, "__esModule", { value: true }), mod);
35
+ var __require = /* @__PURE__ */ createRequire(import.meta.url);
36
+ //#endregion
37
+ export { __toCommonJS as a, __require as i, __esmMin as n, __toESM as o, __exportAll as r, __commonJSMin as t };
@@ -0,0 +1,64 @@
1
+ //#region \0rolldown/runtime.js
2
+ var __create = Object.create;
3
+ var __defProp = Object.defineProperty;
4
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
+ var __getOwnPropNames = Object.getOwnPropertyNames;
6
+ var __getProtoOf = Object.getPrototypeOf;
7
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
8
+ var __esmMin = (fn, res) => () => (fn && (res = fn(fn = 0)), res);
9
+ var __commonJSMin = (cb, mod) => () => (mod || (cb((mod = { exports: {} }).exports, mod), cb = null), mod.exports);
10
+ var __exportAll = (all, no_symbols) => {
11
+ let target = {};
12
+ for (var name in all) __defProp(target, name, {
13
+ get: all[name],
14
+ enumerable: true
15
+ });
16
+ if (!no_symbols) __defProp(target, Symbol.toStringTag, { value: "Module" });
17
+ return target;
18
+ };
19
+ var __copyProps = (to, from, except, desc) => {
20
+ if (from && typeof from === "object" || typeof from === "function") for (var keys = __getOwnPropNames(from), i = 0, n = keys.length, key; i < n; i++) {
21
+ key = keys[i];
22
+ if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
23
+ get: ((k) => from[k]).bind(null, key),
24
+ enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
25
+ });
26
+ }
27
+ return to;
28
+ };
29
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
30
+ value: mod,
31
+ enumerable: true
32
+ }) : target, mod));
33
+ var __toCommonJS = (mod) => __hasOwnProp.call(mod, "module.exports") ? mod["module.exports"] : __copyProps(__defProp({}, "__esModule", { value: true }), mod);
34
+ //#endregion
35
+ Object.defineProperty(exports, "__commonJSMin", {
36
+ enumerable: true,
37
+ get: function() {
38
+ return __commonJSMin;
39
+ }
40
+ });
41
+ Object.defineProperty(exports, "__esmMin", {
42
+ enumerable: true,
43
+ get: function() {
44
+ return __esmMin;
45
+ }
46
+ });
47
+ Object.defineProperty(exports, "__exportAll", {
48
+ enumerable: true,
49
+ get: function() {
50
+ return __exportAll;
51
+ }
52
+ });
53
+ Object.defineProperty(exports, "__toCommonJS", {
54
+ enumerable: true,
55
+ get: function() {
56
+ return __toCommonJS;
57
+ }
58
+ });
59
+ Object.defineProperty(exports, "__toESM", {
60
+ enumerable: true,
61
+ get: function() {
62
+ return __toESM;
63
+ }
64
+ });