@oneaddress/setup 2.7.0 → 2.8.0

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/index.js +183 -44
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -856,7 +856,7 @@ var _R = ["\u2588\u2588\u2588\u2588\u2588\u2588 ", "\u2588\u2588 \u2588\u2588"
856
856
  var _S = [" \u2588\u2588\u2588\u2588\u2588\u2588", "\u2588\u2588 ", "\u2588\u2588 ", " \u2588\u2588\u2588\u2588\u2588 ", " \u2588\u2588", " \u2588\u2588", "\u2588\u2588\u2588\u2588\u2588\u2588 "];
857
857
  var ONE_ROWS = Array.from({ length: 7 }, (_3, i) => [_O[i], _N[i], _E[i]].join(" "));
858
858
  var ADDR_ROWS = Array.from({ length: 7 }, (_3, i) => [_A[i], _D2[i], _D2[i], _R[i], _E[i], _S[i], _S[i]].join(" "));
859
- var WIZARD_VERSION = true ? "2.7.0" : "?";
859
+ var WIZARD_VERSION = true ? "2.8.0" : "?";
860
860
  function printCompactHeader() {
861
861
  const INNER = 42;
862
862
  const TOP = fn("\u250C") + dm("\u2500".repeat(INNER)) + fn("\u2510");
@@ -1023,9 +1023,30 @@ data.db-shm
1023
1023
  content: `{
1024
1024
  "//": "YOUR CUSTOMER ROSTER \u2014 edit this file to your customers (account number, name, and the address you hold on file today). src/store.ts seeds from here on startup; point loadRoster at your real customer database when you outgrow the file. Override the path with the ONEADDRESS_CUSTOMERS env var.",
1025
1025
  "customers": [
1026
- { "account_number": "AUR-583920", "name": "Tim Hooper", "address": { "street": "12 Old Mill Road", "suburb": "Parramatta", "state": "NSW", "postcode": "2150" } },
1027
- { "account_number": "AUR-104772", "name": "Olivia Robinson", "address": { "street": "5 Rosewood Lane", "suburb": "Brisbane", "state": "QLD", "postcode": "4000" } },
1028
- { "account_number": "AUR-296815", "name": "Marcus Chen", "address": { "street": "31 Goldfield Drive", "suburb": "Richmond", "state": "VIC", "postcode": "3121" } }
1026
+ { "account_number": "AUR-583920", "name": "Tim Hooper", "address": { "street": "12 Old Mill Road", "suburb": "Parramatta", "state": "NSW", "postcode": "2150" } },
1027
+ { "account_number": "AUR-104772", "name": "Olivia Robinson", "address": { "street": "5 Rosewood Lane", "suburb": "Brisbane", "state": "QLD", "postcode": "4000" } },
1028
+ { "account_number": "AUR-296815", "name": "Marcus Chen", "address": { "street": "31 Goldfield Drive", "suburb": "Richmond", "state": "VIC", "postcode": "3121" } },
1029
+ { "account_number": "AUR-337401", "name": "Priya Raghavan", "address": { "street": "8 Kurrajong Street", "suburb": "Newtown", "state": "NSW", "postcode": "2042" } },
1030
+ { "account_number": "AUR-418266", "name": "Daniel O'Sullivan", "address": { "street": "204/19 Marine Parade", "suburb": "Glenelg", "state": "SA", "postcode": "5045" } },
1031
+ { "account_number": "AUR-452093", "name": "Amara Okafor", "address": { "street": "77 Beaufort Street", "suburb": "Mount Lawley", "state": "WA", "postcode": "6050" } },
1032
+ { "account_number": "AUR-509118", "name": "Hannah Whitlock", "address": { "street": "3 Tasman Close", "suburb": "Sandy Bay", "state": "TAS", "postcode": "7005" } },
1033
+ { "account_number": "AUR-563740", "name": "Joshua Nguyen", "address": { "street": "145 Given Terrace", "suburb": "Paddington", "state": "QLD", "postcode": "4064" } },
1034
+ { "account_number": "AUR-617205", "name": "Isabella Moretti", "address": { "street": "62 Lygon Street", "suburb": "Carlton", "state": "VIC", "postcode": "3053" } },
1035
+ { "account_number": "AUR-668931", "name": "Samuel Achterberg", "address": { "street": "11 Hutt Street", "suburb": "Adelaide", "state": "SA", "postcode": "5000" } },
1036
+ { "account_number": "AUR-702884", "name": "Grace Tupou", "address": { "street": "9 Kingsford Smith Way", "suburb": "Belconnen", "state": "ACT", "postcode": "2617" } },
1037
+ { "account_number": "AUR-745160", "name": "Ethan Marsh", "address": { "street": "38 Smith Street", "suburb": "Darwin City", "state": "NT", "postcode": "0800" } },
1038
+ { "account_number": "AUR-781422", "name": "Chloe Bennett", "address": { "street": "26 Rundle Street", "suburb": "Kent Town", "state": "SA", "postcode": "5067" } },
1039
+ { "account_number": "AUR-816559", "name": "Liam Fitzgerald", "address": { "street": "410/88 Queen Street", "suburb": "Melbourne", "state": "VIC", "postcode": "3000" } },
1040
+ { "account_number": "AUR-849073", "name": "Sofia Delgado", "address": { "street": "17 Cavill Avenue", "suburb": "Surfers Paradise", "state": "QLD", "postcode": "4217" } },
1041
+ { "account_number": "AUR-873318", "name": "Noah Kirkwood", "address": { "street": "54 Hunter Street", "suburb": "Newcastle", "state": "NSW", "postcode": "2300" } },
1042
+ { "account_number": "AUR-905642", "name": "Mei Lin Tan", "address": { "street": "2/33 Rokeby Road", "suburb": "Subiaco", "state": "WA", "postcode": "6008" } },
1043
+ { "account_number": "AUR-938177", "name": "Jack Rasmussen", "address": { "street": "6 Elizabeth Street", "suburb": "Launceston", "state": "TAS", "postcode": "7250" } },
1044
+ { "account_number": "AUR-960845", "name": "Aaliyah Bennett", "address": { "street": "82 Charles Street", "suburb": "Northcote", "state": "VIC", "postcode": "3070" } },
1045
+ { "account_number": "AUR-984312", "name": "Oscar Petrov", "address": { "street": "19 Macquarie Street", "suburb": "Hobart", "state": "TAS", "postcode": "7000" } },
1046
+ { "account_number": "AUR-991026", "name": "Ruby Anderson", "address": { "street": "301/5 Cordelia Street", "suburb": "South Brisbane", "state": "QLD", "postcode": "4101" } },
1047
+ { "account_number": "AUR-995518", "name": "Henry Abebe", "address": { "street": "14 Wakefield Street", "suburb": "Kent Town", "state": "SA", "postcode": "5067" } },
1048
+ { "account_number": "AUR-997430", "name": "Zoe Castellano", "address": { "street": "67 Bay Street", "suburb": "Port Melbourne", "state": "VIC", "postcode": "3207" } },
1049
+ { "account_number": "AUR-999201", "name": "Felix Nakamura", "address": { "street": "23 Anzac Parade", "suburb": "Kensington", "state": "NSW", "postcode": "2033" } }
1029
1050
  ]
1030
1051
  }
1031
1052
  `
@@ -5010,9 +5031,30 @@ type RosterEntry = { account_number: string; name: string; address: Address };
5010
5031
  // runs out of the box. The wizard writes customers.json with these same demo
5011
5032
  // customers \u2014 edit that file, not this list.
5012
5033
  const DEFAULT_ROSTER: RosterEntry[] = [
5013
- { account_number: 'AUR-583920', name: 'Tim Hooper', address: { street: '12 Old Mill Road', suburb: 'Parramatta', state: 'NSW', postcode: '2150' } },
5014
- { account_number: 'AUR-104772', name: 'Olivia Robinson', address: { street: '5 Rosewood Lane', suburb: 'Brisbane', state: 'QLD', postcode: '4000' } },
5015
- { account_number: 'AUR-296815', name: 'Marcus Chen', address: { street: '31 Goldfield Drive', suburb: 'Richmond', state: 'VIC', postcode: '3121' } },
5034
+ { account_number: 'AUR-583920', name: 'Tim Hooper', address: { street: '12 Old Mill Road', suburb: 'Parramatta', state: 'NSW', postcode: '2150' } },
5035
+ { account_number: 'AUR-104772', name: 'Olivia Robinson', address: { street: '5 Rosewood Lane', suburb: 'Brisbane', state: 'QLD', postcode: '4000' } },
5036
+ { account_number: 'AUR-296815', name: 'Marcus Chen', address: { street: '31 Goldfield Drive', suburb: 'Richmond', state: 'VIC', postcode: '3121' } },
5037
+ { account_number: 'AUR-337401', name: 'Priya Raghavan', address: { street: '8 Kurrajong Street', suburb: 'Newtown', state: 'NSW', postcode: '2042' } },
5038
+ { account_number: 'AUR-418266', name: 'Daniel O\\'Sullivan', address: { street: '204/19 Marine Parade', suburb: 'Glenelg', state: 'SA', postcode: '5045' } },
5039
+ { account_number: 'AUR-452093', name: 'Amara Okafor', address: { street: '77 Beaufort Street', suburb: 'Mount Lawley', state: 'WA', postcode: '6050' } },
5040
+ { account_number: 'AUR-509118', name: 'Hannah Whitlock', address: { street: '3 Tasman Close', suburb: 'Sandy Bay', state: 'TAS', postcode: '7005' } },
5041
+ { account_number: 'AUR-563740', name: 'Joshua Nguyen', address: { street: '145 Given Terrace', suburb: 'Paddington', state: 'QLD', postcode: '4064' } },
5042
+ { account_number: 'AUR-617205', name: 'Isabella Moretti', address: { street: '62 Lygon Street', suburb: 'Carlton', state: 'VIC', postcode: '3053' } },
5043
+ { account_number: 'AUR-668931', name: 'Samuel Achterberg', address: { street: '11 Hutt Street', suburb: 'Adelaide', state: 'SA', postcode: '5000' } },
5044
+ { account_number: 'AUR-702884', name: 'Grace Tupou', address: { street: '9 Kingsford Smith Way', suburb: 'Belconnen', state: 'ACT', postcode: '2617' } },
5045
+ { account_number: 'AUR-745160', name: 'Ethan Marsh', address: { street: '38 Smith Street', suburb: 'Darwin City', state: 'NT', postcode: '0800' } },
5046
+ { account_number: 'AUR-781422', name: 'Chloe Bennett', address: { street: '26 Rundle Street', suburb: 'Kent Town', state: 'SA', postcode: '5067' } },
5047
+ { account_number: 'AUR-816559', name: 'Liam Fitzgerald', address: { street: '410/88 Queen Street', suburb: 'Melbourne', state: 'VIC', postcode: '3000' } },
5048
+ { account_number: 'AUR-849073', name: 'Sofia Delgado', address: { street: '17 Cavill Avenue', suburb: 'Surfers Paradise', state: 'QLD', postcode: '4217' } },
5049
+ { account_number: 'AUR-873318', name: 'Noah Kirkwood', address: { street: '54 Hunter Street', suburb: 'Newcastle', state: 'NSW', postcode: '2300' } },
5050
+ { account_number: 'AUR-905642', name: 'Mei Lin Tan', address: { street: '2/33 Rokeby Road', suburb: 'Subiaco', state: 'WA', postcode: '6008' } },
5051
+ { account_number: 'AUR-938177', name: 'Jack Rasmussen', address: { street: '6 Elizabeth Street', suburb: 'Launceston', state: 'TAS', postcode: '7250' } },
5052
+ { account_number: 'AUR-960845', name: 'Aaliyah Bennett', address: { street: '82 Charles Street', suburb: 'Northcote', state: 'VIC', postcode: '3070' } },
5053
+ { account_number: 'AUR-984312', name: 'Oscar Petrov', address: { street: '19 Macquarie Street', suburb: 'Hobart', state: 'TAS', postcode: '7000' } },
5054
+ { account_number: 'AUR-991026', name: 'Ruby Anderson', address: { street: '301/5 Cordelia Street', suburb: 'South Brisbane', state: 'QLD', postcode: '4101' } },
5055
+ { account_number: 'AUR-995518', name: 'Henry Abebe', address: { street: '14 Wakefield Street', suburb: 'Kent Town', state: 'SA', postcode: '5067' } },
5056
+ { account_number: 'AUR-997430', name: 'Zoe Castellano', address: { street: '67 Bay Street', suburb: 'Port Melbourne', state: 'VIC', postcode: '3207' } },
5057
+ { account_number: 'AUR-999201', name: 'Felix Nakamura', address: { street: '23 Anzac Parade', suburb: 'Kensington', state: 'NSW', postcode: '2033' } },
5016
5058
  ];
5017
5059
 
5018
5060
  function loadRoster(): RosterEntry[] {
@@ -6608,19 +6650,35 @@ async function askPassword(): Promise<void> {
6608
6650
 
6609
6651
  type Store = typeof import('../src/store.js');
6610
6652
 
6611
- /** The roster, as display rows. */
6612
- function rosterRows(store: Store): string[] {
6613
- return store.allCustomers().map((c) => {
6614
- let addr: Record<string, string> | null = null;
6615
- try { addr = JSON.parse(c.address) as Record<string, string>; } catch { addr = null; }
6616
- return \` \${esc(c.account_number).padEnd(20)} \${esc(c.name).padEnd(24)} \${esc(fmt(addr))}\`;
6617
- });
6653
+ /**
6654
+ * Does this row answer the filter?
6655
+ *
6656
+ * NAME OR ACCOUNT NUMBER, because a partner checking whether a dispatch landed
6657
+ * knows the person either way round, and typing "hoop" is faster than finding
6658
+ * the account number to type it exactly.
6659
+ */
6660
+ function matches(query: string, name: string, account: string): boolean {
6661
+ if (!query) return true;
6662
+ const q = query.toLowerCase();
6663
+ return name.toLowerCase().includes(q) || account.toLowerCase().includes(q);
6664
+ }
6665
+
6666
+ /** The roster, as display rows, optionally filtered. */
6667
+ function rosterRows(store: Store, query: string): string[] {
6668
+ return store.allCustomers()
6669
+ .filter((c) => matches(query, c.name, c.account_number))
6670
+ .map((c) => {
6671
+ let addr: Record<string, string> | null = null;
6672
+ try { addr = JSON.parse(c.address) as Record<string, string>; } catch { addr = null; }
6673
+ return \` \${esc(c.account_number).padEnd(14)} \${esc(c.name).padEnd(20)} \${esc(fmt(addr))}\`;
6674
+ });
6618
6675
  }
6619
6676
 
6620
6677
  /** Applied changes, newest first, as display rows with both sides. */
6621
- function changeRows(store: Store, limit: number): string[] {
6678
+ function changeRows(store: Store, limit: number, query: string): string[] {
6622
6679
  const out: string[] = [];
6623
6680
  for (const h of store.addressHistory(limit)) {
6681
+ if (!matches(query, h.name, h.account_number)) continue;
6624
6682
  const prev = h.prev_address as unknown as Record<string, string> | null;
6625
6683
  const now = h.address as unknown as Record<string, string>;
6626
6684
  out.push(\` {\${DIM}-fg}\${esc(h.recorded_at)}{/} {\${CREAM}-fg}\${esc(h.account_number)}{/} \${esc(h.name)}\`);
@@ -6653,66 +6711,147 @@ function printOnce(store: Store, limit: number): void {
6653
6711
  console.log('');
6654
6712
  }
6655
6713
 
6656
- /** The live view: the mark, the roster, the changes, refreshed as they land. */
6714
+ /**
6715
+ * The live view: the mark, the roster, the changes, refreshed as they land.
6716
+ *
6717
+ * SEARCH IS THE REASON THIS IS NOT JUST A PRINT. A roster of three fits on a
6718
+ * screen and a realistic one does not, so "is my own record right" stopped
6719
+ * being answerable by looking. \`/\` filters both panels at once on name or
6720
+ * account number, because a partner checking a dispatch landed knows the person
6721
+ * either way round.
6722
+ */
6657
6723
  function stream(store: Store, limit: number): void {
6658
- const screen = blessed.screen({ smartCSR: true, title: 'What this receiver holds \u2014 OneAddress' });
6724
+ const screen = blessed.screen({
6725
+ smartCSR: true,
6726
+ title: 'What this receiver holds \u2014 OneAddress',
6727
+ fullUnicode: true,
6728
+ // WITHOUT THIS THE BRAND COMES OUT RED, and it came out red here for a
6729
+ // whole release because this is the SECOND blessed screen in the scaffold
6730
+ // and the fix lived only in the first. blessed resolves a hex colour
6731
+ // against the palette it infers from TERM, which Windows does not set, so
6732
+ // it assumes a tiny palette and snaps #e0a248 to the nearest thing it
6733
+ // believes exists. Naming the capability is telling it the truth.
6734
+ // \`scripts/__tests__\` pins that EVERY screen we open carries this.
6735
+ terminal: process.env.TERM || 'xterm-256color',
6736
+ });
6659
6737
 
6660
- // Same rule as the dashboard: the pixel wordmark needs 88 columns, and below
6661
- // that it wraps and reads as broken rather than as large.
6662
6738
  const wide = terminalFitsFullMark(Number(screen.width));
6663
- const markHeight = wide ? 9 : 3;
6739
+ // THE MARK, PLUS A LINE SAYING WHICH SCREEN THIS IS. The dashboard and this
6740
+ // viewer open with the same wordmark, so without a subheader a screenshot of
6741
+ // one is indistinguishable from the other - and they answer different
6742
+ // questions. The dashboard is "is it running"; this is "what does it hold".
6743
+ const markHeight = (wide ? 9 : 3) + 1;
6664
6744
  blessed.box({
6665
6745
  parent: screen, top: 0, left: 0, width: '100%', height: markHeight,
6666
6746
  tags: true, padding: { left: 2 },
6667
- content: wide
6747
+ content: (wide
6668
6748
  ? ONE_ROWS.map((row, i) => \`{\${CREAM}-fg}\${row}{/} {\${AMBER}-fg}\${ADDRESS_ROWS[i]}{/}\`).join('\\n')
6669
- : \`{\${CREAM}-fg}{bold}One{/bold}{/}{\${AMBER}-fg}{bold}Address{/bold}{/}\`,
6749
+ : \`{\${CREAM}-fg}{bold}One{/bold}{/}{\${AMBER}-fg}{bold}Address{/bold}{/}\`)
6750
+ + \`\\n{\${DIM}-fg}WHAT THIS RECEIVER HOLDS{/}\`,
6670
6751
  });
6671
6752
 
6753
+ // THE ROSTER IS BOUNDED AND SCROLLS. It used to size itself to its contents,
6754
+ // which was fine for three customers and pushes the changes panel off the
6755
+ // bottom of the screen for a realistic roster.
6756
+ const usable = Math.max(8, Number(screen.height) - markHeight - 1);
6757
+ const rosterHeight = Math.max(5, Math.min(Math.floor(usable * 0.45), usable - 5));
6758
+
6672
6759
  const rosterBox = blessed.box({
6673
- parent: screen, top: markHeight, left: 0, width: '100%', height: 'shrink',
6674
- tags: true, padding: { left: 1, right: 1 },
6760
+ parent: screen, top: markHeight, left: 0, width: '100%', height: rosterHeight,
6761
+ tags: true, padding: { left: 1, right: 1 }, scrollable: true, alwaysScroll: true,
6675
6762
  border: { type: 'line' }, style: { border: { fg: AMBER } },
6676
6763
  label: ' ON FILE ',
6677
6764
  });
6678
6765
 
6679
6766
  const changesBox = blessed.box({
6680
- parent: screen, top: markHeight + 3, left: 0, width: '100%', bottom: 1,
6767
+ parent: screen, top: markHeight + rosterHeight, left: 0, width: '100%', bottom: 1,
6681
6768
  tags: true, padding: { left: 1, right: 1 }, scrollable: true, alwaysScroll: true,
6682
6769
  border: { type: 'line' }, style: { border: { fg: AMBER } },
6683
6770
  label: ' APPLIED CHANGES \u2014 newest first ',
6684
6771
  });
6685
6772
 
6686
- blessed.box({
6773
+ const footer = blessed.box({
6687
6774
  parent: screen, bottom: 0, left: 0, width: '100%', height: 1,
6688
6775
  tags: true, padding: { left: 2 },
6689
- content: \`{\${DIM}-fg}live \u2014 updates as dispatches land{/} {\${CREAM}-fg}[q]{/} quit\`,
6690
6776
  });
6691
6777
 
6692
- // ONLY REDRAWN WHEN THE CONTENT CHANGES. A poll that repaints unconditionally
6693
- // makes an idle receiver flicker once a second and destroys any scrollback
6694
- // position the operator had.
6778
+ let query = '';
6695
6779
  let last = '';
6696
- const tick = (): void => {
6697
- const roster = rosterRows(store);
6698
- const changes = changeRows(store, limit);
6699
- const next = roster.join('\\n') + '\\u0000' + changes.join('\\n');
6700
- if (next === last) return;
6780
+
6781
+ const drawFooter = (): void => {
6782
+ footer.setContent(query
6783
+ ? \`{\${AMBER}-fg}filter: \${esc(query)}{/} {\${CREAM}-fg}[/]{/} change {\${CREAM}-fg}[esc]{/} clear {\${CREAM}-fg}[q]{/} quit\`
6784
+ : \`{\${DIM}-fg}live \u2014 updates as dispatches land{/} {\${CREAM}-fg}[/]{/} search {\${CREAM}-fg}[q]{/} quit\`);
6785
+ };
6786
+
6787
+ const tick = (force = false): void => {
6788
+ const all = rosterRows(store, '');
6789
+ const roster = rosterRows(store, query);
6790
+ const changes = changeRows(store, limit, query);
6791
+ const next = \`\${query}\\u0000\${roster.join('\\n')}\\u0000\${changes.join('\\n')}\`;
6792
+ if (next === last && !force) return;
6701
6793
  last = next;
6702
- rosterBox.height = roster.length + 2;
6703
- rosterBox.setContent(roster.join('\\n') || ' (nobody on file yet)');
6704
- changesBox.top = markHeight + roster.length + 2;
6705
- changesBox.setContent(changes.join('\\n') || ' None yet. Send a dispatch and this fills in.');
6794
+
6795
+ rosterBox.setLabel(query
6796
+ ? \` ON FILE \u2014 \${roster.length} of \${all.length} matching "\${esc(query)}" \`
6797
+ : \` ON FILE \u2014 \${all.length} \`);
6798
+ rosterBox.setContent(roster.join('\\n') ||
6799
+ (query ? \` Nobody matching "\${esc(query)}".\` : ' (nobody on file yet)'));
6800
+
6801
+ changesBox.setLabel(query
6802
+ ? \` APPLIED CHANGES \u2014 matching "\${esc(query)}", newest first \`
6803
+ : ' APPLIED CHANGES \u2014 newest first ');
6804
+ changesBox.setContent(changes.join('\\n') || (query
6805
+ ? \` No applied change for "\${esc(query)}" yet.\`
6806
+ : ' None yet. Send a dispatch and this fills in.'));
6807
+
6808
+ drawFooter();
6706
6809
  screen.render();
6707
6810
  };
6708
6811
 
6709
- screen.key(['q', 'C-c', 'escape'], () => { screen.destroy(); process.exit(0); });
6710
- tick();
6711
- screen.render();
6812
+ // \`/\` OPENS A LIVE FILTER. It filters as you type rather than on Enter,
6813
+ // because the question being asked is "is my record in here", and the answer
6814
+ // is usually visible three characters in.
6815
+ let searching = false;
6816
+ const openSearch = (): void => {
6817
+ searching = true;
6818
+ const box = blessed.textbox({
6819
+ parent: screen, bottom: 0, left: 0, width: '100%', height: 1,
6820
+ style: { fg: CREAM }, inputOnFocus: true, keys: true,
6821
+ });
6822
+ box.setValue(query);
6823
+ // The filter must update on every keystroke, and \`readInput\` only reports
6824
+ // the final value, so the live half is driven off keypress.
6825
+ box.on('keypress', () => {
6826
+ setImmediate(() => { query = String(box.getValue() ?? '').trim(); tick(); });
6827
+ });
6828
+ screen.render();
6829
+ box.readInput(() => {
6830
+ searching = false;
6831
+ query = String(box.getValue() ?? '').trim();
6832
+ box.destroy();
6833
+ tick(true);
6834
+ });
6835
+ };
6836
+
6837
+ screen.key(['/'], () => { if (!searching) openSearch(); });
6838
+ screen.key(['escape'], () => {
6839
+ if (searching) return;
6840
+ if (!query) return;
6841
+ query = '';
6842
+ tick(true);
6843
+ });
6844
+ screen.key(['q', 'C-c'], () => {
6845
+ if (searching) return;
6846
+ screen.destroy();
6847
+ process.exit(0);
6848
+ });
6849
+
6850
+ tick(true);
6712
6851
  // DELIBERATELY NOT unref'd. An unref'd timer does not hold the event loop
6713
6852
  // open, and with the screen drawn there is nothing else pending, so the
6714
6853
  // process would exit the instant it finished painting.
6715
- setInterval(tick, 1000);
6854
+ setInterval(() => tick(), 1000);
6716
6855
  }
6717
6856
 
6718
6857
  async function main(): Promise<void> {
@@ -12107,7 +12246,7 @@ async function scaffold(platform, outputDir, partnerId, webhookSecret, webhookUr
12107
12246
 
12108
12247
  // src/register.ts
12109
12248
  var import_node_crypto2 = require("crypto");
12110
- var PKG_VERSION = true ? "2.7.0" : "dev";
12249
+ var PKG_VERSION = true ? "2.8.0" : "dev";
12111
12250
  var REGISTER_URL = "https://partners.oneaddress.io/api/partner/installs";
12112
12251
  function hmacSha256(secret, message) {
12113
12252
  return (0, import_node_crypto2.createHmac)("sha256", secret).update(message).digest("hex");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@oneaddress/setup",
3
- "version": "2.7.0",
3
+ "version": "2.8.0",
4
4
  "description": "Interactive setup wizard for OneAddress partner webhook integrations",
5
5
  "main": "dist/index.js",
6
6
  "bin": {