@bloodhound-rs/core 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/CHANGELOG.md +6 -0
- package/README.md +21 -1
- package/dist/index.js +54 -54
- package/docs/support.md +42 -40
- package/package.json +34 -19
- package/dist/bloodhound.darwin-arm64.node +0 -0
- package/dist/bloodhound.darwin-x64.node +0 -0
- package/dist/bloodhound.linux-arm64-gnu.node +0 -0
- package/dist/bloodhound.linux-x64-gnu.node +0 -0
- package/dist/bloodhound.win32-x64-msvc.node +0 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
# @bloodhound-rs/core
|
|
2
2
|
|
|
3
|
+
## 0.1.2
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- e814af8: Distribute native binaries as separate optional packages selected by operating system, CPU architecture, and Linux libc. Keep the core package limited to the generated loader, type declarations, and schemas.
|
|
8
|
+
|
|
3
9
|
## 0.1.1
|
|
4
10
|
|
|
5
11
|
### Patch Changes
|
package/README.md
CHANGED
|
@@ -12,6 +12,24 @@ A Rust SDK for static analysis of browser resources. Rust exports the public met
|
|
|
12
12
|
|
|
13
13
|
Results describe static accesses and potential issues. They do not prove that code executed or modified runtime state. The scanner never executes the code it analyzes.
|
|
14
14
|
|
|
15
|
+
## Install
|
|
16
|
+
|
|
17
|
+
```sh
|
|
18
|
+
pnpm add @bloodhound-rs/core
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
The core package contains the generated loader, type declarations, and schemas. The package manager selects a native binary through optional dependencies using the operating system, CPU architecture, and Linux libc. Keep optional dependencies enabled.
|
|
22
|
+
|
|
23
|
+
| Platform | Binary package |
|
|
24
|
+
| ------------------- | ------------------------------------- |
|
|
25
|
+
| macOS Apple Silicon | `@bloodhound-rs/core-darwin-arm64` |
|
|
26
|
+
| macOS Intel | `@bloodhound-rs/core-darwin-x64` |
|
|
27
|
+
| Linux glibc ARM64 | `@bloodhound-rs/core-linux-arm64-gnu` |
|
|
28
|
+
| Linux glibc x64 | `@bloodhound-rs/core-linux-x64-gnu` |
|
|
29
|
+
| Windows x64 | `@bloodhound-rs/core-win32-x64-msvc` |
|
|
30
|
+
|
|
31
|
+
The loader uses the architecture of the running Node.js process. Linux musl is not supported. Install dependencies on the target system instead of copying `node_modules` between platforms.
|
|
32
|
+
|
|
15
33
|
## Build
|
|
16
34
|
|
|
17
35
|
Requires Node.js 22+, pnpm 10.20.0, Rust 1.97+, and the platform's C/C++ build tools.
|
|
@@ -159,6 +177,8 @@ const report = await pending;
|
|
|
159
177
|
pnpm pack
|
|
160
178
|
```
|
|
161
179
|
|
|
162
|
-
|
|
180
|
+
`pnpm pack` builds the local SDK and packs core without native binaries. For a complete release, CI builds every target in `.github/native-targets.json`, collects the binaries in `dist/`, then runs `pnpm pack:release` to produce six archives in `artifacts/`.
|
|
181
|
+
|
|
182
|
+
Changesets keeps core and the five binary packages at the same version. The workflow publishes and confirms the binary packages before publishing core with exact optional dependency versions. Run `pnpm changeset` for changes that require a release. See [Releasing](docs/releasing.md) for beta releases, stable releases, and npm authentication.
|
|
163
183
|
|
|
164
184
|
See [Support](docs/support.md) for capabilities and limitations, [Technical design](docs/technical-design.md) for the design, and [Verification](docs/verification.md) for local validation evidence.
|
package/dist/index.js
CHANGED
|
@@ -92,8 +92,8 @@ function requireNative() {
|
|
|
92
92
|
try {
|
|
93
93
|
const binding = require('@bloodhound-rs/core-android-arm64')
|
|
94
94
|
const bindingPackageVersion = require('@bloodhound-rs/core-android-arm64/package.json').version
|
|
95
|
-
if (bindingPackageVersion !== '0.1.
|
|
96
|
-
throw new Error(`Native binding package version mismatch, expected 0.1.
|
|
95
|
+
if (bindingPackageVersion !== '0.1.2' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
96
|
+
throw new Error(`Native binding package version mismatch, expected 0.1.2 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
97
97
|
}
|
|
98
98
|
return binding
|
|
99
99
|
} catch (e) {
|
|
@@ -108,8 +108,8 @@ function requireNative() {
|
|
|
108
108
|
try {
|
|
109
109
|
const binding = require('@bloodhound-rs/core-android-arm-eabi')
|
|
110
110
|
const bindingPackageVersion = require('@bloodhound-rs/core-android-arm-eabi/package.json').version
|
|
111
|
-
if (bindingPackageVersion !== '0.1.
|
|
112
|
-
throw new Error(`Native binding package version mismatch, expected 0.1.
|
|
111
|
+
if (bindingPackageVersion !== '0.1.2' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
112
|
+
throw new Error(`Native binding package version mismatch, expected 0.1.2 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
113
113
|
}
|
|
114
114
|
return binding
|
|
115
115
|
} catch (e) {
|
|
@@ -129,8 +129,8 @@ function requireNative() {
|
|
|
129
129
|
try {
|
|
130
130
|
const binding = require('@bloodhound-rs/core-win32-x64-gnu')
|
|
131
131
|
const bindingPackageVersion = require('@bloodhound-rs/core-win32-x64-gnu/package.json').version
|
|
132
|
-
if (bindingPackageVersion !== '0.1.
|
|
133
|
-
throw new Error(`Native binding package version mismatch, expected 0.1.
|
|
132
|
+
if (bindingPackageVersion !== '0.1.2' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
133
|
+
throw new Error(`Native binding package version mismatch, expected 0.1.2 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
134
134
|
}
|
|
135
135
|
return binding
|
|
136
136
|
} catch (e) {
|
|
@@ -145,8 +145,8 @@ function requireNative() {
|
|
|
145
145
|
try {
|
|
146
146
|
const binding = require('@bloodhound-rs/core-win32-x64-msvc')
|
|
147
147
|
const bindingPackageVersion = require('@bloodhound-rs/core-win32-x64-msvc/package.json').version
|
|
148
|
-
if (bindingPackageVersion !== '0.1.
|
|
149
|
-
throw new Error(`Native binding package version mismatch, expected 0.1.
|
|
148
|
+
if (bindingPackageVersion !== '0.1.2' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
149
|
+
throw new Error(`Native binding package version mismatch, expected 0.1.2 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
150
150
|
}
|
|
151
151
|
return binding
|
|
152
152
|
} catch (e) {
|
|
@@ -162,8 +162,8 @@ function requireNative() {
|
|
|
162
162
|
try {
|
|
163
163
|
const binding = require('@bloodhound-rs/core-win32-ia32-msvc')
|
|
164
164
|
const bindingPackageVersion = require('@bloodhound-rs/core-win32-ia32-msvc/package.json').version
|
|
165
|
-
if (bindingPackageVersion !== '0.1.
|
|
166
|
-
throw new Error(`Native binding package version mismatch, expected 0.1.
|
|
165
|
+
if (bindingPackageVersion !== '0.1.2' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
166
|
+
throw new Error(`Native binding package version mismatch, expected 0.1.2 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
167
167
|
}
|
|
168
168
|
return binding
|
|
169
169
|
} catch (e) {
|
|
@@ -178,8 +178,8 @@ function requireNative() {
|
|
|
178
178
|
try {
|
|
179
179
|
const binding = require('@bloodhound-rs/core-win32-arm64-msvc')
|
|
180
180
|
const bindingPackageVersion = require('@bloodhound-rs/core-win32-arm64-msvc/package.json').version
|
|
181
|
-
if (bindingPackageVersion !== '0.1.
|
|
182
|
-
throw new Error(`Native binding package version mismatch, expected 0.1.
|
|
181
|
+
if (bindingPackageVersion !== '0.1.2' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
182
|
+
throw new Error(`Native binding package version mismatch, expected 0.1.2 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
183
183
|
}
|
|
184
184
|
return binding
|
|
185
185
|
} catch (e) {
|
|
@@ -197,8 +197,8 @@ function requireNative() {
|
|
|
197
197
|
try {
|
|
198
198
|
const binding = require('@bloodhound-rs/core-darwin-universal')
|
|
199
199
|
const bindingPackageVersion = require('@bloodhound-rs/core-darwin-universal/package.json').version
|
|
200
|
-
if (bindingPackageVersion !== '0.1.
|
|
201
|
-
throw new Error(`Native binding package version mismatch, expected 0.1.
|
|
200
|
+
if (bindingPackageVersion !== '0.1.2' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
201
|
+
throw new Error(`Native binding package version mismatch, expected 0.1.2 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
202
202
|
}
|
|
203
203
|
return binding
|
|
204
204
|
} catch (e) {
|
|
@@ -213,8 +213,8 @@ function requireNative() {
|
|
|
213
213
|
try {
|
|
214
214
|
const binding = require('@bloodhound-rs/core-darwin-x64')
|
|
215
215
|
const bindingPackageVersion = require('@bloodhound-rs/core-darwin-x64/package.json').version
|
|
216
|
-
if (bindingPackageVersion !== '0.1.
|
|
217
|
-
throw new Error(`Native binding package version mismatch, expected 0.1.
|
|
216
|
+
if (bindingPackageVersion !== '0.1.2' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
217
|
+
throw new Error(`Native binding package version mismatch, expected 0.1.2 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
218
218
|
}
|
|
219
219
|
return binding
|
|
220
220
|
} catch (e) {
|
|
@@ -229,8 +229,8 @@ function requireNative() {
|
|
|
229
229
|
try {
|
|
230
230
|
const binding = require('@bloodhound-rs/core-darwin-arm64')
|
|
231
231
|
const bindingPackageVersion = require('@bloodhound-rs/core-darwin-arm64/package.json').version
|
|
232
|
-
if (bindingPackageVersion !== '0.1.
|
|
233
|
-
throw new Error(`Native binding package version mismatch, expected 0.1.
|
|
232
|
+
if (bindingPackageVersion !== '0.1.2' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
233
|
+
throw new Error(`Native binding package version mismatch, expected 0.1.2 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
234
234
|
}
|
|
235
235
|
return binding
|
|
236
236
|
} catch (e) {
|
|
@@ -249,8 +249,8 @@ function requireNative() {
|
|
|
249
249
|
try {
|
|
250
250
|
const binding = require('@bloodhound-rs/core-freebsd-x64')
|
|
251
251
|
const bindingPackageVersion = require('@bloodhound-rs/core-freebsd-x64/package.json').version
|
|
252
|
-
if (bindingPackageVersion !== '0.1.
|
|
253
|
-
throw new Error(`Native binding package version mismatch, expected 0.1.
|
|
252
|
+
if (bindingPackageVersion !== '0.1.2' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
253
|
+
throw new Error(`Native binding package version mismatch, expected 0.1.2 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
254
254
|
}
|
|
255
255
|
return binding
|
|
256
256
|
} catch (e) {
|
|
@@ -265,8 +265,8 @@ function requireNative() {
|
|
|
265
265
|
try {
|
|
266
266
|
const binding = require('@bloodhound-rs/core-freebsd-arm64')
|
|
267
267
|
const bindingPackageVersion = require('@bloodhound-rs/core-freebsd-arm64/package.json').version
|
|
268
|
-
if (bindingPackageVersion !== '0.1.
|
|
269
|
-
throw new Error(`Native binding package version mismatch, expected 0.1.
|
|
268
|
+
if (bindingPackageVersion !== '0.1.2' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
269
|
+
throw new Error(`Native binding package version mismatch, expected 0.1.2 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
270
270
|
}
|
|
271
271
|
return binding
|
|
272
272
|
} catch (e) {
|
|
@@ -286,8 +286,8 @@ function requireNative() {
|
|
|
286
286
|
try {
|
|
287
287
|
const binding = require('@bloodhound-rs/core-linux-x64-musl')
|
|
288
288
|
const bindingPackageVersion = require('@bloodhound-rs/core-linux-x64-musl/package.json').version
|
|
289
|
-
if (bindingPackageVersion !== '0.1.
|
|
290
|
-
throw new Error(`Native binding package version mismatch, expected 0.1.
|
|
289
|
+
if (bindingPackageVersion !== '0.1.2' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
290
|
+
throw new Error(`Native binding package version mismatch, expected 0.1.2 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
291
291
|
}
|
|
292
292
|
return binding
|
|
293
293
|
} catch (e) {
|
|
@@ -302,8 +302,8 @@ function requireNative() {
|
|
|
302
302
|
try {
|
|
303
303
|
const binding = require('@bloodhound-rs/core-linux-x64-gnu')
|
|
304
304
|
const bindingPackageVersion = require('@bloodhound-rs/core-linux-x64-gnu/package.json').version
|
|
305
|
-
if (bindingPackageVersion !== '0.1.
|
|
306
|
-
throw new Error(`Native binding package version mismatch, expected 0.1.
|
|
305
|
+
if (bindingPackageVersion !== '0.1.2' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
306
|
+
throw new Error(`Native binding package version mismatch, expected 0.1.2 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
307
307
|
}
|
|
308
308
|
return binding
|
|
309
309
|
} catch (e) {
|
|
@@ -320,8 +320,8 @@ function requireNative() {
|
|
|
320
320
|
try {
|
|
321
321
|
const binding = require('@bloodhound-rs/core-linux-arm64-musl')
|
|
322
322
|
const bindingPackageVersion = require('@bloodhound-rs/core-linux-arm64-musl/package.json').version
|
|
323
|
-
if (bindingPackageVersion !== '0.1.
|
|
324
|
-
throw new Error(`Native binding package version mismatch, expected 0.1.
|
|
323
|
+
if (bindingPackageVersion !== '0.1.2' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
324
|
+
throw new Error(`Native binding package version mismatch, expected 0.1.2 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
325
325
|
}
|
|
326
326
|
return binding
|
|
327
327
|
} catch (e) {
|
|
@@ -336,8 +336,8 @@ function requireNative() {
|
|
|
336
336
|
try {
|
|
337
337
|
const binding = require('@bloodhound-rs/core-linux-arm64-gnu')
|
|
338
338
|
const bindingPackageVersion = require('@bloodhound-rs/core-linux-arm64-gnu/package.json').version
|
|
339
|
-
if (bindingPackageVersion !== '0.1.
|
|
340
|
-
throw new Error(`Native binding package version mismatch, expected 0.1.
|
|
339
|
+
if (bindingPackageVersion !== '0.1.2' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
340
|
+
throw new Error(`Native binding package version mismatch, expected 0.1.2 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
341
341
|
}
|
|
342
342
|
return binding
|
|
343
343
|
} catch (e) {
|
|
@@ -354,8 +354,8 @@ function requireNative() {
|
|
|
354
354
|
try {
|
|
355
355
|
const binding = require('@bloodhound-rs/core-linux-arm-musleabihf')
|
|
356
356
|
const bindingPackageVersion = require('@bloodhound-rs/core-linux-arm-musleabihf/package.json').version
|
|
357
|
-
if (bindingPackageVersion !== '0.1.
|
|
358
|
-
throw new Error(`Native binding package version mismatch, expected 0.1.
|
|
357
|
+
if (bindingPackageVersion !== '0.1.2' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
358
|
+
throw new Error(`Native binding package version mismatch, expected 0.1.2 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
359
359
|
}
|
|
360
360
|
return binding
|
|
361
361
|
} catch (e) {
|
|
@@ -370,8 +370,8 @@ function requireNative() {
|
|
|
370
370
|
try {
|
|
371
371
|
const binding = require('@bloodhound-rs/core-linux-arm-gnueabihf')
|
|
372
372
|
const bindingPackageVersion = require('@bloodhound-rs/core-linux-arm-gnueabihf/package.json').version
|
|
373
|
-
if (bindingPackageVersion !== '0.1.
|
|
374
|
-
throw new Error(`Native binding package version mismatch, expected 0.1.
|
|
373
|
+
if (bindingPackageVersion !== '0.1.2' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
374
|
+
throw new Error(`Native binding package version mismatch, expected 0.1.2 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
375
375
|
}
|
|
376
376
|
return binding
|
|
377
377
|
} catch (e) {
|
|
@@ -388,8 +388,8 @@ function requireNative() {
|
|
|
388
388
|
try {
|
|
389
389
|
const binding = require('@bloodhound-rs/core-linux-loong64-musl')
|
|
390
390
|
const bindingPackageVersion = require('@bloodhound-rs/core-linux-loong64-musl/package.json').version
|
|
391
|
-
if (bindingPackageVersion !== '0.1.
|
|
392
|
-
throw new Error(`Native binding package version mismatch, expected 0.1.
|
|
391
|
+
if (bindingPackageVersion !== '0.1.2' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
392
|
+
throw new Error(`Native binding package version mismatch, expected 0.1.2 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
393
393
|
}
|
|
394
394
|
return binding
|
|
395
395
|
} catch (e) {
|
|
@@ -404,8 +404,8 @@ function requireNative() {
|
|
|
404
404
|
try {
|
|
405
405
|
const binding = require('@bloodhound-rs/core-linux-loong64-gnu')
|
|
406
406
|
const bindingPackageVersion = require('@bloodhound-rs/core-linux-loong64-gnu/package.json').version
|
|
407
|
-
if (bindingPackageVersion !== '0.1.
|
|
408
|
-
throw new Error(`Native binding package version mismatch, expected 0.1.
|
|
407
|
+
if (bindingPackageVersion !== '0.1.2' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
408
|
+
throw new Error(`Native binding package version mismatch, expected 0.1.2 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
409
409
|
}
|
|
410
410
|
return binding
|
|
411
411
|
} catch (e) {
|
|
@@ -422,8 +422,8 @@ function requireNative() {
|
|
|
422
422
|
try {
|
|
423
423
|
const binding = require('@bloodhound-rs/core-linux-riscv64-musl')
|
|
424
424
|
const bindingPackageVersion = require('@bloodhound-rs/core-linux-riscv64-musl/package.json').version
|
|
425
|
-
if (bindingPackageVersion !== '0.1.
|
|
426
|
-
throw new Error(`Native binding package version mismatch, expected 0.1.
|
|
425
|
+
if (bindingPackageVersion !== '0.1.2' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
426
|
+
throw new Error(`Native binding package version mismatch, expected 0.1.2 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
427
427
|
}
|
|
428
428
|
return binding
|
|
429
429
|
} catch (e) {
|
|
@@ -438,8 +438,8 @@ function requireNative() {
|
|
|
438
438
|
try {
|
|
439
439
|
const binding = require('@bloodhound-rs/core-linux-riscv64-gnu')
|
|
440
440
|
const bindingPackageVersion = require('@bloodhound-rs/core-linux-riscv64-gnu/package.json').version
|
|
441
|
-
if (bindingPackageVersion !== '0.1.
|
|
442
|
-
throw new Error(`Native binding package version mismatch, expected 0.1.
|
|
441
|
+
if (bindingPackageVersion !== '0.1.2' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
442
|
+
throw new Error(`Native binding package version mismatch, expected 0.1.2 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
443
443
|
}
|
|
444
444
|
return binding
|
|
445
445
|
} catch (e) {
|
|
@@ -455,8 +455,8 @@ function requireNative() {
|
|
|
455
455
|
try {
|
|
456
456
|
const binding = require('@bloodhound-rs/core-linux-ppc64-gnu')
|
|
457
457
|
const bindingPackageVersion = require('@bloodhound-rs/core-linux-ppc64-gnu/package.json').version
|
|
458
|
-
if (bindingPackageVersion !== '0.1.
|
|
459
|
-
throw new Error(`Native binding package version mismatch, expected 0.1.
|
|
458
|
+
if (bindingPackageVersion !== '0.1.2' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
459
|
+
throw new Error(`Native binding package version mismatch, expected 0.1.2 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
460
460
|
}
|
|
461
461
|
return binding
|
|
462
462
|
} catch (e) {
|
|
@@ -471,8 +471,8 @@ function requireNative() {
|
|
|
471
471
|
try {
|
|
472
472
|
const binding = require('@bloodhound-rs/core-linux-s390x-gnu')
|
|
473
473
|
const bindingPackageVersion = require('@bloodhound-rs/core-linux-s390x-gnu/package.json').version
|
|
474
|
-
if (bindingPackageVersion !== '0.1.
|
|
475
|
-
throw new Error(`Native binding package version mismatch, expected 0.1.
|
|
474
|
+
if (bindingPackageVersion !== '0.1.2' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
475
|
+
throw new Error(`Native binding package version mismatch, expected 0.1.2 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
476
476
|
}
|
|
477
477
|
return binding
|
|
478
478
|
} catch (e) {
|
|
@@ -491,8 +491,8 @@ function requireNative() {
|
|
|
491
491
|
try {
|
|
492
492
|
const binding = require('@bloodhound-rs/core-openharmony-arm64')
|
|
493
493
|
const bindingPackageVersion = require('@bloodhound-rs/core-openharmony-arm64/package.json').version
|
|
494
|
-
if (bindingPackageVersion !== '0.1.
|
|
495
|
-
throw new Error(`Native binding package version mismatch, expected 0.1.
|
|
494
|
+
if (bindingPackageVersion !== '0.1.2' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
495
|
+
throw new Error(`Native binding package version mismatch, expected 0.1.2 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
496
496
|
}
|
|
497
497
|
return binding
|
|
498
498
|
} catch (e) {
|
|
@@ -507,8 +507,8 @@ function requireNative() {
|
|
|
507
507
|
try {
|
|
508
508
|
const binding = require('@bloodhound-rs/core-openharmony-x64')
|
|
509
509
|
const bindingPackageVersion = require('@bloodhound-rs/core-openharmony-x64/package.json').version
|
|
510
|
-
if (bindingPackageVersion !== '0.1.
|
|
511
|
-
throw new Error(`Native binding package version mismatch, expected 0.1.
|
|
510
|
+
if (bindingPackageVersion !== '0.1.2' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
511
|
+
throw new Error(`Native binding package version mismatch, expected 0.1.2 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
512
512
|
}
|
|
513
513
|
return binding
|
|
514
514
|
} catch (e) {
|
|
@@ -523,8 +523,8 @@ function requireNative() {
|
|
|
523
523
|
try {
|
|
524
524
|
const binding = require('@bloodhound-rs/core-openharmony-arm')
|
|
525
525
|
const bindingPackageVersion = require('@bloodhound-rs/core-openharmony-arm/package.json').version
|
|
526
|
-
if (bindingPackageVersion !== '0.1.
|
|
527
|
-
throw new Error(`Native binding package version mismatch, expected 0.1.
|
|
526
|
+
if (bindingPackageVersion !== '0.1.2' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
527
|
+
throw new Error(`Native binding package version mismatch, expected 0.1.2 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
528
528
|
}
|
|
529
529
|
return binding
|
|
530
530
|
} catch (e) {
|
|
@@ -664,8 +664,8 @@ if (!nativeBinding || forceWasi) {
|
|
|
664
664
|
if (!candidateFailed) {
|
|
665
665
|
if (process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
666
666
|
const bindingPackageVersion = require('@bloodhound-rs/core-wasm32-wasi/package.json').version
|
|
667
|
-
if (bindingPackageVersion !== '0.1.
|
|
668
|
-
throw new Error(`WASI binding package version mismatch, expected 0.1.
|
|
667
|
+
if (bindingPackageVersion !== '0.1.2') {
|
|
668
|
+
throw new Error(`WASI binding package version mismatch, expected 0.1.2 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
669
669
|
}
|
|
670
670
|
}
|
|
671
671
|
wasiBinding = require('@bloodhound-rs/core-wasm32-wasi')
|
package/docs/support.md
CHANGED
|
@@ -1,55 +1,57 @@
|
|
|
1
|
-
#
|
|
1
|
+
# Supported capabilities
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
| --------------- | ------------------------------------------------------------------------- | ------------------------------------------------------------------------- |
|
|
5
|
-
| JS 输入 | 文件、URL、内容,classic / module / unknown | 语法错误、模式或环境缺失 |
|
|
6
|
-
| 绑定与目标 | Oxc 作用域、局部遮蔽、全局词法与对象属性分离、未绑定引用 | `with` 动态作用域 |
|
|
7
|
-
| 全局操作 | 声明、读、赋值、复合赋值、更新、delete、Object / Reflect、原型 | 未知属性键保留独立访问,不创建共享空目标 |
|
|
8
|
-
| 别名 | 顺序赋值、失效、有限分支合并、直接 IIFE 与可绑定包装函数参数 | 复杂解构赋值、异常及 switch 的值传播、一般函数副作用 |
|
|
9
|
-
| 有限求值 | 字面量、拼接、模板、有限条件、数组与对象常量键、受限返回表达式 | getter、Proxy、一般调用、扩张超预算 |
|
|
10
|
-
| ESM | import / export、动态 import 候选、跨模块原始值摘要、有界迭代 | 非有限动态依赖、未知裸模块映射 |
|
|
11
|
-
| webpack | 运行时对象属性、纯 chunk 映射函数、脚本 src 表达式、有限 ID 表 | 自动 publicPath、复杂运行时函数及未知地址 |
|
|
12
|
-
| Vite | 动态 import;具有链接创建与回调调用结构的 preload 包装函数及有限依赖数组 | 一般缓存型 mapDeps 包装及非有限数组 |
|
|
13
|
-
| DOM | document / body / head 及别名的操作候选、可还原节点资源地址 | 未知节点身份、运行时插入、退出残留 |
|
|
14
|
-
| Worker / iframe | 入口可解析时建立独立 scope,保留引用边 | 文档基准未知、动态子环境地址 |
|
|
15
|
-
| HTML | HTML5 分词、raw-text、base、Import Map 快照、脚本、样式、iframe、内联偏移 | foreign-content 树上下文、noscript 环境、token 恢复、事件处理器特殊作用域 |
|
|
16
|
-
| CSS | CSS Syntax 解析、@import、url、全局选择器、reset、自定义属性、动画 | 解析恢复、未知资源值;候选不代表实际匹配或污染 |
|
|
17
|
-
| source map | Rust sourcemap,外链和 data URL | 缺失或不可用只影响可选源码位置 |
|
|
3
|
+
Use this reference to identify supported syntax, analysis limits, and report semantics.
|
|
18
4
|
|
|
19
|
-
|
|
5
|
+
| Area | Implementation | Coverage gaps |
|
|
6
|
+
| -------------------- | ------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- |
|
|
7
|
+
| JavaScript input | Files, URLs, source text, and classic / module / unknown modes | Syntax errors and missing script mode or environment |
|
|
8
|
+
| Bindings and targets | Oxc scopes, local shadowing, separate global lexical bindings and object properties, and unbound references | Dynamic scopes introduced by `with` |
|
|
9
|
+
| Global operations | Declarations, reads, assignments, compound assignments, updates, delete, Object / Reflect APIs, and prototypes | Unknown property keys remain separate accesses without a shared placeholder target |
|
|
10
|
+
| Aliases | Sequential assignments, invalidation, bounded branch merging, direct IIFEs, and wrapper parameters with known bindings | Complex destructuring, exception and switch value propagation, and general function side effects |
|
|
11
|
+
| Bounded evaluation | Literals, concatenation, templates, bounded conditions, constant array and object keys, and restricted return expressions | Getters, proxies, general calls, and expansion beyond budgets |
|
|
12
|
+
| ESM | Imports, exports, dynamic import candidates, cross-module primitive summaries, and bounded iteration | Unbounded dynamic dependencies and unknown bare-specifier mappings |
|
|
13
|
+
| webpack | Runtime object properties, pure chunk mapping functions, script `src` expressions, and bounded ID tables | Automatic publicPath, complex runtime functions, and unknown addresses |
|
|
14
|
+
| Vite | Dynamic imports, preload wrappers with link creation and callback invocation, and bounded dependency arrays | General caching mapDeps wrappers and unbounded arrays |
|
|
15
|
+
| DOM | Candidate operations on document / body / head and aliases, and recoverable node resource addresses | Unknown node identity, runtime insertion, and teardown residue |
|
|
16
|
+
| Workers / iframes | Separate scopes for resolvable entry points, with reference edges preserved | Unknown document bases and dynamic child-environment addresses |
|
|
17
|
+
| HTML | HTML5 tokenization, raw text, base URLs, import map snapshots, scripts, styles, iframes, and inline offsets | Foreign-content tree contexts, noscript environments, token recovery, and event-handler scopes |
|
|
18
|
+
| CSS | CSS Syntax parsing, @import, url, global selectors, resets, custom properties, and animations | Parser recovery and unknown resource values. Candidates do not prove actual matching or pollution |
|
|
19
|
+
| Source maps | Rust sourcemap support for external maps and data URLs | Missing or unavailable maps affect only optional original-source locations |
|
|
20
20
|
|
|
21
|
-
|
|
21
|
+
HTML processing uses tokenization with source locations, without constructing a complete browser DOM tree. Template contents remain inert, and special tree contexts explicitly reduce coverage. For entity-decoded content such as `srcdoc`, the host location identifies the tag containing the attribute. Child-resource locations remain independent.
|
|
22
22
|
|
|
23
|
-
|
|
23
|
+
The webpack adapter matches syntax structures and Oxc bindings rather than fixed minified variable names. Chunk mappings produce bounded candidates without proving that every chunk loads. ESM analysis handles ordinary Vite dynamic imports, while preload analysis adds resource edges.
|
|
24
24
|
|
|
25
|
-
|
|
26
|
-
| --------- | ------------------------------------------------ |
|
|
27
|
-
| completed | 声明范围内没有已记录的必检缺口 |
|
|
28
|
-
| partial | 有结果,同时存在未知依赖、上下文、语义或预算缺口 |
|
|
29
|
-
| failed | 没有建立有效分析结果 |
|
|
30
|
-
| cancelled | runStatus,独立于以上扫描状态 |
|
|
25
|
+
# Status
|
|
31
26
|
|
|
32
|
-
|
|
27
|
+
| Status | Meaning |
|
|
28
|
+
| --------- | ------------------------------------------------------------------------ |
|
|
29
|
+
| completed | No required coverage gaps were recorded within the declared scope |
|
|
30
|
+
| partial | Results exist, with gaps in dependencies, context, semantics, or budgets |
|
|
31
|
+
| failed | No valid analysis result was established |
|
|
32
|
+
| cancelled | A `runStatus` value, independent of the scan statuses |
|
|
33
33
|
|
|
34
|
-
|
|
34
|
+
`single` excludes the dependency closure and marks reference edges as `not-followed`. `completed` does not mean that the program has no dynamic behavior or that candidate issues occurred at runtime.
|
|
35
35
|
|
|
36
|
-
|
|
37
|
-
- 同内容不同 URL 或上下文保留独立实例,循环只阻止重复分析,保留引用边。
|
|
38
|
-
- 未绑定裸引用保留候选关系,不能直接认定为隐式全局属性。
|
|
39
|
-
- 产物位置采用 UTF-16 偏移、从 1 开始的行、从 0 开始的列,Rust 内部 UTF-8 偏移在输出时转换。
|
|
40
|
-
- 多写入、原型变更、DOM/CSS 操作均为 static-candidate。
|
|
41
|
-
- 版本差异匹配资源、scope、模式、环境、目标和操作特征。匹配不唯一时返回新增和移除。相同类型的任意值变化不保证识别。
|
|
36
|
+
# Indexes and locations
|
|
42
37
|
|
|
43
|
-
|
|
38
|
+
- Target IDs use scope, namespace, path segments, and key type. Local Symbols also include the analysis instance and do not merge across resources.
|
|
39
|
+
- Identical contents with different URLs or contexts retain separate instances. Cycles prevent repeated analysis while preserving reference edges.
|
|
40
|
+
- Unbound bare references retain candidate relationships. They are not automatically classified as implicit global properties.
|
|
41
|
+
- Artifact locations use UTF-16 offsets, one-based lines, and zero-based columns. Rust converts its internal UTF-8 offsets when emitting results.
|
|
42
|
+
- Multiple writes, prototype changes, and DOM/CSS operations remain `static-candidate` findings.
|
|
43
|
+
- Version diffs match resources, scopes, modes, environments, targets, and operation features. Ambiguous matches become additions and removals. Changes between arbitrary values of the same type are not guaranteed to be detected.
|
|
44
44
|
|
|
45
|
-
|
|
45
|
+
# Runtime budgets
|
|
46
46
|
|
|
47
|
-
|
|
47
|
+
Limits apply to resource counts, total bytes, bytes per resource, download buffers, concurrency, depth, time, AST visits, bounded evaluation, candidate counts, summary rounds, and record counts. ASTs are released after each resource analysis, and caches have byte limits.
|
|
48
48
|
|
|
49
|
-
|
|
49
|
+
These limits bound input, work, and result sizes. They are not operating-system RSS limits. A host process can impose additional memory limits for large or untrusted inputs. Request timeouts bound network waits, while parsing does not guarantee immediate preemption.
|
|
50
50
|
|
|
51
|
-
|
|
51
|
+
JSONL supports consumer backpressure through the filesystem. Standard reports and in-memory indexes use memory proportional to their record counts. Recovery rebuilds the graph from saved entries and reads resources again, including remote content validation.
|
|
52
52
|
|
|
53
|
-
|
|
53
|
+
Checkpoints preserve access restrictions, resource mappings, and source map settings. Supply authentication headers and proxy settings again when resuming.
|
|
54
54
|
|
|
55
|
-
|
|
55
|
+
# Delivery scope
|
|
56
|
+
|
|
57
|
+
The SDK excludes platform databases, release gates, browser probes, and production deployment. No unit test suite was added. Scans of real artifacts and build evidence do not replace precision and recall evaluation against a fully labeled application dataset.
|
package/package.json
CHANGED
|
@@ -1,13 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bloodhound-rs/core",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.2",
|
|
4
4
|
"description": "Rust static resource scanner with a thin Node.js SDK",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"engines": {
|
|
8
8
|
"node": ">=22"
|
|
9
9
|
},
|
|
10
|
-
"packageManager": "pnpm@10.20.0",
|
|
11
10
|
"main": "./dist/index.js",
|
|
12
11
|
"types": "./dist/index.d.ts",
|
|
13
12
|
"exports": {
|
|
@@ -19,26 +18,13 @@
|
|
|
19
18
|
"./index-schema": "./schemas/index.schema.json"
|
|
20
19
|
},
|
|
21
20
|
"files": [
|
|
22
|
-
"dist",
|
|
21
|
+
"dist/*.js",
|
|
22
|
+
"dist/*.d.ts",
|
|
23
23
|
"schemas",
|
|
24
24
|
"README.md",
|
|
25
25
|
"docs/support.md",
|
|
26
26
|
"CHANGELOG.md"
|
|
27
27
|
],
|
|
28
|
-
"scripts": {
|
|
29
|
-
"build:native": "node scripts/build-native.mjs",
|
|
30
|
-
"build:ts": "tsc --emitDeclarationOnly",
|
|
31
|
-
"build": "node scripts/clean-dist.mjs && pnpm build:native && pnpm build:ts",
|
|
32
|
-
"typecheck": "tsc --noEmit --skipLibCheck false",
|
|
33
|
-
"prepack": "pnpm build",
|
|
34
|
-
"example": "node examples/scan.mjs",
|
|
35
|
-
"example:html": "node examples/scan-html.mjs",
|
|
36
|
-
"format": "prettier --write src scripts examples schemas README.md docs/support.md docs/verification.md .github .changeset docs/releasing.md package.json tsconfig.json",
|
|
37
|
-
"format:check": "prettier --check src scripts examples schemas README.md docs/support.md docs/verification.md .github .changeset docs/releasing.md package.json tsconfig.json",
|
|
38
|
-
"changeset": "changeset",
|
|
39
|
-
"changeset:status": "changeset status",
|
|
40
|
-
"version:packages": "changeset version && node scripts/sync-native-version.mjs"
|
|
41
|
-
},
|
|
42
28
|
"devDependencies": {
|
|
43
29
|
"@changesets/cli": "3.0.3",
|
|
44
30
|
"@napi-rs/cli": "3.10.8",
|
|
@@ -47,7 +33,14 @@
|
|
|
47
33
|
"typescript": "^5.9.3"
|
|
48
34
|
},
|
|
49
35
|
"napi": {
|
|
50
|
-
"binaryName": "bloodhound"
|
|
36
|
+
"binaryName": "bloodhound",
|
|
37
|
+
"targets": [
|
|
38
|
+
"x86_64-unknown-linux-gnu",
|
|
39
|
+
"aarch64-unknown-linux-gnu",
|
|
40
|
+
"aarch64-apple-darwin",
|
|
41
|
+
"x86_64-apple-darwin",
|
|
42
|
+
"x86_64-pc-windows-msvc"
|
|
43
|
+
]
|
|
51
44
|
},
|
|
52
45
|
"publishConfig": {
|
|
53
46
|
"access": "public",
|
|
@@ -57,5 +50,27 @@
|
|
|
57
50
|
"repository": {
|
|
58
51
|
"type": "git",
|
|
59
52
|
"url": "git+https://github.com/Justinidlerz/bloodhound.git"
|
|
53
|
+
},
|
|
54
|
+
"optionalDependencies": {
|
|
55
|
+
"@bloodhound-rs/core-linux-x64-gnu": "0.1.2",
|
|
56
|
+
"@bloodhound-rs/core-darwin-arm64": "0.1.2",
|
|
57
|
+
"@bloodhound-rs/core-win32-x64-msvc": "0.1.2",
|
|
58
|
+
"@bloodhound-rs/core-linux-arm64-gnu": "0.1.2",
|
|
59
|
+
"@bloodhound-rs/core-darwin-x64": "0.1.2"
|
|
60
|
+
},
|
|
61
|
+
"scripts": {
|
|
62
|
+
"build:native": "node scripts/build-native.mjs",
|
|
63
|
+
"build:ts": "tsc --emitDeclarationOnly",
|
|
64
|
+
"build": "node scripts/clean-dist.mjs && pnpm build:native && pnpm build:ts",
|
|
65
|
+
"typecheck": "tsc --noEmit --skipLibCheck false",
|
|
66
|
+
"example": "node examples/scan.mjs",
|
|
67
|
+
"example:html": "node examples/scan-html.mjs",
|
|
68
|
+
"format": "prettier --write src scripts examples schemas README.md docs/support.md docs/verification.md .github .changeset docs/releasing.md package.json tsconfig.json npm pnpm-workspace.yaml",
|
|
69
|
+
"format:check": "prettier --check src scripts examples schemas README.md docs/support.md docs/verification.md .github .changeset docs/releasing.md package.json tsconfig.json npm pnpm-workspace.yaml",
|
|
70
|
+
"changeset": "changeset",
|
|
71
|
+
"changeset:status": "changeset status",
|
|
72
|
+
"version:packages": "changeset version && node scripts/sync-native-version.mjs && node scripts/sync-platform-packages.mjs",
|
|
73
|
+
"platforms:sync": "node scripts/sync-platform-packages.mjs",
|
|
74
|
+
"pack:release": "node scripts/pack-ci.mjs"
|
|
60
75
|
}
|
|
61
|
-
}
|
|
76
|
+
}
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|