@bestend/confluence-cli 1.16.0 → 2.0.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.
@@ -1,31 +0,0 @@
1
- ## Pull Request Template
2
-
3
- ### Description
4
- Brief description of what this PR does.
5
-
6
- ### Type of Change
7
- - [ ] Bug fix (non-breaking change which fixes an issue)
8
- - [ ] New feature (non-breaking change which adds functionality)
9
- - [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
10
- - [ ] Documentation update
11
- - [ ] Performance improvement
12
- - [ ] Code refactoring
13
-
14
- ### Testing
15
- - [ ] Tests pass locally with my changes
16
- - [ ] I have added tests that prove my fix is effective or that my feature works
17
- - [ ] New and existing unit tests pass locally with my changes
18
-
19
- ### Checklist
20
- - [ ] My code follows the style guidelines of this project
21
- - [ ] I have performed a self-review of my own code
22
- - [ ] I have commented my code, particularly in hard-to-understand areas
23
- - [ ] I have made corresponding changes to the documentation
24
- - [ ] My changes generate no new warnings
25
- - [ ] Any dependent changes have been merged and published in downstream modules
26
-
27
- ### Screenshots (if applicable)
28
- Add screenshots to help explain your changes.
29
-
30
- ### Additional Context
31
- Add any other context about the pull request here.
@@ -1,28 +0,0 @@
1
- name: CI
2
-
3
- on:
4
- push:
5
- branches: [ main, develop ]
6
- pull_request:
7
- branches: [ main ]
8
-
9
- jobs:
10
- test:
11
- runs-on: ubuntu-latest
12
-
13
- strategy:
14
- matrix:
15
- node-version: [18.x, 20.x]
16
-
17
- steps:
18
- - uses: actions/checkout@v4
19
-
20
- - name: Use Node.js ${{ matrix.node-version }}
21
- uses: actions/setup-node@v4
22
- with:
23
- node-version: ${{ matrix.node-version }}
24
- cache: 'npm'
25
-
26
- - run: npm ci
27
- - run: npm run lint
28
- - run: npm test
@@ -1,38 +0,0 @@
1
- name: Publish to npm
2
-
3
- on:
4
- push:
5
- tags:
6
- - 'v*' # e.g., v1.2.3
7
-
8
- jobs:
9
- publish:
10
- runs-on: ubuntu-latest
11
- permissions:
12
- contents: read
13
- id-token: write # required for npm trusted publishing (OIDC)
14
- steps:
15
- - uses: actions/checkout@v4
16
-
17
- - uses: actions/setup-node@v4
18
- with:
19
- node-version: '24.x'
20
- registry-url: 'https://registry.npmjs.org'
21
-
22
- - name: Set package version from tag (idempotent)
23
- run: |
24
- TAG="${GITHUB_REF_NAME#v}"
25
- PKG_VERSION=$(node -p "require('./package.json').version")
26
- if [ "$TAG" = "$PKG_VERSION" ]; then
27
- echo "package.json already at $PKG_VERSION (matches tag)"
28
- else
29
- echo "Setting package.json version to ${TAG}"
30
- npm pkg set version="${TAG}"
31
- npm install --package-lock-only
32
- fi
33
-
34
- - name: Install dependencies
35
- run: npm ci
36
-
37
- - name: Publish with provenance via OIDC
38
- run: npm publish --provenance --access public
package/.releaserc DELETED
@@ -1,17 +0,0 @@
1
- {
2
- "branches": ["main"],
3
- "plugins": [
4
- "@semantic-release/commit-analyzer",
5
- "@semantic-release/release-notes-generator",
6
- "@semantic-release/changelog",
7
- "@semantic-release/npm",
8
- "@semantic-release/github",
9
- [
10
- "@semantic-release/git",
11
- {
12
- "assets": ["package.json", "CHANGELOG.md"],
13
- "message": "chore(release): ${nextRelease.version} [skip ci]\n\n${nextRelease.notes}"
14
- }
15
- ]
16
- ]
17
- }
package/AGENTS.md DELETED
@@ -1,105 +0,0 @@
1
- # Confluence CLI — 프로젝트 가이드
2
-
3
- ## 아키텍처
4
-
5
- ```
6
- bin/
7
- index.js # 엔트리포인트 (Node 버전 체크 → confluence.js 로딩)
8
- confluence.js # Commander CLI 정의 (모든 커맨드 등록)
9
-
10
- lib/
11
- confluence-client.js # 핵심 클라이언트 (API 호출, 포맷 변환, 페이지 CRUD)
12
- config.js # 설정 로드 (~/.confluence-cli/config.json)
13
- analytics.js # 익명 사용 통계
14
-
15
- tests/
16
- confluence-client.test.js # Jest 단위 테스트
17
-
18
- .github/workflows/
19
- ci.yml # push/PR → lint + test (Node 18.x, 20.x)
20
- publish.yml # tag push (v*) → npm publish with OIDC provenance
21
- ```
22
-
23
- ## 코드 스타일
24
-
25
- - ESLint flat config (`eslint.config.js`)
26
- - 들여쓰기: 2칸 스페이스
27
- - 따옴표: 작은따옴표
28
- - 세미콜론: 필수
29
- - `no-unused-vars`: `_` 접두사 무시
30
-
31
- ## 핵심 변환 파이프라인
32
-
33
- ```
34
- Markdown → MarkdownIt.render() → HTML → htmlToConfluenceStorage() → Storage XML
35
- ```
36
-
37
- `htmlToConfluenceStorage()`는 MarkdownIt이 생성한 HTML 중 Confluence 전용 처리가 필요한 것만 변환:
38
- - `<li>` → `<li><p>...</p></li>` (Confluence 필수)
39
- - `<pre><code>` → `ac:structured-macro` code block with CDATA
40
- - `<blockquote>` → info/warning/note 매크로
41
- - `<th>`, `<td>` → `<p>` 래핑
42
- - `<hr>` → `<hr />` (self-closing)
43
-
44
- 나머지 HTML 태그(h1-h6, p, strong, em, ul, ol, table 등)는 이미 Confluence storage와 호환되므로 변환하지 않음.
45
-
46
- ## 버전 관리
47
-
48
- - `package.json`의 version은 직접 올리지 않아도 됨
49
- - publish.yml이 git tag에서 버전을 추출해서 package.json을 자동 맞춤
50
- - 단, 로컬 개발 시 혼동 방지를 위해 릴리스 전 맞춰두는 것을 권장
51
-
52
- ## 릴리스 절차
53
-
54
- ```bash
55
- # 1. 변경 커밋 (Conventional Commits)
56
- git add -A
57
- git commit -m "feat: add --parent option to create command"
58
-
59
- # 2. 태그 생성 (SemVer)
60
- git tag v1.16.0
61
-
62
- # 3. 푸시 (커밋 + 태그)
63
- git push origin main --follow-tags
64
- ```
65
-
66
- 태그 push 시 자동으로:
67
- 1. `ci.yml` → lint + test (push to main 트리거)
68
- 2. `publish.yml` → npm publish with OIDC provenance (tag 트리거)
69
-
70
- ### 버전 결정 기준
71
-
72
- | 변경 유형 | 예시 | 버전 |
73
- |-----------|------|------|
74
- | 새 명령어/옵션 추가 | `--parent` 옵션 | minor (x.Y.0) |
75
- | 버그 수정, 내부 정리 | no-op regex 제거 | patch (x.y.Z) |
76
- | 하위 호환 깨짐 | 명령어 인터페이스 변경 | major (X.0.0) |
77
-
78
- ### npm OIDC Trusted Publishing
79
-
80
- publish.yml은 `id-token: write` 권한으로 npm OIDC provenance를 사용.
81
- npm 토큰이 아닌 GitHub Actions OIDC로 인증하므로 시크릿 관리 불필요.
82
- Node.js 24.x (npm 11.5.1+) 필요.
83
-
84
- ## 테스트
85
-
86
- ```bash
87
- npm test # Jest 단위 테스트 (40개)
88
- npm run lint # ESLint
89
- ```
90
-
91
- 테스트는 `axios-mock-adapter`로 HTTP 모킹. 실제 Confluence 인스턴스 불필요.
92
-
93
- ## agent-rules 연동
94
-
95
- 이 CLI는 [mona/agent-rules](https://oss.navercorp.com/mona/agent-rules)의 `confluence-cli` 스킬로 사용됨:
96
- - 스킬 문서: `sources/skills/confluence-cli/SKILL.md`
97
- - 설치: `npm install -g @bestend/confluence-cli@latest`
98
-
99
- CLI 버전 릴리스 후 agent-rules의 SKILL.md `metadata.version`도 맞춰 업데이트할 것.
100
-
101
- ## 금지 사항
102
-
103
- - `htmlToConfluenceStorage()`에 no-op regex 추가 금지 (X→X 변환은 의미 없음)
104
- - 전역 entity unescape (`&lt;`→`<` 등) 금지 — code block 내부는 이미 별도 디코딩됨
105
- - OIDC publish 설정 변경 시 Node.js 24.x 이상 유지 필수
package/CHANGELOG.md DELETED
@@ -1,232 +0,0 @@
1
- # [1.15.0](https://github.com/pchuri/confluence-cli/compare/v1.14.0...v1.15.0) (2026-02-06)
2
-
3
-
4
- ### Features
5
-
6
- * Add CLI flags to confluence init for non-interactive setup ([#30](https://github.com/pchuri/confluence-cli/issues/30)) ([09b6b85](https://github.com/pchuri/confluence-cli/commit/09b6b85a243da5ab86eb61a1a2376a64ce6979c7))
7
-
8
- # [1.14.0](https://github.com/pchuri/confluence-cli/compare/v1.13.0...v1.14.0) (2026-02-03)
9
-
10
-
11
- ### Features
12
-
13
- * add comments support to CLI ([d40de55](https://github.com/pchuri/confluence-cli/commit/d40de55573aa71409b3aa2743531f2a4cb5a4eda)), closes [#28](https://github.com/pchuri/confluence-cli/issues/28)
14
-
15
- # [1.13.0](https://github.com/pchuri/confluence-cli/compare/v1.12.1...v1.13.0) (2026-01-08)
16
-
17
-
18
- ### Features
19
-
20
- * add children command to list child pages ([#27](https://github.com/pchuri/confluence-cli/issues/27)) ([7e8b4ed](https://github.com/pchuri/confluence-cli/commit/7e8b4ed1b0ed69a7e1de52dfaf0c1ff36973f78b))
21
-
22
- ## [1.12.1](https://github.com/pchuri/confluence-cli/compare/v1.12.0...v1.12.1) (2025-12-31)
23
-
24
-
25
- ### Bug Fixes
26
-
27
- * align README with CLI behavior ([#26](https://github.com/pchuri/confluence-cli/issues/26)) ([b24c7cf](https://github.com/pchuri/confluence-cli/commit/b24c7cf4a645383812a1cb7239b1db41ded77f8d))
28
-
29
- # [1.12.0](https://github.com/pchuri/confluence-cli/compare/v1.11.1...v1.12.0) (2025-12-31)
30
-
31
-
32
- ### Features
33
-
34
- * add page delete command ([#25](https://github.com/pchuri/confluence-cli/issues/25)) ([bc3e412](https://github.com/pchuri/confluence-cli/commit/bc3e412a6ccd0774d62ab0816a6c2735cbd470a4))
35
-
36
- ## [1.11.1](https://github.com/pchuri/confluence-cli/compare/v1.11.0...v1.11.1) (2025-12-17)
37
-
38
-
39
- ### Bug Fixes
40
-
41
- * support children macro, improve macro handling, and filter attachments ([#23](https://github.com/pchuri/confluence-cli/issues/23)) ([15b721a](https://github.com/pchuri/confluence-cli/commit/15b721acdc296e72470ee438c9fe3470e09ae52e))
42
-
43
- # [1.11.0](https://github.com/pchuri/confluence-cli/compare/v1.10.1...v1.11.0) (2025-12-12)
44
-
45
-
46
- ### Features
47
-
48
- * Support for Confluence display URLs ([#20](https://github.com/pchuri/confluence-cli/issues/20)) ([3bda7c2](https://github.com/pchuri/confluence-cli/commit/3bda7c2aad8ec02dac60f3b7c34c31b549a31cce))
49
-
50
- ## [1.10.1](https://github.com/pchuri/confluence-cli/compare/v1.10.0...v1.10.1) (2025-12-08)
51
-
52
-
53
- ### Bug Fixes
54
-
55
- * improve markdown export and attachment download ([#19](https://github.com/pchuri/confluence-cli/issues/19)) ([978275d](https://github.com/pchuri/confluence-cli/commit/978275dbe71eea83138bbd537ce7d4edda8180f8))
56
-
57
- # [1.10.0](https://github.com/pchuri/confluence-cli/compare/v1.9.0...v1.10.0) (2025-12-05)
58
-
59
-
60
- ### Features
61
-
62
- * export page with attachments ([#18](https://github.com/pchuri/confluence-cli/issues/18)) ([bdd9da4](https://github.com/pchuri/confluence-cli/commit/bdd9da474f13a8b6f96e64836443f65f846257a2))
63
-
64
- # [1.9.0](https://github.com/pchuri/confluence-cli/compare/v1.8.0...v1.9.0) (2025-12-04)
65
-
66
-
67
- ### Features
68
-
69
- * add attachments list and download command ([#17](https://github.com/pchuri/confluence-cli/issues/17)) ([fb3d4f8](https://github.com/pchuri/confluence-cli/commit/fb3d4f81a3926fec832a39c78f4eda3b4a22130a))
70
-
71
- # [1.8.0](https://github.com/pchuri/confluence-cli/compare/v1.7.0...v1.8.0) (2025-09-28)
72
-
73
-
74
- ### Features
75
-
76
- * make Confluence API path configurable ([#14](https://github.com/pchuri/confluence-cli/issues/14)) ([be000e0](https://github.com/pchuri/confluence-cli/commit/be000e0d92881d65329b84bad6555dcad0bbb455)), closes [#13](https://github.com/pchuri/confluence-cli/issues/13)
77
-
78
- ## [Unreleased]
79
-
80
- ### Added
81
- - Make the Confluence REST base path configurable to support both `/rest/api` and `/wiki/rest/api`.
82
-
83
- # [1.7.0](https://github.com/pchuri/confluence-cli/compare/v1.6.0...v1.7.0) (2025-09-28)
84
-
85
-
86
- ### Features
87
-
88
- * support basic auth for Atlassian API tokens ([#12](https://github.com/pchuri/confluence-cli/issues/12)) ([e80ea9b](https://github.com/pchuri/confluence-cli/commit/e80ea9b7913d5f497b60bf72149737b6f704c6b8))
89
-
90
- # [1.6.0](https://github.com/pchuri/confluence-cli/compare/v1.5.0...v1.6.0) (2025-09-05)
91
-
92
-
93
- ### Features
94
-
95
- * Add copy-tree command for recursive page copying with children ([#9](https://github.com/pchuri/confluence-cli/issues/9)) ([29efa5b](https://github.com/pchuri/confluence-cli/commit/29efa5b2f8edeee1c5072ad8d7077f38f860c2ba))
96
-
97
- # [1.5.0](https://github.com/pchuri/confluence-cli/compare/v1.4.1...v1.5.0) (2025-08-13)
98
-
99
-
100
- ### Features
101
-
102
- * Align README with implementation and fix update command ([#7](https://github.com/pchuri/confluence-cli/issues/7)) ([87f48e0](https://github.com/pchuri/confluence-cli/commit/87f48e03c6310bb9bfc7fda2930247c0d61414ec))
103
-
104
- ## [1.4.1](https://github.com/pchuri/confluence-cli/compare/v1.4.0...v1.4.1) (2025-06-30)
105
-
106
-
107
- ### Bug Fixes
108
-
109
- * correct version display in CLI ([#6](https://github.com/pchuri/confluence-cli/issues/6)) ([36f8419](https://github.com/pchuri/confluence-cli/commit/36f8419b309ae1ff99fa94c12ace9a527ee3f162))
110
-
111
- # [1.4.0](https://github.com/pchuri/confluence-cli/compare/v1.3.2...v1.4.0) (2025-06-30)
112
-
113
-
114
- ### Features
115
-
116
- * Enhanced Markdown Support with Bidirectional Conversion ([#5](https://github.com/pchuri/confluence-cli/issues/5)) ([d17771b](https://github.com/pchuri/confluence-cli/commit/d17771b40d8d60ed68c0ac0a3594fed6b9a4e771))
117
-
118
- ## [1.3.2](https://github.com/pchuri/confluence-cli/compare/v1.3.1...v1.3.2) (2025-06-27)
119
-
120
-
121
- ### Bug Fixes
122
-
123
- * resolve merge conflict in CHANGELOG.md ([8565c1a](https://github.com/pchuri/confluence-cli/commit/8565c1a90243663f206285e5af3616541ee1a1d0))
124
-
125
- ## [1.3.1](https://github.com/pchuri/confluence-cli/compare/v1.3.0...v1.3.1) (2025-06-27)
126
-
127
-
128
- ### Bug Fixes
129
-
130
- * clean up duplicate CHANGELOG entries ([0163deb](https://github.com/pchuri/confluence-cli/commit/0163deb7f007e1d64ce4693eb8e86280d27eb6cc))
131
-
132
- # [1.3.0](https://github.com/pchuri/confluence-cli/compare/v1.2.0...v1.3.0) (2025-06-27)
133
-
134
-
135
- ### Bug Fixes
136
-
137
- * improve format handling based on production testing ([820f9cd](https://github.com/pchuri/confluence-cli/commit/820f9cdc7e59b6aa4b676eda6cff7e22865ec8fb))
138
-
139
-
140
- ### Features
141
-
142
- * implement page creation and update capabilities ([3c43b19](https://github.com/pchuri/confluence-cli/commit/3c43b19765f94318d01fea3a22b324ada00a77d1))
143
-
144
- # [1.2.1](https://github.com/pchuri/confluence-cli/compare/v1.2.0...v1.2.1) (2025-06-27)
145
-
146
-
147
- ### Bug Fixes
148
-
149
- * **format handling**: improve compatibility across Confluence instances
150
- - Switch from 'html' macro to 'markdown' macro for better compatibility
151
- - Change HTML processing to direct Storage format (no macro wrapper)
152
- - Add markdownToNativeStorage method for alternative conversion
153
- - Fix issues discovered during production testing in real Confluence environments
154
-
155
- # [1.2.0](https://github.com/pchuri/confluence-cli/compare/v1.1.0...v1.2.0) (2025-06-27)
156
-
157
-
158
- ### Features
159
-
160
- * **page management**: add page creation and update capabilities ([#2](https://github.com/pchuri/confluence-cli/issues/2)) ([b814ddf](https://github.com/pchuri/confluence-cli/commit/b814ddfd056aeac83cc7eb5d8d6db47ba9c70cdf))
161
- - `confluence create` - Create new pages with support for Markdown, HTML, and Storage formats
162
- - `confluence update` - Update existing page content and titles
163
- - `confluence edit` - Export page content for editing workflow
164
- - Support for reading content from files or inline
165
- - Markdown to Confluence Storage format conversion
166
- * **content formats**: support multiple input formats
167
- - Markdown format with automatic conversion using `markdown` macro
168
- - HTML format with direct Storage format integration
169
- - Native Confluence Storage format
170
- * **examples**: add sample files and demo scripts for new features
171
-
172
- ### Breaking Changes
173
-
174
- * None - all new features are additive
175
-
176
- # [1.1.0](https://github.com/pchuri/confluence-cli/compare/v1.0.0...v1.1.0) (2025-06-26)
177
-
178
-
179
- ### Features
180
-
181
- * add analytics tracking to spaces command ([265e8f4](https://github.com/pchuri/confluence-cli/commit/265e8f42b5ba86fb50398e8b1fcfd1d85fcc54d9))
182
- * add community feedback and analytics infrastructure ([a7ff6e8](https://github.com/pchuri/confluence-cli/commit/a7ff6e87cdc92d98f3d927ee98fac9e33aedbaae))
183
-
184
- # 1.0.0 (2025-06-26)
185
-
186
-
187
- ### Bug Fixes
188
-
189
- * add explicit permissions for GitHub Actions ([fa36b29](https://github.com/pchuri/confluence-cli/commit/fa36b2974b1261c144a415ced324383b35a938fb))
190
- * add NODE_AUTH_TOKEN for npm authentication ([2031314](https://github.com/pchuri/confluence-cli/commit/2031314ad01fc1d9b4f9557a3d1321a046cad8f3))
191
- * resolve eslint errors and npm publish warnings ([b93285e](https://github.com/pchuri/confluence-cli/commit/b93285ee098d96c8b750dbf2be5a93f28f44706c))
192
-
193
-
194
- ### Features
195
-
196
- * initial release of confluence-cli ([ec04e06](https://github.com/pchuri/confluence-cli/commit/ec04e06bb0c785dcff84dabcafeeb60bf9e1658f))
197
-
198
- # Confluence CLI Changelog
199
-
200
- All notable changes to this project will be documented in this file.
201
-
202
- The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
203
- and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
204
-
205
- ## [1.0.0] - 2025-06-26
206
-
207
- ### Added
208
- - Initial release of Confluence CLI
209
- - Read Confluence pages by ID or URL
210
- - Search functionality with customizable limits
211
- - Page information display
212
- - List all Confluence spaces
213
- - Interactive configuration setup
214
- - Environment variable support
215
- - HTML and text output formats
216
- - Comprehensive README with examples
217
- - MIT License
218
-
219
- ### Features
220
- - `confluence init` - Interactive configuration setup
221
- - `confluence read <pageId>` - Read page content with format options
222
- - `confluence info <pageId>` - Display page information
223
- - `confluence search <query>` - Search pages with optional limit
224
- - `confluence spaces` - List all available spaces
225
-
226
- ### Dependencies
227
- - commander for CLI framework
228
- - axios for HTTP requests
229
- - chalk for colored output
230
- - inquirer for interactive prompts
231
- - html-to-text for content conversion
232
- - ora for loading indicators
package/CONTRIBUTING.md DELETED
@@ -1,246 +0,0 @@
1
- # Contributing to Confluence CLI
2
-
3
- Thank you for your interest in contributing to Confluence CLI! This document provides guidelines and information about contributing to this project.
4
-
5
- ## Table of Contents
6
-
7
- - [Code of Conduct](#code-of-conduct)
8
- - [Getting Started](#getting-started)
9
- - [Development Setup](#development-setup)
10
- - [Making Changes](#making-changes)
11
- - [Testing](#testing)
12
- - [Submitting Changes](#submitting-changes)
13
- - [Coding Standards](#coding-standards)
14
-
15
- ## Code of Conduct
16
-
17
- This project adheres to a code of conduct. By participating, you are expected to uphold this code. Please be respectful and considerate in all interactions.
18
-
19
- ## Getting Started
20
-
21
- 1. Fork the repository on GitHub
22
- 2. Clone your fork locally
23
- 3. Create a branch for your changes
24
- 4. Make your changes
25
- 5. Test your changes
26
- 6. Submit a pull request
27
-
28
- ## Development Setup
29
-
30
- ```bash
31
- # Clone your fork
32
- git clone https://github.com/your-username/confluence-cli.git
33
- cd confluence-cli
34
-
35
- # Install dependencies
36
- npm install
37
-
38
- # Set up your test environment
39
- export CONFLUENCE_DOMAIN="your-test-domain.atlassian.net"
40
- export CONFLUENCE_API_TOKEN="your-test-token"
41
-
42
- # Test the CLI locally
43
- node bin/confluence.js --help
44
- ```
45
-
46
- ## Making Changes
47
-
48
- ### Branch Naming
49
-
50
- Use descriptive branch names:
51
- - `feature/add-page-creation` - for new features
52
- - `fix/search-pagination` - for bug fixes
53
- - `docs/update-readme` - for documentation updates
54
- - `refactor/client-architecture` - for refactoring
55
-
56
- ### Commit Messages
57
-
58
- Write clear, descriptive commit messages:
59
- ```
60
- feat: add page creation functionality
61
-
62
- - Add create command to CLI
63
- - Implement createPage method in client
64
- - Add tests for page creation
65
- - Update README with new command
66
- ```
67
-
68
- Use conventional commit format:
69
- - `feat:` - new features
70
- - `fix:` - bug fixes
71
- - `docs:` - documentation changes
72
- - `style:` - formatting changes
73
- - `refactor:` - code refactoring
74
- - `test:` - adding tests
75
- - `chore:` - maintenance tasks
76
-
77
- ## Testing
78
-
79
- ```bash
80
- # Run all tests
81
- npm test
82
-
83
- # Run tests in watch mode
84
- npm run test:watch
85
-
86
- # Check test coverage
87
- npm run test:coverage
88
-
89
- # Manual testing
90
- node bin/confluence.js read 123456789
91
- ```
92
-
93
- ### Test Guidelines
94
-
95
- - Write tests for new functionality
96
- - Ensure existing tests pass
97
- - Aim for good test coverage
98
- - Use descriptive test names
99
- - Mock external API calls
100
-
101
- ## Submitting Changes
102
-
103
- 1. **Push your changes** to your fork
104
- 2. **Create a pull request** against the main branch
105
- 3. **Fill out the PR template** with:
106
- - Description of changes
107
- - Type of change (bug fix, feature, etc.)
108
- - Testing performed
109
- - Screenshots (if applicable)
110
-
111
- ### Pull Request Guidelines
112
-
113
- - Keep PRs focused and atomic
114
- - Include tests for new functionality
115
- - Update documentation as needed
116
- - Ensure CI passes
117
- - Request review from maintainers
118
-
119
- ## Coding Standards
120
-
121
- ### JavaScript Style
122
-
123
- - Use ES6+ features when appropriate
124
- - Follow existing code style
125
- - Use meaningful variable names
126
- - Add comments for complex logic
127
- - Keep functions small and focused
128
-
129
- ### Markdown Support
130
-
131
- The CLI includes enhanced markdown support with:
132
-
133
- - **Native Confluence Storage Format**: Converts markdown to native Confluence elements instead of HTML macros
134
- - **Confluence Extensions**: Support for admonitions (`[!info]`, `[!warning]`, `[!note]`)
135
- - **Bidirectional Conversion**: Convert from markdown to storage format and back
136
- - **Rich Elements**: Tables, code blocks, lists, links, and formatting
137
-
138
- Example markdown with Confluence extensions:
139
- ```markdown
140
- # My Page
141
-
142
- [!info]
143
- This is an info admonition that will render as a Confluence info macro.
144
-
145
- ```javascript
146
- console.log("Code blocks preserve syntax highlighting");
147
- ```
148
-
149
- | Feature | Status |
150
- |---------|--------|
151
- | Tables | ✅ |
152
- | Lists | ✅ |
153
- ```
154
-
155
- ### File Structure
156
-
157
- ```
158
- bin/ # CLI entry points
159
- lib/ # Core library code
160
- ├── confluence-client.js
161
- ├── config.js
162
- └── utils.js
163
- tests/ # Test files
164
- docs/ # Additional documentation
165
- ```
166
-
167
- ### Error Handling
168
-
169
- - Always handle errors gracefully
170
- - Provide helpful error messages
171
- - Use appropriate exit codes
172
- - Log errors appropriately
173
-
174
- ### Documentation
175
-
176
- - Update README for new features
177
- - Add JSDoc comments for functions
178
- - Update CHANGELOG for releases
179
- - Include usage examples
180
-
181
- ## Feature Requests
182
-
183
- Before implementing major features:
184
-
185
- 1. **Check existing issues** to avoid duplication
186
- 2. **Create an issue** to discuss the feature
187
- 3. **Get maintainer feedback** before starting work
188
- 4. **Follow the agreed approach** in implementation
189
-
190
- ## Bug Reports
191
-
192
- When reporting bugs:
193
-
194
- 1. **Check existing issues** first
195
- 2. **Provide reproduction steps**
196
- 3. **Include environment details**:
197
- - Node.js version
198
- - OS and version
199
- - CLI version
200
- 4. **Share error messages** and logs
201
-
202
- ## Development Tips
203
-
204
- ### Local Testing
205
-
206
- ```bash
207
- # Test against your Confluence instance
208
- export CONFLUENCE_DOMAIN="your-domain.atlassian.net"
209
- export CONFLUENCE_API_TOKEN="your-token"
210
-
211
- # Test commands
212
- node bin/confluence.js spaces
213
- node bin/confluence.js search "test"
214
- node bin/confluence.js read 123456789
215
- ```
216
-
217
- ### Debugging
218
-
219
- ```bash
220
- # Enable debug mode
221
- DEBUG=confluence-cli node bin/confluence.js read 123456789
222
-
223
- # Use Node.js debugger
224
- node --inspect-brk bin/confluence.js read 123456789
225
- ```
226
-
227
- ## Release Process
228
-
229
- For maintainers:
230
-
231
- 1. Update version in `package.json`
232
- 2. Update `CHANGELOG.md`
233
- 3. Create git tag
234
- 4. Push to npm
235
- 5. Create GitHub release
236
-
237
- ## Questions?
238
-
239
- If you have questions about contributing:
240
-
241
- 1. Check existing documentation
242
- 2. Search closed issues
243
- 3. Ask in a new issue
244
- 4. Contact maintainers
245
-
246
- Thank you for contributing to Confluence CLI! 🚀