@shined/doctor 0.0.17 → 0.0.18

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.
Files changed (3) hide show
  1. package/index.d.ts +272 -3
  2. package/index.js +3 -0
  3. package/package.json +9 -9
package/index.d.ts CHANGED
@@ -10,14 +10,16 @@ export interface Diagnostic {
10
10
  labels: Array<LabeledLoc>
11
11
  }
12
12
 
13
- export declare function doctor(cwd: string, options: DoctorOptions): Promise<void>
13
+ export declare function doctor(cwd: string, options: DoctorOptions): Promise<Array<NapiMessages>>
14
14
 
15
15
  export interface DoctorOptions {
16
16
  verbose?: boolean
17
- globals?: Record<string, string>
18
- ignore?: Array<string>
17
+ maxRenderCount?: number
18
+ withDashboard?: boolean
19
19
  }
20
20
 
21
+ export declare function getLanguagesStatistics(paths: Array<string>): Array<NapiLanguageStatistics>
22
+
21
23
  export interface GlobJsArgs {
22
24
  ignore?: Array<string>
23
25
  cwd: string
@@ -54,6 +56,273 @@ export declare const enum NaPiCategory {
54
56
  V20250601Inner = 0
55
57
  }
56
58
 
59
+ export interface NapiDiagnostics {
60
+ message: string
61
+ code?: string
62
+ severity?: NapiSeverity
63
+ help?: string
64
+ url?: string
65
+ labels?: Array<NapiLabeledSpan>
66
+ }
67
+
68
+ export interface NapiLabeledSpan {
69
+ label?: string
70
+ span: NapiSourceSpan
71
+ primary: boolean
72
+ }
73
+
74
+ export interface NapiLanguageStatistics {
75
+ language: NapiLanguageType
76
+ code: number
77
+ comments: number
78
+ blanks: number
79
+ }
80
+
81
+ export declare const enum NapiLanguageType {
82
+ ABNF = 'ABNF',
83
+ Abap = 'Abap',
84
+ ActionScript = 'ActionScript',
85
+ Ada = 'Ada',
86
+ Agda = 'Agda',
87
+ Alex = 'Alex',
88
+ Alloy = 'Alloy',
89
+ Arduino = 'Arduino',
90
+ AsciiDoc = 'AsciiDoc',
91
+ Asn1 = 'Asn1',
92
+ Asp = 'Asp',
93
+ AspNet = 'AspNet',
94
+ Assembly = 'Assembly',
95
+ AssemblyGAS = 'AssemblyGAS',
96
+ AutoHotKey = 'AutoHotKey',
97
+ Autoconf = 'Autoconf',
98
+ Automake = 'Automake',
99
+ Bash = 'Bash',
100
+ Batch = 'Batch',
101
+ Bean = 'Bean',
102
+ BrightScript = 'BrightScript',
103
+ C = 'C',
104
+ CHeader = 'CHeader',
105
+ CMake = 'CMake',
106
+ CSharp = 'CSharp',
107
+ CShell = 'CShell',
108
+ Cabal = 'Cabal',
109
+ Cassius = 'Cassius',
110
+ Ceylon = 'Ceylon',
111
+ Clojure = 'Clojure',
112
+ ClojureC = 'ClojureC',
113
+ ClojureScript = 'ClojureScript',
114
+ Cobol = 'Cobol',
115
+ CodeQL = 'CodeQL',
116
+ CoffeeScript = 'CoffeeScript',
117
+ Cogent = 'Cogent',
118
+ ColdFusion = 'ColdFusion',
119
+ ColdFusionScript = 'ColdFusionScript',
120
+ Coq = 'Coq',
121
+ Cpp = 'Cpp',
122
+ CppHeader = 'CppHeader',
123
+ Crystal = 'Crystal',
124
+ Css = 'Css',
125
+ D = 'D',
126
+ Daml = 'Daml',
127
+ Dart = 'Dart',
128
+ DeviceTree = 'DeviceTree',
129
+ Dhall = 'Dhall',
130
+ Dockerfile = 'Dockerfile',
131
+ DotNetResource = 'DotNetResource',
132
+ DreamMaker = 'DreamMaker',
133
+ Dust = 'Dust',
134
+ Edn = 'Edn',
135
+ Elisp = 'Elisp',
136
+ Elixir = 'Elixir',
137
+ Elm = 'Elm',
138
+ Elvish = 'Elvish',
139
+ EmacsDevEnv = 'EmacsDevEnv',
140
+ Emojicode = 'Emojicode',
141
+ Erlang = 'Erlang',
142
+ FEN = 'FEN',
143
+ FSharp = 'FSharp',
144
+ Fish = 'Fish',
145
+ FlatBuffers = 'FlatBuffers',
146
+ Forth = 'Forth',
147
+ FortranLegacy = 'FortranLegacy',
148
+ FortranModern = 'FortranModern',
149
+ FreeMarker = 'FreeMarker',
150
+ Fstar = 'Fstar',
151
+ Futhark = 'Futhark',
152
+ GDB = 'GDB',
153
+ GdScript = 'GdScript',
154
+ Gherkin = 'Gherkin',
155
+ Gleam = 'Gleam',
156
+ Glsl = 'Glsl',
157
+ Go = 'Go',
158
+ Gohtml = 'Gohtml',
159
+ Graphql = 'Graphql',
160
+ Groovy = 'Groovy',
161
+ Gwion = 'Gwion',
162
+ Hamlet = 'Hamlet',
163
+ Handlebars = 'Handlebars',
164
+ Happy = 'Happy',
165
+ Haskell = 'Haskell',
166
+ Haxe = 'Haxe',
167
+ Hcl = 'Hcl',
168
+ Headache = 'Headache',
169
+ Hex = 'Hex',
170
+ Hlsl = 'Hlsl',
171
+ HolyC = 'HolyC',
172
+ Html = 'Html',
173
+ Idris = 'Idris',
174
+ Ini = 'Ini',
175
+ IntelHex = 'IntelHex',
176
+ Isabelle = 'Isabelle',
177
+ Jai = 'Jai',
178
+ Java = 'Java',
179
+ JavaScript = 'JavaScript',
180
+ Json = 'Json',
181
+ Jsonnet = 'Jsonnet',
182
+ Jsx = 'Jsx',
183
+ Julia = 'Julia',
184
+ Julius = 'Julius',
185
+ Jupyter = 'Jupyter',
186
+ K = 'K',
187
+ KakouneScript = 'KakouneScript',
188
+ Kotlin = 'Kotlin',
189
+ LLVM = 'LLVM',
190
+ Lean = 'Lean',
191
+ Less = 'Less',
192
+ LinkerScript = 'LinkerScript',
193
+ Liquid = 'Liquid',
194
+ Lisp = 'Lisp',
195
+ LiveScript = 'LiveScript',
196
+ Logtalk = 'Logtalk',
197
+ Lua = 'Lua',
198
+ Lucius = 'Lucius',
199
+ Madlang = 'Madlang',
200
+ Makefile = 'Makefile',
201
+ Markdown = 'Markdown',
202
+ Meson = 'Meson',
203
+ Mint = 'Mint',
204
+ ModuleDef = 'ModuleDef',
205
+ MoonScript = 'MoonScript',
206
+ MsBuild = 'MsBuild',
207
+ Mustache = 'Mustache',
208
+ Nim = 'Nim',
209
+ Nix = 'Nix',
210
+ NotQuitePerl = 'NotQuitePerl',
211
+ OCaml = 'OCaml',
212
+ ObjectiveC = 'ObjectiveC',
213
+ ObjectiveCpp = 'ObjectiveCpp',
214
+ Odin = 'Odin',
215
+ OpenType = 'OpenType',
216
+ Org = 'Org',
217
+ Oz = 'Oz',
218
+ PSL = 'PSL',
219
+ Pan = 'Pan',
220
+ Pascal = 'Pascal',
221
+ Perl = 'Perl',
222
+ Perl6 = 'Perl6',
223
+ Pest = 'Pest',
224
+ Php = 'Php',
225
+ Polly = 'Polly',
226
+ Pony = 'Pony',
227
+ PostCss = 'PostCss',
228
+ PowerShell = 'PowerShell',
229
+ Processing = 'Processing',
230
+ Prolog = 'Prolog',
231
+ Protobuf = 'Protobuf',
232
+ Pug = 'Pug',
233
+ PureScript = 'PureScript',
234
+ Python = 'Python',
235
+ Q = 'Q',
236
+ Qcl = 'Qcl',
237
+ Qml = 'Qml',
238
+ R = 'R',
239
+ RON = 'RON',
240
+ RPMSpecfile = 'RPMSpecfile',
241
+ Racket = 'Racket',
242
+ Rakefile = 'Rakefile',
243
+ Razor = 'Razor',
244
+ ReStructuredText = 'ReStructuredText',
245
+ Renpy = 'Renpy',
246
+ Ruby = 'Ruby',
247
+ RubyHtml = 'RubyHtml',
248
+ Rust = 'Rust',
249
+ SRecode = 'SRecode',
250
+ Sass = 'Sass',
251
+ Scala = 'Scala',
252
+ Scheme = 'Scheme',
253
+ Scons = 'Scons',
254
+ Sh = 'Sh',
255
+ Sml = 'Sml',
256
+ Solidity = 'Solidity',
257
+ SpecmanE = 'SpecmanE',
258
+ Spice = 'Spice',
259
+ Sql = 'Sql',
260
+ Stan = 'Stan',
261
+ Stratego = 'Stratego',
262
+ Stylus = 'Stylus',
263
+ Svelte = 'Svelte',
264
+ Svg = 'Svg',
265
+ Swift = 'Swift',
266
+ Swig = 'Swig',
267
+ SystemVerilog = 'SystemVerilog',
268
+ Tcl = 'Tcl',
269
+ Tera = 'Tera',
270
+ Tex = 'Tex',
271
+ Text = 'Text',
272
+ Thrift = 'Thrift',
273
+ Toml = 'Toml',
274
+ Tsx = 'Tsx',
275
+ Ttcn = 'Ttcn',
276
+ Twig = 'Twig',
277
+ TypeScript = 'TypeScript',
278
+ UnrealDeveloperMarkdown = 'UnrealDeveloperMarkdown',
279
+ UnrealPlugin = 'UnrealPlugin',
280
+ UnrealProject = 'UnrealProject',
281
+ UnrealScript = 'UnrealScript',
282
+ UnrealShader = 'UnrealShader',
283
+ UnrealShaderHeader = 'UnrealShaderHeader',
284
+ UrWeb = 'UrWeb',
285
+ UrWebProject = 'UrWebProject',
286
+ VB6 = 'VB6',
287
+ VBScript = 'VBScript',
288
+ Vala = 'Vala',
289
+ Velocity = 'Velocity',
290
+ Verilog = 'Verilog',
291
+ VerilogArgsFile = 'VerilogArgsFile',
292
+ Vhdl = 'Vhdl',
293
+ VimScript = 'VimScript',
294
+ VisualBasic = 'VisualBasic',
295
+ VisualStudioProject = 'VisualStudioProject',
296
+ VisualStudioSolution = 'VisualStudioSolution',
297
+ Vue = 'Vue',
298
+ WebAssembly = 'WebAssembly',
299
+ Wolfram = 'Wolfram',
300
+ XSL = 'XSL',
301
+ Xaml = 'Xaml',
302
+ XcodeConfig = 'XcodeConfig',
303
+ Xml = 'Xml',
304
+ Xtend = 'Xtend',
305
+ Yaml = 'Yaml',
306
+ Zig = 'Zig',
307
+ Zsh = 'Zsh'
308
+ }
309
+
310
+ export interface NapiMessages {
311
+ sourcePath: string
312
+ diagnostics: Array<NapiDiagnostics>
313
+ }
314
+
315
+ export declare const enum NapiSeverity {
316
+ Error = 'Error',
317
+ Warning = 'Warning',
318
+ Advice = 'Advice'
319
+ }
320
+
321
+ export interface NapiSourceSpan {
322
+ offset: number
323
+ length: number
324
+ }
325
+
57
326
  export interface Position {
58
327
  line: number
59
328
  col: number
package/index.js CHANGED
@@ -371,8 +371,11 @@ if (!nativeBinding) {
371
371
  }
372
372
 
373
373
  module.exports.doctor = nativeBinding.doctor
374
+ module.exports.getLanguagesStatistics = nativeBinding.getLanguagesStatistics
374
375
  module.exports.initializeLogger = nativeBinding.initializeLogger
375
376
  module.exports.innerDebugLint = nativeBinding.innerDebugLint
376
377
  module.exports.innerLint = nativeBinding.innerLint
377
378
  module.exports.LogLevel = nativeBinding.LogLevel
378
379
  module.exports.NaPiCategory = nativeBinding.NaPiCategory
380
+ module.exports.NapiLanguageType = nativeBinding.NapiLanguageType
381
+ module.exports.NapiSeverity = nativeBinding.NapiSeverity
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@shined/doctor",
3
- "version": "0.0.17",
3
+ "version": "0.0.18",
4
4
  "main": "index.js",
5
5
  "types": "index.d.ts",
6
6
  "bin": "./bin/index.mjs",
@@ -21,13 +21,13 @@
21
21
  "cac": "^6.7.14"
22
22
  },
23
23
  "optionalDependencies": {
24
- "@shined/doctor-darwin-x64": "0.0.17",
25
- "@shined/doctor-darwin-arm64": "0.0.17",
26
- "@shined/doctor-win32-x64-msvc": "0.0.17",
27
- "@shined/doctor-win32-arm64-msvc": "0.0.17",
28
- "@shined/doctor-linux-x64-gnu": "0.0.17",
29
- "@shined/doctor-linux-x64-musl": "0.0.17",
30
- "@shined/doctor-linux-arm64-gnu": "0.0.17",
31
- "@shined/doctor-linux-arm64-musl": "0.0.17"
24
+ "@shined/doctor-darwin-x64": "0.0.18",
25
+ "@shined/doctor-darwin-arm64": "0.0.18",
26
+ "@shined/doctor-win32-x64-msvc": "0.0.18",
27
+ "@shined/doctor-win32-arm64-msvc": "0.0.18",
28
+ "@shined/doctor-linux-x64-gnu": "0.0.18",
29
+ "@shined/doctor-linux-x64-musl": "0.0.18",
30
+ "@shined/doctor-linux-arm64-gnu": "0.0.18",
31
+ "@shined/doctor-linux-arm64-musl": "0.0.18"
32
32
  }
33
33
  }