@doki-land/nifty 0.1.1 → 0.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/src/native.ts CHANGED
@@ -9,740 +9,736 @@ import type {
9
9
  } from "./types.js";
10
10
 
11
11
  export type GitmojiExports = {
12
- "known-gitmojis" : () =>string[];
13
- "validate-subject" : (subject : string) =>boolean;
14
- "parse-subject" : (subject : string) =>ParsedSubject;
15
- "format-subject" : (gitmoji : string, body : string) =>string;
16
- "strip-gitmoji" : (subject : string) =>string;
17
- "leading-gitmoji" : (subject : string) =>string | undefined;
18
- "section-for-gitmoji" : (gitmoji : string | undefined) =>ReleaseSection;
19
- "parse-noreply-email" : (email : string) =>GithubAuthor | undefined;
20
- "resolve-github-author" : (email : string, authorMapJson : string) =>GithubAuthor | undefined;
21
- "display-login" : (author : GithubAuthor) =>string;
22
- "profile-url" : (author : GithubAuthor) =>string;
23
- "avatar-url" : (author : GithubAuthor) =>string;
24
- "author-mention" : (email : string, authorName : string, authorMapJson : string) =>string;
25
- "commit-bullet" : (body : string, email : string, authorName : string, authorMapJson : string) =>string;
12
+ "known-gitmojis": () => string[];
13
+ "validate-subject": (subject: string) => boolean;
14
+ "parse-subject": (subject: string) => ParsedSubject;
15
+ "format-subject": (gitmoji: string, body: string) => string;
16
+ "strip-gitmoji": (subject: string) => string;
17
+ "leading-gitmoji": (subject: string) => string | undefined;
18
+ "section-for-gitmoji": (gitmoji: string | undefined) => ReleaseSection;
19
+ "parse-noreply-email": (email: string) => GithubAuthor | undefined;
20
+ "resolve-github-author": (email: string, authorMapJson: string) => GithubAuthor | undefined;
21
+ "display-login": (author: GithubAuthor) => string;
22
+ "profile-url": (author: GithubAuthor) => string;
23
+ "avatar-url": (author: GithubAuthor) => string;
24
+ "author-mention": (email: string, authorName: string, authorMapJson: string) => string;
25
+ "commit-bullet": (body: string, email: string, authorName: string, authorMapJson: string) => string;
26
26
  };
27
27
 
28
28
  export type GitExports = {
29
- "discover-root" : (startPath : string) =>string;
30
- "list-version-tags" : (repoRoot : string) =>string[];
31
- "list-tag-infos" : (repoRoot : string) =>Array<{ name : string; "short-hash" : string }>;
32
- "format-tag-list" : (repoRoot : string) =>string;
33
- "resolve-range" : (
34
- repoRoot : string,
35
- version : string | undefined,
36
- fromRef : string | undefined,
37
- toRef : string | undefined,
38
- ) =>{ version : string; "from-ref" ? : string; "to-ref" : string };
39
- "collect-commits" : (
40
- repoRoot : string,
41
- fromRef : string | undefined,
42
- toRef : string,
43
- ) =>NativeCommitRecord[];
44
- "detect-github-repo" : (repoRoot : string) =>string | undefined;
45
- "parse-github-remote" : (url : string) =>string | undefined;
29
+ "discover-root": (startPath: string) => string;
30
+ "list-version-tags": (repoRoot: string) => string[];
31
+ "list-tag-infos": (repoRoot: string) => Array < { name: string; "short-hash": string }>;
32
+ "format-tag-list": (repoRoot: string) => string;
33
+ "resolve-range": (
34
+ repoRoot: string,
35
+ version: string | undefined,
36
+ fromRef: string | undefined,
37
+ toRef: string | undefined,
38
+ ) => { version: string; "from-ref"?: string; "to-ref": string };
39
+ "collect-commits": (
40
+ repoRoot: string,
41
+ fromRef: string | undefined,
42
+ toRef: string,
43
+ ) => NativeCommitRecord[];
44
+ "detect-github-repo": (repoRoot: string) => string | undefined;
45
+ "parse-github-remote": (url: string) => string | undefined;
46
46
  };
47
47
 
48
- type NativeCommitRecord = Omit<CommitRecord, "section"> & { section : string };
48
+ type NativeCommitRecord = Omit < CommitRecord, "section"> & { section: string };
49
49
 
50
50
  export type PublishReport = {
51
- root : string;
52
- order : string[];
53
- published : string[];
54
- skipped : string[];
55
- skippedVersions : string[];
51
+ root: string;
52
+ order: string[];
53
+ published: string[];
54
+ skipped: string[];
55
+ skippedVersions: string[];
56
56
  };
57
57
 
58
58
  export type TrustReport = {
59
- root : string;
60
- configured : string[];
61
- skipped : string[];
62
- failed : string[];
59
+ root: string;
60
+ configured: string[];
61
+ skipped: string[];
62
+ failed: string[];
63
63
  };
64
64
 
65
65
  export type RewordPlannedChange = {
66
- oldOid : string;
67
- oldSubject : string;
68
- newSubject : string;
69
- parentsRelinked : boolean;
70
- messageChanged : boolean;
66
+ oldOid: string;
67
+ oldSubject: string;
68
+ newSubject: string;
69
+ parentsRelinked: boolean;
70
+ messageChanged: boolean;
71
71
  };
72
72
 
73
73
  export type RewordRewriteReport = {
74
- changes : RewordPlannedChange[];
75
- oldTip : string;
76
- newTip ? : string;
77
- refName : string;
78
- dryRun : boolean;
74
+ changes: RewordPlannedChange[];
75
+ oldTip: string;
76
+ newTip?: string;
77
+ refName: string;
78
+ dryRun: boolean;
79
79
  };
80
80
 
