release-note 0.0.3 → 0.0.4

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.cjs CHANGED
@@ -1,20 +1,20 @@
1
1
  #!/usr/bin/env node
2
- const require_asyncToGenerator = require("./asyncToGenerator-OdY5smjc.cjs");
3
- const require_generate = require("./generate-DqPPuOfE.cjs");
2
+ const require_chunk = require("./chunk-Cek0wNdY.cjs");
3
+ const require_generate = require("./generate-Cy2c8xRC.cjs");
4
4
  let node_events = require("node:events");
5
5
  let node_child_process = require("node:child_process");
6
- node_child_process = require_asyncToGenerator.__toESM(node_child_process, 1);
6
+ node_child_process = require_chunk.__toESM(node_child_process, 1);
7
7
  let node_path = require("node:path");
8
- node_path = require_asyncToGenerator.__toESM(node_path, 1);
8
+ node_path = require_chunk.__toESM(node_path, 1);
9
9
  let node_fs = require("node:fs");
10
- node_fs = require_asyncToGenerator.__toESM(node_fs, 1);
10
+ node_fs = require_chunk.__toESM(node_fs, 1);
11
11
  let node_process = require("node:process");
12
- node_process = require_asyncToGenerator.__toESM(node_process, 1);
12
+ node_process = require_chunk.__toESM(node_process, 1);
13
13
  let node_util = require("node:util");
14
14
  let fs = require("fs");
15
- fs = require_asyncToGenerator.__toESM(fs, 1);
15
+ fs = require_chunk.__toESM(fs, 1);
16
16
  let path = require("path");
17
- path = require_asyncToGenerator.__toESM(path, 1);
17
+ path = require_chunk.__toESM(path, 1);
18
18
  //#region node_modules/.pnpm/commander@15.0.0/node_modules/commander/lib/error.js
19
19
  /**
20
20
  * CommanderError class
@@ -195,8 +195,7 @@ var Help = class {
195
195
  * @param {{ error?: boolean, helpWidth?: number, outputHasColors?: boolean }} contextOptions
196
196
  */
197
197
  prepareContext(contextOptions) {
198
- var _ref, _this$helpWidth;
199
- this.helpWidth = (_ref = (_this$helpWidth = this.helpWidth) !== null && _this$helpWidth !== void 0 ? _this$helpWidth : contextOptions.helpWidth) !== null && _ref !== void 0 ? _ref : 80;
198
+ this.helpWidth = this.helpWidth ?? contextOptions.helpWidth ?? 80;
200
199
  }
201
200
  /**
202
201
  * Get an array of the visible subcommands. Includes a placeholder for the implicit help command, if there is one.
@@ -465,9 +464,8 @@ var Help = class {
465
464
  * @returns {string}
466
465
  */
467
466
  formatHelp(cmd, helper) {
468
- var _helper$helpWidth;
469
467
  const termWidth = helper.padWidth(cmd, helper);
470
- const helpWidth = (_helper$helpWidth = helper.helpWidth) !== null && _helper$helpWidth !== void 0 ? _helper$helpWidth : 80;
468
+ const helpWidth = helper.helpWidth ?? 80;
471
469
  function callFormatItem(term, description) {
472
470
  return helper.formatItem(term, termWidth, description, helper);
473
471
  }
@@ -478,10 +476,7 @@ var Help = class {
478
476
  return callFormatItem(helper.styleArgumentTerm(helper.argumentTerm(argument)), helper.styleArgumentDescription(helper.argumentDescription(argument)));
479
477
  });
480
478
  output = output.concat(this.formatItemList("Arguments:", argumentList, helper));
