@spresto/monitordog-rust 1.1.4

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 (5) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +85 -0
  3. package/index.d.ts +75 -0
  4. package/index.js +398 -0
  5. package/package.json +104 -0
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2020 N-API for Rust
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,85 @@
1
+ # `sPresto/monitorDog-Rust`
2
+
3
+ ![https://github.com/sPresto/monitorDog-Rust/actions](https://github.com/napi-rs/package-template/workflows/CI/badge.svg)
4
+
5
+ > Template project for writing node packages with napi-rs.
6
+
7
+ # Usage
8
+
9
+ 1. Click **Use this template**.
10
+ 2. **Clone** your project.
11
+ 3. Run `yarn install` to install dependencies.
12
+ 4. Run `yarn napi rename -n [@your-scope/package-name] -b [binary-name]` command under the project folder to rename your package.
13
+
14
+ ## Install this test package
15
+
16
+ ```
17
+ yarn add @napi-rs/package-template
18
+ ```
19
+
20
+ ## Ability
21
+
22
+ ### Build
23
+
24
+ After `yarn build/npm run build` command, you can see `package-template.[darwin|win32|linux].node` file in project root. This is the native addon built from [lib.rs](./src/lib.rs).
25
+
26
+ ### Test
27
+
28
+ With [ava](https://github.com/avajs/ava), run `yarn test/npm run test` to testing native addon. You can also switch to another testing framework if you want.
29
+
30
+ ### CI
31
+
32
+ With GitHub Actions, each commit and pull request will be built and tested automatically in [`node@20`, `@node22`] x [`macOS`, `Linux`, `Windows`] matrix. You will never be afraid of the native addon broken in these platforms.
33
+
34
+ ### Release
35
+
36
+ Release native package is very difficult in old days. Native packages may ask developers who use it to install `build toolchain` like `gcc/llvm`, `node-gyp` or something more.
37
+
38
+ With `GitHub actions`, we can easily prebuild a `binary` for major platforms. And with `N-API`, we should never be afraid of **ABI Compatible**.
39
+
40
+ The other problem is how to deliver prebuild `binary` to users. Downloading it in `postinstall` script is a common way that most packages do it right now. The problem with this solution is it introduced many other packages to download binary that has not been used by `runtime codes`. The other problem is some users may not easily download the binary from `GitHub/CDN` if they are behind a private network (But in most cases, they have a private NPM mirror).
41
+
42
+ In this package, we choose a better way to solve this problem. We release different `npm packages` for different platforms. And add it to `optionalDependencies` before releasing the `Major` package to npm.
43
+
44
+ `NPM` will choose which native package should download from `registry` automatically. You can see [npm](./npm) dir for details. And you can also run `yarn add @napi-rs/package-template` to see how it works.
45
+
46
+ ## Develop requirements
47
+
48
+ - Install the latest `Rust`
49
+ - Install `Node.js@10+` which fully supported `Node-API`
50
+ - Install `yarn@1.x`
51
+
52
+ ## Test in local
53
+
54
+ - yarn
55
+ - yarn build
56
+ - yarn test
57
+
58
+ And you will see:
59
+
60
+ ```bash
61
+ $ ava --verbose
62
+
63
+ ✔ sync function from native code
64
+ ✔ sleep function from native code (201ms)
65
+
66
+
67
+ 2 tests passed
68
+ ✨ Done in 1.12s.
69
+ ```
70
+
71
+ ## Release package
72
+
73
+ Ensure you have set your **NPM_TOKEN** in the `GitHub` project setting.
74
+
75
+ In `Settings -> Secrets`, add **NPM_TOKEN** into it.
76
+
77
+ When you want to release the package:
78
+
79
+ ```
80
+ npm version [<newversion> | major | minor | patch | premajor | preminor | prepatch | prerelease [--preid=<prerelease-id>] | from-git]
81
+
82
+ git push
83
+ ```
84
+
85
+ GitHub actions will do the rest job for you.
package/index.d.ts ADDED
@@ -0,0 +1,75 @@
1
+ /* auto-generated by NAPI-RS */
2
+ /* eslint-disable */
3
+ export declare class MdKeyboardManager {
4
+ constructor()
5
+ /** Start blocking screenshot-related keyboard shortcuts */
6
+ startBlocking(): void
7
+ /** Stop blocking screenshot-related keyboard shortcuts */
8
+ stopBlocking(): void
9
+ /** Check if keyboard shortcuts are currently being blocked */
10
+ get isBlocking(): boolean
11
+ /** Add a custom hotkey to block */
12
+ addHotkey(key: string, modifiers: Array<string>): void
13
+ /** Remove a custom hotkey */
14
+ removeHotkey(key: string, modifiers: Array<string>): void
15
+ /** Clear all custom hotkeys */
16
+ clearCustomHotkeys(): void
17
+ /** Destroy the keyboard manager: stop the event loop, clear all custom hotkeys and reset state. */
18
+ destroy(): void
19
+ }
20
+
21
+ export declare class MdPolicyManager {
22
+ constructor()
23
+ /** Check if the Snipping Tool policy is currently enabled (blocked) */
24
+ isSnippingToolBlocked(): boolean
25
+ /** Enable the "Do not allow Snipping Tool to run" policy (block Snipping Tool) */
26
+ enableSnippingToolBlock(): void
27
+ /** Disable the "Do not allow Snipping Tool to run" policy (allow Snipping Tool) */
28
+ disableSnippingToolBlock(): void
29
+ /** Restore the original policy state (remove our modifications) */
30
+ restoreOriginalPolicy(): void
31
+ /** Get the current policy value as a string for debugging */
32
+ getPolicyStatus(): string
33
+ /** Check if the current process has the necessary privileges to modify policies */
34
+ canModifyPolicies(): boolean
35
+ /** Cleanup: restore original policy state */
36
+ destroy(): void
37
+ }
38
+
39
+ export declare class MdSystemMonitor {
40
+ constructor()
41
+ /** Refresh all system information */
42
+ refreshAll(): void
43
+ /** Refresh memory information */
44
+ refreshMemory(): void
45
+ /**
46
+ * Refresh CPU usage information.
47
+ * For accurate CPU usage, call this method multiple times with an interval (e.g., 200ms) between calls.
48
+ */
49
+ refreshCpu(): void
50
+ /** Refresh processes information */
51
+ refreshProcesses(): void
52
+ /** Get current memory usage */
53
+ getMemoryUsage(): MemoryInfo
54
+ /** Get global CPU usage percentage */
55
+ getCpuUsage(): number
56
+ /**
57
+ * Get list of processes
58
+ *
59
+ * Optimization: acquire a read lock, copy minimal owned data (pid + name) then release the lock
60
+ * so heavy conversions / allocations don't block other readers/writers for long.
61
+ */
62
+ getProcessList(): Array<ProcessInfo>
63
+ /** Destroy the system monitor: reset state. */
64
+ destroy(): void
65
+ }
66
+
67
+ export interface MemoryInfo {
68
+ free: number
69
+ available: number
70
+ }
71
+
72
+ export interface ProcessInfo {
73
+ pid: number
74
+ name: string
75
+ }
package/index.js ADDED
@@ -0,0 +1,398 @@
1
+ // prettier-ignore
2
+ /* eslint-disable */
3
+ // @ts-nocheck
4
+ /* auto-generated by NAPI-RS */
5
+
6
+ const { createRequire } = require('node:module')
7
+ require = createRequire(__filename)
8
+
9
+ const { readFileSync } = require('node:fs')
10
+ let nativeBinding = null
11
+ const loadErrors = []
12
+
13
+ const isMusl = () => {
14
+ let musl = false
15
+ if (process.platform === 'linux') {
16
+ musl = isMuslFromFilesystem()
17
+ if (musl === null) {
18
+ musl = isMuslFromReport()
19
+ }
20
+ if (musl === null) {
21
+ musl = isMuslFromChildProcess()
22
+ }
23
+ }
24
+ return musl
25
+ }
26
+
27
+ const isFileMusl = (f) => f.includes('libc.musl-') || f.includes('ld-musl-')
28
+
29
+ const isMuslFromFilesystem = () => {
30
+ try {
31
+ return readFileSync('/usr/bin/ldd', 'utf-8').includes('musl')
32
+ } catch {
33
+ return null
34
+ }
35
+ }
36
+
37
+ const isMuslFromReport = () => {
38
+ let report = null
39
+ if (typeof process.report?.getReport === 'function') {
40
+ process.report.excludeNetwork = true
41
+ report = process.report.getReport()
42
+ }
43
+ if (!report) {
44
+ return null
45
+ }
46
+ if (report.header && report.header.glibcVersionRuntime) {
47
+ return false
48
+ }
49
+ if (Array.isArray(report.sharedObjects)) {
50
+ if (report.sharedObjects.some(isFileMusl)) {
51
+ return true
52
+ }
53
+ }
54
+ return false
55
+ }
56
+
57
+ const isMuslFromChildProcess = () => {
58
+ try {
59
+ return require('child_process').execSync('ldd --version', { encoding: 'utf8' }).includes('musl')
60
+ } catch (e) {
61
+ // If we reach this case, we don't know if the system is musl or not, so is better to just fallback to false
62
+ return false
63
+ }
64
+ }
65
+
66
+ function requireNative() {
67
+ if (process.env.NAPI_RS_NATIVE_LIBRARY_PATH) {
68
+ try {
69
+ nativeBinding = require(process.env.NAPI_RS_NATIVE_LIBRARY_PATH);
70
+ } catch (err) {
71
+ loadErrors.push(err)
72
+ }
73
+ } else if (process.platform === 'android') {
74
+ if (process.arch === 'arm64') {
75
+ try {
76
+ return require('./monitorDog-rust.android-arm64.node')
77
+ } catch (e) {
78
+ loadErrors.push(e)
79
+ }
80
+ try {
81
+ return require('@spresto/monitordog-rust-android-arm64')
82
+ } catch (e) {
83
+ loadErrors.push(e)
84
+ }
85
+ } else if (process.arch === 'arm') {
86
+ try {
87
+ return require('./monitorDog-rust.android-arm-eabi.node')
88
+ } catch (e) {
89
+ loadErrors.push(e)
90
+ }
91
+ try {
92
+ return require('@spresto/monitordog-rust-android-arm-eabi')
93
+ } catch (e) {
94
+ loadErrors.push(e)
95
+ }
96
+ } else {
97
+ loadErrors.push(new Error(`Unsupported architecture on Android ${process.arch}`))
98
+ }
99
+ } else if (process.platform === 'win32') {
100
+ if (process.arch === 'x64') {
101
+ try {
102
+ return require('./monitorDog-rust.win32-x64-msvc.node')
103
+ } catch (e) {
104
+ loadErrors.push(e)
105
+ }
106
+ try {
107
+ return require('@spresto/monitordog-rust-win32-x64-msvc')
108
+ } catch (e) {
109
+ loadErrors.push(e)
110
+ }
111
+ } else if (process.arch === 'ia32') {
112
+ try {
113
+ return require('./monitorDog-rust.win32-ia32-msvc.node')
114
+ } catch (e) {
115
+ loadErrors.push(e)
116
+ }
117
+ try {
118
+ return require('@spresto/monitordog-rust-win32-ia32-msvc')
119
+ } catch (e) {
120
+ loadErrors.push(e)
121
+ }
122
+ } else if (process.arch === 'arm64') {
123
+ try {
124
+ return require('./monitorDog-rust.win32-arm64-msvc.node')
125
+ } catch (e) {
126
+ loadErrors.push(e)
127
+ }
128
+ try {
129
+ return require('@spresto/monitordog-rust-win32-arm64-msvc')
130
+ } catch (e) {
131
+ loadErrors.push(e)
132
+ }
133
+ } else {
134
+ loadErrors.push(new Error(`Unsupported architecture on Windows: ${process.arch}`))
135
+ }
136
+ } else if (process.platform === 'darwin') {
137
+ try {
138
+ return require('./monitorDog-rust.darwin-universal.node')
139
+ } catch (e) {
140
+ loadErrors.push(e)
141
+ }
142
+ try {
143
+ return require('@spresto/monitordog-rust-darwin-universal')
144
+ } catch (e) {
145
+ loadErrors.push(e)
146
+ }
147
+ if (process.arch === 'x64') {
148
+ try {
149
+ return require('./monitorDog-rust.darwin-x64.node')
150
+ } catch (e) {
151
+ loadErrors.push(e)
152
+ }
153
+ try {
154
+ return require('@spresto/monitordog-rust-darwin-x64')
155
+ } catch (e) {
156
+ loadErrors.push(e)
157
+ }
158
+ } else if (process.arch === 'arm64') {
159
+ try {
160
+ return require('./monitorDog-rust.darwin-arm64.node')
161
+ } catch (e) {
162
+ loadErrors.push(e)
163
+ }
164
+ try {
165
+ return require('@spresto/monitordog-rust-darwin-arm64')
166
+ } catch (e) {
167
+ loadErrors.push(e)
168
+ }
169
+ } else {
170
+ loadErrors.push(new Error(`Unsupported architecture on macOS: ${process.arch}`))
171
+ }
172
+ } else if (process.platform === 'freebsd') {
173
+ if (process.arch === 'x64') {
174
+ try {
175
+ return require('./monitorDog-rust.freebsd-x64.node')
176
+ } catch (e) {
177
+ loadErrors.push(e)
178
+ }
179
+ try {
180
+ return require('@spresto/monitordog-rust-freebsd-x64')
181
+ } catch (e) {
182
+ loadErrors.push(e)
183
+ }
184
+ } else if (process.arch === 'arm64') {
185
+ try {
186
+ return require('./monitorDog-rust.freebsd-arm64.node')
187
+ } catch (e) {
188
+ loadErrors.push(e)
189
+ }
190
+ try {
191
+ return require('@spresto/monitordog-rust-freebsd-arm64')
192
+ } catch (e) {
193
+ loadErrors.push(e)
194
+ }
195
+ } else {
196
+ loadErrors.push(new Error(`Unsupported architecture on FreeBSD: ${process.arch}`))
197
+ }
198
+ } else if (process.platform === 'linux') {
199
+ if (process.arch === 'x64') {
200
+ if (isMusl()) {
201
+ try {
202
+ return require('./monitorDog-rust.linux-x64-musl.node')
203
+ } catch (e) {
204
+ loadErrors.push(e)
205
+ }
206
+ try {
207
+ return require('@spresto/monitordog-rust-linux-x64-musl')
208
+ } catch (e) {
209
+ loadErrors.push(e)
210
+ }
211
+ } else {
212
+ try {
213
+ return require('./monitorDog-rust.linux-x64-gnu.node')
214
+ } catch (e) {
215
+ loadErrors.push(e)
216
+ }
217
+ try {
218
+ return require('@spresto/monitordog-rust-linux-x64-gnu')
219
+ } catch (e) {
220
+ loadErrors.push(e)
221
+ }
222
+ }
223
+ } else if (process.arch === 'arm64') {
224
+ if (isMusl()) {
225
+ try {
226
+ return require('./monitorDog-rust.linux-arm64-musl.node')
227
+ } catch (e) {
228
+ loadErrors.push(e)
229
+ }
230
+ try {
231
+ return require('@spresto/monitordog-rust-linux-arm64-musl')
232
+ } catch (e) {
233
+ loadErrors.push(e)
234
+ }
235
+ } else {
236
+ try {
237
+ return require('./monitorDog-rust.linux-arm64-gnu.node')
238
+ } catch (e) {
239
+ loadErrors.push(e)
240
+ }
241
+ try {
242
+ return require('@spresto/monitordog-rust-linux-arm64-gnu')
243
+ } catch (e) {
244
+ loadErrors.push(e)
245
+ }
246
+ }
247
+ } else if (process.arch === 'arm') {
248
+ if (isMusl()) {
249
+ try {
250
+ return require('./monitorDog-rust.linux-arm-musleabihf.node')
251
+ } catch (e) {
252
+ loadErrors.push(e)
253
+ }
254
+ try {
255
+ return require('@spresto/monitordog-rust-linux-arm-musleabihf')
256
+ } catch (e) {
257
+ loadErrors.push(e)
258
+ }
259
+ } else {
260
+ try {
261
+ return require('./monitorDog-rust.linux-arm-gnueabihf.node')
262
+ } catch (e) {
263
+ loadErrors.push(e)
264
+ }
265
+ try {
266
+ return require('@spresto/monitordog-rust-linux-arm-gnueabihf')
267
+ } catch (e) {
268
+ loadErrors.push(e)
269
+ }
270
+ }
271
+ } else if (process.arch === 'riscv64') {
272
+ if (isMusl()) {
273
+ try {
274
+ return require('./monitorDog-rust.linux-riscv64-musl.node')
275
+ } catch (e) {
276
+ loadErrors.push(e)
277
+ }
278
+ try {
279
+ return require('@spresto/monitordog-rust-linux-riscv64-musl')
280
+ } catch (e) {
281
+ loadErrors.push(e)
282
+ }
283
+ } else {
284
+ try {
285
+ return require('./monitorDog-rust.linux-riscv64-gnu.node')
286
+ } catch (e) {
287
+ loadErrors.push(e)
288
+ }
289
+ try {
290
+ return require('@spresto/monitordog-rust-linux-riscv64-gnu')
291
+ } catch (e) {
292
+ loadErrors.push(e)
293
+ }
294
+ }
295
+ } else if (process.arch === 'ppc64') {
296
+ try {
297
+ return require('./monitorDog-rust.linux-ppc64-gnu.node')
298
+ } catch (e) {
299
+ loadErrors.push(e)
300
+ }
301
+ try {
302
+ return require('@spresto/monitordog-rust-linux-ppc64-gnu')
303
+ } catch (e) {
304
+ loadErrors.push(e)
305
+ }
306
+ } else if (process.arch === 's390x') {
307
+ try {
308
+ return require('./monitorDog-rust.linux-s390x-gnu.node')
309
+ } catch (e) {
310
+ loadErrors.push(e)
311
+ }
312
+ try {
313
+ return require('@spresto/monitordog-rust-linux-s390x-gnu')
314
+ } catch (e) {
315
+ loadErrors.push(e)
316
+ }
317
+ } else {
318
+ loadErrors.push(new Error(`Unsupported architecture on Linux: ${process.arch}`))
319
+ }
320
+ } else if (process.platform === 'openharmony') {
321
+ if (process.arch === 'arm64') {
322
+ try {
323
+ return require('./monitorDog-rust.linux-arm64-ohos.node')
324
+ } catch (e) {
325
+ loadErrors.push(e)
326
+ }
327
+ try {
328
+ return require('@spresto/monitordog-rust-linux-arm64-ohos')
329
+ } catch (e) {
330
+ loadErrors.push(e)
331
+ }
332
+ } else if (process.arch === 'x64') {
333
+ try {
334
+ return require('./monitorDog-rust.linux-x64-ohos.node')
335
+ } catch (e) {
336
+ loadErrors.push(e)
337
+ }
338
+ try {
339
+ return require('@spresto/monitordog-rust-linux-x64-ohos')
340
+ } catch (e) {
341
+ loadErrors.push(e)
342
+ }
343
+ } else if (process.arch === 'arm') {
344
+ try {
345
+ return require('./monitorDog-rust.linux-arm-ohos.node')
346
+ } catch (e) {
347
+ loadErrors.push(e)
348
+ }
349
+ try {
350
+ return require('@spresto/monitordog-rust-linux-arm-ohos')
351
+ } catch (e) {
352
+ loadErrors.push(e)
353
+ }
354
+ } else {
355
+ loadErrors.push(new Error(`Unsupported architecture on OpenHarmony: ${process.arch}`))
356
+ }
357
+ } else {
358
+ loadErrors.push(new Error(`Unsupported OS: ${process.platform}, architecture: ${process.arch}`))
359
+ }
360
+ }
361
+
362
+ nativeBinding = requireNative()
363
+
364
+ if (!nativeBinding || process.env.NAPI_RS_FORCE_WASI) {
365
+ try {
366
+ nativeBinding = require('./monitorDog-rust.wasi.cjs')
367
+ } catch (err) {
368
+ if (process.env.NAPI_RS_FORCE_WASI) {
369
+ loadErrors.push(err)
370
+ }
371
+ }
372
+ if (!nativeBinding) {
373
+ try {
374
+ nativeBinding = require('@spresto/monitordog-rust-wasm32-wasi')
375
+ } catch (err) {
376
+ if (process.env.NAPI_RS_FORCE_WASI) {
377
+ loadErrors.push(err)
378
+ }
379
+ }
380
+ }
381
+ }
382
+
383
+ if (!nativeBinding) {
384
+ if (loadErrors.length > 0) {
385
+ throw new Error(
386
+ `Cannot find native binding. ` +
387
+ `npm has a bug related to optional dependencies (https://github.com/npm/cli/issues/4828). ` +
388
+ 'Please try `npm i` again after removing both package-lock.json and node_modules directory.',
389
+ { cause: loadErrors }
390
+ )
391
+ }
392
+ throw new Error(`Failed to load native binding`)
393
+ }
394
+
395
+ module.exports = nativeBinding
396
+ module.exports.MdKeyboardManager = nativeBinding.MdKeyboardManager
397
+ module.exports.MdPolicyManager = nativeBinding.MdPolicyManager
398
+ module.exports.MdSystemMonitor = nativeBinding.MdSystemMonitor
package/package.json ADDED
@@ -0,0 +1,104 @@
1
+ {
2
+ "name": "@spresto/monitordog-rust",
3
+ "version": "1.1.4",
4
+ "description": "Rust Library for MonitorDog",
5
+ "main": "index.js",
6
+ "repository": {
7
+ "type": "git",
8
+ "url": "git+ssh://git@github.com/sPresto/monitorDog-Rust.git"
9
+ },
10
+ "license": "MIT",
11
+ "keywords": [
12
+ "napi-rs",
13
+ "NAPI",
14
+ "N-API",
15
+ "Rust",
16
+ "node-addon",
17
+ "node-addon-api"
18
+ ],
19
+ "files": [
20
+ "index.d.ts",
21
+ "index.js"
22
+ ],
23
+ "napi": {
24
+ "binaryName": "monitorDog-rust",
25
+ "targets": [
26
+ "x86_64-pc-windows-msvc"
27
+ ]
28
+ },
29
+ "engines": {
30
+ "node": ">= 12.22.0 < 13 || >= 14.17.0 < 15 || >= 15.12.0 < 16 || >= 16.0.0"
31
+ },
32
+ "publishConfig": {
33
+ "registry": "https://registry.npmjs.org/",
34
+ "access": "public"
35
+ },
36
+ "scripts": {
37
+ "artifacts": "napi artifacts",
38
+ "bench": "node --import @oxc-node/core/register benchmark/bench.ts",
39
+ "build": "napi build --platform --release",
40
+ "build:debug": "napi build --platform",
41
+ "format": "run-p format:prettier format:rs format:toml",
42
+ "format:prettier": "prettier . -w",
43
+ "format:toml": "taplo format",
44
+ "format:rs": "cargo fmt",
45
+ "lint": "oxlint .",
46
+ "prepublishOnly": "napi prepublish -t npm",
47
+ "test": "ava",
48
+ "version": "napi version",
49
+ "prepare": "husky"
50
+ },
51
+ "devDependencies": {
52
+ "@emnapi/core": "^1.4.5",
53
+ "@emnapi/runtime": "^1.4.5",
54
+ "@napi-rs/cli": "^3.0.3",
55
+ "@oxc-node/core": "^0.0.32",
56
+ "@taplo/cli": "^0.7.0",
57
+ "@tybys/wasm-util": "^0.10.0",
58
+ "ava": "^6.4.1",
59
+ "chalk": "^5.4.1",
60
+ "husky": "^9.1.7",
61
+ "lint-staged": "^16.1.2",
62
+ "npm-run-all2": "^8.0.4",
63
+ "oxlint": "^1.8.0",
64
+ "prettier": "^3.6.2",
65
+ "tinybench": "^5.0.0",
66
+ "typescript": "^5.8.3"
67
+ },
68
+ "lint-staged": {
69
+ "*.@(js|ts|tsx)": [
70
+ "oxlint --fix"
71
+ ],
72
+ "*.@(js|ts|tsx|yml|yaml|md|json)": [
73
+ "prettier --write"
74
+ ],
75
+ "*.toml": [
76
+ "taplo format"
77
+ ]
78
+ },
79
+ "ava": {
80
+ "extensions": {
81
+ "ts": "module"
82
+ },
83
+ "timeout": "2m",
84
+ "workerThreads": false,
85
+ "environmentVariables": {
86
+ "OXC_TSCONFIG_PATH": "./__test__/tsconfig.json"
87
+ },
88
+ "nodeArguments": [
89
+ "--import",
90
+ "@oxc-node/core/register"
91
+ ]
92
+ },
93
+ "prettier": {
94
+ "printWidth": 120,
95
+ "semi": false,
96
+ "trailingComma": "all",
97
+ "singleQuote": true,
98
+ "arrowParens": "always"
99
+ },
100
+ "packageManager": "yarn@4.9.2",
101
+ "optionalDependencies": {
102
+ "@spresto/monitordog-rust-win32-x64-msvc": "1.1.4"
103
+ }
104
+ }