81
81
  export type HistoryExports = {
82
- "commit-export" : (options : {
83
- cwd ? : string;
84
- base : string;
85
- ref ? : string;
86
- path : string;
87
- }) =>{ count : number; path : string };
88
- "commit-apply" : (options : {
89
- cwd ? : string;
90
- base : string;
91
- ref ? : string;
92
- path : string;
93
- dryRun ? : boolean;
94
- }) =>RewordRewriteReport;
82
+ "commit-export": (options: {
83
+ cwd?: string;
84
+ base: string;
85
+ ref?: string;
86
+ path: string;
87
+ }) => { count: number; path: string };
88
+ "commit-apply": (options: {
89
+ cwd?: string;
90
+ base: string;
91
+ ref?: string;
92
+ path: string;
93
+ dryRun?: boolean;
94
+ }) => RewordRewriteReport;
95
95
  /** @deprecated use `commit-export` */
96
- "reword-export" : (options : {
97
- cwd ? : string;
98
- base : string;
99
- ref ? : string;
100
- path : string;
101
- }) =>{ count : number; path : string };
96
+ "reword-export": (options: {
97
+ cwd?: string;
98
+ base: string;
99
+ ref?: string;
100
+ path: string;
101
+ }) => { count: number; path: string };
102
102
  /** @deprecated use `commit-apply` */
103
- "reword-rewrite" : (options : {
104
- cwd ? : string;
105
- base : string;
106
- ref ? : string;
107
- path : string;
108
- dryRun ? : boolean;
109
- }) =>RewordRewriteReport;
110
- "retime-range" : (options : {
111
- cwd ? : string;
112
- commit : string;
113
- startDate ? : string;
114
- endDate ? : string;
115
- branch ? : string;
116
- tip ? : string;
117
- }) =>{ branch : string; newTip : string; rewritten : number };
118
- "retime-root" : (options : {
119
- cwd ? : string;
120
- startDate ? : string;
121
- endDate ? : string;
122
- branch ? : string;
123
- tip ? : string;
124
- message ? : string;
125
- }) =>{ branch : string; newTip : string; rewritten : number };
126
- "changelog-render" : (options : {
127
- cwd ? : string;
128
- version ? : string;
129
- fromRef ? : string;
130
- toRef ? : string;
131
- write ? : boolean;
132
- tags ? : boolean;
133
- repo ? : string;
134
- authorMap ? : string;
135
- releasesDir ? : string;
136
- }) =>{
137
- notes : string;
138
- version : string;
139
- fromRef ? : string;
140
- toRef : string;
141
- commitCount : number;
142
- writtenPath ? : string;
143
- rangeLabel : string;
103
+ "reword-rewrite": (options: {
104
+ cwd?: string;
105
+ base: string;
106
+ ref?: string;
107
+ path: string;
108
+ dryRun?: boolean;
109
+ }) => RewordRewriteReport;
110
+ "retime-range": (options: {
111
+ cwd?: string;
112
+ commit: string;
113
+ startDate?: string;
114
+ endDate?: string;
115
+ branch?: string;
116
+ tip?: string;
117
+ }) => { branch: string; newTip: string; rewritten: number };
118
+ "retime-root": (options: {
119
+ cwd?: string;
120
+ startDate?: string;
121
+ endDate?: string;
122
+ branch?: string;
123
+ tip?: string;
124
+ message?: string;
125
+ }) => { branch: string; newTip: string; rewritten: number };
126
+ "changelog-render": (options: {
127
+ cwd?: string;
128
+ version?: string;
129
+ fromRef?: string;
130
+ toRef?: string;
131
+ write?: boolean;
132
+ tags?: boolean;
133
+ repo?: string;
134
+ authorMap?: string;
135
+ releasesDir?: string;
136
+ }) => {
137
+ notes: string;
138
+ version: string;
139
+ fromRef?: string;
140
+ toRef: string;
141
+ commitCount: number;
142
+ writtenPath?: string;
143
+ rangeLabel: string;
144
144
  };
145
- "changelog-lookup" : (options : {
146
- cwd ? : string;
147
- email ? : string;
148
- login ? : string;
149
- map ? : string;
150
- githubToken ? : string;
151
- fetch ? : boolean;
152
- }) =>GithubAuthor;
145
+ "changelog-lookup": (options: {
146
+ cwd?: string;
147
+ email?: string;
148
+ login?: string;
149
+ map?: string;
150
+ githubToken?: string;
151
+ fetch?: boolean;
152
+ }) => GithubAuthor;
153
153
  };
154
154
 
155
155
  export type LintDiagnosticRecord = {
156
- rule : string;
157
- severity : "error" | "warning" | "info";
158
- message : string;
159
- subject ? : string;
160
- hash ? : string;
161
- path ? : string;
162
- line ? : number;
156
+ rule: string;
157
+ severity: "error" | "warning" | "info";
158
+ message: string;
159
+ subject?: string;
160
+ hash?: string;
161
+ path?: string;
162
+ line?: number;
163
163
  };
164
164
 
165
165
  export type LintRunOptions = {
166
- cwd ? : string;
167
- fromRef ? : string;
168
- toRef ? : string;
169
- subjects ? : string[];
170
- rules ? : Array<{ id : string; enabled ? : boolean; severity ? : "error" | "warning" | "info" }>;
171
- scanCargo ? : boolean;
172
- commitOnly ? : boolean;
166
+ cwd?: string;
167
+ fromRef?: string;
168
+ toRef?: string;
169
+ subjects?: string[];
170
+ rules?: Array < { id: string; enabled?: boolean; severity?: "error" | "warning" | "info" }>;
171
+ scanCargo?: boolean;
172
+ commitOnly?: boolean;
173
173
  };
174
174
 
175
175
  export type LintReportRecord = {
176
- diagnostics : LintDiagnosticRecord[];
177
- errorCount : number;
178
- warningCount : number;
176
+ diagnostics: LintDiagnosticRecord[];
177
+ errorCount: number;
178
+ warningCount: number;
179
179
  };
180
180
 
181
181
  export type LintExports = {
182
- run : (options : LintRunOptions) =>LintReportRecord;
183
- check : (options : LintRunOptions) =>LintReportRecord;
182
+ run: (options: LintRunOptions) => LintReportRecord;
183
+ check: (options: LintRunOptions) => LintReportRecord;
184
184
  };
185
185
 
186
186
  export type UpdaterExports = {
187
- run : (options : { cwd ? : string; interactive ? : boolean }) =>void;
187
+ run: (options: { cwd?: string; interactive?: boolean }) => void;
188
188
  };
189
189
 
190
190
  export type FormatReportRecord = {
191
- formatted : number;
192
- unchanged : number;
193
- errors : string[];
191
+ formatted: number;
192
+ unchanged: number;
193
+ errors: string[];
194
194
  };
195
195
 
196
196
  export type FormatterStyleOptions = {
197
- indentStyle ? : string;
198
- indentWidth ? : number;
199
- lineWidth ? : number;
200
- quoteStyle ? : string;
197
+ indentStyle?: string;
198
+ indentWidth?: number;
199
+ lineWidth?: number;
200
+ quoteStyle?: string;
201
201
  };
202
202
 
203
203
  export type FormatterRunOptions = {
204
- cwd ? : string;
205
- check ? : boolean;
206
- includes ? : string[];
207
- excludes ? : string[];
208
- rust ? : boolean;
209
- javascript ? : boolean;
210
- style ? : FormatterStyleOptions;
204
+ cwd?: string;
205
+ check?: boolean;
206
+ includes?: string[];
207
+ excludes?: string[];
208
+ rust?: boolean;
209
+ javascript?: boolean;
210
+ style?: FormatterStyleOptions;
211
211
  };
212
212
 
213
213
  export type FormatterExports = {
214
- run : (options : FormatterRunOptions) =>FormatReportRecord;
214
+ run: (options: FormatterRunOptions) => FormatReportRecord;
215
215
  };
216
216
 
217
217
  export type PublisherExports = {
218
- "publish-workspace" : (options : {
219
- cwd ? : string;
220
- dryRun ? : boolean;
221
- refresh ? : boolean;
222
- placeholder ? : boolean;
223
- only ? : string;
224
- packages ? : string[];
225
- tag ? : string;
226
- access ? : string;
227
- npm ? : string;
228
- otp ? : string;
229
- totpSecret ? : string;
230
- token ? : string;
231
- trustRepo ? : string;
232
- trustFile ? : string;
233
- trustEnvironment ? : string;
234
- }) =>PublishReport;
235
- "trust-workspace" : (options : {
236
- cwd ? : string;
237
- dryRun ? : boolean;
238
- refresh ? : boolean;
239
- only ? : string;
240
- packages ? : string[];
241
- npm ? : string;
242
- otp ? : string;
243
- totpSecret ? : string;
244
- token ? : string;
245
- trustRepo ? : string;
246
- trustFile ? : string;
247
- trustEnvironment ? : string;
248
- }) =>TrustReport;
218
+ "publish-workspace": (options: {
219
+ cwd?: string;
220
+ dryRun?: boolean;
221
+ refresh?: boolean;
222
+ placeholder?: boolean;
223
+ only?: string;
224
+ packages?: string[];
225
+ tag?: string;
226
+ access?: string;
227
+ npm?: string;
228
+ otp?: string;
229
+ totpSecret?: string;
230
+ token?: string;
231
+ trustRepo?: string;
232
+ trustFile?: string;
233
+ trustEnvironment?: string;
234
+ }) => PublishReport;
235
+ "trust-workspace": (options: {
236
+ cwd?: string;
237
+ dryRun?: boolean;
238
+ refresh?: boolean;
239
+ only?: string;
240
+ packages?: string[];
241
+ npm?: string;
242
+ otp?: string;
243
+ totpSecret?: string;
244
+ token?: string;
245
+ trustRepo?: string;
246
+ trustFile?: string;
247
+ trustEnvironment?: string;
248
+ }) => TrustReport;
249
249
  };
250
250
 
251
251
  export type NiftyNative = {
252
- gitmoji : GitmojiExports;
253
- git : GitExports;
254
- history : HistoryExports;
255
- lint : LintExports;
256
- updater : UpdaterExports;
257
- formatter : FormatterExports;
258
- publisher : PublisherExports;
252
+ gitmoji: GitmojiExports;
253
+ git: GitExports;
254
+ history: HistoryExports;
255
+ lint: LintExports;
256
+ updater: UpdaterExports;
257
+ formatter: FormatterExports;
258
+ publisher: PublisherExports;
259
259
  };
260
260
 
261
261
  type NativeBinding = {
262
- gitmojiKnownGitmojis : () =>string[];
263
- gitmojiValidateSubject : (subject : string) =>boolean;
264
- gitmojiParseSubject : (subject : string) =>ParsedSubject;
265
- gitmojiFormatSubject : (gitmoji : string, body : string) =>string;
266
- gitmojiStripGitmoji : (subject : string) =>string;
267
- gitmojiLeadingGitmoji : (subject : string) =>string | null;
268
- gitmojiSectionForGitmoji : (gitmoji ? : string | null) =>string;
269
- gitmojiParseNoreplyEmail : (email : string) =>GithubAuthor | null;
270
- gitmojiResolveGithubAuthor : (email : string, authorMapJson : string) =>GithubAuthor | null;
271
- gitmojiDisplayLogin : (author : GithubAuthor) =>string;
272
- gitmojiProfileUrl : (author : GithubAuthor) =>string;
273
- gitmojiAvatarUrl : (author : GithubAuthor) =>string;
274
- gitmojiAuthorMention : (email : string, authorName : string, authorMapJson : string) =>string;
275
- gitmojiCommitBullet : (body : string, email : string, authorName : string, authorMapJson : string) =>string;
276
- gitDiscoverRoot : (startPath : string) =>string;
277
- gitListVersionTags : (repoRoot : string) =>string[];
278
- gitListTagInfos : (repoRoot : string) =>Array<{ name : string; shortHash : string }>;
279
- gitFormatTagList : (repoRoot : string) =>string;
280
- gitResolveRange : (
281
- repoRoot : string,
282
- version ? : string | null,
283
- fromRef ? : string | null,
284
- toRef ? : string | null,
285
- ) =>{ version : string; fromRef ? : string; toRef : string };
286
- gitCollectCommits : (
287
- repoRoot : string,
288
- fromRef : string | null | undefined,
289
- toRef : string,
290
- ) =>CommitRecord[];
291
- gitDetectGithubRepo : (repoRoot : string) =>string | null;
292
- gitParseGithubRemote : (url : string) =>string | null;
293
- publisherPublishWorkspace : (options : {
294
- cwd ? : string | null;
295
- dryRun ? : boolean | null;
296
- refresh ? : boolean | null;
297
- placeholder ? : boolean | null;
298
- tag ? : string | null;
299
- access ? : string | null;
300
- npm ? : string | null;
301
- otp ? : string | null;
302
- totpSecret ? : string | null;
303
- token ? : string | null;
304
- only ? : string | null;
305
- packages ? : string[] | null;
306
- }) =>PublishReport;
307
- publisherTrustWorkspace : (options : {
308
- cwd ? : string | null;
309
- dryRun ? : boolean | null;
310
- refresh ? : boolean | null;
311
- only ? : string | null;
312
- packages ? : string[] | null;
313
- npm ? : string | null;
314
- otp ? : string | null;
315
- totpSecret ? : string | null;
316
- token ? : string | null;
317
- }) =>TrustReport;
318
- gitToolsCommitExport : (options : {
319
- cwd ? : string | null;
320
- base : string;
321
- ref ? : string | null;
322
- path : string;
323
- }) =>{ count : number; path : string };
324
- gitToolsCommitApply : (options : {
325
- cwd ? : string | null;
326
- base : string;
327
- ref ? : string | null;
328
- path : string;
329
- dryRun ? : boolean | null;
330
- }) =>{
331
- changes : Array<{
332
- oldOid : string;
333
- oldSubject : string;
334
- newSubject : string;
335
- parentsRelinked : boolean;
336
- messageChanged : boolean;
262
+ gitmojiKnownGitmojis: () => string[];
263
+ gitmojiValidateSubject: (subject: string) => boolean;
264
+ gitmojiParseSubject: (subject: string) => ParsedSubject;
265
+ gitmojiFormatSubject: (gitmoji: string, body: string) => string;
266
+ gitmojiStripGitmoji: (subject: string) => string;
267
+ gitmojiLeadingGitmoji: (subject: string) => string | null;
268
+ gitmojiSectionForGitmoji: (gitmoji?: string | null) => string;
269
+ gitmojiParseNoreplyEmail: (email: string) => GithubAuthor | null;
270
+ gitmojiResolveGithubAuthor: (email: string, authorMapJson: string) => GithubAuthor | null;
271
+ gitmojiDisplayLogin: (author: GithubAuthor) => string;
272
+ gitmojiProfileUrl: (author: GithubAuthor) => string;
273
+ gitmojiAvatarUrl: (author: GithubAuthor) => string;
274
+ gitmojiAuthorMention: (email: string, authorName: string, authorMapJson: string) => string;
275
+ gitmojiCommitBullet: (body: string, email: string, authorName: string, authorMapJson: string) => string;
276
+ gitDiscoverRoot: (startPath: string) => string;
277
+ gitListVersionTags: (repoRoot: string) => string[];
278
+ gitListTagInfos: (repoRoot: string) => Array < { name: string; shortHash: string }>;
279
+ gitFormatTagList: (repoRoot: string) => string;
280
+ gitResolveRange: (
281
+ repoRoot: string,
282
+ version?: string | null,
283
+ fromRef?: string | null,
284
+ toRef?: string | null,
285
+ ) => { version: string; fromRef?: string; toRef: string };
286
+ gitCollectCommits: (
287
+ repoRoot: string,
288
+ fromRef: string | null | undefined,
289
+ toRef: string,
290
+ ) => CommitRecord[];
291
+ gitDetectGithubRepo: (repoRoot: string) => string | null;
292
+ gitParseGithubRemote: (url: string) => string | null;
293
+ publisherPublishWorkspace: (options: {
294
+ cwd?: string | null;
295
+ dryRun?: boolean | null;
296
+ refresh?: boolean | null;
297
+ placeholder?: boolean | null;
298
+ tag?: string | null;
299
+ access?: string | null;
300
+ npm?: string | null;
301
+ otp?: string | null;
302
+ totpSecret?: string | null;
303
+ token?: string | null;
304
+ only?: string | null;
305
+ packages?: string[] | null;
306
+ }) => PublishReport;
307
+ publisherTrustWorkspace: (options: {
308
+ cwd?: string | null;
309
+ dryRun?: boolean | null;
310
+ refresh?: boolean | null;
311
+ only?: string | null;
312
+ packages?: string[] | null;
313
+ npm?: string | null;
314
+ otp?: string | null;
315
+ totpSecret?: string | null;
316
+ token?: string | null;
317
+ }) => TrustReport;
318
+ gitToolsCommitExport: (options: {
319
+ cwd?: string | null;
320
+ base: string;
321
+ ref?: string | null;
322
+ path: string;
323
+ }) => { count: number; path: string };
324
+ gitToolsCommitApply: (options: {
325
+ cwd?: string | null;
326
+ base: string;
327
+ ref?: string | null;
328
+ path: string;
329
+ dryRun?: boolean | null;
330
+ }) => {
331
+ changes: Array < {
332
+ oldOid: string;
333
+ oldSubject: string;
334
+ newSubject: string;
335
+ parentsRelinked: boolean;
336
+ messageChanged: boolean;
337
337
  }>;
338
- oldTip : string;
339
- newTip ? : string | null;
340
- refName : string;
341
- dryRun : boolean;
338
+ oldTip: string;
339
+ newTip?: string | null;
340
+ refName: string;
341
+ dryRun: boolean;
342
342
  };
343
- gitToolsRewordExport : (options : {
344
- cwd ? : string | null;
345
- base : string;
346
- ref ? : string | null;
347
- path : string;
348
- }) =>{ count : number; path : string };
349
- gitToolsRewordRewrite : (options : {
350
- cwd ? : string | null;
351
- base : string;
352
- ref ? : string | null;
353
- path : string;
354
- dryRun ? : boolean | null;
355
- }) =>{
356
- changes : Array<{
357
- oldOid : string;
358
- oldSubject : string;
359
- newSubject : string;
360
- parentsRelinked : boolean;
361
- messageChanged : boolean;
343
+ gitToolsRewordExport: (options: {
344
+ cwd?: string | null;
345
+ base: string;
346
+ ref?: string | null;
347
+ path: string;
348
+ }) => { count: number; path: string };
349
+ gitToolsRewordRewrite: (options: {
350
+ cwd?: string | null;
351
+ base: string;
352
+ ref?: string | null;
353
+ path: string;
354
+ dryRun?: boolean | null;
355
+ }) => {
356
+ changes: Array < {
357
+ oldOid: string;
358
+ oldSubject: string;
359
+ newSubject: string;
360
+ parentsRelinked: boolean;
361
+ messageChanged: boolean;
362
362
  }>;
363
- oldTip : string;
364
- newTip ? : string | null;
365
- refName : string;
366
- dryRun : boolean;
363
+ oldTip: string;
364
+ newTip?: string | null;
365
+ refName: string;
366
+ dryRun: boolean;
367
367
  };
368
- gitToolsRetimeRange : (options : {
369
- cwd ? : string | null;
370
- commit : string;
371
- startDate ? : string | null;
372
- endDate ? : string | null;
373
- branch ? : string | null;
374
- tip ? : string | null;
375
- }) =>{ branch : string; newTip : string; rewritten : number };
376
- gitToolsRetimeRoot : (options : {
377
- cwd ? : string | null;
378
- startDate ? : string | null;
379
- endDate ? : string | null;
380
- branch ? : string | null;
381
- tip ? : string | null;
382
- message ? : string | null;
383
- }) =>{ branch : string; newTip : string; rewritten : number };
384
- gitToolsChangelogRender : (options : {
385
- cwd ? : string | null;
386
- version ? : string | null;
387
- fromRef ? : string | null;
388
- toRef ? : string | null;
389
- write ? : boolean | null;
390
- tags ? : boolean | null;
391
- repo ? : string | null;
392
- authorMap ? : string | null;
393
- releasesDir ? : string | null;
394
- }) =>{
395
- notes : string;
396
- version : string;
397
- fromRef ? : string | null;
398
- toRef : string;
399
- commitCount : number;
400
- writtenPath ? : string | null;
401
- rangeLabel : string;
368
+ gitToolsRetimeRange: (options: {
369
+ cwd?: string | null;
370
+ commit: string;
371
+ startDate?: string | null;
372
+ endDate?: string | null;
373
+ branch?: string | null;
374
+ tip?: string | null;
375
+ }) => { branch: string; newTip: string; rewritten: number };
376
+ gitToolsRetimeRoot: (options: {
377
+ cwd?: string | null;
378
+ startDate?: string | null;
379
+ endDate?: string | null;
380
+ branch?: string | null;
381
+ tip?: string | null;
382
+ message?: string | null;
383
+ }) => { branch: string; newTip: string; rewritten: number };
384
+ gitToolsChangelogRender: (options: {
385
+ cwd?: string | null;
386
+ version?: string | null;
387
+ fromRef?: string | null;
388
+ toRef?: string | null;
389
+ write?: boolean | null;
390
+ tags?: boolean | null;
391
+ repo?: string | null;
392
+ authorMap?: string | null;
393
+ releasesDir?: string | null;
394
+ }) => {
395
+ notes: string;
396
+ version: string;
397
+ fromRef?: string | null;
398
+ toRef: string;
399
+ commitCount: number;
400
+ writtenPath?: string | null;
401
+ rangeLabel: string;
402
402
  };
403
- gitToolsChangelogLookup : (options : {
404
- cwd ? : string | null;
405
- email ? : string | null;
406
- login ? : string | null;
407
- map ? : string | null;
408
- githubToken ? : string | null;
409
- fetch ? : boolean | null;
410
- }) =>GithubAuthor;
411
- lintRun : (options : {
412
- cwd ? : string | null;
413
- fromRef ? : string | null;
414
- toRef ? : string | null;
415
- subjects ? : string[] | null;
416
- rules ? : Array<{ id : string; enabled ? : boolean | null; severity ? : string | null }> | null;
417
- scanCargo ? : boolean | null;
418
- commitOnly ? : boolean | null;
419
- check ? : boolean | null;
420
- }) =>{
421
- diagnostics : Array<{
422
- rule : string;
423
- severity : string;
424
- message : string;
425
- subject ? : string | null;
426
- hash ? : string | null;
427
- path ? : string | null;
428
- line ? : number | null;
403
+ gitToolsChangelogLookup: (options: {
404
+ cwd?: string | null;
405
+ email?: string | null;
406
+ login?: string | null;
407
+ map?: string | null;
408
+ githubToken?: string | null;
409
+ fetch?: boolean | null;
410
+ }) => GithubAuthor;
411
+ lintRun: (options: {
412
+ cwd?: string | null;
413
+ fromRef?: string | null;
414
+ toRef?: string | null;
415
+ subjects?: string[] | null;
416
+ rules?: Array < { id: string; enabled?: boolean | null; severity?: string | null }> | null;
417
+ scanCargo?: boolean | null;
418
+ commitOnly?: boolean | null;
419
+ check?: boolean | null;
420
+ }) => {
421
+ diagnostics: Array < {
422
+ rule: string;
423
+ severity: string;
424
+ message: string;
425
+ subject?: string | null;
426
+ hash?: string | null;
427
+ path?: string | null;
428
+ line?: number | null;
429
429
  }>;
430
- errorCount : number;
431
- warningCount : number;
430
+ errorCount: number;
431
+ warningCount: number;
432
432
  };
433
- lintCheck : (options : {
434
- cwd ? : string | null;
435
- fromRef ? : string | null;
436
- toRef ? : string | null;
437
- subjects ? : string[] | null;
438
- rules ? : Array<{ id : string; enabled ? : boolean | null; severity ? : string | null }> | null;
439
- scanCargo ? : boolean | null;
440
- commitOnly ? : boolean | null;
441
- check ? : boolean | null;
442
- }) =>{
443
- diagnostics : Array<{
444
- rule : string;
445
- severity : string;
446
- message : string;
447
- subject ? : string | null;
448
- hash ? : string | null;
449
- path ? : string | null;
450
- line ? : number | null;
433
+ lintCheck: (options: {
434
+ cwd?: string | null;
435
+ fromRef?: string | null;
436
+ toRef?: string | null;
437
+ subjects?: string[] | null;
438
+ rules?: Array < { id: string; enabled?: boolean | null; severity?: string | null }> | null;
439
+ scanCargo?: boolean | null;
440
+ commitOnly?: boolean | null;
441
+ check?: boolean | null;
442
+ }) => {
443
+ diagnostics: Array < {
444
+ rule: string;
445
+ severity: string;
446
+ message: string;
447
+ subject?: string | null;
448
+ hash?: string | null;
449
+ path?: string | null;
450
+ line?: number | null;
451
451
  }>;
452
- errorCount : number;
453
- warningCount : number;
452
+ errorCount: number;
453
+ warningCount: number;
454
454
  };
455
- updaterRun : (options : { cwd ? : string | null; interactive ? : boolean | null }) =>void;
456
- formatterRun : (options : {
457
- cwd ? : string | null;
458
- check ? : boolean | null;
459
- includes ? : string[] | null;
460
- excludes ? : string[] | null;
461
- rust ? : boolean | null;
462
- javascript ? : boolean | null;
463
- style ? : FormatterStyleOptions | null;
464
- }) =>{
465
- formatted : number;
466
- unchanged : number;
467
- errors : string[];
455
+ updaterRun: (options: { cwd?: string | null; interactive?: boolean | null }) => void;
456
+ formatterRun: (options: {
457
+ cwd?: string | null;
458
+ check?: boolean | null;
459
+ includes?: string[] | null;
460
+ excludes?: string[] | null;
461
+ rust?: boolean | null;
462
+ javascript?: boolean | null;
463
+ style?: FormatterStyleOptions | null;
464
+ }) => {
465
+ formatted: number;
466
+ unchanged: number;
467
+ errors: string[];
468
468
  };
469
469
  };
470
470
 
471
- const PLATFORM_PACKAGES : Record<string, string> = {
472
- "win32-x64" : "@doki-land/nifty-win32-x64",
473
- "linux-x64" : "@doki-land/nifty-linux-x64",
474
- "linux-arm64" : "@doki-land/nifty-linux-arm64",
475
- "darwin-x64" : "@doki-land/nifty-darwin-x64",
476
- "darwin-arm64" : "@doki-land/nifty-darwin-arm64",
471
+ const PLATFORM_PACKAGES: Record < string, string > = {
472
+ "win32-x64": "@doki-land/nifty-win32-x64",
473
+ "linux-x64": "@doki-land/nifty-linux-x64",
474
+ "linux-arm64": "@doki-land/nifty-linux-arm64",
475
+ "darwin-x64": "@doki-land/nifty-darwin-x64",
476
+ "darwin-arm64": "@doki-land/nifty-darwin-arm64",
477
477
  };
478
478
 
479
- function mapAuthor(raw : GithubAuthor | null | undefined) : GithubAuthor | undefined {
480
- if(!raw){
479
+ function mapAuthor(raw: GithubAuthor | null | undefined): GithubAuthor | undefined {
480
+ if (!raw) {
481
481
  return undefined;
482
482
  }
483
483
  return {
484
- id : raw.id!== undefined && raw.id!== null ? BigInt(raw.id) : undefined,
485
- login : raw.login ?? undefined,
484
+ id: raw.id !== undefined && raw.id !== null ? BigInt(raw.id) : undefined,
485
+ login: raw.login ?? undefined,
486
486
  };
487
487
  }
488
488
 
489
- function mapLintOptions(options : LintRunOptions){
489
+ function mapLintOptions(options: LintRunOptions) {
490
490
  return {
491
- ...(options.cwd!== undefined ? { cwd : options.cwd } : { }),
492
- ...(options.fromRef!== undefined ? { fromRef : options.fromRef } : { }),
493
- ...(options.toRef!== undefined ? { toRef : options.toRef } : { }),
494
- ...(options.subjects!== undefined ? { subjects : options.subjects } : { }),
495
- ...(options.rules!== undefined ? { rules : options.rules } : { }),
496
- ...(options.scanCargo!== undefined ? { scanCargo : options.scanCargo } : { }),
497
- ...(options.commitOnly!== undefined ? { commitOnly : options.commitOnly } : { }),
491
+ ...(options.cwd !== undefined ? { cwd: options.cwd } : { }),
492
+ ...(options.fromRef !== undefined ? { fromRef: options.fromRef } : { }),
493
+ ...(options.toRef !== undefined ? { toRef: options.toRef } : { }),
494
+ ...(options.subjects !== undefined ? { subjects: options.subjects } : { }),
495
+ ...(options.rules !== undefined ? { rules: options.rules } : { }),
496
+ ...(options.scanCargo !== undefined ? { scanCargo: options.scanCargo } : { }),
497
+ ...(options.commitOnly !== undefined ? { commitOnly: options.commitOnly } : { }),
498
498
  };
499
499
  }
500
500
 
501
- function mapLintReport(raw : {
502
- diagnostics : Array<{
503
- rule : string;
504
- severity : string;
505
- message : string;
506
- subject ? : string | null;
507
- hash ? : string | null;
508
- path ? : string | null;
509
- line ? : number | null;
501
+ function mapLintReport(raw: {
502
+ diagnostics: Array < {
503
+ rule: string;
504
+ severity: string;
505
+ message: string;
506
+ subject?: string | null;
507
+ hash?: string | null;
508
+ path?: string | null;
509
+ line?: number | null;
510
510
  }>;
511
- errorCount : number;
512
- warningCount : number;
513
- }) : LintReportRecord {
511
+ errorCount: number;
512
+ warningCount: number;
513
+ }): LintReportRecord {
514
514
  return {
515
- errorCount : raw.errorCount,
516
- warningCount : raw.warningCount,
517
- diagnostics : raw.diagnostics.map((item) =>({
518
- rule : item.rule,
519
- severity : item.severity as LintDiagnosticRecord["severity"],
520
- message : item.message,
521
- subject : item.subject ?? undefined,
522
- hash : item.hash ?? undefined,
523
- path : item.path ?? undefined,
524
- line : item.line ?? undefined,
515
+ errorCount: raw.errorCount,
516
+ warningCount: raw.warningCount,
517
+ diagnostics: raw.diagnostics.map((item) => ({
518
+ rule: item.rule,
519
+ severity: item.severity as LintDiagnosticRecord["severity"],
520
+ message: item.message,
521
+ subject: item.subject ?? undefined,
522
+ hash: item.hash ?? undefined,
523
+ path: item.path ?? undefined,
524
+ line: item.line ?? undefined,
525
525
  })),
526
526
  };
527
527
  }
528
528
 
529
- function wrapBinding(binding : NativeBinding) : NiftyNative {
529
+ function wrapBinding(binding: NativeBinding): NiftyNative {
530
530
  return {
531
- gitmoji : {
532
- "known-gitmojis" : () =>binding.gitmojiKnownGitmojis(),
533
- "validate-subject" : (subject) =>binding.gitmojiValidateSubject(subject),
534
- "parse-subject" : (subject) =>binding.gitmojiParseSubject(subject),
535
- "format-subject" : (gitmoji, body) =>binding.gitmojiFormatSubject(gitmoji, body),
536
- "strip-gitmoji" : (subject) =>binding.gitmojiStripGitmoji(subject),
537
- "leading-gitmoji" : (subject) =>binding.gitmojiLeadingGitmoji(subject) ?? undefined,
538
- "section-for-gitmoji" : (gitmoji) =>binding.gitmojiSectionForGitmoji(gitmoji)as ReleaseSection,
539
- "parse-noreply-email" : (email) =>mapAuthor(binding.gitmojiParseNoreplyEmail(email)),
540
- "resolve-github-author" : (email, authorMapJson) =>
531
+ gitmoji: {
532
+ "known-gitmojis": () => binding.gitmojiKnownGitmojis(),
533
+ "validate-subject": (subject) => binding.gitmojiValidateSubject(subject),
534
+ "parse-subject": (subject) => binding.gitmojiParseSubject(subject),
535
+ "format-subject": (gitmoji, body) => binding.gitmojiFormatSubject(gitmoji, body),
536
+ "strip-gitmoji": (subject) => binding.gitmojiStripGitmoji(subject),
537
+ "leading-gitmoji": (subject) => binding.gitmojiLeadingGitmoji(subject) ?? undefined,
538
+ "section-for-gitmoji": (gitmoji) => binding.gitmojiSectionForGitmoji(gitmoji)as ReleaseSection,
539
+ "parse-noreply-email": (email) => mapAuthor(binding.gitmojiParseNoreplyEmail(email)),
540
+ "resolve-github-author": (email, authorMapJson) =>
541
541
  mapAuthor(binding.gitmojiResolveGithubAuthor(email, authorMapJson)),
542
- "display-login" : (author) =>binding.gitmojiDisplayLogin(author),
543
- "profile-url" : (author) =>binding.gitmojiProfileUrl(author),
544
- "avatar-url" : (author) =>binding.gitmojiAvatarUrl(author),
545
- "author-mention" : (email, authorName, authorMapJson) =>
542
+ "display-login": (author) => binding.gitmojiDisplayLogin(author),
543
+ "profile-url": (author) => binding.gitmojiProfileUrl(author),
544
+ "avatar-url": (author) => binding.gitmojiAvatarUrl(author),
545
+ "author-mention": (email, authorName, authorMapJson) =>
546
546
  binding.gitmojiAuthorMention(email, authorName, authorMapJson),
547
- "commit-bullet" : (body, email, authorName, authorMapJson) =>
547
+ "commit-bullet": (body, email, authorName, authorMapJson) =>
548
548
  binding.gitmojiCommitBullet(body, email, authorName, authorMapJson),
549
549
  },
550
- git : {
551
- "discover-root" : (startPath) =>binding.gitDiscoverRoot(startPath),
552
- "list-version-tags" : (repoRoot) =>binding.gitListVersionTags(repoRoot),
553
- "list-tag-infos" : (repoRoot) =>
554
- binding.gitListTagInfos(repoRoot).map((tag) =>({
555
- name : tag.name,
556
- "short-hash" : tag.shortHash,
550
+ git: {
551
+ "discover-root": (startPath) => binding.gitDiscoverRoot(startPath),
552
+ "list-version-tags": (repoRoot) => binding.gitListVersionTags(repoRoot),
553
+ "list-tag-infos": (repoRoot) =>
554
+ binding.gitListTagInfos(repoRoot).map((tag) => ({
555
+ name: tag.name,
556
+ "short-hash": tag.shortHash,
557
557
  })),
558
- "format-tag-list" : (repoRoot) =>binding.gitFormatTagList(repoRoot),
559
- "resolve-range" : (repoRoot, version, fromRef, toRef) =>{
558
+ "format-tag-list": (repoRoot) => binding.gitFormatTagList(repoRoot),
559
+ "resolve-range": (repoRoot, version, fromRef, toRef) => {
560
560
  const range = binding.gitResolveRange(repoRoot, version, fromRef, toRef);
561
561
  return {
562
- version : range.version,
563
- "from-ref" : range.fromRef,
564
- "to-ref" : range.toRef,
562
+ version: range.version,
563
+ "from-ref": range.fromRef,
564
+ "to-ref": range.toRef,
565
565
  };
566
566
  },
567
- "collect-commits" : (repoRoot, fromRef, toRef) =>binding.gitCollectCommits(repoRoot, fromRef, toRef),
568
- "detect-github-repo" : (repoRoot) =>binding.gitDetectGithubRepo(repoRoot) ?? undefined,
569
- "parse-github-remote" : (url) =>binding.gitParseGithubRemote(url) ?? undefined,
567
+ "collect-commits": (repoRoot, fromRef, toRef) => binding.gitCollectCommits(repoRoot, fromRef, toRef),
568
+ "detect-github-repo": (repoRoot) => binding.gitDetectGithubRepo(repoRoot) ?? undefined,
569
+ "parse-github-remote": (url) => binding.gitParseGithubRemote(url) ?? undefined,
570
570
  },
571
- history : {
572
- "commit-export" : (options) =>
571
+ history: {
572
+ "commit-export": (options) =>
573
573
  binding.gitToolsCommitExport({
574
- ...(options.cwd!== undefined ? { cwd : options.cwd } : { }),
575
- base : options.base,
576
- ...(options.ref!== undefined ? { ref : options.ref } : { }),
577
- path : options.path,
574
+ ...(options.cwd !== undefined ? { cwd: options.cwd } : { }),
575
+ base: options.base,
576
+ ...(options.ref !== undefined ? { ref: options.ref } : { }),
577
+ path: options.path,
578
578
  }),
579
- "commit-apply" : (options) =>{
579
+ "commit-apply": (options) => {
580
580
  const report = binding.gitToolsCommitApply({
581
- ...(options.cwd!== undefined ? { cwd : options.cwd } : { }),
582
- base : options.base,
583
- ...(options.ref!== undefined ? { ref : options.ref } : { }),
584
- path : options.path,
585
- ...(options.dryRun!== undefined ? { dryRun : options.dryRun } : { }),
581
+ ...(options.cwd !== undefined ? { cwd: options.cwd } : { }),
582
+ base: options.base,
583
+ ...(options.ref !== undefined ? { ref: options.ref } : { }),
584
+ path: options.path,
585
+ ...(options.dryRun !== undefined ? { dryRun: options.dryRun } : { }),
586
586
  });
587
587
  return {
588
- changes : report.changes,
589
- oldTip : report.oldTip,
590
- newTip : report.newTip ?? undefined,
591
- refName : report.refName,
592
- dryRun : report.dryRun,
588
+ changes: report.changes,
589
+ oldTip: report.oldTip,
590
+ newTip: report.newTip ?? undefined,
591
+ refName: report.refName,
592
+ dryRun: report.dryRun,
593
593
  };
594
594
  },
595
- "reword-export" : (options) =>
595
+ "reword-export": (options) =>
596
596
  binding.gitToolsRewordExport({
597
- ...(options.cwd!== undefined ? { cwd : options.cwd } : { }),
598
- base : options.base,
599
- ...(options.ref!== undefined ? { ref : options.ref } : { }),
600
- path : options.path,
597
+ ...(options.cwd !== undefined ? { cwd: options.cwd } : { }),
598
+ base: options.base,
599
+ ...(options.ref !== undefined ? { ref: options.ref } : { }),
600
+ path: options.path,
601
601
  }),
602
- "reword-rewrite" : (options) =>{
602
+ "reword-rewrite": (options) => {
603
603
  const report = binding.gitToolsRewordRewrite({
604
- ...(options.cwd!== undefined ? { cwd : options.cwd } : { }),
605
- base : options.base,
606
- ...(options.ref!== undefined ? { ref : options.ref } : { }),
607
- path : options.path,
608
- ...(options.dryRun!== undefined ? { dryRun : options.dryRun } : { }),
604
+ ...(options.cwd !== undefined ? { cwd: options.cwd } : { }),
605
+ base: options.base,
606
+ ...(options.ref !== undefined ? { ref: options.ref } : { }),
607
+ path: options.path,
608
+ ...(options.dryRun !== undefined ? { dryRun: options.dryRun } : { }),
609
609
  });
610
610
  return {
611
- changes : report.changes,
612
- oldTip : report.oldTip,
613
- newTip : report.newTip ?? undefined,
614
- refName : report.refName,
615
- dryRun : report.dryRun,
611
+ changes: report.changes,
612
+ oldTip: report.oldTip,
613
+ newTip: report.newTip ?? undefined,
614
+ refName: report.refName,
615
+ dryRun: report.dryRun,
616
616
  };
617
617
  },
618
- "retime-range" : (options) =>
618
+ "retime-range": (options) =>
619
619
  binding.gitToolsRetimeRange({
620
- ...(options.cwd!== undefined ? { cwd : options.cwd } : { }),
621
- commit : options.commit,
622
- ...(options.startDate!== undefined ? { startDate : options.startDate } : { }),
623
- ...(options.endDate!== undefined ? { endDate : options.endDate } : { }),
624
- ...(options.branch!== undefined ? { branch : options.branch } : { }),
625
- ...(options.tip!== undefined ? { tip : options.tip } : { }),
620
+ ...(options.cwd !== undefined ? { cwd: options.cwd } : { }),
621
+ commit: options.commit,
622
+ ...(options.startDate !== undefined ? { startDate: options.startDate } : { }),
623
+ ...(options.endDate !== undefined ? { endDate: options.endDate } : { }),
624
+ ...(options.branch !== undefined ? { branch: options.branch } : { }),
625
+ ...(options.tip !== undefined ? { tip: options.tip } : { }),
626
626
  }),
627
- "retime-root" : (options) =>
627
+ "retime-root": (options) =>
628
628
  binding.gitToolsRetimeRoot({
629
- ...(options.cwd!== undefined ? { cwd : options.cwd } : { }),
630
- ...(options.startDate!== undefined ? { startDate : options.startDate } : { }),
631
- ...(options.endDate!== undefined ? { endDate : options.endDate } : { }),
632
- ...(options.branch!== undefined ? { branch : options.branch } : { }),
633
- ...(options.tip!== undefined ? { tip : options.tip } : { }),
634
- ...(options.message!== undefined ? { message : options.message } : { }),
629
+ ...(options.cwd !== undefined ? { cwd: options.cwd } : { }),
630
+ ...(options.startDate !== undefined ? { startDate: options.startDate } : { }),
631
+ ...(options.endDate !== undefined ? { endDate: options.endDate } : { }),
632
+ ...(options.branch !== undefined ? { branch: options.branch } : { }),
633
+ ...(options.tip !== undefined ? { tip: options.tip } : { }),
634
+ ...(options.message !== undefined ? { message: options.message } : { }),
635
635
  }),
636
- "changelog-render" : (options) =>{
636
+ "changelog-render": (options) => {
637
637
  const report = binding.gitToolsChangelogRender({
638
- ...(options.cwd!== undefined ? { cwd : options.cwd } : { }),
639
- ...(options.version!== undefined ? { version : options.version } : { }),
640
- ...(options.fromRef!== undefined ? { fromRef : options.fromRef } : { }),
641
- ...(options.toRef!== undefined ? { toRef : options.toRef } : { }),
642
- ...(options.write!== undefined ? { write : options.write } : { }),
643
- ...(options.tags!== undefined ? { tags : options.tags } : { }),
644
- ...(options.repo!== undefined ? { repo : options.repo } : { }),
645
- ...(options.authorMap!== undefined ? { authorMap : options.authorMap } : { }),
646
- ...(options.releasesDir!== undefined ? { releasesDir : options.releasesDir } : { }),
638
+ ...(options.cwd !== undefined ? { cwd: options.cwd } : { }),
639
+ ...(options.version !== undefined ? { version: options.version } : { }),
640
+ ...(options.fromRef !== undefined ? { fromRef: options.fromRef } : { }),
641
+ ...(options.toRef !== undefined ? { toRef: options.toRef } : { }),
642
+ ...(options.write !== undefined ? { write: options.write } : { }),
643
+ ...(options.tags !== undefined ? { tags: options.tags } : { }),
644
+ ...(options.repo !== undefined ? { repo: options.repo } : { }),
645
+ ...(options.authorMap !== undefined ? { authorMap: options.authorMap } : { }),
646
+ ...(options.releasesDir !== undefined ? { releasesDir: options.releasesDir } : { }),
647
647
  });
648
648
  return {
649
- notes : report.notes,
650
- version : report.version,
651
- fromRef : report.fromRef ?? undefined,
652
- toRef : report.toRef,
653
- commitCount : report.commitCount,
654
- writtenPath : report.writtenPath ?? undefined,
655
- rangeLabel : report.rangeLabel,
649
+ notes: report.notes,
650
+ version: report.version,
651
+ fromRef: report.fromRef ?? undefined,
652
+ toRef: report.toRef,
653
+ commitCount: report.commitCount,
654
+ writtenPath: report.writtenPath ?? undefined,
655
+ rangeLabel: report.rangeLabel,
656
656
  };
657
657
  },
658
- "changelog-lookup" : (options) =>{
658
+ "changelog-lookup": (options) => {
659
659
  const author = binding.gitToolsChangelogLookup({
660
- ...(options.cwd!== undefined ? { cwd : options.cwd } : { }),
661
- ...(options.email!== undefined ? { email : options.email } : { }),
662
- ...(options.login!== undefined ? { login : options.login } : { }),
663
- ...(options.map!== undefined ? { map : options.map } : { }),
664
- ...(options.githubToken!== undefined ? { githubToken : options.githubToken } : { }),
665
- ...(options.fetch!== undefined ? { fetch : options.fetch } : { }),
660
+ ...(options.cwd !== undefined ? { cwd: options.cwd } : { }),
661
+ ...(options.email !== undefined ? { email: options.email } : { }),
662
+ ...(options.login !== undefined ? { login: options.login } : { }),
663
+ ...(options.map !== undefined ? { map: options.map } : { }),
664
+ ...(options.githubToken !== undefined ? { githubToken: options.githubToken } : { }),
665
+ ...(options.fetch !== undefined ? { fetch: options.fetch } : { }),
666
666
  });
667
667
  return mapAuthor(author) ?? { };
668
668
  },
669
669
  },
670
- lint : {
671
- run : (options) =>mapLintReport(binding.lintRun(mapLintOptions(options))),
672
- check : (options) =>mapLintReport(binding.lintCheck(mapLintOptions(options))),
670
+ lint: {
671
+ run: (options) => mapLintReport(binding.lintRun(mapLintOptions(options))),
672
+ check: (options) => mapLintReport(binding.lintCheck(mapLintOptions(options))),
673
673
  },
674
- updater : {
675
- run : (options) =>{
674
+ updater: {
675
+ run: (options) => {
676
676
  binding.updaterRun({
677
- ...(options.cwd!== undefined ? { cwd : options.cwd } : { }),
678
- ...(options.interactive!== undefined ? { interactive : options.interactive } : { }),
677
+ ...(options.cwd !== undefined ? { cwd: options.cwd } : { }),
678
+ ...(options.interactive !== undefined ? { interactive: options.interactive } : { }),
679
679
  });
680
680
  },
681
681
  },
682
- formatter : {
683
- run : (options) =>
682
+ formatter: {
683
+ run: (options) =>
684
684
  binding.formatterRun({
685
- ...(options.cwd!== undefined ? { cwd : options.cwd } : { }),
686
- ...(options.check!== undefined ? { check : options.check } : { }),
687
- ...(options.includes!== undefined ? { includes : options.includes } : { }),
688
- ...(options.excludes!== undefined ? { excludes : options.excludes } : { }),
689
- ...(options.rust!== undefined ? { rust : options.rust } : { }),
690
- ...(options.javascript!== undefined ? { javascript : options.javascript } : { }),
691
- ...(options.style!== undefined ? { style : options.style } : { }),
685
+ ...(options.cwd !== undefined ? { cwd: options.cwd } : { }),
686
+ ...(options.check !== undefined ? { check: options.check } : { }),
687
+ ...(options.includes !== undefined ? { includes: options.includes } : { }),
688
+ ...(options.excludes !== undefined ? { excludes: options.excludes } : { }),
689
+ ...(options.rust !== undefined ? { rust: options.rust } : { }),
690
+ ...(options.javascript !== undefined ? { javascript: options.javascript } : { }),
691
+ ...(options.style !== undefined ? { style: options.style } : { }),
692
692
  }),
693
693
  },
694
- publisher : {
695
- "publish-workspace" : (options) =>
694
+ publisher: {
695
+ "publish-workspace": (options) =>
696
696
  binding.publisherPublishWorkspace({
697
- ...(options.cwd!== undefined ? { cwd : options.cwd } : { }),
698
- ...(options.dryRun!== undefined ? { dryRun : options.dryRun } : { }),
699
- ...(options.refresh!== undefined ? { refresh : options.refresh } : { }),
700
- ...(options.placeholder!== undefined ? { placeholder : options.placeholder } : { }),
701
- ...(options.only!== undefined ? { only : options.only } : { }),
702
- ...(options.packages!== undefined ? { packages : options.packages } : { }),
703
- ...(options.tag!== undefined ? { tag : options.tag } : { }),
704
- ...(options.access!== undefined ? { access : options.access } : { }),
705
- ...(options.npm!== undefined ? { npm : options.npm } : { }),
706
- ...(options.otp!== undefined ? { otp : options.otp } : { }),
707
- ...(options.totpSecret!== undefined ? { totpSecret : options.totpSecret } : { }),
708
- ...(options.token!== undefined ? { token : options.token } : { }),
709
- ...(options.trustRepo!== undefined ? { trustRepo : options.trustRepo } : { }),
710
- ...(options.trustFile!== undefined ? { trustFile : options.trustFile } : { }),
711
- ...(options.trustEnvironment!== undefined
712
- ? { trustEnvironment : options.trustEnvironment }
713
- : { }),
697
+ ...(options.cwd !== undefined ? { cwd: options.cwd } : { }),
698
+ ...(options.dryRun !== undefined ? { dryRun: options.dryRun } : { }),
699
+ ...(options.refresh !== undefined ? { refresh: options.refresh } : { }),
700
+ ...(options.placeholder !== undefined ? { placeholder: options.placeholder } : { }),
701
+ ...(options.only !== undefined ? { only: options.only } : { }),
702
+ ...(options.packages !== undefined ? { packages: options.packages } : { }),
703
+ ...(options.tag !== undefined ? { tag: options.tag } : { }),
704
+ ...(options.access !== undefined ? { access: options.access } : { }),
705
+ ...(options.npm !== undefined ? { npm: options.npm } : { }),
706
+ ...(options.otp !== undefined ? { otp: options.otp } : { }),
707
+ ...(options.totpSecret !== undefined ? { totpSecret: options.totpSecret } : { }),
708
+ ...(options.token !== undefined ? { token: options.token } : { }),
709
+ ...(options.trustRepo !== undefined ? { trustRepo: options.trustRepo } : { }),
710
+ ...(options.trustFile !== undefined ? { trustFile: options.trustFile } : { }),
711
+ ...(options.trustEnvironment !== undefined ? { trustEnvironment: options.trustEnvironment } : { }),
714
712
  }),
715
- "trust-workspace" : (options) =>
713
+ "trust-workspace": (options) =>
716
714
  binding.publisherTrustWorkspace({
717
- ...(options.cwd!== undefined ? { cwd : options.cwd } : { }),
718
- ...(options.dryRun!== undefined ? { dryRun : options.dryRun } : { }),
719
- ...(options.refresh!== undefined ? { refresh : options.refresh } : { }),
720
- ...(options.only!== undefined ? { only : options.only } : { }),
721
- ...(options.packages!== undefined ? { packages : options.packages } : { }),
722
- ...(options.npm!== undefined ? { npm : options.npm } : { }),
723
- ...(options.otp!== undefined ? { otp : options.otp } : { }),
724
- ...(options.totpSecret!== undefined ? { totpSecret : options.totpSecret } : { }),
725
- ...(options.token!== undefined ? { token : options.token } : { }),
726
- ...(options.trustRepo!== undefined ? { trustRepo : options.trustRepo } : { }),
727
- ...(options.trustFile!== undefined ? { trustFile : options.trustFile } : { }),
728
- ...(options.trustEnvironment!== undefined
729
- ? { trustEnvironment : options.trustEnvironment }
730
- : { }),
715
+ ...(options.cwd !== undefined ? { cwd: options.cwd } : { }),
716
+ ...(options.dryRun !== undefined ? { dryRun: options.dryRun } : { }),
717
+ ...(options.refresh !== undefined ? { refresh: options.refresh } : { }),
718
+ ...(options.only !== undefined ? { only: options.only } : { }),
719
+ ...(options.packages !== undefined ? { packages: options.packages } : { }),
720
+ ...(options.npm !== undefined ? { npm: options.npm } : { }),
721
+ ...(options.otp !== undefined ? { otp: options.otp } : { }),
722
+ ...(options.totpSecret !== undefined ? { totpSecret: options.totpSecret } : { }),
723
+ ...(options.token !== undefined ? { token: options.token } : { }),
724
+ ...(options.trustRepo !== undefined ? { trustRepo: options.trustRepo } : { }),
725
+ ...(options.trustFile !== undefined ? { trustFile: options.trustFile } : { }),
726
+ ...(options.trustEnvironment !== undefined ? { trustEnvironment: options.trustEnvironment } : { }),
731
727
  }),
732
728
  },
733
729
  };
734
730
  }
735
731
 
736
- let cached : NiftyNative | undefined;
732
+ let cached: NiftyNative | undefined;
737
733
 
738
734
  /** Load the platform-specific Node-API binary from `@doki-land/nifty-<platform>`. */
739
- export function loadNiftyNative() : NiftyNative {
740
- if(cached){
735
+ export function loadNiftyNative(): NiftyNative {
736
+ if (cached) {
741
737
  return cached;
742
738
  }
743
739
  const key = `${process.platform}-${process.arch}`;
744
740
  const pkg = PLATFORM_PACKAGES[key];
745
- if(!pkg){
741
+ if (!pkg) {
746
742
  throw new Error(`Unsupported platform for Nifty native bindings: ${key}`);
747
743
  }
748
744
  const require = createRequire(import.meta.url);
@@ -751,26 +747,26 @@ export function loadNiftyNative() : NiftyNative {
751
747
  return cached;
752
748
  }
753
749
 
754
- export function mapTagInfo(raw : { name : string; "short-hash" : string }) : TagInfo {
755
- return { name : raw.name, shortHash : raw["short-hash"] };
750
+ export function mapTagInfo(raw: { name: string; "short-hash": string }): TagInfo {
751
+ return { name: raw.name, shortHash: raw["short-hash"] };
756
752
  }
757
753
 
758
- export function mapRangeInfo(raw : { version : string; "from-ref" ? : string; "to-ref" : string }) : RangeInfo {
754
+ export function mapRangeInfo(raw: { version: string; "from-ref"?: string; "to-ref": string }): RangeInfo {
759
755
  return {
760
- version : raw.version,
761
- fromRef : raw["from-ref"],
762
- toRef : raw["to-ref"],
756
+ version: raw.version,
757
+ fromRef: raw["from-ref"],
758
+ toRef: raw["to-ref"],
763
759
  };
764
760
  }
765
761
 
766
- export function mapCommitRecord(raw : NativeCommitRecord) : CommitRecord {
762
+ export function mapCommitRecord(raw: NativeCommitRecord): CommitRecord {
767
763
  return {
768
- hash : raw.hash,
769
- email : raw.email,
770
- author : raw.author,
771
- subject : raw.subject,
772
- body : raw.body,
773
- gitmoji : raw.gitmoji,
774
- section : raw.section as ReleaseSection,
764
+ hash: raw.hash,
765
+ email: raw.email,
766
+ author: raw.author,
767
+ subject: raw.subject,
768
+ body: raw.body,
769
+ gitmoji: raw.gitmoji,
770
+ section: raw.section as ReleaseSection,
775
771
  };
776
772
  }