481
- this.groupItems(cmd.options, helper.visibleOptions(cmd), (option) => {
482
- var _option$helpGroupHead;
483
- return (_option$helpGroupHead = option.helpGroupHeading) !== null && _option$helpGroupHead !== void 0 ? _option$helpGroupHead : "Options:";
484
- }).forEach((options, group) => {
479
+ this.groupItems(cmd.options, helper.visibleOptions(cmd), (option) => option.helpGroupHeading ?? "Options:").forEach((options, group) => {
485
480
  const optionList = options.map((option) => {
486
481
  return callFormatItem(helper.styleOptionTerm(helper.optionTerm(option)), helper.styleOptionDescription(helper.optionDescription(option)));
487
482
  });
@@ -600,13 +595,12 @@ var Help = class {
600
595
  * @returns {string}
601
596
  */
602
597
  formatItem(term, termWidth, description, helper) {
603
- var _this$helpWidth2;
604
598
  const itemIndent = 2;
605
599
  const itemIndentStr = " ".repeat(itemIndent);
606
600
  if (!description) return itemIndentStr + term;
607
601
  const paddedTerm = term.padEnd(termWidth + term.length - helper.displayWidth(term));
608
602
  const spacerWidth = 2;
609
- const remainingWidth = ((_this$helpWidth2 = this.helpWidth) !== null && _this$helpWidth2 !== void 0 ? _this$helpWidth2 : 80) - termWidth - spacerWidth - itemIndent;
603
+ const remainingWidth = (this.helpWidth ?? 80) - termWidth - spacerWidth - itemIndent;
610
604
  let formattedDescription;
611
605
  if (remainingWidth < this.minWidthToWrap || helper.preformatted(description)) formattedDescription = description;
612
606
  else formattedDescription = helper.boxWrap(description, remainingWidth).replace(/\n/g, "\n" + " ".repeat(termWidth + spacerWidth));
@@ -1002,8 +996,6 @@ function suggestSimilar(word, candidates) {
1002
996
  }
1003
997
  //#endregion
1004
998
  //#region node_modules/.pnpm/commander@15.0.0/node_modules/commander/lib/command.js
1005
- require_asyncToGenerator.init_objectSpread2();
1006
- require_asyncToGenerator.init_asyncToGenerator();
1007
999
  var Command = class Command extends node_events.EventEmitter {
1008
1000
  /**
1009
1001
  * Initialize a new `Command`.
@@ -1055,14 +1047,8 @@ var Command = class Command extends node_events.EventEmitter {
1055
1047
  outputError: (str, write) => write(str),
1056
1048
  getOutHelpWidth: () => node_process.default.stdout.isTTY ? node_process.default.stdout.columns : void 0,
1057
1049
  getErrHelpWidth: () => node_process.default.stderr.isTTY ? node_process.default.stderr.columns : void 0,
1058
- getOutHasColors: () => {
1059
- var _useColor, _process$stdout$hasCo, _process$stdout;
1060
- return (_useColor = useColor()) !== null && _useColor !== void 0 ? _useColor : node_process.default.stdout.isTTY && ((_process$stdout$hasCo = (_process$stdout = node_process.default.stdout).hasColors) === null || _process$stdout$hasCo === void 0 ? void 0 : _process$stdout$hasCo.call(_process$stdout));
1061
- },
1062
- getErrHasColors: () => {
1063
- var _useColor2, _process$stderr$hasCo, _process$stderr;
1064
- return (_useColor2 = useColor()) !== null && _useColor2 !== void 0 ? _useColor2 : node_process.default.stderr.isTTY && ((_process$stderr$hasCo = (_process$stderr = node_process.default.stderr).hasColors) === null || _process$stderr$hasCo === void 0 ? void 0 : _process$stderr$hasCo.call(_process$stderr));
1065
- },
1050
+ getOutHasColors: () => useColor() ?? (node_process.default.stdout.isTTY && node_process.default.stdout.hasColors?.()),
1051
+ getErrHasColors: () => useColor() ?? (node_process.default.stderr.isTTY && node_process.default.stderr.hasColors?.()),
1066
1052
  stripColor: (str) => (0, node_util.stripVTControlCharacters)(str)
1067
1053
  };
1068
1054
  this._hidden = false;
@@ -1215,7 +1201,10 @@ var Command = class Command extends node_events.EventEmitter {
1215
1201
  */
1216
1202
  configureOutput(configuration) {
1217
1203
  if (configuration === void 0) return this._outputConfiguration;
1218
- this._outputConfiguration = require_asyncToGenerator._objectSpread2(require_asyncToGenerator._objectSpread2({}, this._outputConfiguration), configuration);
1204
+ this._outputConfiguration = {
1205
+ ...this._outputConfiguration,
1206
+ ...configuration
1207
+ };
1219
1208
  return this;
1220
1209
  }
1221
1210
  /**
@@ -1320,7 +1309,7 @@ var Command = class Command extends node_events.EventEmitter {
1320
1309
  */
1321
1310
  addArgument(argument) {
1322
1311
  const previousArgument = this.registeredArguments.slice(-1)[0];
1323
- if (previousArgument === null || previousArgument === void 0 ? void 0 : previousArgument.variadic) throw new Error(`only the last argument can be variadic '${previousArgument.name()}'`);
1312
+ if (previousArgument?.variadic) throw new Error(`only the last argument can be variadic '${previousArgument.name()}'`);
1324
1313
  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()}'`);
1325
1314
  this.registeredArguments.push(argument);
1326
1315
  return this;
@@ -1344,8 +1333,8 @@ var Command = class Command extends node_events.EventEmitter {
1344
1333
  if (enableOrNameAndArgs && this._defaultCommandGroup) this._initCommandGroup(this._getHelpCommand());
1345
1334
  return this;
1346
1335
  }
1347
- const [, helpName, helpArgs] = (enableOrNameAndArgs !== null && enableOrNameAndArgs !== void 0 ? enableOrNameAndArgs : "help [command]").match(/([^ ]+) *(.*)/);
1348
- const helpDescription = description !== null && description !== void 0 ? description : "display help for command";
1336
+ const [, helpName, helpArgs] = (enableOrNameAndArgs ?? "help [command]").match(/([^ ]+) *(.*)/);
1337
+ const helpDescription = description ?? "display help for command";
1349
1338
  const helpCommand = this.createCommand(helpName);
1350
1339
  helpCommand.helpOption(false);
1351
1340
  if (helpArgs) helpCommand.arguments(helpArgs);
@@ -1379,8 +1368,7 @@ var Command = class Command extends node_events.EventEmitter {
1379
1368
  * @package
1380
1369
  */
1381
1370
  _getHelpCommand() {
1382
- var _this$_addImplicitHel;
1383
- if ((_this$_addImplicitHel = this._addImplicitHelpCommand) !== null && _this$_addImplicitHel !== void 0 ? _this$_addImplicitHel : this.commands.length && !this._actionHandler && !this._findCommand("help")) {
1371
+ if (this._addImplicitHelpCommand ?? (this.commands.length && !this._actionHandler && !this._findCommand("help"))) {
1384
1372
  if (this._helpCommand === void 0) this.helpCommand(void 0, void 0);
1385
1373
  return this._helpCommand;
1386
1374
  }
@@ -1767,9 +1755,8 @@ Expecting one of '${allowedValues.join("', '")}'`);
1767
1755
  if (argv !== void 0 && !Array.isArray(argv)) throw new Error("first parameter to parse must be array or undefined");
1768
1756
  parseOptions = parseOptions || {};
1769
1757
  if (argv === void 0 && parseOptions.from === void 0) {
1770
- var _process$versions, _process$execArgv;
1771
- if ((_process$versions = node_process.default.versions) === null || _process$versions === void 0 ? void 0 : _process$versions.electron) parseOptions.from = "electron";
1772
- const execArgv = (_process$execArgv = node_process.default.execArgv) !== null && _process$execArgv !== void 0 ? _process$execArgv : [];
1758
+ if (node_process.default.versions?.electron) parseOptions.from = "electron";
1759
+ const execArgv = node_process.default.execArgv ?? [];
1773
1760
  if (execArgv.includes("-e") || execArgv.includes("--eval") || execArgv.includes("-p") || execArgv.includes("--print")) parseOptions.from = "eval";
1774
1761
  }
1775
1762
  if (argv === void 0) argv = node_process.default.argv;
@@ -1847,14 +1834,11 @@ Expecting one of '${allowedValues.join("', '")}'`);
1847
1834
  * @param {string} parseOptions.from - where the args are from: 'node', 'user', 'electron'
1848
1835
  * @return {Promise}
1849
1836
  */
1850
- parseAsync(argv, parseOptions) {
1851
- var _this = this;
1852
- return require_asyncToGenerator._asyncToGenerator(function* () {
1853
- _this._prepareForParse();
1854
- const userArgs = _this._prepareUserArgs(argv, parseOptions);
1855
- yield _this._parseCommand([], userArgs);
1856
- return _this;
1857
- })();
1837
+ async parseAsync(argv, parseOptions) {
1838
+ this._prepareForParse();
1839
+ const userArgs = this._prepareUserArgs(argv, parseOptions);
1840
+ await this._parseCommand([], userArgs);
1841
+ return this;
1858
1842
  }
1859
1843
  _prepareForParse() {
1860
1844
  if (this._savedState === null) {
@@ -1874,8 +1858,8 @@ Expecting one of '${allowedValues.join("', '")}'`);
1874
1858
  saveStateBeforeParse() {
1875
1859
  this._savedState = {
1876
1860
  _name: this._name,
1877
- _optionValues: require_asyncToGenerator._objectSpread2({}, this._optionValues),
1878
- _optionValueSources: require_asyncToGenerator._objectSpread2({}, this._optionValueSources)
1861
+ _optionValues: { ...this._optionValues },
1862
+ _optionValueSources: { ...this._optionValueSources }
1879
1863
  };
1880
1864
  }
1881
1865
  /**
@@ -1890,8 +1874,8 @@ Expecting one of '${allowedValues.join("', '")}'`);
1890
1874
  this._name = this._savedState._name;
1891
1875
  this._scriptPath = null;
1892
1876
  this.rawArgs = [];
1893
- this._optionValues = require_asyncToGenerator._objectSpread2({}, this._savedState._optionValues);
1894
- this._optionValueSources = require_asyncToGenerator._objectSpread2({}, this._savedState._optionValueSources);
1877
+ this._optionValues = { ...this._savedState._optionValues };
1878
+ this._optionValueSources = { ...this._savedState._optionValueSources };
1895
1879
  this.args = [];
1896
1880
  this.processedArgs = [];
1897
1881
  }
@@ -1939,7 +1923,7 @@ Expecting one of '${allowedValues.join("', '")}'`);
1939
1923
  let resolvedScriptPath;
1940
1924
  try {
1941
1925
  resolvedScriptPath = node_fs.default.realpathSync(this._scriptPath);
1942
- } catch (_unused) {
1926
+ } catch {
1943
1927
  resolvedScriptPath = this._scriptPath;
1944
1928
  }
1945
1929
  executableDir = node_path.default.resolve(node_path.default.dirname(resolvedScriptPath), executableDir);
@@ -1978,8 +1962,7 @@ Expecting one of '${allowedValues.join("', '")}'`);
1978
1962
  });
1979
1963
  const exitCallback = this._exitCallback;
1980
1964
  proc.on("close", (code) => {
1981
- var _code;
1982
- code = (_code = code) !== null && _code !== void 0 ? _code : 1;
1965
+ code = code ?? 1;
1983
1966
  if (!exitCallback) node_process.default.exit(code);
1984
1967
  else exitCallback(new CommanderError(code, "commander.executeSubCommandAsync", "(close)"));
1985
1968
  });
@@ -2017,11 +2000,10 @@ Expecting one of '${allowedValues.join("', '")}'`);
2017
2000
  * @private
2018
2001
  */
2019
2002
  _dispatchHelpCommand(subcommandName) {
2020
- var _ref, _this$_getHelpOption$, _this$_getHelpOption, _this$_getHelpOption2;
2021
2003
  if (!subcommandName) this.help();
2022
2004
  const subCommand = this._findCommand(subcommandName);
2023
2005
  if (subCommand && !subCommand._executableHandler) subCommand.help();
2024
- 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"]);
2006
+ return this._dispatchSubcommand(subcommandName, [], [this._getHelpOption()?.long ?? this._getHelpOption()?.short ?? "--help"]);
2025
2007
  }
2026
2008
  /**
2027
2009
  * Check this.args against expected this.registeredArguments.
@@ -2077,7 +2059,7 @@ Expecting one of '${allowedValues.join("', '")}'`);
2077
2059
  * @private
2078
2060
  */
2079
2061
  _chainOrCall(promise, fn) {
2080
- if ((promise === null || promise === void 0 ? void 0 : promise.then) && typeof promise.then === "function") return promise.then(() => fn());
2062
+ if (promise?.then && typeof promise.then === "function") return promise.then(() => fn());
2081
2063
  return fn();
2082
2064
  }
2083
2065
  /**
@@ -2130,7 +2112,6 @@ Expecting one of '${allowedValues.join("', '")}'`);
2130
2112
  * @private
2131
2113
  */
2132
2114
  _parseCommand(operands, unknown) {
2133
- var _this$parent;
2134
2115
  const parsed = this.parseOptions(unknown);
2135
2116
  this._parseOptionsEnv();
2136
2117
  this._parseOptionsImplied();
@@ -2163,7 +2144,7 @@ Expecting one of '${allowedValues.join("', '")}'`);
2163
2144
  promiseChain = this._chainOrCallHooks(promiseChain, "postAction");
2164
2145
  return promiseChain;
2165
2146
  }
2166
- if ((_this$parent = this.parent) === null || _this$parent === void 0 ? void 0 : _this$parent.listenerCount(commandEvent)) {
2147
+ if (this.parent?.listenerCount(commandEvent)) {
2167
2148
  checkForUnknownOptions();
2168
2149
  this._processArguments();
2169
2150
  this.parent.emit(commandEvent, operands, unknown);
@@ -2275,8 +2256,7 @@ Expecting one of '${allowedValues.join("', '")}'`);
2275
2256
  let activeGroup = null;
2276
2257
  let i = 0;
2277
2258
  while (i < args.length || activeGroup) {
2278
- var _activeGroup;
2279
- const arg = (_activeGroup = activeGroup) !== null && _activeGroup !== void 0 ? _activeGroup : args[i++];
2259
+ const arg = activeGroup ?? args[i++];
2280
2260
  activeGroup = null;
2281
2261
  if (arg === "--") {
2282
2262
  if (dest === unknown) dest.push(arg);
@@ -2597,13 +2577,12 @@ Expecting one of '${allowedValues.join("', '")}'`);
2597
2577
  * @return {(string|Command)}
2598
2578
  */
2599
2579
  alias(alias) {
2600
- var _this$parent2;
2601
2580
  if (alias === void 0) return this._aliases[0];
2602
2581
  /** @type {Command} */
2603
2582
  let command = this;
2604
2583
  if (this.commands.length !== 0 && this.commands[this.commands.length - 1]._executableHandler) command = this.commands[this.commands.length - 1];
2605
2584
  if (alias === command._name) throw new Error("Command alias can't be the same as its name");
2606
- const matchingCommand = (_this$parent2 = this.parent) === null || _this$parent2 === void 0 ? void 0 : _this$parent2._findCommand(alias);
2585
+ const matchingCommand = this.parent?._findCommand(alias);
2607
2586
  if (matchingCommand) {
2608
2587
  const existingCmd = [matchingCommand.name()].concat(matchingCommand.aliases()).join("|");
2609
2588
  throw new Error(`cannot add alias '${alias}' to command '${this.name()}' as already have command '${existingCmd}'`);
@@ -2659,8 +2638,7 @@ Expecting one of '${allowedValues.join("', '")}'`);
2659
2638
  * @return {Command | string}
2660
2639
  */
2661
2640
  helpGroup(heading) {
2662
- var _this$_helpGroupHeadi;
2663
- if (heading === void 0) return (_this$_helpGroupHeadi = this._helpGroupHeading) !== null && _this$_helpGroupHeadi !== void 0 ? _this$_helpGroupHeadi : "";
2641
+ if (heading === void 0) return this._helpGroupHeading ?? "";
2664
2642
  this._helpGroupHeading = heading;
2665
2643
  return this;
2666
2644
  }
@@ -2678,8 +2656,7 @@ Expecting one of '${allowedValues.join("', '")}'`);
2678
2656
  * @returns {Command | string}
2679
2657
  */
2680
2658
  commandsGroup(heading) {
2681
- var _this$_defaultCommand;
2682
- if (heading === void 0) return (_this$_defaultCommand = this._defaultCommandGroup) !== null && _this$_defaultCommand !== void 0 ? _this$_defaultCommand : "";
2659
+ if (heading === void 0) return this._defaultCommandGroup ?? "";
2683
2660
  this._defaultCommandGroup = heading;
2684
2661
  return this;
2685
2662
  }
@@ -2697,8 +2674,7 @@ Expecting one of '${allowedValues.join("', '")}'`);
2697
2674
  * @returns {Command | string}
2698
2675
  */
2699
2676
  optionsGroup(heading) {
2700
- var _this$_defaultOptionG;
2701
- if (heading === void 0) return (_this$_defaultOptionG = this._defaultOptionGroup) !== null && _this$_defaultOptionG !== void 0 ? _this$_defaultOptionG : "";
2677
+ if (heading === void 0) return this._defaultOptionGroup ?? "";
2702
2678
  this._defaultOptionGroup = heading;
2703
2679
  return this;
2704
2680
  }
@@ -2811,7 +2787,6 @@ Expecting one of '${allowedValues.join("', '")}'`);
2811
2787
  * @param {{ error: boolean } | Function} [contextOptions] - pass {error:true} to write to stderr instead of stdout
2812
2788
  */
2813
2789
  outputHelp(contextOptions) {
2814
- var _this$_getHelpOption3;
2815
2790
  let deprecatedCallback;
2816
2791
  if (typeof contextOptions === "function") {
2817
2792
  deprecatedCallback = contextOptions;
@@ -2832,7 +2807,7 @@ Expecting one of '${allowedValues.join("', '")}'`);
2832
2807
  if (typeof helpInformation !== "string" && !Buffer.isBuffer(helpInformation)) throw new Error("outputHelp callback must return a string or a Buffer");
2833
2808
  }
2834
2809
  outputContext.write(helpInformation);
2835
- if ((_this$_getHelpOption3 = this._getHelpOption()) === null || _this$_getHelpOption3 === void 0 ? void 0 : _this$_getHelpOption3.long) this.emit(this._getHelpOption().long);
2810
+ if (this._getHelpOption()?.long) this.emit(this._getHelpOption().long);
2836
2811
  this.emit("afterHelp", eventContext);
2837
2812
  this._getCommandAndAncestors().forEach((command) => command.emit("afterAllHelp", eventContext));
2838
2813
  }
@@ -2856,7 +2831,7 @@ Expecting one of '${allowedValues.join("', '")}'`);
2856
2831
  } else this._helpOption = null;
2857
2832
  return this;
2858
2833
  }
2859
- this._helpOption = this.createOption(flags !== null && flags !== void 0 ? flags : "-h, --help", description !== null && description !== void 0 ? description : "display help for command");
2834
+ this._helpOption = this.createOption(flags ?? "-h, --help", description ?? "display help for command");
2860
2835
  if (flags || description) this._initOptionGroup(this._helpOption);
2861
2836
  return this;
2862
2837
  }
@@ -2891,9 +2866,8 @@ Expecting one of '${allowedValues.join("', '")}'`);
2891
2866
  * @param {{ error: boolean }} [contextOptions] - pass {error:true} to write to stderr instead of stdout
2892
2867
  */
2893
2868
  help(contextOptions) {
2894
- var _process$exitCode;
2895
2869
  this.outputHelp(contextOptions);
2896
- let exitCode = Number((_process$exitCode = node_process.default.exitCode) !== null && _process$exitCode !== void 0 ? _process$exitCode : 0);
2870
+ let exitCode = Number(node_process.default.exitCode ?? 0);
2897
2871
  if (exitCode === 0 && contextOptions && typeof contextOptions !== "function" && contextOptions.error) exitCode = 1;
2898
2872
  this._exit(exitCode, "commander.help", "(outputHelp)");
2899
2873
  }
@@ -2991,31 +2965,18 @@ function useColor() {
2991
2965
  new Command();
2992
2966
  //#endregion
2993
2967
  //#region src/args.ts
2994
- require_asyncToGenerator.init_objectSpread2();
2995
- require_asyncToGenerator.init_asyncToGenerator();
2996
- function createArgs() {
2997
- return _createArgs.apply(this, arguments);
2998
- }
2999
- function _createArgs() {
3000
- _createArgs = require_asyncToGenerator._asyncToGenerator(function* () {
3001
- const program = new Command("release-note");
3002
- 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() {
3003
- var _ref = require_asyncToGenerator._asyncToGenerator(function* (options) {
3004
- const resolvedCwd = typeof options.cwd === "string" ? options.cwd : process.cwd();
3005
- const result = yield require_generate.generateReleaseNote(resolvedCwd, require_asyncToGenerator._objectSpread2({}, yield require_generate.resolveConfig(resolvedCwd, typeof options.config === "string" ? [options.config] : void 0)));
3006
- if (typeof options.outFile === "string") {
3007
- const outPath = path.default.join(resolvedCwd, options.outFile);
3008
- yield fs.default.promises.writeFile(outPath, result.note, "utf8");
3009
- console.log(`Release note written to ${outPath}`);
3010
- } else process.stdout.write(result.note);
3011
- });
3012
- return function(_x) {
3013
- return _ref.apply(this, arguments);
3014
- };
3015
- }());
3016
- return program;
2968
+ async function createArgs() {
2969
+ const program = new Command("release-note");
2970
+ 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) => {
2971
+ const resolvedCwd = typeof options.cwd === "string" ? options.cwd : process.cwd();
2972
+ const result = await require_generate.generateReleaseNote(resolvedCwd, { ...await require_generate.resolveConfig(resolvedCwd, typeof options.config === "string" ? [options.config] : void 0) });
2973
+ if (typeof options.outFile === "string") {
2974
+ const outPath = path.default.join(resolvedCwd, options.outFile);
2975
+ await fs.default.promises.writeFile(outPath, result.note, "utf8");
2976
+ console.log(`Release note written to ${outPath}`);
2977
+ } else process.stdout.write(result.note);
3017
2978
  });
3018
- return _createArgs.apply(this, arguments);
2979
+ return program;
3019
2980
  }
3020
2981
  //#endregion
3021
2982
  //#region src/bin.ts