@aaronshaf/ger 2.0.7 → 2.0.8

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/README.md CHANGED
@@ -18,6 +18,14 @@ curl -fsSL https://bun.sh/install | bash
18
18
  bun install -g @aaronshaf/ger
19
19
  ```
20
20
 
21
+ ## Upgrading
22
+
23
+ To upgrade ger to the latest version:
24
+
25
+ ```bash
26
+ bun update -g @aaronshaf/ger
27
+ ```
28
+
21
29
  ## Getting Started
22
30
 
23
31
  ```bash
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aaronshaf/ger",
3
- "version": "2.0.7",
3
+ "version": "2.0.8",
4
4
  "description": "Gerrit CLI and SDK - A modern CLI tool and TypeScript SDK for Gerrit Code Review, built with Effect-TS",
5
5
  "keywords": [
6
6
  "gerrit",
@@ -78,6 +78,19 @@ const ChangeReviewerAccountInfo: Schema.Schema<ChangeReviewerAccount> = Schema.S
78
78
  type ChangeReviewerMap = Partial<
79
79
  Record<'REVIEWER' | 'CC' | 'REMOVED', ReadonlyArray<ChangeReviewerAccount>>
80
80
  >
81
+ // Account/User schema (reusable for groups and reviewers)
82
+ export const AccountInfo: Schema.Schema<{
83
+ readonly _account_id: number
84
+ readonly name?: string
85
+ readonly email?: string
86
+ readonly username?: string
87
+ }> = Schema.Struct({
88
+ _account_id: Schema.Number,
89
+ name: Schema.optional(Schema.String),
90
+ email: Schema.optional(Schema.String),
91
+ username: Schema.optional(Schema.String),
92
+ })
93
+ export type AccountInfo = Schema.Schema.Type<typeof AccountInfo>
81
94
 
82
95
  export const ChangeInfo: Schema.Schema<{
83
96
  readonly id: string
@@ -145,51 +158,36 @@ export const ChangeInfo: Schema.Schema<{
145
158
  insertions: Schema.optional(Schema.Number),
146
159
  deletions: Schema.optional(Schema.Number),
147
160
  _number: Schema.Number,
148
- owner: Schema.optional(
149
- Schema.Struct({
150
- _account_id: Schema.Number,
151
- name: Schema.optional(Schema.String),
152
- email: Schema.optional(Schema.String),
153
- username: Schema.optional(Schema.String),
154
- }),
155
- ),
161
+ owner: Schema.optional(AccountInfo),
156
162
  labels: Schema.optional(
157
163
  Schema.Record({
158
164
  key: Schema.String,
159
165
  value: Schema.Struct({
160
- approved: Schema.optional(
161
- Schema.Struct({
162
- _account_id: Schema.Number,
163
- name: Schema.optional(Schema.String),
164
- email: Schema.optional(Schema.String),
165
- username: Schema.optional(Schema.String),
166
- }),
167
- ),
168
- rejected: Schema.optional(
169
- Schema.Struct({
170
- _account_id: Schema.Number,
171
- name: Schema.optional(Schema.String),
172
- email: Schema.optional(Schema.String),
173
- username: Schema.optional(Schema.String),
174
- }),
175
- ),
176
- recommended: Schema.optional(
177
- Schema.Struct({
178
- _account_id: Schema.Number,
179
- name: Schema.optional(Schema.String),
180
- email: Schema.optional(Schema.String),
181
- username: Schema.optional(Schema.String),
182
- }),
183
- ),
184
- disliked: Schema.optional(
185
- Schema.Struct({
186
- _account_id: Schema.Number,
187
- name: Schema.optional(Schema.String),
188
- email: Schema.optional(Schema.String),
189
- username: Schema.optional(Schema.String),
190
- }),
191
- ),
166
+ approved: Schema.optional(AccountInfo),
167
+ rejected: Schema.optional(AccountInfo),
168
+ recommended: Schema.optional(AccountInfo),
169
+ disliked: Schema.optional(AccountInfo),
192
170
  value: Schema.optional(Schema.Number),
171
+ default_value: Schema.optional(Schema.Number),
172
+ blocking: Schema.optional(Schema.Boolean),
173
+ optional: Schema.optional(Schema.Boolean),
174
+ values: Schema.optional(Schema.Record({ key: Schema.String, value: Schema.String })),
175
+ all: Schema.optional(
176
+ Schema.Array(
177
+ Schema.Struct({
178
+ _account_id: Schema.optional(Schema.Number),
179
+ name: Schema.optional(Schema.String),
180
+ email: Schema.optional(Schema.String),
181
+ username: Schema.optional(Schema.String),
182
+ value: Schema.optional(Schema.Number),
183
+ permitted_voting_range: Schema.optional(
184
+ Schema.Struct({ min: Schema.Number, max: Schema.Number }),
185
+ ),
186
+ date: Schema.optional(Schema.String),
187
+ tag: Schema.optional(Schema.String),
188
+ }),
189
+ ),
190
+ ),
193
191
  }),
194
192
  }),
195
193
  ),
@@ -605,20 +603,6 @@ export const GerritError: Schema.Schema<{
605
603
  })
606
604
  export type GerritError = Schema.Schema.Type<typeof GerritError>
607
605
 
608
- // Account/User schema (reusable for groups and reviewers)
609
- export const AccountInfo: Schema.Schema<{
610
- readonly _account_id: number
611
- readonly name?: string
612
- readonly email?: string
613
- readonly username?: string
614
- }> = Schema.Struct({
615
- _account_id: Schema.Number,
616
- name: Schema.optional(Schema.String),
617
- email: Schema.optional(Schema.String),
618
- username: Schema.optional(Schema.String),
619
- })
620
- export type AccountInfo = Schema.Schema.Type<typeof AccountInfo>
621
-
622
606
  // Groups schemas
623
607
  export const GroupInfo: Schema.Schema<{
624
608
  readonly id: string