@rockcarver/frodo-cli 4.0.0-25 → 4.0.0-27

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/CHANGELOG.md CHANGED
@@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7
7
 
8
8
  ## [Unreleased]
9
9
 
10
+ ## [4.0.0-26] - 2026-03-23
11
+
12
+ ## [4.0.0-25] - 2026-03-23
13
+
10
14
  ## [4.0.0-24] - 2026-03-21
11
15
 
12
16
  ## [4.0.0-23] - 2026-03-21
@@ -2211,7 +2215,9 @@ Frodo CLI 2.x automatically refreshes session and access tokens before they expi
2211
2215
  - Fixed problem with adding connection profiles
2212
2216
  - Miscellaneous bug fixes
2213
2217
 
2214
- [unreleased]: https://github.com/rockcarver/frodo-cli/compare/v4.0.0-24...HEAD
2218
+ [unreleased]: https://github.com/rockcarver/frodo-cli/compare/v4.0.0-26...HEAD
2219
+ [4.0.0-26]: https://github.com/rockcarver/frodo-cli/compare/v4.0.0-25...v4.0.0-26
2220
+ [4.0.0-25]: https://github.com/rockcarver/frodo-cli/compare/v4.0.0-24...v4.0.0-25
2215
2221
  [4.0.0-24]: https://github.com/rockcarver/frodo-cli/compare/v4.0.0-23...v4.0.0-24
2216
2222
  [4.0.0-23]: https://github.com/rockcarver/frodo-cli/compare/v4.0.0-22...v4.0.0-23
2217
2223
  [4.0.0-22]: https://github.com/rockcarver/frodo-cli/compare/v4.0.0-21...v4.0.0-22
