driftdetect-native 0.9.38 → 0.9.41
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/index.d.ts +26 -0
- package/index.js +36 -36
- package/package.json +6 -6
package/index.d.ts
CHANGED
|
@@ -45,15 +45,25 @@ export interface JsParseResult {
|
|
|
45
45
|
errors: Array<JsParseError>
|
|
46
46
|
parseTimeUs: number
|
|
47
47
|
}
|
|
48
|
+
/** Parameter info exposed to JavaScript */
|
|
49
|
+
export interface JsParameterInfo {
|
|
50
|
+
name: string
|
|
51
|
+
typeAnnotation?: string
|
|
52
|
+
defaultValue?: string
|
|
53
|
+
isRest: boolean
|
|
54
|
+
}
|
|
48
55
|
/** Function info exposed to JavaScript */
|
|
49
56
|
export interface JsFunctionInfo {
|
|
50
57
|
name: string
|
|
51
58
|
qualifiedName?: string
|
|
59
|
+
parameters: Array<JsParameterInfo>
|
|
60
|
+
returnType?: string
|
|
52
61
|
isExported: boolean
|
|
53
62
|
isAsync: boolean
|
|
54
63
|
startLine: number
|
|
55
64
|
endLine: number
|
|
56
65
|
decorators: Array<string>
|
|
66
|
+
docComment?: string
|
|
57
67
|
}
|
|
58
68
|
/** Class info exposed to JavaScript */
|
|
59
69
|
export interface JsClassInfo {
|
|
@@ -63,6 +73,22 @@ export interface JsClassInfo {
|
|
|
63
73
|
isExported: boolean
|
|
64
74
|
startLine: number
|
|
65
75
|
endLine: number
|
|
76
|
+
decorators: Array<string>
|
|
77
|
+
properties: Array<JsPropertyInfo>
|
|
78
|
+
}
|
|
79
|
+
/** Property info exposed to JavaScript (for struct fields, class properties) */
|
|
80
|
+
export interface JsPropertyInfo {
|
|
81
|
+
name: string
|
|
82
|
+
typeAnnotation?: string
|
|
83
|
+
isStatic: boolean
|
|
84
|
+
isReadonly: boolean
|
|
85
|
+
visibility: string
|
|
86
|
+
tags?: Array<JsStructTag>
|
|
87
|
+
}
|
|
88
|
+
/** Struct tag exposed to JavaScript (for Go struct field tags) */
|
|
89
|
+
export interface JsStructTag {
|
|
90
|
+
key: string
|
|
91
|
+
value: string
|
|
66
92
|
}
|
|
67
93
|
/** Import info exposed to JavaScript */
|
|
68
94
|
export interface JsImportInfo {
|
package/index.js
CHANGED
|
@@ -32,10 +32,10 @@ switch (platform) {
|
|
|
32
32
|
case 'android':
|
|
33
33
|
switch (arch) {
|
|
34
34
|
case 'arm64':
|
|
35
|
-
localFileExisted = existsSync(join(__dirname, '
|
|
35
|
+
localFileExisted = existsSync(join(__dirname, 'index.android-arm64.node'))
|
|
36
36
|
try {
|
|
37
37
|
if (localFileExisted) {
|
|
38
|
-
nativeBinding = require('./
|
|
38
|
+
nativeBinding = require('./index.android-arm64.node')
|
|
39
39
|
} else {
|
|
40
40
|
nativeBinding = require('driftdetect-native-android-arm64')
|
|
41
41
|
}
|
|
@@ -44,10 +44,10 @@ switch (platform) {
|
|
|
44
44
|
}
|
|
45
45
|
break
|
|
46
46
|
case 'arm':
|
|
47
|
-
localFileExisted = existsSync(join(__dirname, '
|
|
47
|
+
localFileExisted = existsSync(join(__dirname, 'index.android-arm-eabi.node'))
|
|
48
48
|
try {
|
|
49
49
|
if (localFileExisted) {
|
|
50
|
-
nativeBinding = require('./
|
|
50
|
+
nativeBinding = require('./index.android-arm-eabi.node')
|
|
51
51
|
} else {
|
|
52
52
|
nativeBinding = require('driftdetect-native-android-arm-eabi')
|
|
53
53
|
}
|
|
@@ -63,11 +63,11 @@ switch (platform) {
|
|
|
63
63
|
switch (arch) {
|
|
64
64
|
case 'x64':
|
|
65
65
|
localFileExisted = existsSync(
|
|
66
|
-
join(__dirname, '
|
|
66
|
+
join(__dirname, 'index.win32-x64-msvc.node')
|
|
67
67
|
)
|
|
68
68
|
try {
|
|
69
69
|
if (localFileExisted) {
|
|
70
|
-
nativeBinding = require('./
|
|
70
|
+
nativeBinding = require('./index.win32-x64-msvc.node')
|
|
71
71
|
} else {
|
|
72
72
|
nativeBinding = require('driftdetect-native-win32-x64-msvc')
|
|
73
73
|
}
|
|
@@ -77,11 +77,11 @@ switch (platform) {
|
|
|
77
77
|
break
|
|
78
78
|
case 'ia32':
|
|
79
79
|
localFileExisted = existsSync(
|
|
80
|
-
join(__dirname, '
|
|
80
|
+
join(__dirname, 'index.win32-ia32-msvc.node')
|
|
81
81
|
)
|
|
82
82
|
try {
|
|
83
83
|
if (localFileExisted) {
|
|
84
|
-
nativeBinding = require('./
|
|
84
|
+
nativeBinding = require('./index.win32-ia32-msvc.node')
|
|
85
85
|
} else {
|
|
86
86
|
nativeBinding = require('driftdetect-native-win32-ia32-msvc')
|
|
87
87
|
}
|
|
@@ -91,11 +91,11 @@ switch (platform) {
|
|
|
91
91
|
break
|
|
92
92
|
case 'arm64':
|
|
93
93
|
localFileExisted = existsSync(
|
|
94
|
-
join(__dirname, '
|
|
94
|
+
join(__dirname, 'index.win32-arm64-msvc.node')
|
|
95
95
|
)
|
|
96
96
|
try {
|
|
97
97
|
if (localFileExisted) {
|
|
98
|
-
nativeBinding = require('./
|
|
98
|
+
nativeBinding = require('./index.win32-arm64-msvc.node')
|
|
99
99
|
} else {
|
|
100
100
|
nativeBinding = require('driftdetect-native-win32-arm64-msvc')
|
|
101
101
|
}
|
|
@@ -108,10 +108,10 @@ switch (platform) {
|
|
|
108
108
|
}
|
|
109
109
|
break
|
|
110
110
|
case 'darwin':
|
|
111
|
-
localFileExisted = existsSync(join(__dirname, '
|
|
111
|
+
localFileExisted = existsSync(join(__dirname, 'index.darwin-universal.node'))
|
|
112
112
|
try {
|
|
113
113
|
if (localFileExisted) {
|
|
114
|
-
nativeBinding = require('./
|
|
114
|
+
nativeBinding = require('./index.darwin-universal.node')
|
|
115
115
|
} else {
|
|
116
116
|
nativeBinding = require('driftdetect-native-darwin-universal')
|
|
117
117
|
}
|
|
@@ -119,10 +119,10 @@ switch (platform) {
|
|
|
119
119
|
} catch {}
|
|
120
120
|
switch (arch) {
|
|
121
121
|
case 'x64':
|
|
122
|
-
localFileExisted = existsSync(join(__dirname, '
|
|
122
|
+
localFileExisted = existsSync(join(__dirname, 'index.darwin-x64.node'))
|
|
123
123
|
try {
|
|
124
124
|
if (localFileExisted) {
|
|
125
|
-
nativeBinding = require('./
|
|
125
|
+
nativeBinding = require('./index.darwin-x64.node')
|
|
126
126
|
} else {
|
|
127
127
|
nativeBinding = require('driftdetect-native-darwin-x64')
|
|
128
128
|
}
|
|
@@ -132,11 +132,11 @@ switch (platform) {
|
|
|
132
132
|
break
|
|
133
133
|
case 'arm64':
|
|
134
134
|
localFileExisted = existsSync(
|
|
135
|
-
join(__dirname, '
|
|
135
|
+
join(__dirname, 'index.darwin-arm64.node')
|
|
136
136
|
)
|
|
137
137
|
try {
|
|
138
138
|
if (localFileExisted) {
|
|
139
|
-
nativeBinding = require('./
|
|
139
|
+
nativeBinding = require('./index.darwin-arm64.node')
|
|
140
140
|
} else {
|
|
141
141
|
nativeBinding = require('driftdetect-native-darwin-arm64')
|
|
142
142
|
}
|
|
@@ -152,10 +152,10 @@ switch (platform) {
|
|
|
152
152
|
if (arch !== 'x64') {
|
|
153
153
|
throw new Error(`Unsupported architecture on FreeBSD: ${arch}`)
|
|
154
154
|
}
|
|
155
|
-
localFileExisted = existsSync(join(__dirname, '
|
|
155
|
+
localFileExisted = existsSync(join(__dirname, 'index.freebsd-x64.node'))
|
|
156
156
|
try {
|
|
157
157
|
if (localFileExisted) {
|
|
158
|
-
nativeBinding = require('./
|
|
158
|
+
nativeBinding = require('./index.freebsd-x64.node')
|
|
159
159
|
} else {
|
|
160
160
|
nativeBinding = require('driftdetect-native-freebsd-x64')
|
|
161
161
|
}
|
|
@@ -168,11 +168,11 @@ switch (platform) {
|
|
|
168
168
|
case 'x64':
|
|
169
169
|
if (isMusl()) {
|
|
170
170
|
localFileExisted = existsSync(
|
|
171
|
-
join(__dirname, '
|
|
171
|
+
join(__dirname, 'index.linux-x64-musl.node')
|
|
172
172
|
)
|
|
173
173
|
try {
|
|
174
174
|
if (localFileExisted) {
|
|
175
|
-
nativeBinding = require('./
|
|
175
|
+
nativeBinding = require('./index.linux-x64-musl.node')
|
|
176
176
|
} else {
|
|
177
177
|
nativeBinding = require('driftdetect-native-linux-x64-musl')
|
|
178
178
|
}
|
|
@@ -181,11 +181,11 @@ switch (platform) {
|
|
|
181
181
|
}
|
|
182
182
|
} else {
|
|
183
183
|
localFileExisted = existsSync(
|
|
184
|
-
join(__dirname, '
|
|
184
|
+
join(__dirname, 'index.linux-x64-gnu.node')
|
|
185
185
|
)
|
|
186
186
|
try {
|
|
187
187
|
if (localFileExisted) {
|
|
188
|
-
nativeBinding = require('./
|
|
188
|
+
nativeBinding = require('./index.linux-x64-gnu.node')
|
|
189
189
|
} else {
|
|
190
190
|
nativeBinding = require('driftdetect-native-linux-x64-gnu')
|
|
191
191
|
}
|
|
@@ -197,11 +197,11 @@ switch (platform) {
|
|
|
197
197
|
case 'arm64':
|
|
198
198
|
if (isMusl()) {
|
|
199
199
|
localFileExisted = existsSync(
|
|
200
|
-
join(__dirname, '
|
|
200
|
+
join(__dirname, 'index.linux-arm64-musl.node')
|
|
201
201
|
)
|
|
202
202
|
try {
|
|
203
203
|
if (localFileExisted) {
|
|
204
|
-
nativeBinding = require('./
|
|
204
|
+
nativeBinding = require('./index.linux-arm64-musl.node')
|
|
205
205
|
} else {
|
|
206
206
|
nativeBinding = require('driftdetect-native-linux-arm64-musl')
|
|
207
207
|
}
|
|
@@ -210,11 +210,11 @@ switch (platform) {
|
|
|
210
210
|
}
|
|
211
211
|
} else {
|
|
212
212
|
localFileExisted = existsSync(
|
|
213
|
-
join(__dirname, '
|
|
213
|
+
join(__dirname, 'index.linux-arm64-gnu.node')
|
|
214
214
|
)
|
|
215
215
|
try {
|
|
216
216
|
if (localFileExisted) {
|
|
217
|
-
nativeBinding = require('./
|
|
217
|
+
nativeBinding = require('./index.linux-arm64-gnu.node')
|
|
218
218
|
} else {
|
|
219
219
|
nativeBinding = require('driftdetect-native-linux-arm64-gnu')
|
|
220
220
|
}
|
|
@@ -226,11 +226,11 @@ switch (platform) {
|
|
|
226
226
|
case 'arm':
|
|
227
227
|
if (isMusl()) {
|
|
228
228
|
localFileExisted = existsSync(
|
|
229
|
-
join(__dirname, '
|
|
229
|
+
join(__dirname, 'index.linux-arm-musleabihf.node')
|
|
230
230
|
)
|
|
231
231
|
try {
|
|
232
232
|
if (localFileExisted) {
|
|
233
|
-
nativeBinding = require('./
|
|
233
|
+
nativeBinding = require('./index.linux-arm-musleabihf.node')
|
|
234
234
|
} else {
|
|
235
235
|
nativeBinding = require('driftdetect-native-linux-arm-musleabihf')
|
|
236
236
|
}
|
|
@@ -239,11 +239,11 @@ switch (platform) {
|
|
|
239
239
|
}
|
|
240
240
|
} else {
|
|
241
241
|
localFileExisted = existsSync(
|
|
242
|
-
join(__dirname, '
|
|
242
|
+
join(__dirname, 'index.linux-arm-gnueabihf.node')
|
|
243
243
|
)
|
|
244
244
|
try {
|
|
245
245
|
if (localFileExisted) {
|
|
246
|
-
nativeBinding = require('./
|
|
246
|
+
nativeBinding = require('./index.linux-arm-gnueabihf.node')
|
|
247
247
|
} else {
|
|
248
248
|
nativeBinding = require('driftdetect-native-linux-arm-gnueabihf')
|
|
249
249
|
}
|
|
@@ -255,11 +255,11 @@ switch (platform) {
|
|
|
255
255
|
case 'riscv64':
|
|
256
256
|
if (isMusl()) {
|
|
257
257
|
localFileExisted = existsSync(
|
|
258
|
-
join(__dirname, '
|
|
258
|
+
join(__dirname, 'index.linux-riscv64-musl.node')
|
|
259
259
|
)
|
|
260
260
|
try {
|
|
261
261
|
if (localFileExisted) {
|
|
262
|
-
nativeBinding = require('./
|
|
262
|
+
nativeBinding = require('./index.linux-riscv64-musl.node')
|
|
263
263
|
} else {
|
|
264
264
|
nativeBinding = require('driftdetect-native-linux-riscv64-musl')
|
|
265
265
|
}
|
|
@@ -268,11 +268,11 @@ switch (platform) {
|
|
|
268
268
|
}
|
|
269
269
|
} else {
|
|
270
270
|
localFileExisted = existsSync(
|
|
271
|
-
join(__dirname, '
|
|
271
|
+
join(__dirname, 'index.linux-riscv64-gnu.node')
|
|
272
272
|
)
|
|
273
273
|
try {
|
|
274
274
|
if (localFileExisted) {
|
|
275
|
-
nativeBinding = require('./
|
|
275
|
+
nativeBinding = require('./index.linux-riscv64-gnu.node')
|
|
276
276
|
} else {
|
|
277
277
|
nativeBinding = require('driftdetect-native-linux-riscv64-gnu')
|
|
278
278
|
}
|
|
@@ -283,11 +283,11 @@ switch (platform) {
|
|
|
283
283
|
break
|
|
284
284
|
case 's390x':
|
|
285
285
|
localFileExisted = existsSync(
|
|
286
|
-
join(__dirname, '
|
|
286
|
+
join(__dirname, 'index.linux-s390x-gnu.node')
|
|
287
287
|
)
|
|
288
288
|
try {
|
|
289
289
|
if (localFileExisted) {
|
|
290
|
-
nativeBinding = require('./
|
|
290
|
+
nativeBinding = require('./index.linux-s390x-gnu.node')
|
|
291
291
|
} else {
|
|
292
292
|
nativeBinding = require('driftdetect-native-linux-s390x-gnu')
|
|
293
293
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "driftdetect-native",
|
|
3
|
-
"version": "0.9.
|
|
3
|
+
"version": "0.9.41",
|
|
4
4
|
"description": "Native Rust core for Drift - high-performance code analysis",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"types": "index.d.ts",
|
|
@@ -50,10 +50,10 @@
|
|
|
50
50
|
"version": "napi version"
|
|
51
51
|
},
|
|
52
52
|
"optionalDependencies": {
|
|
53
|
-
"driftdetect-native-win32-x64-msvc": "0.9.
|
|
54
|
-
"driftdetect-native-darwin-x64": "0.9.
|
|
55
|
-
"driftdetect-native-linux-x64-gnu": "0.9.
|
|
56
|
-
"driftdetect-native-darwin-arm64": "0.9.
|
|
57
|
-
"driftdetect-native-linux-arm64-gnu": "0.9.
|
|
53
|
+
"driftdetect-native-win32-x64-msvc": "0.9.41",
|
|
54
|
+
"driftdetect-native-darwin-x64": "0.9.41",
|
|
55
|
+
"driftdetect-native-linux-x64-gnu": "0.9.41",
|
|
56
|
+
"driftdetect-native-darwin-arm64": "0.9.41",
|
|
57
|
+
"driftdetect-native-linux-arm64-gnu": "0.9.41"
|
|
58
58
|
}
|
|
59
59
|
}
|