confluence-cli 2.0.1 → 2.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -496,14 +496,23 @@ class ConfluenceClient {
496
496
  return { html, userMap: new Map() };
497
497
  }
498
498
 
499
- // Fetch user info for all keys in parallel
500
- const userPromises = Array.from(userKeys).map(key => this.getUserByKey(key));
501
- const users = await Promise.all(userPromises);
499
+ // Fetch user info for all keys in parallel; isolate per-key failures so a
500
+ // single rejection doesn't drop display names for the rest of the page.
501
+ const keysArray = Array.from(userKeys);
502
+ const results = await Promise.allSettled(
503
+ keysArray.map(key => this.getUserByKey(key))
504
+ );
502
505
 
503
- // Build userkey -> displayName map
506
+ // Build userkey -> displayName map. On rejection, fall back to the raw
507
+ // userkey (mirrors getUserByKey's own caught-error fallback).
504
508
  const userMap = new Map();
505
- users.forEach(user => {
506
- userMap.set(user.key, user.displayName);
509
+ results.forEach((result, i) => {
510
+ const key = keysArray[i];
511
+ if (result.status === 'fulfilled') {
512
+ userMap.set(result.value.key, result.value.displayName);
513
+ } else {
514
+ userMap.set(key, key);
515
+ }
507
516
  });
508
517
 
509
518
  // Replace userkey references with display names in HTML
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "confluence-cli",
3
- "version": "2.0.1",
3
+ "version": "2.0.2",
4
4
  "lockfileVersion": 3,
5
5
  "requires": true,
6
6
  "packages": {
7
7
  "": {
8
8
  "name": "confluence-cli",
9
- "version": "2.0.1",
9
+ "version": "2.0.2",
10
10
  "license": "MIT",
11
11
  "dependencies": {
12
12
  "axios": "^1.15.0",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "confluence-cli",
3
- "version": "2.0.1",
3
+ "version": "2.0.2",
4
4
  "description": "A command-line interface for Atlassian Confluence with page creation and editing capabilities",
5
5
  "main": "index.js",
6
6
  "bin": {