@puniyu/nipaw 1.8.1 → 1.9.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/dist/index.d.ts +329 -68
- package/dist/index.js +64 -55
- package/package.json +6 -6
package/dist/index.d.ts
CHANGED
|
@@ -28,6 +28,8 @@ export declare class CnbClient {
|
|
|
28
28
|
commit(): CnbCommit
|
|
29
29
|
/** 获取Issue操作模块 */
|
|
30
30
|
issue(): CnbIssue
|
|
31
|
+
/** 获取Release操作模块 */
|
|
32
|
+
release(): CnbRelease
|
|
31
33
|
}
|
|
32
34
|
|
|
33
35
|
export declare class CnbCommit {
|
|
@@ -41,16 +43,16 @@ export declare class CnbCommit {
|
|
|
41
43
|
* - `repo` 仓库名称
|
|
42
44
|
* - `sha` 提交SHA, 如果不设置则会获取默认分支的最新提交
|
|
43
45
|
*/
|
|
44
|
-
info(
|
|
46
|
+
info(repoPath: RepoPath, sha?: string | undefined | null): Promise<CommitInfo>
|
|
45
47
|
/**
|
|
46
48
|
* 获取仓库提交列表
|
|
47
49
|
*
|
|
48
50
|
* ## 参数
|
|
49
51
|
* - `owner` 仓库所有者
|
|
50
52
|
* - `repo` 仓库名称
|
|
51
|
-
* - `
|
|
53
|
+
* - `options` 提交列表选项
|
|
52
54
|
*/
|
|
53
|
-
list(
|
|
55
|
+
list(repoPath: RepoPath, options?: CommitListOptions | undefined | null): Promise<Array<CommitListInfo>>
|
|
54
56
|
}
|
|
55
57
|
|
|
56
58
|
export declare class CnbIssue {
|
|
@@ -64,9 +66,9 @@ export declare class CnbIssue {
|
|
|
64
66
|
* - `repo` 仓库名称
|
|
65
67
|
* - `title` issue标题
|
|
66
68
|
* - `body` issue内容
|
|
67
|
-
* - `
|
|
69
|
+
* - `options` 创建issue选项
|
|
68
70
|
*/
|
|
69
|
-
create(
|
|
71
|
+
create(repoPath: RepoPath, title: string, body?: string | undefined | null, options?: CreateIssueOptions | undefined | null): Promise<IssueInfo>
|
|
70
72
|
/**
|
|
71
73
|
* 获取issue信息
|
|
72
74
|
*
|
|
@@ -75,16 +77,16 @@ export declare class CnbIssue {
|
|
|
75
77
|
* - `repo` 仓库名称
|
|
76
78
|
* - `issue_number` issue编号
|
|
77
79
|
*/
|
|
78
|
-
info(
|
|
80
|
+
info(repoPath: RepoPath, issueNumber: string): Promise<IssueInfo>
|
|
79
81
|
/**
|
|
80
82
|
* 获取仓库所有issue信息
|
|
81
83
|
*
|
|
82
84
|
* ## 参数
|
|
83
85
|
* - `owner` 仓库所有者
|
|
84
86
|
* - `repo` 仓库名称
|
|
85
|
-
* - `
|
|
87
|
+
* - `options` issue列表选项
|
|
86
88
|
*/
|
|
87
|
-
list(
|
|
89
|
+
list(repoPath: RepoPath, options?: IssueListOptions | undefined | null): Promise<Array<IssueInfo>>
|
|
88
90
|
/**
|
|
89
91
|
* 更新issue信息
|
|
90
92
|
*
|
|
@@ -94,7 +96,7 @@ export declare class CnbIssue {
|
|
|
94
96
|
* - `issue_number` issue编号
|
|
95
97
|
* - `options` 更新issue选项
|
|
96
98
|
*/
|
|
97
|
-
update(
|
|
99
|
+
update(repoPath: RepoPath, issueNumber: string, options?: UpdateIssueOptions | undefined | null): Promise<IssueInfo>
|
|
98
100
|
}
|
|
99
101
|
|
|
100
102
|
export declare class CnbOrg {
|
|
@@ -119,9 +121,53 @@ export declare class CnbOrg {
|
|
|
119
121
|
*
|
|
120
122
|
* ## 参数
|
|
121
123
|
* - `org_name` 组织名称
|
|
122
|
-
* - `
|
|
124
|
+
* - `options` 仓库列表选项
|
|
123
125
|
*/
|
|
124
|
-
repoList(orgName: string,
|
|
126
|
+
repoList(orgName: string, options?: RepoListOptions | undefined | null): Promise<Array<RepoInfo>>
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
export declare class CnbRelease {
|
|
130
|
+
|
|
131
|
+
constructor()
|
|
132
|
+
/**
|
|
133
|
+
* 创建一个Release
|
|
134
|
+
*
|
|
135
|
+
* ## 参数
|
|
136
|
+
* - `owner` 仓库所有者
|
|
137
|
+
* - `repo` 仓库名称
|
|
138
|
+
* - `tag_name` 标签名称
|
|
139
|
+
* - `name` Release名称, 可选
|
|
140
|
+
* - `body` Release内容, 可选
|
|
141
|
+
* - `target_commitish` 目标提交SHA或分支, 可选
|
|
142
|
+
*/
|
|
143
|
+
create(repoPath: RepoPath, tagName: string, name?: string | undefined | null, body?: string | undefined | null, targetCommitish?: string | undefined | null): Promise<ReleaseInfo>
|
|
144
|
+
/**
|
|
145
|
+
* 获取Release信息
|
|
146
|
+
*
|
|
147
|
+
* ## 参数
|
|
148
|
+
* - `owner` 仓库所有者
|
|
149
|
+
* - `repo` 仓库名称
|
|
150
|
+
* - `tag_name` 标签名称, 可选, 为空时获取最新Release
|
|
151
|
+
*/
|
|
152
|
+
info(repoPath: RepoPath, tagName?: string | undefined | null): Promise<ReleaseInfo>
|
|
153
|
+
/**
|
|
154
|
+
* 获取Release列表
|
|
155
|
+
*
|
|
156
|
+
* ## 参数
|
|
157
|
+
* - `owner` 仓库所有者
|
|
158
|
+
* - `repo` 仓库名称
|
|
159
|
+
*/
|
|
160
|
+
list(repoPath: RepoPath): Promise<Array<ReleaseInfo>>
|
|
161
|
+
/**
|
|
162
|
+
* 更新Release
|
|
163
|
+
*
|
|
164
|
+
* ## 参数
|
|
165
|
+
* - `owner` 仓库所有者
|
|
166
|
+
* - `repo` 仓库名称
|
|
167
|
+
* - `tag_name` 标签名称
|
|
168
|
+
* - `options` 更新参数
|
|
169
|
+
*/
|
|
170
|
+
update(repoPath: RepoPath, tagName: string, options: UpdateReleaseOptions): Promise<ReleaseInfo>
|
|
125
171
|
}
|
|
126
172
|
|
|
127
173
|
export declare class CnbRepo {
|
|
@@ -134,7 +180,7 @@ export declare class CnbRepo {
|
|
|
134
180
|
* - `owner` 仓库所有者
|
|
135
181
|
* - `repo` 仓库名称
|
|
136
182
|
*/
|
|
137
|
-
info(
|
|
183
|
+
info(repoPath: RepoPath): Promise<RepoInfo>
|
|
138
184
|
/**
|
|
139
185
|
* 添加仓库协作者
|
|
140
186
|
*
|
|
@@ -144,7 +190,7 @@ export declare class CnbRepo {
|
|
|
144
190
|
* - `user_name` 协作者用户名
|
|
145
191
|
* - `permission` 协作者权限, 默认为 `Pull`, 可选值为 `Admin`, `Push`, `Pull`
|
|
146
192
|
*/
|
|
147
|
-
addCollaborator(
|
|
193
|
+
addCollaborator(repoPath: RepoPath, userName: string, permission?: CollaboratorPermission | undefined | null): Promise<CollaboratorResult>
|
|
148
194
|
}
|
|
149
195
|
|
|
150
196
|
export declare class CnbUser {
|
|
@@ -176,9 +222,9 @@ export declare class CnbUser {
|
|
|
176
222
|
*
|
|
177
223
|
* ## 参数
|
|
178
224
|
* - `user_name` 用户名称, 为空时获取当前登录用户仓库列表
|
|
179
|
-
* - `
|
|
225
|
+
* - `options` 仓库列表选项
|
|
180
226
|
*/
|
|
181
|
-
repoList(userName?: string | undefined | null,
|
|
227
|
+
repoList(userName?: string | undefined | null, options?: RepoListOptions | undefined | null): Promise<Array<RepoInfo>>
|
|
182
228
|
}
|
|
183
229
|
|
|
184
230
|
export declare class GitCodeClient {
|
|
@@ -210,6 +256,8 @@ export declare class GitCodeClient {
|
|
|
210
256
|
commit(): GitCodeCommit
|
|
211
257
|
/** 获取Issue操作模块 */
|
|
212
258
|
issue(): GitCodeIssue
|
|
259
|
+
/** 获取Release操作模块 */
|
|
260
|
+
release(): GitCodeRelease
|
|
213
261
|
}
|
|
214
262
|
|
|
215
263
|
export declare class GitCodeCommit {
|
|
@@ -223,16 +271,16 @@ export declare class GitCodeCommit {
|
|
|
223
271
|
* - `repo` 仓库名称
|
|
224
272
|
* - `sha` 提交SHA, 如果不设置则会获取默认分支的最新提交
|
|
225
273
|
*/
|
|
226
|
-
info(
|
|
274
|
+
info(repoPath: RepoPath, sha?: string | undefined | null): Promise<CommitInfo>
|
|
227
275
|
/**
|
|
228
276
|
* 获取仓库提交列表
|
|
229
277
|
*
|
|
230
278
|
* ## 参数
|
|
231
279
|
* - `owner` 仓库所有者
|
|
232
280
|
* - `repo` 仓库名称
|
|
233
|
-
* - `
|
|
281
|
+
* - `options` 提交列表选项
|
|
234
282
|
*/
|
|
235
|
-
list(
|
|
283
|
+
list(repoPath: RepoPath, options?: CommitListOptions | undefined | null): Promise<Array<CommitListInfo>>
|
|
236
284
|
}
|
|
237
285
|
|
|
238
286
|
export declare class GitCodeIssue {
|
|
@@ -246,9 +294,9 @@ export declare class GitCodeIssue {
|
|
|
246
294
|
* - `repo` 仓库名称
|
|
247
295
|
* - `title` issue标题
|
|
248
296
|
* - `body` issue内容
|
|
249
|
-
* - `
|
|
297
|
+
* - `options` 创建issue选项
|
|
250
298
|
*/
|
|
251
|
-
create(
|
|
299
|
+
create(repoPath: RepoPath, title: string, body?: string | undefined | null, options?: CreateIssueOptions | undefined | null): Promise<IssueInfo>
|
|
252
300
|
/**
|
|
253
301
|
* 获取issue信息
|
|
254
302
|
*
|
|
@@ -257,16 +305,16 @@ export declare class GitCodeIssue {
|
|
|
257
305
|
* - `repo` 仓库名称
|
|
258
306
|
* - `issue_number` issue编号
|
|
259
307
|
*/
|
|
260
|
-
info(
|
|
308
|
+
info(repoPath: RepoPath, issueNumber: string): Promise<IssueInfo>
|
|
261
309
|
/**
|
|
262
310
|
* 获取仓库所有issue信息
|
|
263
311
|
*
|
|
264
312
|
* ## 参数
|
|
265
313
|
* - `owner` 仓库所有者
|
|
266
314
|
* - `repo` 仓库名称
|
|
267
|
-
* - `
|
|
315
|
+
* - `options` issue列表选项
|
|
268
316
|
*/
|
|
269
|
-
list(
|
|
317
|
+
list(repoPath: RepoPath, options?: IssueListOptions | undefined | null): Promise<Array<IssueInfo>>
|
|
270
318
|
/**
|
|
271
319
|
* 更新issue信息
|
|
272
320
|
*
|
|
@@ -276,7 +324,7 @@ export declare class GitCodeIssue {
|
|
|
276
324
|
* - `issue_number` issue编号
|
|
277
325
|
* - `options` 更新issue选项
|
|
278
326
|
*/
|
|
279
|
-
update(
|
|
327
|
+
update(repoPath: RepoPath, issueNumber: string, options?: UpdateIssueOptions | undefined | null): Promise<IssueInfo>
|
|
280
328
|
}
|
|
281
329
|
|
|
282
330
|
export declare class GitCodeOrg {
|
|
@@ -301,9 +349,53 @@ export declare class GitCodeOrg {
|
|
|
301
349
|
*
|
|
302
350
|
* ## 参数
|
|
303
351
|
* - `org_name` 组织名称
|
|
304
|
-
* - `
|
|
352
|
+
* - `options` 仓库列表选项
|
|
353
|
+
*/
|
|
354
|
+
repoList(orgName: string, options?: RepoListOptions | undefined | null): Promise<Array<RepoInfo>>
|
|
355
|
+
}
|
|
356
|
+
|
|
357
|
+
export declare class GitCodeRelease {
|
|
358
|
+
|
|
359
|
+
constructor()
|
|
360
|
+
/**
|
|
361
|
+
* 创建一个Release
|
|
362
|
+
*
|
|
363
|
+
* ## 参数
|
|
364
|
+
* - `owner` 仓库所有者
|
|
365
|
+
* - `repo` 仓库名称
|
|
366
|
+
* - `tag_name` 标签名称
|
|
367
|
+
* - `name` Release名称, 可选
|
|
368
|
+
* - `body` Release内容, 可选
|
|
369
|
+
* - `target_commitish` 目标提交SHA或分支, 可选
|
|
370
|
+
*/
|
|
371
|
+
create(repoPath: RepoPath, tagName: string, name?: string | undefined | null, body?: string | undefined | null, targetCommitish?: string | undefined | null): Promise<ReleaseInfo>
|
|
372
|
+
/**
|
|
373
|
+
* 获取Release信息
|
|
374
|
+
*
|
|
375
|
+
* ## 参数
|
|
376
|
+
* - `owner` 仓库所有者
|
|
377
|
+
* - `repo` 仓库名称
|
|
378
|
+
* - `tag_name` 标签名称, 可选, 为空时获取最新Release
|
|
379
|
+
*/
|
|
380
|
+
info(repoPath: RepoPath, tagName?: string | undefined | null): Promise<ReleaseInfo>
|
|
381
|
+
/**
|
|
382
|
+
* 获取Release列表
|
|
383
|
+
*
|
|
384
|
+
* ## 参数
|
|
385
|
+
* - `owner` 仓库所有者
|
|
386
|
+
* - `repo` 仓库名称
|
|
387
|
+
*/
|
|
388
|
+
list(repoPath: RepoPath): Promise<Array<ReleaseInfo>>
|
|
389
|
+
/**
|
|
390
|
+
* 更新Release
|
|
391
|
+
*
|
|
392
|
+
* ## 参数
|
|
393
|
+
* - `owner` 仓库所有者
|
|
394
|
+
* - `repo` 仓库名称
|
|
395
|
+
* - `tag_name` 标签名称
|
|
396
|
+
* - `options` 更新参数
|
|
305
397
|
*/
|
|
306
|
-
|
|
398
|
+
update(repoPath: RepoPath, tagName: string, options: UpdateReleaseOptions): Promise<ReleaseInfo>
|
|
307
399
|
}
|
|
308
400
|
|
|
309
401
|
export declare class GitCodeRepo {
|
|
@@ -316,7 +408,7 @@ export declare class GitCodeRepo {
|
|
|
316
408
|
* - `owner` 仓库所有者
|
|
317
409
|
* - `repo` 仓库名称
|
|
318
410
|
*/
|
|
319
|
-
info(
|
|
411
|
+
info(repoPath: RepoPath): Promise<RepoInfo>
|
|
320
412
|
/**
|
|
321
413
|
* 添加仓库协作者
|
|
322
414
|
*
|
|
@@ -326,7 +418,7 @@ export declare class GitCodeRepo {
|
|
|
326
418
|
* - `user_name` 协作者用户名
|
|
327
419
|
* - `permission` 协作者权限, 默认为 `Pull`, 可选值为 `Admin`, `Push`, `Pull`
|
|
328
420
|
*/
|
|
329
|
-
addCollaborator(
|
|
421
|
+
addCollaborator(repoPath: RepoPath, userName: string, permission?: CollaboratorPermission | undefined | null): Promise<CollaboratorResult>
|
|
330
422
|
}
|
|
331
423
|
|
|
332
424
|
export declare class GitCodeUser {
|
|
@@ -358,9 +450,9 @@ export declare class GitCodeUser {
|
|
|
358
450
|
*
|
|
359
451
|
* ## 参数
|
|
360
452
|
* - `user_name` 用户名称, 为空时获取当前登录用户仓库列表
|
|
361
|
-
* - `
|
|
453
|
+
* - `options` 仓库列表选项
|
|
362
454
|
*/
|
|
363
|
-
repoList(userName?: string | undefined | null,
|
|
455
|
+
repoList(userName?: string | undefined | null, options?: RepoListOptions | undefined | null): Promise<Array<RepoInfo>>
|
|
364
456
|
}
|
|
365
457
|
|
|
366
458
|
export declare class GiteeClient {
|
|
@@ -392,6 +484,8 @@ export declare class GiteeClient {
|
|
|
392
484
|
commit(): GiteeCommit
|
|
393
485
|
/** 获取Issue操作模块 */
|
|
394
486
|
issue(): GiteeIssue
|
|
487
|
+
/** 获取Release操作模块 */
|
|
488
|
+
release(): GiteeRelease
|
|
395
489
|
}
|
|
396
490
|
|
|
397
491
|
export declare class GiteeCommit {
|
|
@@ -405,16 +499,16 @@ export declare class GiteeCommit {
|
|
|
405
499
|
* - `repo` 仓库名称
|
|
406
500
|
* - `sha` 提交SHA, 如果不设置则会获取默认分支的最新提交
|
|
407
501
|
*/
|
|
408
|
-
info(
|
|
502
|
+
info(repoPath: RepoPath, sha?: string | undefined | null): Promise<CommitInfo>
|
|
409
503
|
/**
|
|
410
504
|
* 获取仓库提交列表
|
|
411
505
|
*
|
|
412
506
|
* ## 参数
|
|
413
507
|
* - `owner` 仓库所有者
|
|
414
508
|
* - `repo` 仓库名称
|
|
415
|
-
* - `
|
|
509
|
+
* - `options` 提交列表选项
|
|
416
510
|
*/
|
|
417
|
-
list(
|
|
511
|
+
list(repoPath: RepoPath, options?: CommitListOptions | undefined | null): Promise<Array<CommitListInfo>>
|
|
418
512
|
}
|
|
419
513
|
|
|
420
514
|
export declare class GiteeIssue {
|
|
@@ -428,9 +522,9 @@ export declare class GiteeIssue {
|
|
|
428
522
|
* - `repo` 仓库名称
|
|
429
523
|
* - `title` issue标题
|
|
430
524
|
* - `body` issue内容
|
|
431
|
-
* - `
|
|
525
|
+
* - `options` 创建issue选项
|
|
432
526
|
*/
|
|
433
|
-
create(
|
|
527
|
+
create(repoPath: RepoPath, title: string, body?: string | undefined | null, options?: CreateIssueOptions | undefined | null): Promise<IssueInfo>
|
|
434
528
|
/**
|
|
435
529
|
* 获取issue信息
|
|
436
530
|
*
|
|
@@ -439,16 +533,16 @@ export declare class GiteeIssue {
|
|
|
439
533
|
* - `repo` 仓库名称
|
|
440
534
|
* - `issue_number` issue编号
|
|
441
535
|
*/
|
|
442
|
-
info(
|
|
536
|
+
info(repoPath: RepoPath, issueNumber: string): Promise<IssueInfo>
|
|
443
537
|
/**
|
|
444
538
|
* 获取仓库所有issue信息
|
|
445
539
|
*
|
|
446
540
|
* ## 参数
|
|
447
541
|
* - `owner` 仓库所有者
|
|
448
542
|
* - `repo` 仓库名称
|
|
449
|
-
* - `
|
|
543
|
+
* - `options` issue列表选项
|
|
450
544
|
*/
|
|
451
|
-
list(
|
|
545
|
+
list(repoPath: RepoPath, options?: IssueListOptions | undefined | null): Promise<Array<IssueInfo>>
|
|
452
546
|
/**
|
|
453
547
|
* 更新issue信息
|
|
454
548
|
*
|
|
@@ -458,7 +552,7 @@ export declare class GiteeIssue {
|
|
|
458
552
|
* - `issue_number` issue编号
|
|
459
553
|
* - `options` 更新issue选项
|
|
460
554
|
*/
|
|
461
|
-
update(
|
|
555
|
+
update(repoPath: RepoPath, issueNumber: string, options?: UpdateIssueOptions | undefined | null): Promise<IssueInfo>
|
|
462
556
|
}
|
|
463
557
|
|
|
464
558
|
export declare class GiteeOrg {
|
|
@@ -483,9 +577,53 @@ export declare class GiteeOrg {
|
|
|
483
577
|
*
|
|
484
578
|
* ## 参数
|
|
485
579
|
* - `org_name` 组织名称
|
|
486
|
-
* - `
|
|
580
|
+
* - `options` 仓库列表选项
|
|
487
581
|
*/
|
|
488
|
-
repoList(orgName: string,
|
|
582
|
+
repoList(orgName: string, options?: RepoListOptions | undefined | null): Promise<Array<RepoInfo>>
|
|
583
|
+
}
|
|
584
|
+
|
|
585
|
+
export declare class GiteeRelease {
|
|
586
|
+
|
|
587
|
+
constructor()
|
|
588
|
+
/**
|
|
589
|
+
* 创建一个Release
|
|
590
|
+
*
|
|
591
|
+
* ## 参数
|
|
592
|
+
* - `owner` 仓库所有者
|
|
593
|
+
* - `repo` 仓库名称
|
|
594
|
+
* - `tag_name` 标签名称
|
|
595
|
+
* - `name` Release名称, 可选
|
|
596
|
+
* - `body` Release内容, 可选
|
|
597
|
+
* - `target_commitish` 目标提交SHA或分支, 可选
|
|
598
|
+
*/
|
|
599
|
+
create(repoPath: RepoPath, tagName: string, name?: string | undefined | null, body?: string | undefined | null, targetCommitish?: string | undefined | null): Promise<ReleaseInfo>
|
|
600
|
+
/**
|
|
601
|
+
* 获取Release信息
|
|
602
|
+
*
|
|
603
|
+
* ## 参数
|
|
604
|
+
* - `owner` 仓库所有者
|
|
605
|
+
* - `repo` 仓库名称
|
|
606
|
+
* - `tag_name` 标签名称, 可选, 为空时获取最新Release
|
|
607
|
+
*/
|
|
608
|
+
info(repoPath: RepoPath, tagName?: string | undefined | null): Promise<ReleaseInfo>
|
|
609
|
+
/**
|
|
610
|
+
* 获取Release列表
|
|
611
|
+
*
|
|
612
|
+
* ## 参数
|
|
613
|
+
* - `owner` 仓库所有者
|
|
614
|
+
* - `repo` 仓库名称
|
|
615
|
+
*/
|
|
616
|
+
list(repoPath: RepoPath): Promise<Array<ReleaseInfo>>
|
|
617
|
+
/**
|
|
618
|
+
* 更新Release
|
|
619
|
+
*
|
|
620
|
+
* ## 参数
|
|
621
|
+
* - `owner` 仓库所有者
|
|
622
|
+
* - `repo` 仓库名称
|
|
623
|
+
* - `tag_name` 标签名称
|
|
624
|
+
* - `options` 更新参数
|
|
625
|
+
*/
|
|
626
|
+
update(repoPath: RepoPath, tagName: string, options: UpdateReleaseOptions): Promise<ReleaseInfo>
|
|
489
627
|
}
|
|
490
628
|
|
|
491
629
|
export declare class GiteeRepo {
|
|
@@ -498,7 +636,7 @@ export declare class GiteeRepo {
|
|
|
498
636
|
* - `owner` 仓库所有者
|
|
499
637
|
* - `repo` 仓库名称
|
|
500
638
|
*/
|
|
501
|
-
info(
|
|
639
|
+
info(repoPath: RepoPath): Promise<RepoInfo>
|
|
502
640
|
/**
|
|
503
641
|
* 添加仓库协作者
|
|
504
642
|
*
|
|
@@ -508,7 +646,7 @@ export declare class GiteeRepo {
|
|
|
508
646
|
* - `user_name` 协作者用户名
|
|
509
647
|
* - `permission` 协作者权限, 默认为 `Pull`, 可选值为 `Admin`, `Push`, `Pull`
|
|
510
648
|
*/
|
|
511
|
-
addCollaborator(
|
|
649
|
+
addCollaborator(repoPath: RepoPath, userName: string, permission?: CollaboratorPermission | undefined | null): Promise<CollaboratorResult>
|
|
512
650
|
}
|
|
513
651
|
|
|
514
652
|
export declare class GiteeUser {
|
|
@@ -540,9 +678,9 @@ export declare class GiteeUser {
|
|
|
540
678
|
*
|
|
541
679
|
* ## 参数
|
|
542
680
|
* - `user_name` 用户名称, 为空时获取当前登录用户仓库列表
|
|
543
|
-
* - `
|
|
681
|
+
* - `options` 仓库列表选项
|
|
544
682
|
*/
|
|
545
|
-
repoList(userName?: string | undefined | null,
|
|
683
|
+
repoList(userName?: string | undefined | null, options?: RepoListOptions | undefined | null): Promise<Array<RepoInfo>>
|
|
546
684
|
}
|
|
547
685
|
|
|
548
686
|
export declare class GithubClient {
|
|
@@ -574,6 +712,8 @@ export declare class GithubClient {
|
|
|
574
712
|
commit(): GithubCommit
|
|
575
713
|
/** 获取Issue操作模块 */
|
|
576
714
|
issue(): GithubIssue
|
|
715
|
+
/** 获取Release操作模块 */
|
|
716
|
+
release(): GithubRelease
|
|
577
717
|
/**
|
|
578
718
|
* 设置反向代理
|
|
579
719
|
*
|
|
@@ -594,16 +734,16 @@ export declare class GithubCommit {
|
|
|
594
734
|
* - `repo` 仓库名称
|
|
595
735
|
* - `sha` 提交SHA, 如果不设置则会获取默认分支的最新提交
|
|
596
736
|
*/
|
|
597
|
-
info(
|
|
737
|
+
info(repoPath: RepoPath, sha?: string | undefined | null): Promise<CommitInfo>
|
|
598
738
|
/**
|
|
599
739
|
* 获取仓库提交列表
|
|
600
740
|
*
|
|
601
741
|
* ## 参数
|
|
602
742
|
* - `owner` 仓库所有者
|
|
603
743
|
* - `repo` 仓库名称
|
|
604
|
-
* - `
|
|
744
|
+
* - `options` 提交列表选项
|
|
605
745
|
*/
|
|
606
|
-
list(
|
|
746
|
+
list(repoPath: RepoPath, options?: CommitListOptions | undefined | null): Promise<Array<CommitListInfo>>
|
|
607
747
|
}
|
|
608
748
|
|
|
609
749
|
export declare class GithubIssue {
|
|
@@ -617,9 +757,9 @@ export declare class GithubIssue {
|
|
|
617
757
|
* - `repo` 仓库名称
|
|
618
758
|
* - `title` issue标题
|
|
619
759
|
* - `body` issue内容
|
|
620
|
-
* - `
|
|
760
|
+
* - `options` 创建issue选项
|
|
621
761
|
*/
|
|
622
|
-
create(
|
|
762
|
+
create(repoPath: RepoPath, title: string, body?: string | undefined | null, options?: CreateIssueOptions | undefined | null): Promise<IssueInfo>
|
|
623
763
|
/**
|
|
624
764
|
* 获取issue信息
|
|
625
765
|
*
|
|
@@ -628,16 +768,16 @@ export declare class GithubIssue {
|
|
|
628
768
|
* - `repo` 仓库名称
|
|
629
769
|
* - `issue_number` issue编号
|
|
630
770
|
*/
|
|
631
|
-
info(
|
|
771
|
+
info(repoPath: RepoPath, issueNumber: string): Promise<IssueInfo>
|
|
632
772
|
/**
|
|
633
773
|
* 获取仓库所有issue信息
|
|
634
774
|
*
|
|
635
775
|
* ## 参数
|
|
636
776
|
* - `owner` 仓库所有者
|
|
637
777
|
* - `repo` 仓库名称
|
|
638
|
-
* - `
|
|
778
|
+
* - `options` issue列表选项
|
|
639
779
|
*/
|
|
640
|
-
list(
|
|
780
|
+
list(repoPath: RepoPath, options?: IssueListOptions | undefined | null): Promise<Array<IssueInfo>>
|
|
641
781
|
/**
|
|
642
782
|
* 更新issue信息
|
|
643
783
|
*
|
|
@@ -647,7 +787,7 @@ export declare class GithubIssue {
|
|
|
647
787
|
* - `issue_number` issue编号
|
|
648
788
|
* - `options` 更新issue选项
|
|
649
789
|
*/
|
|
650
|
-
update(
|
|
790
|
+
update(repoPath: RepoPath, issueNumber: string, options?: UpdateIssueOptions | undefined | null): Promise<IssueInfo>
|
|
651
791
|
}
|
|
652
792
|
|
|
653
793
|
export declare class GithubOrg {
|
|
@@ -672,9 +812,53 @@ export declare class GithubOrg {
|
|
|
672
812
|
*
|
|
673
813
|
* ## 参数
|
|
674
814
|
* - `org_name` 组织名称
|
|
675
|
-
* - `
|
|
815
|
+
* - `options` 仓库列表选项
|
|
676
816
|
*/
|
|
677
|
-
repoList(orgName: string,
|
|
817
|
+
repoList(orgName: string, options?: RepoListOptions | undefined | null): Promise<Array<RepoInfo>>
|
|
818
|
+
}
|
|
819
|
+
|
|
820
|
+
export declare class GithubRelease {
|
|
821
|
+
|
|
822
|
+
constructor()
|
|
823
|
+
/**
|
|
824
|
+
* 创建一个Release
|
|
825
|
+
*
|
|
826
|
+
* ## 参数
|
|
827
|
+
* - `owner` 仓库所有者
|
|
828
|
+
* - `repo` 仓库名称
|
|
829
|
+
* - `tag_name` 标签名称
|
|
830
|
+
* - `name` Release名称, 可选
|
|
831
|
+
* - `body` Release内容, 可选
|
|
832
|
+
* - `target_commitish` 目标提交SHA或分支, 可选
|
|
833
|
+
*/
|
|
834
|
+
create(repoPath: RepoPath, tagName: string, name?: string | undefined | null, body?: string | undefined | null, targetCommitish?: string | undefined | null): Promise<ReleaseInfo>
|
|
835
|
+
/**
|
|
836
|
+
* 获取Release信息
|
|
837
|
+
*
|
|
838
|
+
* ## 参数
|
|
839
|
+
* - `owner` 仓库所有者
|
|
840
|
+
* - `repo` 仓库名称
|
|
841
|
+
* - `tag_name` 标签名称, 可选, 为空时获取最新Release
|
|
842
|
+
*/
|
|
843
|
+
info(repoPath: RepoPath, tagName?: string | undefined | null): Promise<ReleaseInfo>
|
|
844
|
+
/**
|
|
845
|
+
* 获取Release列表
|
|
846
|
+
*
|
|
847
|
+
* ## 参数
|
|
848
|
+
* - `owner` 仓库所有者
|
|
849
|
+
* - `repo` 仓库名称
|
|
850
|
+
*/
|
|
851
|
+
list(repoPath: RepoPath): Promise<Array<ReleaseInfo>>
|
|
852
|
+
/**
|
|
853
|
+
* 更新Release
|
|
854
|
+
*
|
|
855
|
+
* ## 参数
|
|
856
|
+
* - `owner` 仓库所有者
|
|
857
|
+
* - `repo` 仓库名称
|
|
858
|
+
* - `tag_name` 标签名称
|
|
859
|
+
* - `options` 更新参数
|
|
860
|
+
*/
|
|
861
|
+
update(repoPath: RepoPath, tagName: string, options: UpdateReleaseOptions): Promise<ReleaseInfo>
|
|
678
862
|
}
|
|
679
863
|
|
|
680
864
|
export declare class GithubRepo {
|
|
@@ -687,7 +871,7 @@ export declare class GithubRepo {
|
|
|
687
871
|
* - `owner` 仓库所有者
|
|
688
872
|
* - `repo` 仓库名称
|
|
689
873
|
*/
|
|
690
|
-
info(
|
|
874
|
+
info(repoPath: RepoPath): Promise<RepoInfo>
|
|
691
875
|
/**
|
|
692
876
|
* 添加仓库协作者
|
|
693
877
|
*
|
|
@@ -697,7 +881,7 @@ export declare class GithubRepo {
|
|
|
697
881
|
* - `user_name` 协作者用户名
|
|
698
882
|
* - `permission` 协作者权限, 默认为 `Pull`, 可选值为 `Admin`, `Push`, `Pull`
|
|
699
883
|
*/
|
|
700
|
-
addCollaborator(
|
|
884
|
+
addCollaborator(repoPath: RepoPath, userName: string, permission?: CollaboratorPermission | undefined | null): Promise<CollaboratorResult>
|
|
701
885
|
}
|
|
702
886
|
|
|
703
887
|
export declare class GithubUser {
|
|
@@ -729,9 +913,16 @@ export declare class GithubUser {
|
|
|
729
913
|
*
|
|
730
914
|
* ## 参数
|
|
731
915
|
* - `user_name` 用户名称, 为空时获取当前登录用户仓库列表
|
|
732
|
-
* - `
|
|
916
|
+
* - `options` 仓库列表选项
|
|
733
917
|
*/
|
|
734
|
-
repoList(userName?: string | undefined | null,
|
|
918
|
+
repoList(userName?: string | undefined | null, options?: RepoListOptions | undefined | null): Promise<Array<RepoInfo>>
|
|
919
|
+
}
|
|
920
|
+
|
|
921
|
+
export interface AssetsInfo {
|
|
922
|
+
/** 资源文件名 */
|
|
923
|
+
name: string
|
|
924
|
+
/** 资源下载地址 */
|
|
925
|
+
url: string
|
|
735
926
|
}
|
|
736
927
|
|
|
737
928
|
export declare const enum CollaboratorPermission {
|
|
@@ -766,8 +957,15 @@ export interface CommitInfo {
|
|
|
766
957
|
commit: CommitData
|
|
767
958
|
/** 提交统计信息 */
|
|
768
959
|
stats: StatsInfo
|
|
769
|
-
/**
|
|
770
|
-
|
|
960
|
+
/** 文件差异状态 */
|
|
961
|
+
files: Array<FileInfo>
|
|
962
|
+
}
|
|
963
|
+
|
|
964
|
+
export interface CommitListInfo {
|
|
965
|
+
/** 提交的SHA */
|
|
966
|
+
sha: string
|
|
967
|
+
/** 提交的数据 */
|
|
968
|
+
commit: CommitData
|
|
771
969
|
}
|
|
772
970
|
|
|
773
971
|
export interface CommitListOptions {
|
|
@@ -821,6 +1019,36 @@ export interface CreateIssueOptions {
|
|
|
821
1019
|
assignees?: Array<string>
|
|
822
1020
|
}
|
|
823
1021
|
|
|
1022
|
+
export interface FileInfo {
|
|
1023
|
+
/** 文件名 */
|
|
1024
|
+
fileName: string
|
|
1025
|
+
/** 文件状态 */
|
|
1026
|
+
status: FileStatus
|
|
1027
|
+
/** 新增行数 */
|
|
1028
|
+
additions: number
|
|
1029
|
+
/** 删除行数 */
|
|
1030
|
+
deletions: number
|
|
1031
|
+
/** 修改行数 */
|
|
1032
|
+
changes: number
|
|
1033
|
+
}
|
|
1034
|
+
|
|
1035
|
+
export declare const enum FileStatus {
|
|
1036
|
+
/** 新增文件 */
|
|
1037
|
+
Added = 'Added',
|
|
1038
|
+
/** 修改文件 */
|
|
1039
|
+
Modified = 'Modified',
|
|
1040
|
+
/** 删除文件 */
|
|
1041
|
+
Deleted = 'Deleted',
|
|
1042
|
+
/** 重命名文件 */
|
|
1043
|
+
Renamed = 'Renamed',
|
|
1044
|
+
/** 复制文件 */
|
|
1045
|
+
Copied = 'Copied',
|
|
1046
|
+
/** 文件已变更 */
|
|
1047
|
+
Changed = 'Changed',
|
|
1048
|
+
/** 文件未变更 */
|
|
1049
|
+
UnChanged = 'UnChanged'
|
|
1050
|
+
}
|
|
1051
|
+
|
|
824
1052
|
export interface IssueInfo {
|
|
825
1053
|
/** 议题编号 */
|
|
826
1054
|
number: string
|
|
@@ -888,11 +1116,30 @@ export interface OrgInfo {
|
|
|
888
1116
|
followCount: number
|
|
889
1117
|
}
|
|
890
1118
|
|
|
891
|
-
export interface
|
|
892
|
-
/**
|
|
893
|
-
|
|
894
|
-
/**
|
|
895
|
-
|
|
1119
|
+
export interface ReleaseAuthorInfo {
|
|
1120
|
+
/** 用户登录名 */
|
|
1121
|
+
login: string
|
|
1122
|
+
/** 用户头像地址 */
|
|
1123
|
+
avatarUrl: string
|
|
1124
|
+
}
|
|
1125
|
+
|
|
1126
|
+
export interface ReleaseInfo {
|
|
1127
|
+
/** 标签名 */
|
|
1128
|
+
tagName: string
|
|
1129
|
+
/** 目标提交分支或 SHA */
|
|
1130
|
+
targetCommitish: string
|
|
1131
|
+
/** 是否为预发布版本 */
|
|
1132
|
+
prerelease: boolean
|
|
1133
|
+
/** 发布名称 */
|
|
1134
|
+
name: string
|
|
1135
|
+
/** 发布说明内容 */
|
|
1136
|
+
body?: string
|
|
1137
|
+
/** 发布作者信息 */
|
|
1138
|
+
author: ReleaseAuthorInfo
|
|
1139
|
+
/** 创建时间 */
|
|
1140
|
+
createdAt: Date
|
|
1141
|
+
/** 附件资源列表 */
|
|
1142
|
+
assets: Array<AssetsInfo>
|
|
896
1143
|
}
|
|
897
1144
|
|
|
898
1145
|
export interface RepoInfo {
|
|
@@ -924,13 +1171,20 @@ export interface RepoInfo {
|
|
|
924
1171
|
pushedAt: Date
|
|
925
1172
|
}
|
|
926
1173
|
|
|
927
|
-
export interface
|
|
1174
|
+
export interface RepoListOptions {
|
|
928
1175
|
/** 每页数量,默认 30,最大 100 */
|
|
929
1176
|
perPage?: number
|
|
930
1177
|
/** 页码,默认 1 */
|
|
931
1178
|
page?: number
|
|
932
1179
|
}
|
|
933
1180
|
|
|
1181
|
+
export interface RepoPath {
|
|
1182
|
+
/** 仓库所有者 */
|
|
1183
|
+
owner: string
|
|
1184
|
+
/** 仓库名称 */
|
|
1185
|
+
repo: string
|
|
1186
|
+
}
|
|
1187
|
+
|
|
934
1188
|
export declare const enum RepoVisibility {
|
|
935
1189
|
/** 公开 */
|
|
936
1190
|
Public = 'Public',
|
|
@@ -963,6 +1217,13 @@ export interface UpdateIssueOptions {
|
|
|
963
1217
|
state?: StateType
|
|
964
1218
|
}
|
|
965
1219
|
|
|
1220
|
+
export interface UpdateReleaseOptions {
|
|
1221
|
+
/** 发行名称 */
|
|
1222
|
+
name?: string
|
|
1223
|
+
/** 发行正文 */
|
|
1224
|
+
body?: string
|
|
1225
|
+
}
|
|
1226
|
+
|
|
966
1227
|
export interface UserInfo {
|
|
967
1228
|
/** 登录用户名 */
|
|
968
1229
|
login: string
|
package/dist/index.js
CHANGED
|
@@ -81,8 +81,8 @@ function requireNative() {
|
|
|
81
81
|
try {
|
|
82
82
|
const binding = require('@puniyu/nipaw-android-arm64')
|
|
83
83
|
const bindingPackageVersion = require('@puniyu/nipaw-android-arm64/package.json').version
|
|
84
|
-
if (bindingPackageVersion !== '1.
|
|
85
|
-
throw new Error(`Native binding package version mismatch, expected 1.
|
|
84
|
+
if (bindingPackageVersion !== '1.9.2' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
85
|
+
throw new Error(`Native binding package version mismatch, expected 1.9.2 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
86
86
|
}
|
|
87
87
|
return binding
|
|
88
88
|
} catch (e) {
|
|
@@ -97,8 +97,8 @@ function requireNative() {
|
|
|
97
97
|
try {
|
|
98
98
|
const binding = require('@puniyu/nipaw-android-arm-eabi')
|
|
99
99
|
const bindingPackageVersion = require('@puniyu/nipaw-android-arm-eabi/package.json').version
|
|
100
|
-
if (bindingPackageVersion !== '1.
|
|
101
|
-
throw new Error(`Native binding package version mismatch, expected 1.
|
|
100
|
+
if (bindingPackageVersion !== '1.9.2' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
101
|
+
throw new Error(`Native binding package version mismatch, expected 1.9.2 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
102
102
|
}
|
|
103
103
|
return binding
|
|
104
104
|
} catch (e) {
|
|
@@ -118,8 +118,8 @@ function requireNative() {
|
|
|
118
118
|
try {
|
|
119
119
|
const binding = require('@puniyu/nipaw-win32-x64-gnu')
|
|
120
120
|
const bindingPackageVersion = require('@puniyu/nipaw-win32-x64-gnu/package.json').version
|
|
121
|
-
if (bindingPackageVersion !== '1.
|
|
122
|
-
throw new Error(`Native binding package version mismatch, expected 1.
|
|
121
|
+
if (bindingPackageVersion !== '1.9.2' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
122
|
+
throw new Error(`Native binding package version mismatch, expected 1.9.2 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
123
123
|
}
|
|
124
124
|
return binding
|
|
125
125
|
} catch (e) {
|
|
@@ -134,8 +134,8 @@ function requireNative() {
|
|
|
134
134
|
try {
|
|
135
135
|
const binding = require('@puniyu/nipaw-win32-x64-msvc')
|
|
136
136
|
const bindingPackageVersion = require('@puniyu/nipaw-win32-x64-msvc/package.json').version
|
|
137
|
-
if (bindingPackageVersion !== '1.
|
|
138
|
-
throw new Error(`Native binding package version mismatch, expected 1.
|
|
137
|
+
if (bindingPackageVersion !== '1.9.2' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
138
|
+
throw new Error(`Native binding package version mismatch, expected 1.9.2 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
139
139
|
}
|
|
140
140
|
return binding
|
|
141
141
|
} catch (e) {
|
|
@@ -151,8 +151,8 @@ function requireNative() {
|
|
|
151
151
|
try {
|
|
152
152
|
const binding = require('@puniyu/nipaw-win32-ia32-msvc')
|
|
153
153
|
const bindingPackageVersion = require('@puniyu/nipaw-win32-ia32-msvc/package.json').version
|
|
154
|
-
if (bindingPackageVersion !== '1.
|
|
155
|
-
throw new Error(`Native binding package version mismatch, expected 1.
|
|
154
|
+
if (bindingPackageVersion !== '1.9.2' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
155
|
+
throw new Error(`Native binding package version mismatch, expected 1.9.2 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
156
156
|
}
|
|
157
157
|
return binding
|
|
158
158
|
} catch (e) {
|
|
@@ -167,8 +167,8 @@ function requireNative() {
|
|
|
167
167
|
try {
|
|
168
168
|
const binding = require('@puniyu/nipaw-win32-arm64-msvc')
|
|
169
169
|
const bindingPackageVersion = require('@puniyu/nipaw-win32-arm64-msvc/package.json').version
|
|
170
|
-
if (bindingPackageVersion !== '1.
|
|
171
|
-
throw new Error(`Native binding package version mismatch, expected 1.
|
|
170
|
+
if (bindingPackageVersion !== '1.9.2' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
171
|
+
throw new Error(`Native binding package version mismatch, expected 1.9.2 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
172
172
|
}
|
|
173
173
|
return binding
|
|
174
174
|
} catch (e) {
|
|
@@ -186,8 +186,8 @@ function requireNative() {
|
|
|
186
186
|
try {
|
|
187
187
|
const binding = require('@puniyu/nipaw-darwin-universal')
|
|
188
188
|
const bindingPackageVersion = require('@puniyu/nipaw-darwin-universal/package.json').version
|
|
189
|
-
if (bindingPackageVersion !== '1.
|
|
190
|
-
throw new Error(`Native binding package version mismatch, expected 1.
|
|
189
|
+
if (bindingPackageVersion !== '1.9.2' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
190
|
+
throw new Error(`Native binding package version mismatch, expected 1.9.2 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
191
191
|
}
|
|
192
192
|
return binding
|
|
193
193
|
} catch (e) {
|
|
@@ -202,8 +202,8 @@ function requireNative() {
|
|
|
202
202
|
try {
|
|
203
203
|
const binding = require('@puniyu/nipaw-darwin-x64')
|
|
204
204
|
const bindingPackageVersion = require('@puniyu/nipaw-darwin-x64/package.json').version
|
|
205
|
-
if (bindingPackageVersion !== '1.
|
|
206
|
-
throw new Error(`Native binding package version mismatch, expected 1.
|
|
205
|
+
if (bindingPackageVersion !== '1.9.2' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
206
|
+
throw new Error(`Native binding package version mismatch, expected 1.9.2 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
207
207
|
}
|
|
208
208
|
return binding
|
|
209
209
|
} catch (e) {
|
|
@@ -218,8 +218,8 @@ function requireNative() {
|
|
|
218
218
|
try {
|
|
219
219
|
const binding = require('@puniyu/nipaw-darwin-arm64')
|
|
220
220
|
const bindingPackageVersion = require('@puniyu/nipaw-darwin-arm64/package.json').version
|
|
221
|
-
if (bindingPackageVersion !== '1.
|
|
222
|
-
throw new Error(`Native binding package version mismatch, expected 1.
|
|
221
|
+
if (bindingPackageVersion !== '1.9.2' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
222
|
+
throw new Error(`Native binding package version mismatch, expected 1.9.2 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
223
223
|
}
|
|
224
224
|
return binding
|
|
225
225
|
} catch (e) {
|
|
@@ -238,8 +238,8 @@ function requireNative() {
|
|
|
238
238
|
try {
|
|
239
239
|
const binding = require('@puniyu/nipaw-freebsd-x64')
|
|
240
240
|
const bindingPackageVersion = require('@puniyu/nipaw-freebsd-x64/package.json').version
|
|
241
|
-
if (bindingPackageVersion !== '1.
|
|
242
|
-
throw new Error(`Native binding package version mismatch, expected 1.
|
|
241
|
+
if (bindingPackageVersion !== '1.9.2' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
242
|
+
throw new Error(`Native binding package version mismatch, expected 1.9.2 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
243
243
|
}
|
|
244
244
|
return binding
|
|
245
245
|
} catch (e) {
|
|
@@ -254,8 +254,8 @@ function requireNative() {
|
|
|
254
254
|
try {
|
|
255
255
|
const binding = require('@puniyu/nipaw-freebsd-arm64')
|
|
256
256
|
const bindingPackageVersion = require('@puniyu/nipaw-freebsd-arm64/package.json').version
|
|
257
|
-
if (bindingPackageVersion !== '1.
|
|
258
|
-
throw new Error(`Native binding package version mismatch, expected 1.
|
|
257
|
+
if (bindingPackageVersion !== '1.9.2' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
258
|
+
throw new Error(`Native binding package version mismatch, expected 1.9.2 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
259
259
|
}
|
|
260
260
|
return binding
|
|
261
261
|
} catch (e) {
|
|
@@ -275,8 +275,8 @@ function requireNative() {
|
|
|
275
275
|
try {
|
|
276
276
|
const binding = require('@puniyu/nipaw-linux-x64-musl')
|
|
277
277
|
const bindingPackageVersion = require('@puniyu/nipaw-linux-x64-musl/package.json').version
|
|
278
|
-
if (bindingPackageVersion !== '1.
|
|
279
|
-
throw new Error(`Native binding package version mismatch, expected 1.
|
|
278
|
+
if (bindingPackageVersion !== '1.9.2' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
279
|
+
throw new Error(`Native binding package version mismatch, expected 1.9.2 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
280
280
|
}
|
|
281
281
|
return binding
|
|
282
282
|
} catch (e) {
|
|
@@ -291,8 +291,8 @@ function requireNative() {
|
|
|
291
291
|
try {
|
|
292
292
|
const binding = require('@puniyu/nipaw-linux-x64-gnu')
|
|
293
293
|
const bindingPackageVersion = require('@puniyu/nipaw-linux-x64-gnu/package.json').version
|
|
294
|
-
if (bindingPackageVersion !== '1.
|
|
295
|
-
throw new Error(`Native binding package version mismatch, expected 1.
|
|
294
|
+
if (bindingPackageVersion !== '1.9.2' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
295
|
+
throw new Error(`Native binding package version mismatch, expected 1.9.2 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
296
296
|
}
|
|
297
297
|
return binding
|
|
298
298
|
} catch (e) {
|
|
@@ -309,8 +309,8 @@ function requireNative() {
|
|
|
309
309
|
try {
|
|
310
310
|
const binding = require('@puniyu/nipaw-linux-arm64-musl')
|
|
311
311
|
const bindingPackageVersion = require('@puniyu/nipaw-linux-arm64-musl/package.json').version
|
|
312
|
-
if (bindingPackageVersion !== '1.
|
|
313
|
-
throw new Error(`Native binding package version mismatch, expected 1.
|
|
312
|
+
if (bindingPackageVersion !== '1.9.2' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
313
|
+
throw new Error(`Native binding package version mismatch, expected 1.9.2 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
314
314
|
}
|
|
315
315
|
return binding
|
|
316
316
|
} catch (e) {
|
|
@@ -325,8 +325,8 @@ function requireNative() {
|
|
|
325
325
|
try {
|
|
326
326
|
const binding = require('@puniyu/nipaw-linux-arm64-gnu')
|
|
327
327
|
const bindingPackageVersion = require('@puniyu/nipaw-linux-arm64-gnu/package.json').version
|
|
328
|
-
if (bindingPackageVersion !== '1.
|
|
329
|
-
throw new Error(`Native binding package version mismatch, expected 1.
|
|
328
|
+
if (bindingPackageVersion !== '1.9.2' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
329
|
+
throw new Error(`Native binding package version mismatch, expected 1.9.2 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
330
330
|
}
|
|
331
331
|
return binding
|
|
332
332
|
} catch (e) {
|
|
@@ -343,8 +343,8 @@ function requireNative() {
|
|
|
343
343
|
try {
|
|
344
344
|
const binding = require('@puniyu/nipaw-linux-arm-musleabihf')
|
|
345
345
|
const bindingPackageVersion = require('@puniyu/nipaw-linux-arm-musleabihf/package.json').version
|
|
346
|
-
if (bindingPackageVersion !== '1.
|
|
347
|
-
throw new Error(`Native binding package version mismatch, expected 1.
|
|
346
|
+
if (bindingPackageVersion !== '1.9.2' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
347
|
+
throw new Error(`Native binding package version mismatch, expected 1.9.2 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
348
348
|
}
|
|
349
349
|
return binding
|
|
350
350
|
} catch (e) {
|
|
@@ -359,8 +359,8 @@ function requireNative() {
|
|
|
359
359
|
try {
|
|
360
360
|
const binding = require('@puniyu/nipaw-linux-arm-gnueabihf')
|
|
361
361
|
const bindingPackageVersion = require('@puniyu/nipaw-linux-arm-gnueabihf/package.json').version
|
|
362
|
-
if (bindingPackageVersion !== '1.
|
|
363
|
-
throw new Error(`Native binding package version mismatch, expected 1.
|
|
362
|
+
if (bindingPackageVersion !== '1.9.2' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
363
|
+
throw new Error(`Native binding package version mismatch, expected 1.9.2 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
364
364
|
}
|
|
365
365
|
return binding
|
|
366
366
|
} catch (e) {
|
|
@@ -377,8 +377,8 @@ function requireNative() {
|
|
|
377
377
|
try {
|
|
378
378
|
const binding = require('@puniyu/nipaw-linux-loong64-musl')
|
|
379
379
|
const bindingPackageVersion = require('@puniyu/nipaw-linux-loong64-musl/package.json').version
|
|
380
|
-
if (bindingPackageVersion !== '1.
|
|
381
|
-
throw new Error(`Native binding package version mismatch, expected 1.
|
|
380
|
+
if (bindingPackageVersion !== '1.9.2' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
381
|
+
throw new Error(`Native binding package version mismatch, expected 1.9.2 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
382
382
|
}
|
|
383
383
|
return binding
|
|
384
384
|
} catch (e) {
|
|
@@ -393,8 +393,8 @@ function requireNative() {
|
|
|
393
393
|
try {
|
|
394
394
|
const binding = require('@puniyu/nipaw-linux-loong64-gnu')
|
|
395
395
|
const bindingPackageVersion = require('@puniyu/nipaw-linux-loong64-gnu/package.json').version
|
|
396
|
-
if (bindingPackageVersion !== '1.
|
|
397
|
-
throw new Error(`Native binding package version mismatch, expected 1.
|
|
396
|
+
if (bindingPackageVersion !== '1.9.2' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
397
|
+
throw new Error(`Native binding package version mismatch, expected 1.9.2 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
398
398
|
}
|
|
399
399
|
return binding
|
|
400
400
|
} catch (e) {
|
|
@@ -411,8 +411,8 @@ function requireNative() {
|
|
|
411
411
|
try {
|
|
412
412
|
const binding = require('@puniyu/nipaw-linux-riscv64-musl')
|
|
413
413
|
const bindingPackageVersion = require('@puniyu/nipaw-linux-riscv64-musl/package.json').version
|
|
414
|
-
if (bindingPackageVersion !== '1.
|
|
415
|
-
throw new Error(`Native binding package version mismatch, expected 1.
|
|
414
|
+
if (bindingPackageVersion !== '1.9.2' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
415
|
+
throw new Error(`Native binding package version mismatch, expected 1.9.2 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
416
416
|
}
|
|
417
417
|
return binding
|
|
418
418
|
} catch (e) {
|
|
@@ -427,8 +427,8 @@ function requireNative() {
|
|
|
427
427
|
try {
|
|
428
428
|
const binding = require('@puniyu/nipaw-linux-riscv64-gnu')
|
|
429
429
|
const bindingPackageVersion = require('@puniyu/nipaw-linux-riscv64-gnu/package.json').version
|
|
430
|
-
if (bindingPackageVersion !== '1.
|
|
431
|
-
throw new Error(`Native binding package version mismatch, expected 1.
|
|
430
|
+
if (bindingPackageVersion !== '1.9.2' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
431
|
+
throw new Error(`Native binding package version mismatch, expected 1.9.2 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
432
432
|
}
|
|
433
433
|
return binding
|
|
434
434
|
} catch (e) {
|
|
@@ -444,8 +444,8 @@ function requireNative() {
|
|
|
444
444
|
try {
|
|
445
445
|
const binding = require('@puniyu/nipaw-linux-ppc64-gnu')
|
|
446
446
|
const bindingPackageVersion = require('@puniyu/nipaw-linux-ppc64-gnu/package.json').version
|
|
447
|
-
if (bindingPackageVersion !== '1.
|
|
448
|
-
throw new Error(`Native binding package version mismatch, expected 1.
|
|
447
|
+
if (bindingPackageVersion !== '1.9.2' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
448
|
+
throw new Error(`Native binding package version mismatch, expected 1.9.2 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
449
449
|
}
|
|
450
450
|
return binding
|
|
451
451
|
} catch (e) {
|
|
@@ -460,8 +460,8 @@ function requireNative() {
|
|
|
460
460
|
try {
|
|
461
461
|
const binding = require('@puniyu/nipaw-linux-s390x-gnu')
|
|
462
462
|
const bindingPackageVersion = require('@puniyu/nipaw-linux-s390x-gnu/package.json').version
|
|
463
|
-
if (bindingPackageVersion !== '1.
|
|
464
|
-
throw new Error(`Native binding package version mismatch, expected 1.
|
|
463
|
+
if (bindingPackageVersion !== '1.9.2' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
464
|
+
throw new Error(`Native binding package version mismatch, expected 1.9.2 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
465
465
|
}
|
|
466
466
|
return binding
|
|
467
467
|
} catch (e) {
|
|
@@ -480,8 +480,8 @@ function requireNative() {
|
|
|
480
480
|
try {
|
|
481
481
|
const binding = require('@puniyu/nipaw-openharmony-arm64')
|
|
482
482
|
const bindingPackageVersion = require('@puniyu/nipaw-openharmony-arm64/package.json').version
|
|
483
|
-
if (bindingPackageVersion !== '1.
|
|
484
|
-
throw new Error(`Native binding package version mismatch, expected 1.
|
|
483
|
+
if (bindingPackageVersion !== '1.9.2' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
484
|
+
throw new Error(`Native binding package version mismatch, expected 1.9.2 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
485
485
|
}
|
|
486
486
|
return binding
|
|
487
487
|
} catch (e) {
|
|
@@ -496,8 +496,8 @@ function requireNative() {
|
|
|
496
496
|
try {
|
|
497
497
|
const binding = require('@puniyu/nipaw-openharmony-x64')
|
|
498
498
|
const bindingPackageVersion = require('@puniyu/nipaw-openharmony-x64/package.json').version
|
|
499
|
-
if (bindingPackageVersion !== '1.
|
|
500
|
-
throw new Error(`Native binding package version mismatch, expected 1.
|
|
499
|
+
if (bindingPackageVersion !== '1.9.2' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
500
|
+
throw new Error(`Native binding package version mismatch, expected 1.9.2 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
501
501
|
}
|
|
502
502
|
return binding
|
|
503
503
|
} catch (e) {
|
|
@@ -512,8 +512,8 @@ function requireNative() {
|
|
|
512
512
|
try {
|
|
513
513
|
const binding = require('@puniyu/nipaw-openharmony-arm')
|
|
514
514
|
const bindingPackageVersion = require('@puniyu/nipaw-openharmony-arm/package.json').version
|
|
515
|
-
if (bindingPackageVersion !== '1.
|
|
516
|
-
throw new Error(`Native binding package version mismatch, expected 1.
|
|
515
|
+
if (bindingPackageVersion !== '1.9.2' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
516
|
+
throw new Error(`Native binding package version mismatch, expected 1.9.2 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
517
517
|
}
|
|
518
518
|
return binding
|
|
519
519
|
} catch (e) {
|
|
@@ -540,13 +540,17 @@ if (!nativeBinding || process.env.NAPI_RS_FORCE_WASI) {
|
|
|
540
540
|
wasiBindingError = err
|
|
541
541
|
}
|
|
542
542
|
}
|
|
543
|
-
if (!nativeBinding) {
|
|
543
|
+
if (!nativeBinding || process.env.NAPI_RS_FORCE_WASI) {
|
|
544
544
|
try {
|
|
545
545
|
wasiBinding = require('@puniyu/nipaw-wasm32-wasi')
|
|
546
546
|
nativeBinding = wasiBinding
|
|
547
547
|
} catch (err) {
|
|
548
548
|
if (process.env.NAPI_RS_FORCE_WASI) {
|
|
549
|
-
wasiBindingError
|
|
549
|
+
if (!wasiBindingError) {
|
|
550
|
+
wasiBindingError = err
|
|
551
|
+
} else {
|
|
552
|
+
wasiBindingError.cause = err
|
|
553
|
+
}
|
|
550
554
|
loadErrors.push(err)
|
|
551
555
|
}
|
|
552
556
|
}
|
|
@@ -575,31 +579,36 @@ if (!nativeBinding) {
|
|
|
575
579
|
throw new Error(`Failed to load native binding`)
|
|
576
580
|
}
|
|
577
581
|
|
|
578
|
-
const { CnbClient, CnbCommit, CnbIssue, CnbOrg, CnbRepo, CnbUser, GitCodeClient, GitCodeCommit, GitCodeIssue, GitCodeOrg, GitCodeRepo, GitCodeUser, GiteeClient, GiteeCommit, GiteeIssue, GiteeOrg, GiteeRepo, GiteeUser, GithubClient, GithubCommit, GithubIssue, GithubOrg, GithubRepo, GithubUser, CollaboratorPermission, RepoVisibility, StateType } = nativeBinding
|
|
582
|
+
const { CnbClient, CnbCommit, CnbIssue, CnbOrg, CnbRelease, CnbRepo, CnbUser, GitCodeClient, GitCodeCommit, GitCodeIssue, GitCodeOrg, GitCodeRelease, GitCodeRepo, GitCodeUser, GiteeClient, GiteeCommit, GiteeIssue, GiteeOrg, GiteeRelease, GiteeRepo, GiteeUser, GithubClient, GithubCommit, GithubIssue, GithubOrg, GithubRelease, GithubRepo, GithubUser, CollaboratorPermission, FileStatus, RepoVisibility, StateType } = nativeBinding
|
|
579
583
|
export { CnbClient }
|
|
580
584
|
export { CnbCommit }
|
|
581
585
|
export { CnbIssue }
|
|
582
586
|
export { CnbOrg }
|
|
587
|
+
export { CnbRelease }
|
|
583
588
|
export { CnbRepo }
|
|
584
589
|
export { CnbUser }
|
|
585
590
|
export { GitCodeClient }
|
|
586
591
|
export { GitCodeCommit }
|
|
587
592
|
export { GitCodeIssue }
|
|
588
593
|
export { GitCodeOrg }
|
|
594
|
+
export { GitCodeRelease }
|
|
589
595
|
export { GitCodeRepo }
|
|
590
596
|
export { GitCodeUser }
|
|
591
597
|
export { GiteeClient }
|
|
592
598
|
export { GiteeCommit }
|
|
593
599
|
export { GiteeIssue }
|
|
594
600
|
export { GiteeOrg }
|
|
601
|
+
export { GiteeRelease }
|
|
595
602
|
export { GiteeRepo }
|
|
596
603
|
export { GiteeUser }
|
|
597
604
|
export { GithubClient }
|
|
598
605
|
export { GithubCommit }
|
|
599
606
|
export { GithubIssue }
|
|
600
607
|
export { GithubOrg }
|
|
608
|
+
export { GithubRelease }
|
|
601
609
|
export { GithubRepo }
|
|
602
610
|
export { GithubUser }
|
|
603
611
|
export { CollaboratorPermission }
|
|
612
|
+
export { FileStatus }
|
|
604
613
|
export { RepoVisibility }
|
|
605
614
|
export { StateType }
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@puniyu/nipaw",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.9.2",
|
|
4
4
|
"description": "一个git平台封装库",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -40,11 +40,11 @@
|
|
|
40
40
|
"@napi-rs/cli": "^3.4.1"
|
|
41
41
|
},
|
|
42
42
|
"optionalDependencies": {
|
|
43
|
-
"@puniyu/nipaw-win32-x64-msvc": "1.
|
|
44
|
-
"@puniyu/nipaw-darwin-x64": "1.
|
|
45
|
-
"@puniyu/nipaw-linux-x64-gnu": "1.
|
|
46
|
-
"@puniyu/nipaw-linux-arm64-gnu": "1.
|
|
47
|
-
"@puniyu/nipaw-darwin-arm64": "1.
|
|
43
|
+
"@puniyu/nipaw-win32-x64-msvc": "1.9.2",
|
|
44
|
+
"@puniyu/nipaw-darwin-x64": "1.9.2",
|
|
45
|
+
"@puniyu/nipaw-linux-x64-gnu": "1.9.2",
|
|
46
|
+
"@puniyu/nipaw-linux-arm64-gnu": "1.9.2",
|
|
47
|
+
"@puniyu/nipaw-darwin-arm64": "1.9.2"
|
|
48
48
|
},
|
|
49
49
|
"scripts": {
|
|
50
50
|
"artifacts": "napi artifacts",
|