@puniyu/nipaw 1.5.0 → 1.6.1

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 CHANGED
@@ -111,6 +111,17 @@ export declare class CnbClient {
111
111
  * * `permission` - 协作者权限, 默认为 `Pull`, 可选值为 `Admin`, `Push`, `Pull`
112
112
  */
113
113
  addRepoCollaborator(owner: string, repo: string, userName: string, permission?: CollaboratorPermission | undefined | null): Promise<CollaboratorResult>
114
+ /**
115
+ * 创建一个issue
116
+ *
117
+ * ## 参数
118
+ * - `owner` - 仓库所有者
119
+ * - `name` - 仓库名称
120
+ * - `title` - issue标题
121
+ * - `body` - issue内容
122
+ * - `option` - 创建issue选项, 详见 [CreateIssueOptions]
123
+ */
124
+ createIssue(owner: string, name: string, title: string, body?: string | undefined | null, option?: CreateIssueOptions | undefined | null): Promise<IssueInfo>
114
125
  }
115
126
 
116
127
  export declare class GitCodeClient {
@@ -225,6 +236,17 @@ export declare class GitCodeClient {
225
236
  * * `permission` - 协作者权限, 默认为 `Pull`, 可选值为 `Admin`, `Push`, `Pull`
226
237
  */
227
238
  addRepoCollaborator(owner: string, repo: string, userName: string, permission?: CollaboratorPermission | undefined | null): Promise<CollaboratorResult>
239
+ /**
240
+ * 创建一个issue
241
+ *
242
+ * ## 参数
243
+ * - `owner` - 仓库所有者
244
+ * - `name` - 仓库名称
245
+ * - `title` - issue标题
246
+ * - `body` - issue内容
247
+ * - `option` - 创建issue选项, 详见 [CreateIssueOptions]
248
+ */
249
+ createIssue(owner: string, name: string, title: string, body?: string | undefined | null, option?: CreateIssueOptions | undefined | null): Promise<IssueInfo>
228
250
  }
229
251
 
230
252
  export declare class GiteeClient {
@@ -339,6 +361,17 @@ export declare class GiteeClient {
339
361
  * * `permission` - 协作者权限, 默认为 `Pull`, 可选值为 `Admin`, `Push`, `Pull`
340
362
  */
341
363
  addRepoCollaborator(owner: string, repo: string, userName: string, permission?: CollaboratorPermission | undefined | null): Promise<CollaboratorResult>
364
+ /**
365
+ * 创建一个issue
366
+ *
367
+ * ## 参数
368
+ * - `owner` - 仓库所有者
369
+ * - `name` - 仓库名称
370
+ * - `title` - issue标题
371
+ * - `body` - issue内容
372
+ * - `option` - 创建issue选项, 详见 [CreateIssueOptions]
373
+ */
374
+ createIssue(owner: string, name: string, title: string, body?: string | undefined | null, option?: CreateIssueOptions | undefined | null): Promise<IssueInfo>
342
375
  }
343
376
 
344
377
  export declare class GithubClient {
@@ -453,6 +486,17 @@ export declare class GithubClient {
453
486
  * * `permission` - 协作者权限, 默认为 `Pull`, 可选值为 `Admin`, `Push`, `Pull`
454
487
  */
455
488
  addRepoCollaborator(owner: string, repo: string, userName: string, permission?: CollaboratorPermission | undefined | null): Promise<CollaboratorResult>
489
+ /**
490
+ * 创建一个issue
491
+ *
492
+ * ## 参数
493
+ * - `owner` - 仓库所有者
494
+ * - `name` - 仓库名称
495
+ * - `title` - issue标题
496
+ * - `body` - issue内容
497
+ * - `option` - 创建issue选项, 详见 [CreateIssueOptions]
498
+ */
499
+ createIssue(owner: string, name: string, title: string, body?: string | undefined | null, option?: CreateIssueOptions | undefined | null): Promise<IssueInfo>
456
500
  }
457
501
 
458
502
  export declare const enum CollaboratorPermission {
@@ -487,6 +531,8 @@ export interface CommitInfo {
487
531
  commit: CommitData
488
532
  /** 提交统计信息 */
489
533
  stats: StatsInfo
534
+ /** 修改的文件数 */
535
+ changeFiles: number
490
536
  }
491
537
 
492
538
  export interface CommitListOptions {
@@ -533,6 +579,52 @@ export interface ContributionResult {
533
579
  contributions: Array<Array<ContributionData>>
534
580
  }
535
581
 
582
+ export interface CreateIssueOptions {
583
+ /** 标签 */
584
+ labels: Array<string>
585
+ /** 分配的用户名 */
586
+ assignees: Array<string>
587
+ }
588
+
589
+ export interface IssueInfo {
590
+ /** 议题Id */
591
+ id: number
592
+ /** 议题编号 */
593
+ number: string
594
+ /** 议题状态 */
595
+ state: StateType
596
+ /** 议题标题 */
597
+ title: string
598
+ /** 议题内容 */
599
+ body?: string
600
+ /** 标签信息 */
601
+ labels: Array<LabelInfo>
602
+ /** 创建者信息 */
603
+ user: IssueUserInfo
604
+ /** 议题创建时间 */
605
+ createdAt: Date
606
+ /** 议题更新时间 */
607
+ updatedAt: Date
608
+ /** 议题关闭时间 */
609
+ closedAt?: Date
610
+ }
611
+
612
+ export interface IssueUserInfo {
613
+ /** 用户名 */
614
+ name: string
615
+ /** 邮箱 */
616
+ email?: string
617
+ /** 头像URL */
618
+ avatarUrl: string
619
+ }
620
+
621
+ export interface LabelInfo {
622
+ /** 标签名称 */
623
+ name: string
624
+ /** 颜色,16进制 */
625
+ color: string
626
+ }
627
+
536
628
  export interface OrgInfo {
537
629
  /** 组织id */
538
630
  id: number
@@ -602,6 +694,11 @@ export declare const enum RepoVisibility {
602
694
  Private = 'Private'
603
695
  }
604
696
 
697
+ export declare const enum StateType {
698
+ Opened = 'Opened',
699
+ Closed = 'Closed'
700
+ }
701
+
605
702
  export interface StatsInfo {
606
703
  /** 总提交行数 */
607
704
  total: number
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.5.0' && 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.5.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
84
+ if (bindingPackageVersion !== '1.6.1' && 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.6.1 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.5.0' && 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.5.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
100
+ if (bindingPackageVersion !== '1.6.1' && 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.6.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
102
102
  }
103
103
  return binding
104
104
  } catch (e) {
@@ -109,7 +109,24 @@ function requireNative() {
109
109
  }
110
110
  } else if (process.platform === 'win32') {
111
111
  if (process.arch === 'x64') {
112
+ if (process.config?.variables?.shlib_suffix === 'dll.a' || process.config?.variables?.node_target_type === 'shared_library') {
113
+ try {
114
+ return require('./nipaw.win32-x64-gnu.node')
115
+ } catch (e) {
116
+ loadErrors.push(e)
117
+ }
112
118
  try {
119
+ const binding = require('@puniyu/nipaw-win32-x64-gnu')
120
+ const bindingPackageVersion = require('@puniyu/nipaw-win32-x64-gnu/package.json').version
121
+ if (bindingPackageVersion !== '1.6.1' && 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.6.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
123
+ }
124
+ return binding
125
+ } catch (e) {
126
+ loadErrors.push(e)
127
+ }
128
+ } else {
129
+ try {
113
130
  return require('./nipaw.win32-x64-msvc.node')
114
131
  } catch (e) {
115
132
  loadErrors.push(e)
@@ -117,13 +134,14 @@ function requireNative() {
117
134
  try {
118
135
  const binding = require('@puniyu/nipaw-win32-x64-msvc')
119
136
  const bindingPackageVersion = require('@puniyu/nipaw-win32-x64-msvc/package.json').version
120
- if (bindingPackageVersion !== '1.5.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
121
- throw new Error(`Native binding package version mismatch, expected 1.5.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
137
+ if (bindingPackageVersion !== '1.6.1' && 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.6.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
122
139
  }
123
140
  return binding
124
141
  } catch (e) {
125
142
  loadErrors.push(e)
126
143
  }
144
+ }
127
145
  } else if (process.arch === 'ia32') {
128
146
  try {
129
147
  return require('./nipaw.win32-ia32-msvc.node')
@@ -133,8 +151,8 @@ function requireNative() {
133
151
  try {
134
152
  const binding = require('@puniyu/nipaw-win32-ia32-msvc')
135
153
  const bindingPackageVersion = require('@puniyu/nipaw-win32-ia32-msvc/package.json').version
136
- if (bindingPackageVersion !== '1.5.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
137
- throw new Error(`Native binding package version mismatch, expected 1.5.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
154
+ if (bindingPackageVersion !== '1.6.1' && 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.6.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
138
156
  }
139
157
  return binding
140
158
  } catch (e) {
@@ -149,8 +167,8 @@ function requireNative() {
149
167
  try {
150
168
  const binding = require('@puniyu/nipaw-win32-arm64-msvc')
151
169
  const bindingPackageVersion = require('@puniyu/nipaw-win32-arm64-msvc/package.json').version
152
- if (bindingPackageVersion !== '1.5.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
153
- throw new Error(`Native binding package version mismatch, expected 1.5.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
170
+ if (bindingPackageVersion !== '1.6.1' && 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.6.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
154
172
  }
155
173
  return binding
156
174
  } catch (e) {
@@ -168,8 +186,8 @@ function requireNative() {
168
186
  try {
169
187
  const binding = require('@puniyu/nipaw-darwin-universal')
170
188
  const bindingPackageVersion = require('@puniyu/nipaw-darwin-universal/package.json').version
171
- if (bindingPackageVersion !== '1.5.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
172
- throw new Error(`Native binding package version mismatch, expected 1.5.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
189
+ if (bindingPackageVersion !== '1.6.1' && 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.6.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
173
191
  }
174
192
  return binding
175
193
  } catch (e) {
@@ -184,8 +202,8 @@ function requireNative() {
184
202
  try {
185
203
  const binding = require('@puniyu/nipaw-darwin-x64')
186
204
  const bindingPackageVersion = require('@puniyu/nipaw-darwin-x64/package.json').version
187
- if (bindingPackageVersion !== '1.5.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
188
- throw new Error(`Native binding package version mismatch, expected 1.5.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
205
+ if (bindingPackageVersion !== '1.6.1' && 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.6.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
189
207
  }
190
208
  return binding
191
209
  } catch (e) {
@@ -200,8 +218,8 @@ function requireNative() {
200
218
  try {
201
219
  const binding = require('@puniyu/nipaw-darwin-arm64')
202
220
  const bindingPackageVersion = require('@puniyu/nipaw-darwin-arm64/package.json').version
203
- if (bindingPackageVersion !== '1.5.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
204
- throw new Error(`Native binding package version mismatch, expected 1.5.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
221
+ if (bindingPackageVersion !== '1.6.1' && 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.6.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
205
223
  }
206
224
  return binding
207
225
  } catch (e) {
@@ -220,8 +238,8 @@ function requireNative() {
220
238
  try {
221
239
  const binding = require('@puniyu/nipaw-freebsd-x64')
222
240
  const bindingPackageVersion = require('@puniyu/nipaw-freebsd-x64/package.json').version
223
- if (bindingPackageVersion !== '1.5.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
224
- throw new Error(`Native binding package version mismatch, expected 1.5.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
241
+ if (bindingPackageVersion !== '1.6.1' && 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.6.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
225
243
  }
226
244
  return binding
227
245
  } catch (e) {
@@ -236,8 +254,8 @@ function requireNative() {
236
254
  try {
237
255
  const binding = require('@puniyu/nipaw-freebsd-arm64')
238
256
  const bindingPackageVersion = require('@puniyu/nipaw-freebsd-arm64/package.json').version
239
- if (bindingPackageVersion !== '1.5.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
240
- throw new Error(`Native binding package version mismatch, expected 1.5.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
257
+ if (bindingPackageVersion !== '1.6.1' && 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.6.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
241
259
  }
242
260
  return binding
243
261
  } catch (e) {
@@ -257,8 +275,8 @@ function requireNative() {
257
275
  try {
258
276
  const binding = require('@puniyu/nipaw-linux-x64-musl')
259
277
  const bindingPackageVersion = require('@puniyu/nipaw-linux-x64-musl/package.json').version
260
- if (bindingPackageVersion !== '1.5.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
261
- throw new Error(`Native binding package version mismatch, expected 1.5.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
278
+ if (bindingPackageVersion !== '1.6.1' && 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.6.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
262
280
  }
263
281
  return binding
264
282
  } catch (e) {
@@ -273,8 +291,8 @@ function requireNative() {
273
291
  try {
274
292
  const binding = require('@puniyu/nipaw-linux-x64-gnu')
275
293
  const bindingPackageVersion = require('@puniyu/nipaw-linux-x64-gnu/package.json').version
276
- if (bindingPackageVersion !== '1.5.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
277
- throw new Error(`Native binding package version mismatch, expected 1.5.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
294
+ if (bindingPackageVersion !== '1.6.1' && 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.6.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
278
296
  }
279
297
  return binding
280
298
  } catch (e) {
@@ -291,8 +309,8 @@ function requireNative() {
291
309
  try {
292
310
  const binding = require('@puniyu/nipaw-linux-arm64-musl')
293
311
  const bindingPackageVersion = require('@puniyu/nipaw-linux-arm64-musl/package.json').version
294
- if (bindingPackageVersion !== '1.5.0' && 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.5.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
312
+ if (bindingPackageVersion !== '1.6.1' && 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.6.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
296
314
  }
297
315
  return binding
298
316
  } catch (e) {
@@ -307,8 +325,8 @@ function requireNative() {
307
325
  try {
308
326
  const binding = require('@puniyu/nipaw-linux-arm64-gnu')
309
327
  const bindingPackageVersion = require('@puniyu/nipaw-linux-arm64-gnu/package.json').version
310
- if (bindingPackageVersion !== '1.5.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
311
- throw new Error(`Native binding package version mismatch, expected 1.5.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
328
+ if (bindingPackageVersion !== '1.6.1' && 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.6.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
312
330
  }
313
331
  return binding
314
332
  } catch (e) {
@@ -325,8 +343,8 @@ function requireNative() {
325
343
  try {
326
344
  const binding = require('@puniyu/nipaw-linux-arm-musleabihf')
327
345
  const bindingPackageVersion = require('@puniyu/nipaw-linux-arm-musleabihf/package.json').version
328
- if (bindingPackageVersion !== '1.5.0' && 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.5.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
346
+ if (bindingPackageVersion !== '1.6.1' && 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.6.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
330
348
  }
331
349
  return binding
332
350
  } catch (e) {
@@ -341,8 +359,8 @@ function requireNative() {
341
359
  try {
342
360
  const binding = require('@puniyu/nipaw-linux-arm-gnueabihf')
343
361
  const bindingPackageVersion = require('@puniyu/nipaw-linux-arm-gnueabihf/package.json').version
344
- if (bindingPackageVersion !== '1.5.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
345
- throw new Error(`Native binding package version mismatch, expected 1.5.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
362
+ if (bindingPackageVersion !== '1.6.1' && 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.6.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
346
364
  }
347
365
  return binding
348
366
  } catch (e) {
@@ -359,8 +377,8 @@ function requireNative() {
359
377
  try {
360
378
  const binding = require('@puniyu/nipaw-linux-loong64-musl')
361
379
  const bindingPackageVersion = require('@puniyu/nipaw-linux-loong64-musl/package.json').version
362
- if (bindingPackageVersion !== '1.5.0' && 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.5.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
380
+ if (bindingPackageVersion !== '1.6.1' && 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.6.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
364
382
  }
365
383
  return binding
366
384
  } catch (e) {
@@ -375,8 +393,8 @@ function requireNative() {
375
393
  try {
376
394
  const binding = require('@puniyu/nipaw-linux-loong64-gnu')
377
395
  const bindingPackageVersion = require('@puniyu/nipaw-linux-loong64-gnu/package.json').version
378
- if (bindingPackageVersion !== '1.5.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
379
- throw new Error(`Native binding package version mismatch, expected 1.5.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
396
+ if (bindingPackageVersion !== '1.6.1' && 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.6.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
380
398
  }
381
399
  return binding
382
400
  } catch (e) {
@@ -393,8 +411,8 @@ function requireNative() {
393
411
  try {
394
412
  const binding = require('@puniyu/nipaw-linux-riscv64-musl')
395
413
  const bindingPackageVersion = require('@puniyu/nipaw-linux-riscv64-musl/package.json').version
396
- if (bindingPackageVersion !== '1.5.0' && 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.5.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
414
+ if (bindingPackageVersion !== '1.6.1' && 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.6.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
398
416
  }
399
417
  return binding
400
418
  } catch (e) {
@@ -409,8 +427,8 @@ function requireNative() {
409
427
  try {
410
428
  const binding = require('@puniyu/nipaw-linux-riscv64-gnu')
411
429
  const bindingPackageVersion = require('@puniyu/nipaw-linux-riscv64-gnu/package.json').version
412
- if (bindingPackageVersion !== '1.5.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
413
- throw new Error(`Native binding package version mismatch, expected 1.5.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
430
+ if (bindingPackageVersion !== '1.6.1' && 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.6.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
414
432
  }
415
433
  return binding
416
434
  } catch (e) {
@@ -426,8 +444,8 @@ function requireNative() {
426
444
  try {
427
445
  const binding = require('@puniyu/nipaw-linux-ppc64-gnu')
428
446
  const bindingPackageVersion = require('@puniyu/nipaw-linux-ppc64-gnu/package.json').version
429
- if (bindingPackageVersion !== '1.5.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
430
- throw new Error(`Native binding package version mismatch, expected 1.5.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
447
+ if (bindingPackageVersion !== '1.6.1' && 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.6.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
431
449
  }
432
450
  return binding
433
451
  } catch (e) {
@@ -442,8 +460,8 @@ function requireNative() {
442
460
  try {
443
461
  const binding = require('@puniyu/nipaw-linux-s390x-gnu')
444
462
  const bindingPackageVersion = require('@puniyu/nipaw-linux-s390x-gnu/package.json').version
445
- if (bindingPackageVersion !== '1.5.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
446
- throw new Error(`Native binding package version mismatch, expected 1.5.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
463
+ if (bindingPackageVersion !== '1.6.1' && 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.6.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
447
465
  }
448
466
  return binding
449
467
  } catch (e) {
@@ -462,8 +480,8 @@ function requireNative() {
462
480
  try {
463
481
  const binding = require('@puniyu/nipaw-openharmony-arm64')
464
482
  const bindingPackageVersion = require('@puniyu/nipaw-openharmony-arm64/package.json').version
465
- if (bindingPackageVersion !== '1.5.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
466
- throw new Error(`Native binding package version mismatch, expected 1.5.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
483
+ if (bindingPackageVersion !== '1.6.1' && 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.6.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
467
485
  }
468
486
  return binding
469
487
  } catch (e) {
@@ -478,8 +496,8 @@ function requireNative() {
478
496
  try {
479
497
  const binding = require('@puniyu/nipaw-openharmony-x64')
480
498
  const bindingPackageVersion = require('@puniyu/nipaw-openharmony-x64/package.json').version
481
- if (bindingPackageVersion !== '1.5.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
482
- throw new Error(`Native binding package version mismatch, expected 1.5.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
499
+ if (bindingPackageVersion !== '1.6.1' && 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.6.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
483
501
  }
484
502
  return binding
485
503
  } catch (e) {
@@ -494,8 +512,8 @@ function requireNative() {
494
512
  try {
495
513
  const binding = require('@puniyu/nipaw-openharmony-arm')
496
514
  const bindingPackageVersion = require('@puniyu/nipaw-openharmony-arm/package.json').version
497
- if (bindingPackageVersion !== '1.5.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
498
- throw new Error(`Native binding package version mismatch, expected 1.5.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
515
+ if (bindingPackageVersion !== '1.6.1' && 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.6.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
499
517
  }
500
518
  return binding
501
519
  } catch (e) {
@@ -557,10 +575,11 @@ if (!nativeBinding) {
557
575
  throw new Error(`Failed to load native binding`)
558
576
  }
559
577
 
560
- const { CnbClient, GitCodeClient, GiteeClient, GithubClient, CollaboratorPermission, RepoVisibility } = nativeBinding
578
+ const { CnbClient, GitCodeClient, GiteeClient, GithubClient, CollaboratorPermission, RepoVisibility, StateType } = nativeBinding
561
579
  export { CnbClient }
562
580
  export { GitCodeClient }
563
581
  export { GiteeClient }
564
582
  export { GithubClient }
565
583
  export { CollaboratorPermission }
566
584
  export { RepoVisibility }
585
+ export { StateType }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@puniyu/nipaw",
3
- "version": "1.5.0",
3
+ "version": "1.6.1",
4
4
  "description": "一个git平台封装库",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -37,14 +37,14 @@
37
37
  "node": ">= 12.22.0 < 13 || >= 14.17.0 < 15 || >= 15.12.0 < 16 || >= 16.0.0"
38
38
  },
39
39
  "devDependencies": {
40
- "@napi-rs/cli": "^3.2.0"
40
+ "@napi-rs/cli": "^3.4.1"
41
41
  },
42
42
  "optionalDependencies": {
43
- "@puniyu/nipaw-win32-x64-msvc": "1.5.0",
44
- "@puniyu/nipaw-darwin-x64": "1.5.0",
45
- "@puniyu/nipaw-linux-x64-gnu": "1.5.0",
46
- "@puniyu/nipaw-linux-arm64-gnu": "1.5.0",
47
- "@puniyu/nipaw-darwin-arm64": "1.5.0"
43
+ "@puniyu/nipaw-win32-x64-msvc": "1.6.1",
44
+ "@puniyu/nipaw-darwin-x64": "1.6.1",
45
+ "@puniyu/nipaw-linux-x64-gnu": "1.6.1",
46
+ "@puniyu/nipaw-linux-arm64-gnu": "1.6.1",
47
+ "@puniyu/nipaw-darwin-arm64": "1.6.1"
48
48
  },
49
49
  "scripts": {
50
50
  "artifacts": "napi artifacts",