@puniyu/nipaw 1.9.0 → 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 +94 -80
- package/dist/index.js +58 -54
- package/package.json +6 -6
package/dist/index.d.ts
CHANGED
|
@@ -43,16 +43,16 @@ export declare class CnbCommit {
|
|
|
43
43
|
* - `repo` 仓库名称
|
|
44
44
|
* - `sha` 提交SHA, 如果不设置则会获取默认分支的最新提交
|
|
45
45
|
*/
|
|
46
|
-
info(
|
|
46
|
+
info(repoPath: RepoPath, sha?: string | undefined | null): Promise<CommitInfo>
|
|
47
47
|
/**
|
|
48
48
|
* 获取仓库提交列表
|
|
49
49
|
*
|
|
50
50
|
* ## 参数
|
|
51
51
|
* - `owner` 仓库所有者
|
|
52
52
|
* - `repo` 仓库名称
|
|
53
|
-
* - `
|
|
53
|
+
* - `options` 提交列表选项
|
|
54
54
|
*/
|
|
55
|
-
list(
|
|
55
|
+
list(repoPath: RepoPath, options?: CommitListOptions | undefined | null): Promise<Array<CommitListInfo>>
|
|
56
56
|
}
|
|
57
57
|
|
|
58
58
|
export declare class CnbIssue {
|
|
@@ -66,9 +66,9 @@ export declare class CnbIssue {
|
|
|
66
66
|
* - `repo` 仓库名称
|
|
67
67
|
* - `title` issue标题
|
|
68
68
|
* - `body` issue内容
|
|
69
|
-
* - `
|
|
69
|
+
* - `options` 创建issue选项
|
|
70
70
|
*/
|
|
71
|
-
create(
|
|
71
|
+
create(repoPath: RepoPath, title: string, body?: string | undefined | null, options?: CreateIssueOptions | undefined | null): Promise<IssueInfo>
|
|
72
72
|
/**
|
|
73
73
|
* 获取issue信息
|
|
74
74
|
*
|
|
@@ -77,16 +77,16 @@ export declare class CnbIssue {
|
|
|
77
77
|
* - `repo` 仓库名称
|
|
78
78
|
* - `issue_number` issue编号
|
|
79
79
|
*/
|
|
80
|
-
info(
|
|
80
|
+
info(repoPath: RepoPath, issueNumber: string): Promise<IssueInfo>
|
|
81
81
|
/**
|
|
82
82
|
* 获取仓库所有issue信息
|
|
83
83
|
*
|
|
84
84
|
* ## 参数
|
|
85
85
|
* - `owner` 仓库所有者
|
|
86
86
|
* - `repo` 仓库名称
|
|
87
|
-
* - `
|
|
87
|
+
* - `options` issue列表选项
|
|
88
88
|
*/
|
|
89
|
-
list(
|
|
89
|
+
list(repoPath: RepoPath, options?: IssueListOptions | undefined | null): Promise<Array<IssueInfo>>
|
|
90
90
|
/**
|
|
91
91
|
* 更新issue信息
|
|
92
92
|
*
|
|
@@ -96,7 +96,7 @@ export declare class CnbIssue {
|
|
|
96
96
|
* - `issue_number` issue编号
|
|
97
97
|
* - `options` 更新issue选项
|
|
98
98
|
*/
|
|
99
|
-
update(
|
|
99
|
+
update(repoPath: RepoPath, issueNumber: string, options?: UpdateIssueOptions | undefined | null): Promise<IssueInfo>
|
|
100
100
|
}
|
|
101
101
|
|
|
102
102
|
export declare class CnbOrg {
|
|
@@ -121,9 +121,9 @@ export declare class CnbOrg {
|
|
|
121
121
|
*
|
|
122
122
|
* ## 参数
|
|
123
123
|
* - `org_name` 组织名称
|
|
124
|
-
* - `
|
|
124
|
+
* - `options` 仓库列表选项
|
|
125
125
|
*/
|
|
126
|
-
repoList(orgName: string,
|
|
126
|
+
repoList(orgName: string, options?: RepoListOptions | undefined | null): Promise<Array<RepoInfo>>
|
|
127
127
|
}
|
|
128
128
|
|
|
129
129
|
export declare class CnbRelease {
|
|
@@ -140,7 +140,7 @@ export declare class CnbRelease {
|
|
|
140
140
|
* - `body` Release内容, 可选
|
|
141
141
|
* - `target_commitish` 目标提交SHA或分支, 可选
|
|
142
142
|
*/
|
|
143
|
-
create(
|
|
143
|
+
create(repoPath: RepoPath, tagName: string, name?: string | undefined | null, body?: string | undefined | null, targetCommitish?: string | undefined | null): Promise<ReleaseInfo>
|
|
144
144
|
/**
|
|
145
145
|
* 获取Release信息
|
|
146
146
|
*
|
|
@@ -149,7 +149,7 @@ export declare class CnbRelease {
|
|
|
149
149
|
* - `repo` 仓库名称
|
|
150
150
|
* - `tag_name` 标签名称, 可选, 为空时获取最新Release
|
|
151
151
|
*/
|
|
152
|
-
info(
|
|
152
|
+
info(repoPath: RepoPath, tagName?: string | undefined | null): Promise<ReleaseInfo>
|
|
153
153
|
/**
|
|
154
154
|
* 获取Release列表
|
|
155
155
|
*
|
|
@@ -157,7 +157,7 @@ export declare class CnbRelease {
|
|
|
157
157
|
* - `owner` 仓库所有者
|
|
158
158
|
* - `repo` 仓库名称
|
|
159
159
|
*/
|
|
160
|
-
list(
|
|
160
|
+
list(repoPath: RepoPath): Promise<Array<ReleaseInfo>>
|
|
161
161
|
/**
|
|
162
162
|
* 更新Release
|
|
163
163
|
*
|
|
@@ -165,9 +165,9 @@ export declare class CnbRelease {
|
|
|
165
165
|
* - `owner` 仓库所有者
|
|
166
166
|
* - `repo` 仓库名称
|
|
167
167
|
* - `tag_name` 标签名称
|
|
168
|
-
* - `
|
|
168
|
+
* - `options` 更新参数
|
|
169
169
|
*/
|
|
170
|
-
update(
|
|
170
|
+
update(repoPath: RepoPath, tagName: string, options: UpdateReleaseOptions): Promise<ReleaseInfo>
|
|
171
171
|
}
|
|
172
172
|
|
|
173
173
|
export declare class CnbRepo {
|
|
@@ -180,7 +180,7 @@ export declare class CnbRepo {
|
|
|
180
180
|
* - `owner` 仓库所有者
|
|
181
181
|
* - `repo` 仓库名称
|
|
182
182
|
*/
|
|
183
|
-
info(
|
|
183
|
+
info(repoPath: RepoPath): Promise<RepoInfo>
|
|
184
184
|
/**
|
|
185
185
|
* 添加仓库协作者
|
|
186
186
|
*
|
|
@@ -190,7 +190,7 @@ export declare class CnbRepo {
|
|
|
190
190
|
* - `user_name` 协作者用户名
|
|
191
191
|
* - `permission` 协作者权限, 默认为 `Pull`, 可选值为 `Admin`, `Push`, `Pull`
|
|
192
192
|
*/
|
|
193
|
-
addCollaborator(
|
|
193
|
+
addCollaborator(repoPath: RepoPath, userName: string, permission?: CollaboratorPermission | undefined | null): Promise<CollaboratorResult>
|
|
194
194
|
}
|
|
195
195
|
|
|
196
196
|
export declare class CnbUser {
|
|
@@ -222,9 +222,9 @@ export declare class CnbUser {
|
|
|
222
222
|
*
|
|
223
223
|
* ## 参数
|
|
224
224
|
* - `user_name` 用户名称, 为空时获取当前登录用户仓库列表
|
|
225
|
-
* - `
|
|
225
|
+
* - `options` 仓库列表选项
|
|
226
226
|
*/
|
|
227
|
-
repoList(userName?: string | undefined | null,
|
|
227
|
+
repoList(userName?: string | undefined | null, options?: RepoListOptions | undefined | null): Promise<Array<RepoInfo>>
|
|
228
228
|
}
|
|
229
229
|
|
|
230
230
|
export declare class GitCodeClient {
|
|
@@ -271,16 +271,16 @@ export declare class GitCodeCommit {
|
|
|
271
271
|
* - `repo` 仓库名称
|
|
272
272
|
* - `sha` 提交SHA, 如果不设置则会获取默认分支的最新提交
|
|
273
273
|
*/
|
|
274
|
-
info(
|
|
274
|
+
info(repoPath: RepoPath, sha?: string | undefined | null): Promise<CommitInfo>
|
|
275
275
|
/**
|
|
276
276
|
* 获取仓库提交列表
|
|
277
277
|
*
|
|
278
278
|
* ## 参数
|
|
279
279
|
* - `owner` 仓库所有者
|
|
280
280
|
* - `repo` 仓库名称
|
|
281
|
-
* - `
|
|
281
|
+
* - `options` 提交列表选项
|
|
282
282
|
*/
|
|
283
|
-
list(
|
|
283
|
+
list(repoPath: RepoPath, options?: CommitListOptions | undefined | null): Promise<Array<CommitListInfo>>
|
|
284
284
|
}
|
|
285
285
|
|
|
286
286
|
export declare class GitCodeIssue {
|
|
@@ -294,9 +294,9 @@ export declare class GitCodeIssue {
|
|
|
294
294
|
* - `repo` 仓库名称
|
|
295
295
|
* - `title` issue标题
|
|
296
296
|
* - `body` issue内容
|
|
297
|
-
* - `
|
|
297
|
+
* - `options` 创建issue选项
|
|
298
298
|
*/
|
|
299
|
-
create(
|
|
299
|
+
create(repoPath: RepoPath, title: string, body?: string | undefined | null, options?: CreateIssueOptions | undefined | null): Promise<IssueInfo>
|
|
300
300
|
/**
|
|
301
301
|
* 获取issue信息
|
|
302
302
|
*
|
|
@@ -305,16 +305,16 @@ export declare class GitCodeIssue {
|
|
|
305
305
|
* - `repo` 仓库名称
|
|
306
306
|
* - `issue_number` issue编号
|
|
307
307
|
*/
|
|
308
|
-
info(
|
|
308
|
+
info(repoPath: RepoPath, issueNumber: string): Promise<IssueInfo>
|
|
309
309
|
/**
|
|
310
310
|
* 获取仓库所有issue信息
|
|
311
311
|
*
|
|
312
312
|
* ## 参数
|
|
313
313
|
* - `owner` 仓库所有者
|
|
314
314
|
* - `repo` 仓库名称
|
|
315
|
-
* - `
|
|
315
|
+
* - `options` issue列表选项
|
|
316
316
|
*/
|
|
317
|
-
list(
|
|
317
|
+
list(repoPath: RepoPath, options?: IssueListOptions | undefined | null): Promise<Array<IssueInfo>>
|
|
318
318
|
/**
|
|
319
319
|
* 更新issue信息
|
|
320
320
|
*
|
|
@@ -324,7 +324,7 @@ export declare class GitCodeIssue {
|
|
|
324
324
|
* - `issue_number` issue编号
|
|
325
325
|
* - `options` 更新issue选项
|
|
326
326
|
*/
|
|
327
|
-
update(
|
|
327
|
+
update(repoPath: RepoPath, issueNumber: string, options?: UpdateIssueOptions | undefined | null): Promise<IssueInfo>
|
|
328
328
|
}
|
|
329
329
|
|
|
330
330
|
export declare class GitCodeOrg {
|
|
@@ -349,9 +349,9 @@ export declare class GitCodeOrg {
|
|
|
349
349
|
*
|
|
350
350
|
* ## 参数
|
|
351
351
|
* - `org_name` 组织名称
|
|
352
|
-
* - `
|
|
352
|
+
* - `options` 仓库列表选项
|
|
353
353
|
*/
|
|
354
|
-
repoList(orgName: string,
|
|
354
|
+
repoList(orgName: string, options?: RepoListOptions | undefined | null): Promise<Array<RepoInfo>>
|
|
355
355
|
}
|
|
356
356
|
|
|
357
357
|
export declare class GitCodeRelease {
|
|
@@ -368,7 +368,7 @@ export declare class GitCodeRelease {
|
|
|
368
368
|
* - `body` Release内容, 可选
|
|
369
369
|
* - `target_commitish` 目标提交SHA或分支, 可选
|
|
370
370
|
*/
|
|
371
|
-
create(
|
|
371
|
+
create(repoPath: RepoPath, tagName: string, name?: string | undefined | null, body?: string | undefined | null, targetCommitish?: string | undefined | null): Promise<ReleaseInfo>
|
|
372
372
|
/**
|
|
373
373
|
* 获取Release信息
|
|
374
374
|
*
|
|
@@ -377,7 +377,7 @@ export declare class GitCodeRelease {
|
|
|
377
377
|
* - `repo` 仓库名称
|
|
378
378
|
* - `tag_name` 标签名称, 可选, 为空时获取最新Release
|
|
379
379
|
*/
|
|
380
|
-
info(
|
|
380
|
+
info(repoPath: RepoPath, tagName?: string | undefined | null): Promise<ReleaseInfo>
|
|
381
381
|
/**
|
|
382
382
|
* 获取Release列表
|
|
383
383
|
*
|
|
@@ -385,7 +385,7 @@ export declare class GitCodeRelease {
|
|
|
385
385
|
* - `owner` 仓库所有者
|
|
386
386
|
* - `repo` 仓库名称
|
|
387
387
|
*/
|
|
388
|
-
list(
|
|
388
|
+
list(repoPath: RepoPath): Promise<Array<ReleaseInfo>>
|
|
389
389
|
/**
|
|
390
390
|
* 更新Release
|
|
391
391
|
*
|
|
@@ -393,9 +393,9 @@ export declare class GitCodeRelease {
|
|
|
393
393
|
* - `owner` 仓库所有者
|
|
394
394
|
* - `repo` 仓库名称
|
|
395
395
|
* - `tag_name` 标签名称
|
|
396
|
-
* - `
|
|
396
|
+
* - `options` 更新参数
|
|
397
397
|
*/
|
|
398
|
-
update(
|
|
398
|
+
update(repoPath: RepoPath, tagName: string, options: UpdateReleaseOptions): Promise<ReleaseInfo>
|
|
399
399
|
}
|
|
400
400
|
|
|
401
401
|
export declare class GitCodeRepo {
|
|
@@ -408,7 +408,7 @@ export declare class GitCodeRepo {
|
|
|
408
408
|
* - `owner` 仓库所有者
|
|
409
409
|
* - `repo` 仓库名称
|
|
410
410
|
*/
|
|
411
|
-
info(
|
|
411
|
+
info(repoPath: RepoPath): Promise<RepoInfo>
|
|
412
412
|
/**
|
|
413
413
|
* 添加仓库协作者
|
|
414
414
|
*
|
|
@@ -418,7 +418,7 @@ export declare class GitCodeRepo {
|
|
|
418
418
|
* - `user_name` 协作者用户名
|
|
419
419
|
* - `permission` 协作者权限, 默认为 `Pull`, 可选值为 `Admin`, `Push`, `Pull`
|
|
420
420
|
*/
|
|
421
|
-
addCollaborator(
|
|
421
|
+
addCollaborator(repoPath: RepoPath, userName: string, permission?: CollaboratorPermission | undefined | null): Promise<CollaboratorResult>
|
|
422
422
|
}
|
|
423
423
|
|
|
424
424
|
export declare class GitCodeUser {
|
|
@@ -450,9 +450,9 @@ export declare class GitCodeUser {
|
|
|
450
450
|
*
|
|
451
451
|
* ## 参数
|
|
452
452
|
* - `user_name` 用户名称, 为空时获取当前登录用户仓库列表
|
|
453
|
-
* - `
|
|
453
|
+
* - `options` 仓库列表选项
|
|
454
454
|
*/
|
|
455
|
-
repoList(userName?: string | undefined | null,
|
|
455
|
+
repoList(userName?: string | undefined | null, options?: RepoListOptions | undefined | null): Promise<Array<RepoInfo>>
|
|
456
456
|
}
|
|
457
457
|
|
|
458
458
|
export declare class GiteeClient {
|
|
@@ -499,16 +499,16 @@ export declare class GiteeCommit {
|
|
|
499
499
|
* - `repo` 仓库名称
|
|
500
500
|
* - `sha` 提交SHA, 如果不设置则会获取默认分支的最新提交
|
|
501
501
|
*/
|
|
502
|
-
info(
|
|
502
|
+
info(repoPath: RepoPath, sha?: string | undefined | null): Promise<CommitInfo>
|
|
503
503
|
/**
|
|
504
504
|
* 获取仓库提交列表
|
|
505
505
|
*
|
|
506
506
|
* ## 参数
|
|
507
507
|
* - `owner` 仓库所有者
|
|
508
508
|
* - `repo` 仓库名称
|
|
509
|
-
* - `
|
|
509
|
+
* - `options` 提交列表选项
|
|
510
510
|
*/
|
|
511
|
-
list(
|
|
511
|
+
list(repoPath: RepoPath, options?: CommitListOptions | undefined | null): Promise<Array<CommitListInfo>>
|
|
512
512
|
}
|
|
513
513
|
|
|
514
514
|
export declare class GiteeIssue {
|
|
@@ -522,9 +522,9 @@ export declare class GiteeIssue {
|
|
|
522
522
|
* - `repo` 仓库名称
|
|
523
523
|
* - `title` issue标题
|
|
524
524
|
* - `body` issue内容
|
|
525
|
-
* - `
|
|
525
|
+
* - `options` 创建issue选项
|
|
526
526
|
*/
|
|
527
|
-
create(
|
|
527
|
+
create(repoPath: RepoPath, title: string, body?: string | undefined | null, options?: CreateIssueOptions | undefined | null): Promise<IssueInfo>
|
|
528
528
|
/**
|
|
529
529
|
* 获取issue信息
|
|
530
530
|
*
|
|
@@ -533,16 +533,16 @@ export declare class GiteeIssue {
|
|
|
533
533
|
* - `repo` 仓库名称
|
|
534
534
|
* - `issue_number` issue编号
|
|
535
535
|
*/
|
|
536
|
-
info(
|
|
536
|
+
info(repoPath: RepoPath, issueNumber: string): Promise<IssueInfo>
|
|
537
537
|
/**
|
|
538
538
|
* 获取仓库所有issue信息
|
|
539
539
|
*
|
|
540
540
|
* ## 参数
|
|
541
541
|
* - `owner` 仓库所有者
|
|
542
542
|
* - `repo` 仓库名称
|
|
543
|
-
* - `
|
|
543
|
+
* - `options` issue列表选项
|
|
544
544
|
*/
|
|
545
|
-
list(
|
|
545
|
+
list(repoPath: RepoPath, options?: IssueListOptions | undefined | null): Promise<Array<IssueInfo>>
|
|
546
546
|
/**
|
|
547
547
|
* 更新issue信息
|
|
548
548
|
*
|
|
@@ -552,7 +552,7 @@ export declare class GiteeIssue {
|
|
|
552
552
|
* - `issue_number` issue编号
|
|
553
553
|
* - `options` 更新issue选项
|
|
554
554
|
*/
|
|
555
|
-
update(
|
|
555
|
+
update(repoPath: RepoPath, issueNumber: string, options?: UpdateIssueOptions | undefined | null): Promise<IssueInfo>
|
|
556
556
|
}
|
|
557
557
|
|
|
558
558
|
export declare class GiteeOrg {
|
|
@@ -577,9 +577,9 @@ export declare class GiteeOrg {
|
|
|
577
577
|
*
|
|
578
578
|
* ## 参数
|
|
579
579
|
* - `org_name` 组织名称
|
|
580
|
-
* - `
|
|
580
|
+
* - `options` 仓库列表选项
|
|
581
581
|
*/
|
|
582
|
-
repoList(orgName: string,
|
|
582
|
+
repoList(orgName: string, options?: RepoListOptions | undefined | null): Promise<Array<RepoInfo>>
|
|
583
583
|
}
|
|
584
584
|
|
|
585
585
|
export declare class GiteeRelease {
|
|
@@ -596,7 +596,7 @@ export declare class GiteeRelease {
|
|
|
596
596
|
* - `body` Release内容, 可选
|
|
597
597
|
* - `target_commitish` 目标提交SHA或分支, 可选
|
|
598
598
|
*/
|
|
599
|
-
create(
|
|
599
|
+
create(repoPath: RepoPath, tagName: string, name?: string | undefined | null, body?: string | undefined | null, targetCommitish?: string | undefined | null): Promise<ReleaseInfo>
|
|
600
600
|
/**
|
|
601
601
|
* 获取Release信息
|
|
602
602
|
*
|
|
@@ -605,7 +605,7 @@ export declare class GiteeRelease {
|
|
|
605
605
|
* - `repo` 仓库名称
|
|
606
606
|
* - `tag_name` 标签名称, 可选, 为空时获取最新Release
|
|
607
607
|
*/
|
|
608
|
-
info(
|
|
608
|
+
info(repoPath: RepoPath, tagName?: string | undefined | null): Promise<ReleaseInfo>
|
|
609
609
|
/**
|
|
610
610
|
* 获取Release列表
|
|
611
611
|
*
|
|
@@ -613,7 +613,7 @@ export declare class GiteeRelease {
|
|
|
613
613
|
* - `owner` 仓库所有者
|
|
614
614
|
* - `repo` 仓库名称
|
|
615
615
|
*/
|
|
616
|
-
list(
|
|
616
|
+
list(repoPath: RepoPath): Promise<Array<ReleaseInfo>>
|
|
617
617
|
/**
|
|
618
618
|
* 更新Release
|
|
619
619
|
*
|
|
@@ -621,9 +621,9 @@ export declare class GiteeRelease {
|
|
|
621
621
|
* - `owner` 仓库所有者
|
|
622
622
|
* - `repo` 仓库名称
|
|
623
623
|
* - `tag_name` 标签名称
|
|
624
|
-
* - `
|
|
624
|
+
* - `options` 更新参数
|
|
625
625
|
*/
|
|
626
|
-
update(
|
|
626
|
+
update(repoPath: RepoPath, tagName: string, options: UpdateReleaseOptions): Promise<ReleaseInfo>
|
|
627
627
|
}
|
|
628
628
|
|
|
629
629
|
export declare class GiteeRepo {
|
|
@@ -636,7 +636,7 @@ export declare class GiteeRepo {
|
|
|
636
636
|
* - `owner` 仓库所有者
|
|
637
637
|
* - `repo` 仓库名称
|
|
638
638
|
*/
|
|
639
|
-
info(
|
|
639
|
+
info(repoPath: RepoPath): Promise<RepoInfo>
|
|
640
640
|
/**
|
|
641
641
|
* 添加仓库协作者
|
|
642
642
|
*
|
|
@@ -646,7 +646,7 @@ export declare class GiteeRepo {
|
|
|
646
646
|
* - `user_name` 协作者用户名
|
|
647
647
|
* - `permission` 协作者权限, 默认为 `Pull`, 可选值为 `Admin`, `Push`, `Pull`
|
|
648
648
|
*/
|
|
649
|
-
addCollaborator(
|
|
649
|
+
addCollaborator(repoPath: RepoPath, userName: string, permission?: CollaboratorPermission | undefined | null): Promise<CollaboratorResult>
|
|
650
650
|
}
|
|
651
651
|
|
|
652
652
|
export declare class GiteeUser {
|
|
@@ -678,9 +678,9 @@ export declare class GiteeUser {
|
|
|
678
678
|
*
|
|
679
679
|
* ## 参数
|
|
680
680
|
* - `user_name` 用户名称, 为空时获取当前登录用户仓库列表
|
|
681
|
-
* - `
|
|
681
|
+
* - `options` 仓库列表选项
|
|
682
682
|
*/
|
|
683
|
-
repoList(userName?: string | undefined | null,
|
|
683
|
+
repoList(userName?: string | undefined | null, options?: RepoListOptions | undefined | null): Promise<Array<RepoInfo>>
|
|
684
684
|
}
|
|
685
685
|
|
|
686
686
|
export declare class GithubClient {
|
|
@@ -734,16 +734,16 @@ export declare class GithubCommit {
|
|
|
734
734
|
* - `repo` 仓库名称
|
|
735
735
|
* - `sha` 提交SHA, 如果不设置则会获取默认分支的最新提交
|
|
736
736
|
*/
|
|
737
|
-
info(
|
|
737
|
+
info(repoPath: RepoPath, sha?: string | undefined | null): Promise<CommitInfo>
|
|
738
738
|
/**
|
|
739
739
|
* 获取仓库提交列表
|
|
740
740
|
*
|
|
741
741
|
* ## 参数
|
|
742
742
|
* - `owner` 仓库所有者
|
|
743
743
|
* - `repo` 仓库名称
|
|
744
|
-
* - `
|
|
744
|
+
* - `options` 提交列表选项
|
|
745
745
|
*/
|
|
746
|
-
list(
|
|
746
|
+
list(repoPath: RepoPath, options?: CommitListOptions | undefined | null): Promise<Array<CommitListInfo>>
|
|
747
747
|
}
|
|
748
748
|
|
|
749
749
|
export declare class GithubIssue {
|
|
@@ -757,9 +757,9 @@ export declare class GithubIssue {
|
|
|
757
757
|
* - `repo` 仓库名称
|
|
758
758
|
* - `title` issue标题
|
|
759
759
|
* - `body` issue内容
|
|
760
|
-
* - `
|
|
760
|
+
* - `options` 创建issue选项
|
|
761
761
|
*/
|
|
762
|
-
create(
|
|
762
|
+
create(repoPath: RepoPath, title: string, body?: string | undefined | null, options?: CreateIssueOptions | undefined | null): Promise<IssueInfo>
|
|
763
763
|
/**
|
|
764
764
|
* 获取issue信息
|
|
765
765
|
*
|
|
@@ -768,16 +768,16 @@ export declare class GithubIssue {
|
|
|
768
768
|
* - `repo` 仓库名称
|
|
769
769
|
* - `issue_number` issue编号
|
|
770
770
|
*/
|
|
771
|
-
info(
|
|
771
|
+
info(repoPath: RepoPath, issueNumber: string): Promise<IssueInfo>
|
|
772
772
|
/**
|
|
773
773
|
* 获取仓库所有issue信息
|
|
774
774
|
*
|
|
775
775
|
* ## 参数
|
|
776
776
|
* - `owner` 仓库所有者
|
|
777
777
|
* - `repo` 仓库名称
|
|
778
|
-
* - `
|
|
778
|
+
* - `options` issue列表选项
|
|
779
779
|
*/
|
|
780
|
-
list(
|
|
780
|
+
list(repoPath: RepoPath, options?: IssueListOptions | undefined | null): Promise<Array<IssueInfo>>
|
|
781
781
|
/**
|
|
782
782
|
* 更新issue信息
|
|
783
783
|
*
|
|
@@ -787,7 +787,7 @@ export declare class GithubIssue {
|
|
|
787
787
|
* - `issue_number` issue编号
|
|
788
788
|
* - `options` 更新issue选项
|
|
789
789
|
*/
|
|
790
|
-
update(
|
|
790
|
+
update(repoPath: RepoPath, issueNumber: string, options?: UpdateIssueOptions | undefined | null): Promise<IssueInfo>
|
|
791
791
|
}
|
|
792
792
|
|
|
793
793
|
export declare class GithubOrg {
|
|
@@ -812,9 +812,9 @@ export declare class GithubOrg {
|
|
|
812
812
|
*
|
|
813
813
|
* ## 参数
|
|
814
814
|
* - `org_name` 组织名称
|
|
815
|
-
* - `
|
|
815
|
+
* - `options` 仓库列表选项
|
|
816
816
|
*/
|
|
817
|
-
repoList(orgName: string,
|
|
817
|
+
repoList(orgName: string, options?: RepoListOptions | undefined | null): Promise<Array<RepoInfo>>
|
|
818
818
|
}
|
|
819
819
|
|
|
820
820
|
export declare class GithubRelease {
|
|
@@ -831,7 +831,7 @@ export declare class GithubRelease {
|
|
|
831
831
|
* - `body` Release内容, 可选
|
|
832
832
|
* - `target_commitish` 目标提交SHA或分支, 可选
|
|
833
833
|
*/
|
|
834
|
-
create(
|
|
834
|
+
create(repoPath: RepoPath, tagName: string, name?: string | undefined | null, body?: string | undefined | null, targetCommitish?: string | undefined | null): Promise<ReleaseInfo>
|
|
835
835
|
/**
|
|
836
836
|
* 获取Release信息
|
|
837
837
|
*
|
|
@@ -840,7 +840,7 @@ export declare class GithubRelease {
|
|
|
840
840
|
* - `repo` 仓库名称
|
|
841
841
|
* - `tag_name` 标签名称, 可选, 为空时获取最新Release
|
|
842
842
|
*/
|
|
843
|
-
info(
|
|
843
|
+
info(repoPath: RepoPath, tagName?: string | undefined | null): Promise<ReleaseInfo>
|
|
844
844
|
/**
|
|
845
845
|
* 获取Release列表
|
|
846
846
|
*
|
|
@@ -848,7 +848,7 @@ export declare class GithubRelease {
|
|
|
848
848
|
* - `owner` 仓库所有者
|
|
849
849
|
* - `repo` 仓库名称
|
|
850
850
|
*/
|
|
851
|
-
list(
|
|
851
|
+
list(repoPath: RepoPath): Promise<Array<ReleaseInfo>>
|
|
852
852
|
/**
|
|
853
853
|
* 更新Release
|
|
854
854
|
*
|
|
@@ -856,9 +856,9 @@ export declare class GithubRelease {
|
|
|
856
856
|
* - `owner` 仓库所有者
|
|
857
857
|
* - `repo` 仓库名称
|
|
858
858
|
* - `tag_name` 标签名称
|
|
859
|
-
* - `
|
|
859
|
+
* - `options` 更新参数
|
|
860
860
|
*/
|
|
861
|
-
update(
|
|
861
|
+
update(repoPath: RepoPath, tagName: string, options: UpdateReleaseOptions): Promise<ReleaseInfo>
|
|
862
862
|
}
|
|
863
863
|
|
|
864
864
|
export declare class GithubRepo {
|
|
@@ -871,7 +871,7 @@ export declare class GithubRepo {
|
|
|
871
871
|
* - `owner` 仓库所有者
|
|
872
872
|
* - `repo` 仓库名称
|
|
873
873
|
*/
|
|
874
|
-
info(
|
|
874
|
+
info(repoPath: RepoPath): Promise<RepoInfo>
|
|
875
875
|
/**
|
|
876
876
|
* 添加仓库协作者
|
|
877
877
|
*
|
|
@@ -881,7 +881,7 @@ export declare class GithubRepo {
|
|
|
881
881
|
* - `user_name` 协作者用户名
|
|
882
882
|
* - `permission` 协作者权限, 默认为 `Pull`, 可选值为 `Admin`, `Push`, `Pull`
|
|
883
883
|
*/
|
|
884
|
-
addCollaborator(
|
|
884
|
+
addCollaborator(repoPath: RepoPath, userName: string, permission?: CollaboratorPermission | undefined | null): Promise<CollaboratorResult>
|
|
885
885
|
}
|
|
886
886
|
|
|
887
887
|
export declare class GithubUser {
|
|
@@ -913,9 +913,9 @@ export declare class GithubUser {
|
|
|
913
913
|
*
|
|
914
914
|
* ## 参数
|
|
915
915
|
* - `user_name` 用户名称, 为空时获取当前登录用户仓库列表
|
|
916
|
-
* - `
|
|
916
|
+
* - `options` 仓库列表选项
|
|
917
917
|
*/
|
|
918
|
-
repoList(userName?: string | undefined | null,
|
|
918
|
+
repoList(userName?: string | undefined | null, options?: RepoListOptions | undefined | null): Promise<Array<RepoInfo>>
|
|
919
919
|
}
|
|
920
920
|
|
|
921
921
|
export interface AssetsInfo {
|
|
@@ -961,6 +961,13 @@ export interface CommitInfo {
|
|
|
961
961
|
files: Array<FileInfo>
|
|
962
962
|
}
|
|
963
963
|
|
|
964
|
+
export interface CommitListInfo {
|
|
965
|
+
/** 提交的SHA */
|
|
966
|
+
sha: string
|
|
967
|
+
/** 提交的数据 */
|
|
968
|
+
commit: CommitData
|
|
969
|
+
}
|
|
970
|
+
|
|
964
971
|
export interface CommitListOptions {
|
|
965
972
|
/** 每页数量,默认 30,最大 100 */
|
|
966
973
|
perPage?: number
|
|
@@ -1171,6 +1178,13 @@ export interface RepoListOptions {
|
|
|
1171
1178
|
page?: number
|
|
1172
1179
|
}
|
|
1173
1180
|
|
|
1181
|
+
export interface RepoPath {
|
|
1182
|
+
/** 仓库所有者 */
|
|
1183
|
+
owner: string
|
|
1184
|
+
/** 仓库名称 */
|
|
1185
|
+
repo: string
|
|
1186
|
+
}
|
|
1187
|
+
|
|
1174
1188
|
export declare const enum RepoVisibility {
|
|
1175
1189
|
/** 公开 */
|
|
1176
1190
|
Public = 'Public',
|
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.9.
|
|
85
|
-
throw new Error(`Native binding package version mismatch, expected 1.9.
|
|
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.9.
|
|
101
|
-
throw new Error(`Native binding package version mismatch, expected 1.9.
|
|
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.9.
|
|
122
|
-
throw new Error(`Native binding package version mismatch, expected 1.9.
|
|
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.9.
|
|
138
|
-
throw new Error(`Native binding package version mismatch, expected 1.9.
|
|
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.9.
|
|
155
|
-
throw new Error(`Native binding package version mismatch, expected 1.9.
|
|
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.9.
|
|
171
|
-
throw new Error(`Native binding package version mismatch, expected 1.9.
|
|
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.9.
|
|
190
|
-
throw new Error(`Native binding package version mismatch, expected 1.9.
|
|
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.9.
|
|
206
|
-
throw new Error(`Native binding package version mismatch, expected 1.9.
|
|
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.9.
|
|
222
|
-
throw new Error(`Native binding package version mismatch, expected 1.9.
|
|
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.9.
|
|
242
|
-
throw new Error(`Native binding package version mismatch, expected 1.9.
|
|
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.9.
|
|
258
|
-
throw new Error(`Native binding package version mismatch, expected 1.9.
|
|
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.9.
|
|
279
|
-
throw new Error(`Native binding package version mismatch, expected 1.9.
|
|
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.9.
|
|
295
|
-
throw new Error(`Native binding package version mismatch, expected 1.9.
|
|
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.9.
|
|
313
|
-
throw new Error(`Native binding package version mismatch, expected 1.9.
|
|
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.9.
|
|
329
|
-
throw new Error(`Native binding package version mismatch, expected 1.9.
|
|
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.9.
|
|
347
|
-
throw new Error(`Native binding package version mismatch, expected 1.9.
|
|
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.9.
|
|
363
|
-
throw new Error(`Native binding package version mismatch, expected 1.9.
|
|
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.9.
|
|
381
|
-
throw new Error(`Native binding package version mismatch, expected 1.9.
|
|
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.9.
|
|
397
|
-
throw new Error(`Native binding package version mismatch, expected 1.9.
|
|
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.9.
|
|
415
|
-
throw new Error(`Native binding package version mismatch, expected 1.9.
|
|
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.9.
|
|
431
|
-
throw new Error(`Native binding package version mismatch, expected 1.9.
|
|
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.9.
|
|
448
|
-
throw new Error(`Native binding package version mismatch, expected 1.9.
|
|
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.9.
|
|
464
|
-
throw new Error(`Native binding package version mismatch, expected 1.9.
|
|
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.9.
|
|
484
|
-
throw new Error(`Native binding package version mismatch, expected 1.9.
|
|
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.9.
|
|
500
|
-
throw new Error(`Native binding package version mismatch, expected 1.9.
|
|
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.9.
|
|
516
|
-
throw new Error(`Native binding package version mismatch, expected 1.9.
|
|
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
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@puniyu/nipaw",
|
|
3
|
-
"version": "1.9.
|
|
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.9.
|
|
44
|
-
"@puniyu/nipaw-darwin-x64": "1.9.
|
|
45
|
-
"@puniyu/nipaw-linux-x64-gnu": "1.9.
|
|
46
|
-
"@puniyu/nipaw-linux-arm64-gnu": "1.9.
|
|
47
|
-
"@puniyu/nipaw-darwin-arm64": "1.9.
|
|
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",
|