confluence-cli 1.29.0 → 1.30.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.
@@ -136,6 +136,26 @@ class ConfluenceClient {
136
136
  return prettyMatch[1];
137
137
  }
138
138
 
139
+ // Handle tiny links (/wiki/x/<code>)
140
+ const tinyLinkMatch = pageIdOrUrl.match(/\/wiki\/x\/([A-Za-z0-9_-]+)/);
141
+ if (tinyLinkMatch) {
142
+ try {
143
+ const response = await this.client.get(pageIdOrUrl, {
144
+ maxRedirects: 0,
145
+ validateStatus: (status) => status >= 300 && status < 400
146
+ });
147
+ const redirectUrl = response.headers.location;
148
+ if (redirectUrl) {
149
+ return this.extractPageId(redirectUrl);
150
+ }
151
+ } catch (error) {
152
+ if (error.response && error.response.headers && error.response.headers.location) {
153
+ return this.extractPageId(error.response.headers.location);
154
+ }
155
+ }
156
+ throw new Error(`Could not resolve page ID from tiny link: ${pageIdOrUrl}`);
157
+ }
158
+
139
159
  // Handle display URLs - search by space and title
140
160
  const displayMatch = pageIdOrUrl.match(/\/display\/([^/]+)\/(.+)/);
141
161
  if (displayMatch) {
@@ -1,15 +1,15 @@
1
1
  {
2
2
  "name": "confluence-cli",
3
- "version": "1.29.0",
3
+ "version": "1.30.0",
4
4
  "lockfileVersion": 3,
5
5
  "requires": true,
6
6
  "packages": {
7
7
  "": {
8
8
  "name": "confluence-cli",
9
- "version": "1.29.0",
9
+ "version": "1.30.0",
10
10
  "license": "MIT",
11
11
  "dependencies": {
12
- "axios": "^1.12.0",
12
+ "axios": "^1.15.0",
13
13
  "chalk": "^4.1.2",
14
14
  "commander": "^11.1.0",
15
15
  "form-data": "^4.0.5",
@@ -1503,14 +1503,14 @@
1503
1503
  "license": "MIT"
1504
1504
  },
1505
1505
  "node_modules/axios": {
1506
- "version": "1.13.5",
1507
- "resolved": "https://registry.npmjs.org/axios/-/axios-1.13.5.tgz",
1508
- "integrity": "sha512-cz4ur7Vb0xS4/KUN0tPWe44eqxrIu31me+fbang3ijiNscE129POzipJJA6zniq2C/Z6sJCjMimjS8Lc/GAs8Q==",
1506
+ "version": "1.15.0",
1507
+ "resolved": "https://registry.npmjs.org/axios/-/axios-1.15.0.tgz",
1508
+ "integrity": "sha512-wWyJDlAatxk30ZJer+GeCWS209sA42X+N5jU2jy6oHTp7ufw8uzUTVFBX9+wTfAlhiJXGS0Bq7X6efruWjuK9Q==",
1509
1509
  "license": "MIT",
1510
1510
  "dependencies": {
1511
1511
  "follow-redirects": "^1.15.11",
1512
1512
  "form-data": "^4.0.5",
1513
- "proxy-from-env": "^1.1.0"
1513
+ "proxy-from-env": "^2.1.0"
1514
1514
  }
1515
1515
  },
1516
1516
  "node_modules/axios-mock-adapter": {
@@ -4691,10 +4691,13 @@
4691
4691
  }
4692
4692
  },
4693
4693
  "node_modules/proxy-from-env": {
4694
- "version": "1.1.0",
4695
- "resolved": "https://registry.npmjs.org/proxy-from-env/-/proxy-from-env-1.1.0.tgz",
4696
- "integrity": "sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg==",
4697
- "license": "MIT"
4694
+ "version": "2.1.0",
4695
+ "resolved": "https://registry.npmjs.org/proxy-from-env/-/proxy-from-env-2.1.0.tgz",
4696
+ "integrity": "sha512-cJ+oHTW1VAEa8cJslgmUZrc+sjRKgAKl3Zyse6+PV38hZe/V6Z14TbCuXcan9F9ghlz4QrFr2c92TNF82UkYHA==",
4697
+ "license": "MIT",
4698
+ "engines": {
4699
+ "node": ">=10"
4700
+ }
4698
4701
  },
4699
4702
  "node_modules/punycode": {
4700
4703
  "version": "2.3.1",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "confluence-cli",
3
- "version": "1.29.0",
3
+ "version": "1.30.0",
4
4
  "description": "A command-line interface for Atlassian Confluence with page creation and editing capabilities",
5
5
  "main": "index.js",
6
6
  "bin": {
@@ -23,7 +23,7 @@
23
23
  "author": "pchuri",
24
24
  "license": "MIT",
25
25
  "dependencies": {
26
- "axios": "^1.12.0",
26
+ "axios": "^1.15.0",
27
27
  "chalk": "^4.1.2",
28
28
  "commander": "^11.1.0",
29
29
  "form-data": "^4.0.5",