package/dist/app.cjs CHANGED
@@ -9539,7 +9539,7 @@ var require_yesno = _chunkI43EENNMcjs.__commonJS.call(void 0, {
9539
9539
  "node_modules/yesno/yesno.js"(exports2, module2) {
9540
9540
  "use strict";
9541
9541
  _chunkI43EENNMcjs.init_cjs_shims.call(void 0, );
9542
- var readline2 = _chunkI43EENNMcjs.__require.call(void 0, "readline");
9542
+ var readline = _chunkI43EENNMcjs.__require.call(void 0, "readline");
9543
9543
  var options = {
9544
9544
  yes: ["yes", "y"],
9545
9545
  no: ["no", "n"]
@@ -9556,7 +9556,7 @@ var require_yesno = _chunkI43EENNMcjs.__commonJS.call(void 0, {
9556
9556
  invalid = defaultInvalidHandler;
9557
9557
  var yValues = (yesValues || options.yes).map((v) => v.toLowerCase());
9558
9558
  var nValues = (noValues || options.no).map((v) => v.toLowerCase());
9559
- const rl = readline2.createInterface({
9559
+ const rl = readline.createInterface({
9560
9560
  input: process.stdin,
9561
9561
  output: process.stdout
9562
9562
  });
@@ -238572,13 +238572,15 @@ function setup270() {
238572
238572
 
238573
238573
  // src/cli/shell/shell.ts
238574
238574
  _chunkI43EENNMcjs.init_cjs_shims.call(void 0, );
238575
- var _readline = require('readline'); var _readline2 = _interopRequireDefault2(_readline);
238576
238575
  var _repl = require('repl'); var _repl2 = _interopRequireDefault2(_repl);
238577
238576
 
238578
238577
  var _vm = require('vm'); var _vm2 = _interopRequireDefault2(_vm);
238579
238578
 
238580
238579
  // src/ops/ShellAutoCompleteOps.ts
238581
238580
  _chunkI43EENNMcjs.init_cjs_shims.call(void 0, );
238581
+ var CYAN = "\x1B[36m";
238582
+ var DIM = "\x1B[2m";
238583
+ var RESET = "\x1B[0m";
238582
238584
  function getHelpMetadataFromInstance(frodoInstance) {
238583
238585
  const candidate = frodoInstance["utils"];
238584
238586
  if (!candidate || typeof candidate !== "object") return [];
@@ -238636,12 +238638,36 @@ function buildHintLine(fullPath, doc) {
238636
238638
  const type = abbrevType(p.type);
238637
238639
  return name && type ? `${name}: ${type}` : name;
238638
238640
  }).filter((s4) => s4.length > 0).join(", ");
238639
- return `// ${fullPath}(${params})`;
238641
+ return `\u25B8 ${CYAN}${fullPath}${RESET}(${DIM}${params}${RESET})`;
238640
238642
  }
238641
238643
  function createFrodoCompleter(rootBindings, docsByMethod, onMethodHint) {
238642
238644
  return (line) => {
238645
+ const invocationMatch = line.match(
238646
+ /([A-Za-z_$][\w$]*(?:\.[A-Za-z_$][\w$]*)+)\(\s*$/
238647
+ );
238648
+ if (invocationMatch) {
238649
+ const fullPath = invocationMatch[1];
238650
+ const parts = fullPath.split(".");
238651
+ const rootName2 = parts[0];
238652
+ const root5 = rootBindings[rootName2];
238653
+ if (!root5) return [[], line];
238654
+ const methodName = parts[parts.length - 1];
238655
+ const parentSegments2 = parts.slice(1, -1);
238656
+ const completion = `${fullPath}${buildMethodScaffold(
238657
+ parentSegments2,
238658
+ methodName,
238659
+ docsByMethod
238660
+ )}`;
238661
+ if (onMethodHint) {
238662
+ const doc = findBestDoc(methodName, parentSegments2, docsByMethod);
238663
+ if (doc) {
238664
+ setImmediate(() => onMethodHint(buildHintLine(fullPath, doc)));
238665
+ }
238666
+ }
238667
+ return [[completion], `${fullPath}(`];
238668
+ }
238643
238669
  const tokenMatch = line.match(
238644
- /([A-Za-z_$][\w$]*(?:\.[A-Za-z_$][\w$]*)*\.?$)/
238670
+ /([A-Za-z_$][\w$]*(?:\.[A-Za-z_$][\w$]*)*\.?)$/
238645
238671
  );
238646
238672
  const token2 = _nullishCoalesce(_optionalChain([tokenMatch, 'optionalAccess', _580 => _580[1]]), () => ( ""));
238647
238673
  if (!token2) return [[], line];
@@ -238698,10 +238724,12 @@ function buildDocsByMethod(frodoInstance) {
238698
238724
  }
238699
238725
  function registerOpenParenHint(replServer, rootBindings, docsByMethod, onHint) {
238700
238726
  process.stdin.on("keypress", (_char, key) => {
238701
- if (_optionalChain([key, 'optionalAccess', _581 => _581.sequence]) !== "(") return;
238727
+ const char = typeof _char === "string" ? _char : "";
238728
+ const sequence = _nullishCoalesce(_optionalChain([key, 'optionalAccess', _581 => _581.sequence]), () => ( ""));
238729
+ if (sequence !== "(" && char !== "(") return;
238702
238730
  const currentLine = _nullishCoalesce(replServer["line"], () => ( ""));
238703
238731
  const match2 = currentLine.match(
238704
- /([A-Za-z_$][\w$]*(?:\.[A-Za-z_$][\w$]*)+)$/
238732
+ /([A-Za-z_$][\w$]*(?:\.[A-Za-z_$][\w$]*)+)\s*$/
238705
238733
  );
238706
238734
  if (!match2) return;
238707
238735
  const parts = match2[1].split(".");
@@ -238709,18 +238737,20 @@ function registerOpenParenHint(replServer, rootBindings, docsByMethod, onHint) {
238709
238737
  const methodName = parts[parts.length - 1];
238710
238738
  const parentSegments = parts.slice(1, -1);
238711
238739
  const doc = findBestDoc(methodName, parentSegments, docsByMethod);
238712
- if (doc) onHint(buildHintLine(match2[1], doc));
238740
+ if (doc) {
238741
+ setImmediate(() => onHint(buildHintLine(match2[1], doc)));
238742
+ }
238713
238743
  });
238714
238744
  }
238715
238745
 
238716
238746
  // src/ops/ShellHelpOps.ts
238717
238747
  _chunkI43EENNMcjs.init_cjs_shims.call(void 0, );
238718
238748
  var BOLD = "\x1B[1m";
238719
- var RESET = "\x1B[0m";
238720
- var CYAN = "\x1B[36m";
238749
+ var RESET2 = "\x1B[0m";
238750
+ var CYAN2 = "\x1B[36m";
238721
238751
  var YELLOW = "\x1B[33m";
238722
238752
  var GREEN = "\x1B[32m";
238723
- var DIM = "\x1B[2m";
238753
+ var DIM2 = "\x1B[2m";
238724
238754
  var cachedIndex = null;
238725
238755
  function getHelpMetadataFromInstance2(frodoInstance) {
238726
238756
  const candidate = frodoInstance["utils"];
@@ -238741,22 +238771,22 @@ function getMethodIndex(helpDocs) {
238741
238771
  }
238742
238772
  function formatMethodDoc(doc, verbose) {
238743
238773
  const lines = [];
238744
- lines.push(`${YELLOW}${doc.typeName}.${doc.methodName}${RESET}`);
238745
- lines.push(` ${CYAN}Signature :${RESET} ${doc.signature}`);
238774
+ lines.push(`${YELLOW}${doc.typeName}.${doc.methodName}${RESET2}`);
238775
+ lines.push(` ${CYAN2}Signature :${RESET2} ${doc.signature}`);
238746
238776
  if (doc.description) {
238747
- lines.push(` ${CYAN}Description:${RESET} ${doc.description}`);
238777
+ lines.push(` ${CYAN2}Description:${RESET2} ${doc.description}`);
238748
238778
  }
238749
238779
  if (verbose) {
238750
238780
  if (doc.params.length > 0) {
238751
- lines.push(` ${CYAN}Parameters :${RESET}`);
238781
+ lines.push(` ${CYAN2}Parameters :${RESET2}`);
238752
238782
  for (const p of doc.params) {
238753
238783
  const typePart = p.type ? `{${p.type}} ` : "";
238754
238784
  const desc = p.description ? `: ${p.description}` : "";
238755
- lines.push(` ${typePart}${GREEN}${p.name}${RESET}${desc}`);
238785
+ lines.push(` ${typePart}${GREEN}${p.name}${RESET2}${desc}`);
238756
238786
  }
238757
238787
  }
238758
238788
  if (doc.returns) {
238759
- lines.push(` ${CYAN}Returns :${RESET} ${doc.returns}`);
238789
+ lines.push(` ${CYAN2}Returns :${RESET2} ${doc.returns}`);
238760
238790
  }
238761
238791
  }
238762
238792
  return lines.join("\n");
@@ -238817,21 +238847,21 @@ function createHelpContext(frodoInstance) {
238817
238847
  );
238818
238848
  const sortedFns = [...fns].sort(alphaSort);
238819
238849
  const sortedMods = [...mods].sort(alphaSort);
238820
- console.log(`${BOLD}${CYAN}Frodo Shell - Help System${RESET}`);
238850
+ console.log(`${BOLD}${CYAN2}Frodo Shell - Help System${RESET2}`);
238821
238851
  console.log("");
238822
- console.log(` ${GREEN}help()${RESET} ${DIM}this overview${RESET}`);
238852
+ console.log(` ${GREEN}help()${RESET2} ${DIM2}this overview${RESET2}`);
238823
238853
  console.log(
238824
- ` ${GREEN}help(frodo.<module>)${RESET} ${DIM}list all methods and modules in <module>${RESET}`
238854
+ ` ${GREEN}help(frodo.<module>)${RESET2} ${DIM2}list all methods and modules in <module>${RESET2}`
238825
238855
  );
238826
238856
  console.log(
238827
- ` ${GREEN}help(frodo.<module>.<method>)${RESET} ${DIM}full signature + docs for a method${RESET}`
238857
+ ` ${GREEN}help(frodo.<module>.<method>)${RESET2} ${DIM2}full signature + docs for a method${RESET2}`
238828
238858
  );
238829
238859
  console.log(
238830
- ` ${GREEN}help("methodName")${RESET} ${DIM}search for a method across all modules${RESET}`
238860
+ ` ${GREEN}help("methodName")${RESET2} ${DIM2}search for a method across all modules${RESET2}`
238831
238861
  );
238832
238862
  console.log("");
238833
238863
  const modulesCountLabel = sortedMods.length > 0 ? ` (${sortedMods.length} ${sortedMods.length === 1 ? "module" : "modules"})` : "";
238834
- console.log(`${BOLD}Modules${modulesCountLabel}:${RESET}`);
238864
+ console.log(`${BOLD}Modules${modulesCountLabel}:${RESET2}`);
238835
238865
  for (const k2 of sortedMods) {
238836
238866
  const val = frodoInstance[k2];
238837
238867
  if (typeof val === "object" && val !== null) {
@@ -238839,17 +238869,17 @@ function createHelpContext(frodoInstance) {
238839
238869
  const subModuleCount = getSubModuleNames(val).length;
238840
238870
  const countSuffix = formatCountSuffix(methodCount, subModuleCount);
238841
238871
  console.log(
238842
- ` frodo.${GREEN}${k2}${RESET}${countSuffix ? ` ${DIM}${countSuffix}${RESET}` : ""}`
238872
+ ` frodo.${GREEN}${k2}${RESET2}${countSuffix ? ` ${DIM2}${countSuffix}${RESET2}` : ""}`
238843
238873
  );
238844
238874
  }
238845
238875
  }
238846
238876
  if (sortedFns.length > 0) {
238847
238877
  console.log("");
238848
- console.log(`${BOLD}Factory helpers:${RESET}`);
238878
+ console.log(`${BOLD}Factory helpers:${RESET2}`);
238849
238879
  for (const fn of sortedFns) {
238850
238880
  const docs = idx.get(fn);
238851
- const sigHint = _optionalChain([docs, 'optionalAccess', _582 => _582.length]) ? ` ${DIM}${docs[0].signature}${RESET}` : "";
238852
- console.log(` frodo.${GREEN}${fn}${RESET}${sigHint}`);
238881
+ const sigHint = _optionalChain([docs, 'optionalAccess', _582 => _582.length]) ? ` ${DIM2}${docs[0].signature}${RESET2}` : "";
238882
+ console.log(` frodo.${GREEN}${fn}${RESET2}${sigHint}`);
238853
238883
  }
238854
238884
  }
238855
238885
  return;
@@ -238860,7 +238890,7 @@ function createHelpContext(frodoInstance) {
238860
238890
  const matches = idx.get(methodName);
238861
238891
  if (!matches || matches.length === 0) {
238862
238892
  console.log(
238863
- `${YELLOW}No documentation found for "${methodName}".${RESET}`
238893
+ `${YELLOW}No documentation found for "${methodName}".${RESET2}`
238864
238894
  );
238865
238895
  return;
238866
238896
  }
@@ -238874,20 +238904,20 @@ function createHelpContext(frodoInstance) {
238874
238904
  const fnName = target.name;
238875
238905
  if (!fnName) {
238876
238906
  console.log(
238877
- `${YELLOW}Cannot determine function name from this reference.${RESET}`
238907
+ `${YELLOW}Cannot determine function name from this reference.${RESET2}`
238878
238908
  );
238879
238909
  return;
238880
238910
  }
238881
238911
  const matches = idx.get(fnName);
238882
238912
  if (!matches || matches.length === 0) {
238883
- console.log(`${YELLOW}No documentation found for "${fnName}".${RESET}`);
238913
+ console.log(`${YELLOW}No documentation found for "${fnName}".${RESET2}`);
238884
238914
  return;
238885
238915
  }
238886
238916
  if (matches.length === 1) {
238887
238917
  console.log(formatMethodDoc(matches[0], true));
238888
238918
  } else {
238889
238919
  console.log(
238890
- `${YELLOW}Found "${fnName}" in ${matches.length} module types:${RESET}`
238920
+ `${YELLOW}Found "${fnName}" in ${matches.length} module types:${RESET2}`
238891
238921
  );
238892
238922
  for (const doc of matches) {
238893
238923
  console.log("");
@@ -238908,13 +238938,13 @@ function createHelpContext(frodoInstance) {
238908
238938
  ""
238909
238939
  )]) || "Module";
238910
238940
  console.log(
238911
- `${BOLD}${CYAN}${moduleType}${formatCountLabel(methodCount, subModuleCount)}${RESET}`
238941
+ `${BOLD}${CYAN2}${moduleType}${formatCountLabel(methodCount, subModuleCount)}${RESET2}`
238912
238942
  );
238913
238943
  console.log("");
238914
238944
  if (sortedMethods.length === 0) {
238915
238945
  if (sortedSubMods.length > 0) {
238916
238946
  console.log(
238917
- `${BOLD}Modules (${subModuleCount} ${subModuleCount === 1 ? "module" : "modules"}):${RESET}`
238947
+ `${BOLD}Modules (${subModuleCount} ${subModuleCount === 1 ? "module" : "modules"}):${RESET2}`
238918
238948
  );
238919
238949
  for (const subModule of sortedSubMods) {
238920
238950
  const subModuleObj = target[subModule];
@@ -238922,15 +238952,15 @@ function createHelpContext(frodoInstance) {
238922
238952
  const nestedSubMods = typeof subModuleObj === "object" && subModuleObj !== null ? getSubModuleNames(subModuleObj).length : 0;
238923
238953
  const countSuffix = formatCountSuffix(subMethods, nestedSubMods);
238924
238954
  console.log(
238925
- ` ${GREEN}${subModule}${RESET}${countSuffix ? ` ${DIM}${countSuffix}${RESET}` : ""}`
238955
+ ` ${GREEN}${subModule}${RESET2}${countSuffix ? ` ${DIM2}${countSuffix}${RESET2}` : ""}`
238926
238956
  );
238927
238957
  }
238928
238958
  const subModPath = _nullishCoalesce(findModulePath(frodoInstance, target), () => ( "frodo.X"));
238929
238959
  console.log(
238930
- `Use ${GREEN}help(${subModPath}.<module>)${RESET} to explore further.`
238960
+ `Use ${GREEN}help(${subModPath}.<module>)${RESET2} to explore further.`
238931
238961
  );
238932
238962
  } else {
238933
- console.log(`${YELLOW}No methods found on this object.${RESET}`);
238963
+ console.log(`${YELLOW}No methods found on this object.${RESET2}`);
238934
238964
  }
238935
238965
  return;
238936
238966
  }
@@ -238950,7 +238980,7 @@ function createHelpContext(frodoInstance) {
238950
238980
  }
238951
238981
  if (sortedSubMods.length > 0) {
238952
238982
  console.log(
238953
- `${BOLD}Modules (${subModuleCount} ${subModuleCount === 1 ? "module" : "modules"}):${RESET}`
238983
+ `${BOLD}Modules (${subModuleCount} ${subModuleCount === 1 ? "module" : "modules"}):${RESET2}`
238954
238984
  );
238955
238985
  for (const subModule of sortedSubMods) {
238956
238986
  const subModuleObj = target[subModule];
@@ -238958,13 +238988,13 @@ function createHelpContext(frodoInstance) {
238958
238988
  const nestedSubMods = typeof subModuleObj === "object" && subModuleObj !== null ? getSubModuleNames(subModuleObj).length : 0;
238959
238989
  const countSuffix = formatCountSuffix(subMethods, nestedSubMods);
238960
238990
  console.log(
238961
- ` ${GREEN}${subModule}${RESET}${countSuffix ? ` ${DIM}${countSuffix}${RESET}` : ""}`
238991
+ ` ${GREEN}${subModule}${RESET2}${countSuffix ? ` ${DIM2}${countSuffix}${RESET2}` : ""}`
238962
238992
  );
238963
238993
  }
238964
238994
  console.log("");
238965
238995
  }
238966
238996
  console.log(
238967
- `${BOLD}${CYAN}${bestType || moduleType}${formatCountLabel(methodCount, subModuleCount)}:${RESET}`
238997
+ `${BOLD}${CYAN2}${bestType || moduleType}${formatCountLabel(methodCount, subModuleCount)}:${RESET2}`
238968
238998
  );
238969
238999
  console.log("");
238970
239000
  for (const methodName of sortedMethods) {
@@ -238972,24 +239002,24 @@ function createHelpContext(frodoInstance) {
238972
239002
  const doc = _nullishCoalesce(_optionalChain([docs, 'optionalAccess', _586 => _586.find, 'call', _587 => _587((d3) => d3.typeName === bestType)]), () => ( _optionalChain([docs, 'optionalAccess', _588 => _588[0]])));
238973
239003
  if (doc) {
238974
239004
  const sig = doc.signature.length > 100 ? doc.signature.slice(0, 97) + "..." : doc.signature;
238975
- console.log(` ${YELLOW}${sig}${RESET}`);
239005
+ console.log(` ${YELLOW}${sig}${RESET2}`);
238976
239006
  if (doc.description) {
238977
239007
  const desc = doc.description.length > 110 ? doc.description.slice(0, 107) + "..." : doc.description;
238978
- console.log(` ${DIM}${desc}${RESET}`);
239008
+ console.log(` ${DIM2}${desc}${RESET2}`);
238979
239009
  }
238980
239010
  } else {
238981
- console.log(` ${YELLOW}${methodName}(...)${RESET}`);
239011
+ console.log(` ${YELLOW}${methodName}(...)${RESET2}`);
238982
239012
  }
238983
239013
  console.log("");
238984
239014
  }
238985
239015
  const modPath = _nullishCoalesce(findModulePath(frodoInstance, target), () => ( "frodo.X"));
238986
239016
  console.log(
238987
- `Tip: ${GREEN}help(${modPath}.<method name>)${RESET} shows full parameter documentation.`
239017
+ `Tip: ${GREEN}help(${modPath}.<method name>)${RESET2} shows full parameter documentation.`
238988
239018
  );
238989
239019
  return;
238990
239020
  }
238991
239021
  console.log(
238992
- `${YELLOW}Usage: help() | help(frodo.<module>) | help(frodo.<module>.<method name>) | help("methodName")${RESET}`
239022
+ `${YELLOW}Usage: help() | help(frodo.<module>) | help(frodo.<module>.<method name>) | help("methodName")${RESET2}`
238993
239023
  );
238994
239024
  }
238995
239025
  return { help };
@@ -239079,14 +239109,17 @@ var ShellHistory = class {
239079
239109
  // src/cli/shell/shell.ts
239080
239110
  function printHintAbovePrompt(replServer, hint) {
239081
239111
  if (!replServer) return;
239082
- if (process.stdout.isTTY) {
239083
- _readline2.default.clearLine(process.stdout, 0);
239084
- _readline2.default.cursorTo(process.stdout, 0);
239085
- }
239086
- process.stdout.write(`
239112
+ setImmediate(() => {
239113
+ process.stdout.write(`
239087
239114
  ${hint}
239088
239115
  `);
239089
- replServer.displayPrompt(true);
239116
+ const refreshLine = replServer._refreshLine;
239117
+ if (typeof refreshLine === "function") {
239118
+ refreshLine.call(replServer);
239119
+ return;
239120
+ }
239121
+ replServer.displayPrompt(true);
239122
+ });
239090
239123
  }
239091
239124
  async function startRepl(allowAwait = false, host) {
239092
239125
  const docsByMethod = buildDocsByMethod(frodo);
@@ -239171,46 +239204,74 @@ async function startRepl(allowAwait = false, host) {
239171
239204
  help: "Show this help (frodo context + dot-commands)",
239172
239205
  action() {
239173
239206
  const BOLD2 = "\x1B[1m";
239174
- const RESET2 = "\x1B[0m";
239175
- const CYAN2 = "\x1B[36m";
239207
+ const RESET3 = "\x1B[0m";
239208
+ const CYAN3 = "\x1B[36m";
239176
239209
  const GREEN2 = "\x1B[32m";
239177
- const DIM2 = "\x1B[2m";
239178
- console.log(`${BOLD2}${CYAN2}Frodo Interactive Shell${RESET2}`);
239210
+ const DIM3 = "\x1B[2m";
239211
+ console.log(`${BOLD2}${CYAN3}Frodo Interactive Shell${RESET3}`);
239179
239212
  console.log("");
239180
- console.log(`${BOLD2}Explore the Frodo API:${RESET2}`);
239213
+ console.log(`${BOLD2}Explore the Frodo API:${RESET3}`);
239181
239214
  console.log(
239182
- ` ${GREEN2}help()${RESET2} ${DIM2}browse all modules and methods${RESET2}`
239215
+ ` ${GREEN2}help()${RESET3} ${DIM3}browse all modules and methods${RESET3}`
239183
239216
  );
239184
239217
  console.log(
239185
- ` ${GREEN2}help(frodo.<module>)${RESET2} ${DIM2}list all methods in module X${RESET2}`
239218
+ ` ${GREEN2}help(frodo.<module>)${RESET3} ${DIM3}list all methods in module X${RESET3}`
239186
239219
  );
239187
239220
  console.log(
239188
- ` ${GREEN2}help(frodo.<module>.<method>)${RESET2} ${DIM2}show full signature and docs${RESET2}`
239221
+ ` ${GREEN2}help(frodo.<module>.<method>)${RESET3} ${DIM3}show full signature and docs${RESET3}`
239189
239222
  );
239190
239223
  console.log(
239191
- ` ${GREEN2}help("methodName")${RESET2} ${DIM2}search for a method across all modules${RESET2}`
239224
+ ` ${GREEN2}help("methodName")${RESET3} ${DIM3}search for a method across all modules${RESET3}`
239192
239225
  );
239193
239226
  console.log("");
239194
- console.log(`${BOLD2}Sample commands:${RESET2}`);
239227
+ console.log(`${BOLD2}Sample commands:${RESET3}`);
239195
239228
  console.log(
239196
- ` ${GREEN2}frodo.info.getInfo()${RESET2} ${DIM2}print info about the connected environment${RESET2}`
239229
+ ` ${GREEN2}frodo.info.getInfo()${RESET3} ${DIM3}print info about the connected environment${RESET3}`
239197
239230
  );
239198
239231
  console.log(
239199
- ` ${GREEN2}frodo.login.getTokens()${RESET2} ${DIM2}get fresh or cached tokens${RESET2}`
239232
+ ` ${GREEN2}frodo.login.getTokens()${RESET3} ${DIM3}get fresh or cached tokens${RESET3}`
239200
239233
  );
239201
239234
  console.log(
239202
- ` ${GREEN2}frodo${RESET2} ${DIM2}show a hierarchy of all Frodo Library commands${RESET2}`
239235
+ ` ${GREEN2}frodo${RESET3} ${DIM3}show a hierarchy of all Frodo Library commands${RESET3}`
239203
239236
  );
239204
239237
  console.log("");
239205
- console.log(`${BOLD2}Shell dot-commands:${RESET2}`);
239238
+ console.log(`${BOLD2}Shell dot-commands:${RESET3}`);
239206
239239
  const commands = replServer.commands;
239207
239240
  for (const name of Object.keys(commands).sort()) {
239208
239241
  const helpText = _nullishCoalesce(_optionalChain([commands, 'access', _589 => _589[name], 'optionalAccess', _590 => _590.help]), () => ( ""));
239209
- console.log(` ${GREEN2}.${name}${RESET2} ${DIM2}${helpText}${RESET2}`);
239242
+ console.log(` ${GREEN2}.${name}${RESET3} ${DIM3}${helpText}${RESET3}`);
239210
239243
  }
239211
239244
  this.displayPrompt();
239212
239245
  }
239213
239246
  });
239247
+ let historyNavigationActive = false;
239248
+ process.stdin.on("keypress", (_char, key) => {
239249
+ const rl = replServer;
239250
+ const currentHistIdx = _nullishCoalesce(rl["_historyIndex"], () => ( -1));
239251
+ if (_optionalChain([key, 'optionalAccess', _591 => _591.name]) === "down" && !historyNavigationActive && currentHistIdx === -1) {
239252
+ const currentLine = _nullishCoalesce(replServer.line, () => ( ""));
239253
+ if (currentLine.trim().length > 0) {
239254
+ const replHistory = _nullishCoalesce(rl["history"], () => ( []));
239255
+ if (replHistory[0] !== currentLine) {
239256
+ replHistory.unshift(currentLine);
239257
+ shellHistory.addLine(currentLine);
239258
+ }
239259
+ replServer.write(null, { ctrl: true, name: "e" });
239260
+ replServer.write(null, { ctrl: true, name: "u" });
239261
+ }
239262
+ }
239263
+ if (_optionalChain([key, 'optionalAccess', _592 => _592.name]) === "up" || _optionalChain([key, 'optionalAccess', _593 => _593.name]) === "down") {
239264
+ historyNavigationActive = true;
239265
+ return;
239266
+ }
239267
+ if (_optionalChain([key, 'optionalAccess', _594 => _594.name]) === "return" || _optionalChain([key, 'optionalAccess', _595 => _595.name]) === "enter") {
239268
+ historyNavigationActive = false;
239269
+ return;
239270
+ }
239271
+ if (_optionalChain([key, 'optionalAccess', _596 => _596.ctrl]) || _optionalChain([key, 'optionalAccess', _597 => _597.meta]) || typeof _optionalChain([key, 'optionalAccess', _598 => _598.name]) === "string") {
239272
+ historyNavigationActive = false;
239273
+ }
239274
+ });
239214
239275
  replServer.on("line", (line) => {
239215
239276
  shellHistory.addLine(line);
239216
239277
  });
@@ -239613,7 +239674,7 @@ var compareVersions = (v12, v2) => {
239613
239674
  // package.json
239614
239675
  var package_default2 = {
239615
239676
  name: "@rockcarver/frodo-cli",
239616
- version: "4.0.0-25",
239677
+ version: "4.0.0-27",
239617
239678
  type: "module",
239618
239679
  description: "A command line interface to manage ForgeRock Identity Cloud tenants, ForgeOps deployments, and classic deployments.",
239619
239680
  keywords: [