@knpkv/codecommit 0.1.0 → 0.1.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.
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2025 knpkv
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md CHANGED
@@ -2,6 +2,22 @@
2
2
 
3
3
  CLI and TUI for AWS CodeCommit pull requests.
4
4
 
5
+ ## Prerequisites
6
+
7
+ - AWS SSO configured (`~/.aws/config`)
8
+ - IAM permissions for CodeCommit (optionally granted per command):
9
+ - `codecommit:ListRepositories`, `codecommit:ListPullRequests`, `codecommit:GetPullRequest` — list/view
10
+ - `codecommit:CreatePullRequest` — create
11
+ - `codecommit:UpdatePullRequestTitle`, `codecommit:UpdatePullRequestDescription` — update
12
+ - `codecommit:GetCommentsForPullRequest` — export
13
+ - `codecommit:ListBranches` — branch listing
14
+
15
+ ## Quick Start
16
+
17
+ ```bash
18
+ pnpx @knpkv/codecommit
19
+ ```
20
+
5
21
  ## Installation
6
22
 
7
23
  ```bash
@@ -28,8 +44,6 @@ codecommit web [--port 3000] [--hostname 127.0.0.1]
28
44
 
29
45
  #### List PRs
30
46
 
31
- List pull requests.
32
-
33
47
  ```bash
34
48
  codecommit pr list [options]
35
49
  ```
@@ -44,25 +58,12 @@ codecommit pr list [options]
44
58
  | `--author` | | Filter by author | - |
45
59
  | `--json` | | Output as JSON | `false` |
46
60
 
47
- Example:
48
-
49
61
  ```bash
50
- # List open PRs (default)
51
62
  codecommit pr list
52
-
53
- # List closed PRs
54
63
  codecommit pr list --status CLOSED
55
-
56
- # List all PRs (open and closed)
57
64
  codecommit pr list --all
58
-
59
- # Filter by repo
60
65
  codecommit pr list --repo my-repo
61
-
62
- # Filter by author
63
- codecommit pr list --author andrey
64
-
65
- # JSON output
66
+ codecommit pr list --author jane
66
67
  codecommit pr list --json
67
68
  ```
68
69
 
@@ -73,27 +74,13 @@ Found 3 open PR(s):
73
74
 
74
75
  123 my-repo
75
76
  Add feature X
76
- feature/x main
77
- by alice approved mergeable
77
+ feature/x -> main
78
+ by alice approved mergeable
78
79
 
79
80
  124 my-repo
80
81
  Fix bug Y
81
- fix/y main
82
- by bob conflicts
83
- ```
84
-
85
- With `--all`:
86
-
87
- ```
88
- Found 5 all PR(s):
89
-
90
- 123 [OPEN] my-repo
91
- Add feature X
92
- ...
93
-
94
- 120 [CLOSED] my-repo
95
- Old feature
96
- ...
82
+ fix/y -> main
83
+ by bob conflicts
97
84
  ```
98
85
 
99
86
  #### Create PR
@@ -110,8 +97,6 @@ codecommit pr create <repo> <title> -s <source-branch> [options]
110
97
  | `--profile` | `-p` | AWS profile | `default` |
111
98
  | `--region` | `-r` | AWS region | `us-east-1` |
112
99
 
113
- Example:
114
-
115
100
  ```bash
116
101
  codecommit pr create my-repo "Add feature X" -s feature/x -d main --description "Implements feature X"
117
102
  ```
@@ -130,53 +115,13 @@ codecommit pr export <pr-id> <repo> [options]
130
115
  | `--profile` | `-p` | AWS profile | `default` |
131
116
  | `--region` | `-r` | AWS region | `us-east-1` |
132
117
 
133
- Example:
134
-
135
118
  ```bash
136
- # Print to stdout
137
119
  codecommit pr export 123 my-repo
138
-
139
- # Save to file
140
120
  codecommit pr export 123 my-repo -o pr-comments.md
141
121
  ```
142
122
 
143
- Output format:
144
-
145
- ```markdown
146
- # RPS-2585: Add CDK destroy buildspec
147
-
148
- **Repository:** tilapia
149
- **Branch:** refs/heads/feat/RPS-2585-destroy-buildspec → refs/heads/main
150
- **Author:** andrey
151
- **Status:** OPEN
152
- **AWS Account:** core-code
153
- **Link:** https://...
154
-
155
- ## Description
156
-
157
- Adds buildspec for CDK destroy operation.
158
-
159
- ## Comments
160
-
161
- ### src/file.ts
162
-
163
- - **alice** (2024-01-15T10:00:00Z)
164
- This needs refactoring
165
- - **bob** (2024-01-15T11:00:00Z)
166
- Agreed, will fix
167
- - **alice** (2024-01-15T12:00:00Z)
168
- Thanks!
169
-
170
- ### General comments
171
-
172
- - **charlie** (2024-01-15T09:00:00Z)
173
- LGTM overall
174
- ```
175
-
176
123
  #### Update PR
177
124
 
178
- Update PR title or description.
179
-
180
125
  ```bash
181
126
  codecommit pr update <pr-id> [options]
182
127
  ```
@@ -188,26 +133,23 @@ codecommit pr update <pr-id> [options]
188
133
  | `--profile` | `-p` | AWS profile | `default` |
189
134
  | `--region` | `-r` | AWS region | `us-east-1` |
190
135
 
191
- Example:
192
-
193
136
  ```bash
194
- # Update title
195
137
  codecommit pr update 123 -t "New title"
196
-
197
- # Update description
198
138
  codecommit pr update 123 -d "Updated description"
199
-
200
- # Update both
201
139
  codecommit pr update 123 -t "New title" -d "New description"
202
140
  ```
203
141
 
204
142
  ## AWS Configuration
205
143
 
206
- Uses standard AWS credential chain. Configure via:
144
+ Uses AWS SSO. Configure profiles in `~/.aws/config`:
207
145
 
208
- - Environment variables (`AWS_ACCESS_KEY_ID`, `AWS_SECRET_ACCESS_KEY`)
209
- - AWS credentials file (`~/.aws/credentials`)
210
- - IAM role (when running on AWS)
146
+ ```ini
147
+ [profile my-profile]
148
+ sso_session = my-sso
149
+ sso_account_id = 123456789012
150
+ sso_role_name = MyRole
151
+ region = us-east-1
152
+ ```
211
153
 
212
154
  Specify profile with `--profile` or `AWS_PROFILE` env var.
213
155
 
package/dist/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@knpkv/codecommit",
3
- "version": "0.1.0",
3
+ "version": "0.1.2",
4
4
  "description": "TUI for browsing AWS CodeCommit PRs",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -30,8 +30,8 @@
30
30
  "@effect/platform": "^0.94.2",
31
31
  "@effect/platform-bun": "^0.87.1",
32
32
  "@effect/platform-node": "latest",
33
- "@knpkv/codecommit-core": "workspace:*",
34
- "@knpkv/codecommit-web": "workspace:*",
33
+ "@knpkv/codecommit-core": "workspace:^",
34
+ "@knpkv/codecommit-web": "workspace:^",
35
35
  "@opentui/core": "https://pkg.pr.new/anomalyco/opentui/@opentui/core@367a94087821b3b5feedd35bbb57df43b10a286e",
36
36
  "@opentui/react": "https://pkg.pr.new/anomalyco/opentui/@opentui/react@367a94087821b3b5feedd35bbb57df43b10a286e",
37
37
  "effect": "latest",
package/dist/src/bin.js CHANGED
File without changes