confluence-cli 1.15.0 → 1.15.1

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
@@ -1,3 +1,10 @@
1
+ ## [1.15.1](https://github.com/pchuri/confluence-cli/compare/v1.15.0...v1.15.1) (2026-02-12)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * parse page ID from pretty URLs ([#34](https://github.com/pchuri/confluence-cli/issues/34)) ([6f22cd5](https://github.com/pchuri/confluence-cli/commit/6f22cd5424aec11a330a3cc7faf9cbeccb943168))
7
+
1
8
  # [1.15.0](https://github.com/pchuri/confluence-cli/compare/v1.14.0...v1.15.0) (2026-02-06)
2
9
 
3
10
 
@@ -61,7 +61,12 @@ class ConfluenceClient {
61
61
  if (pageIdMatch) {
62
62
  return pageIdMatch[1];
63
63
  }
64
-
64
+
65
+ const prettyMatch = pageIdOrUrl.match(/\/pages\/(\d+)(?:[/?#]|$)/);
66
+ if (prettyMatch) {
67
+ return prettyMatch[1];
68
+ }
69
+
65
70
  // Handle display URLs - search by space and title
66
71
  const displayMatch = pageIdOrUrl.match(/\/display\/([^/]+)\/(.+)/);
67
72
  if (displayMatch) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "confluence-cli",
3
- "version": "1.15.0",
3
+ "version": "1.15.1",
4
4
  "description": "A command-line interface for Atlassian Confluence with page creation and editing capabilities",
5
5
  "main": "index.js",
6
6
  "bin": {
@@ -74,6 +74,11 @@ describe('ConfluenceClient', () => {
74
74
  expect(await client.extractPageId(url + '?pageId=987654321')).toBe('987654321');
75
75
  });
76
76
 
77
+ test('should extract page ID from pretty URL path', async () => {
78
+ const url = 'https://test.atlassian.net/wiki/spaces/TEST/pages/123456789/Page+Title';
79
+ expect(await client.extractPageId(url)).toBe('123456789');
80
+ });
81
+
77
82
  test('should resolve display URLs', async () => {
78
83
  // Mock the API response for display URL resolution
79
84
  const mock = new MockAdapter(client.client);