{"_id":"@bun-win32/wevtapi","_rev":"3-3efbdaf27ae7452c92c6bf3bdbea16f4","name":"@bun-win32/wevtapi","dist-tags":{"latest":"2.0.1"},"versions":{"1.0.0":{"name":"@bun-win32/wevtapi","version":"1.0.0","keywords":["bun","ffi","win32","windows","wevtapi","windows-event-log","event-log","subscriptions","bindings","typescript","dll"],"author":"Stev Peifer <stev@bell.net>","license":"MIT","_id":"@bun-win32/wevtapi@1.0.0","maintainers":[{"name":"obscuritysrl","email":"stev@bell.net"}],"homepage":"https://github.com/ObscuritySRL/bun-win32#readme","bugs":{"url":"https://github.com/ObscuritySRL/bun-win32/issues"},"dist":{"shasum":"674cb7610f3fb95b39c62f960b6372f0325ad97f","tarball":"https://registry.npmjs.org/@bun-win32/wevtapi/-/wevtapi-1.0.0.tgz","fileCount":6,"integrity":"sha512-mWt41NPUfynBjkj+Fmf61R5tTkBk/ww2U1+99pZQcrq6CnlH9ZXOwqpplXayPLigaWyz9cvNu5a1ZfIUdQ3NQQ==","signatures":[{"sig":"MEUCIBxAc8ujFPO9ZhZCVOporaT2tyQ7khRAzZkHR3IxIw1FAiEAiU50SuPsDRSwnu0rcI8Q3BvirNCtn92MvV/QFKC/AR0=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":30367},"main":"./index.ts","type":"module","module":"index.ts","shasum":"674cb7610f3fb95b39c62f960b6372f0325ad97f","engines":{"bun":">=1.1.0"},"exports":{".":"./index.ts"},"private":false,"scripts":{"example:event-tail":"bun ./example/event-tail.ts","example:channel-report":"bun ./example/channel-report.ts"},"_npmUser":{"name":"obscuritysrl","email":"stev@bell.net"},"_integrity":"sha512-mWt41NPUfynBjkj+Fmf61R5tTkBk/ww2U1+99pZQcrq6CnlH9ZXOwqpplXayPLigaWyz9cvNu5a1ZfIUdQ3NQQ==","repository":{"url":"git://github.com/ObscuritySRL/bun-win32.git","type":"git","directory":"packages/wevtapi"},"_npmVersion":"10.8.3","description":"Zero-dependency, zero-overhead Win32 WEVTAPI bindings for Bun (FFI) on Windows.","directories":{},"sideEffects":false,"_nodeVersion":"24.3.0","dependencies":{"@bun-win32/core":"1.1.2"},"_hasShrinkwrap":false,"devDependencies":{"@types/bun":"latest","@bun-win32/kernel32":"1.0.21"},"peerDependencies":{"typescript":"^5"},"_npmOperationalInternal":{"tmp":"tmp/wevtapi_1.0.0_1775710100374_0.055854172926622425","host":"s3://npm-registry-packages-npm-production"}},"2.0.0":{"name":"@bun-win32/wevtapi","version":"2.0.0","keywords":["bun","ffi","win32","windows","wevtapi","windows-event-log","event-log","subscriptions","bindings","typescript","dll"],"author":"Stev Peifer <stev.p@outlook.com>","license":"MIT","_id":"@bun-win32/wevtapi@2.0.0","maintainers":[{"name":"obscuritysrl","email":"stev.p@outlook.com"}],"homepage":"https://github.com/ObscuritySRL/bun-win32#readme","bugs":{"url":"https://github.com/ObscuritySRL/bun-win32/issues"},"dist":{"shasum":"165e4c7df4edfb58b646671fa4bf5fc0c51737c0","tarball":"https://registry.npmjs.org/@bun-win32/wevtapi/-/wevtapi-2.0.0.tgz","fileCount":6,"integrity":"sha512-vYD/wflFV4QL5oSde3psF3jtr0y1e87FfIhS5VY3J09AZiBSgc9+ylpaWEoxPfFfxqpiDqfVBHaMLE30i1O5Bg==","signatures":[{"sig":"MEYCIQDOwcuuwrl1ek7iwCems5heX7L21v6IKU4qdk71FXzzKAIhANS5xpQj71mk66o9M3XkcZBsv5Oq7TTKk2iibCpzKnPV","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":32061},"main":"./index.ts","type":"module","module":"index.ts","shasum":"165e4c7df4edfb58b646671fa4bf5fc0c51737c0","engines":{"bun":">=1.1.0"},"exports":{".":"./index.ts"},"private":false,"scripts":{"example:event-tail":"bun ./example/event-tail.ts","example:channel-report":"bun ./example/channel-report.ts"},"_npmUser":{"name":"obscuritysrl","email":"stev.p@outlook.com"},"_integrity":"sha512-vYD/wflFV4QL5oSde3psF3jtr0y1e87FfIhS5VY3J09AZiBSgc9+ylpaWEoxPfFfxqpiDqfVBHaMLE30i1O5Bg==","repository":{"url":"git://github.com/ObscuritySRL/bun-win32.git","type":"git","directory":"packages/wevtapi"},"_npmVersion":"10.8.3","description":"Zero-dependency, zero-overhead Win32 WEVTAPI bindings for Bun (FFI) on Windows.","directories":{},"sideEffects":false,"_nodeVersion":"26.3.0","dependencies":{"@bun-win32/core":"2.0.0"},"_hasShrinkwrap":false,"devDependencies":{"@types/bun":"latest","@bun-win32/kernel32":"2.0.0"},"peerDependencies":{"typescript":"^5"},"_npmOperationalInternal":{"tmp":"tmp/wevtapi_2.0.0_1782435985604_0.11491391526013484","host":"s3://npm-registry-packages-npm-production"}},"2.0.1":{"author":"Stev Peifer <stev.p@outlook.com>","bugs":{"url":"https://github.com/ObscuritySRL/bun-win32/issues"},"dependencies":{"@bun-win32/core":"2.0.1"},"description":"Zero-dependency, zero-overhead Win32 WEVTAPI bindings for Bun (FFI) on Windows.","devDependencies":{"@bun-win32/kernel32":"2.0.1","@types/bun":"latest"},"exports":{".":"./index.ts"},"license":"MIT","module":"index.ts","name":"@bun-win32/wevtapi","peerDependencies":{"typescript":"^5"},"private":false,"homepage":"https://github.com/ObscuritySRL/bun-win32#readme","repository":{"type":"git","url":"git://github.com/ObscuritySRL/bun-win32.git","directory":"packages/wevtapi"},"type":"module","version":"2.0.1","main":"./index.ts","keywords":["bun","ffi","win32","windows","wevtapi","windows-event-log","event-log","subscriptions","bindings","typescript","dll"],"sideEffects":false,"engines":{"bun":">=1.1.0"},"scripts":{"example:channel-report":"bun ./example/channel-report.ts","example:event-tail":"bun ./example/event-tail.ts"},"_id":"@bun-win32/wevtapi@2.0.1","_integrity":"sha512-00HxKld7suwCNNZYNM+vIAirk40+fXQuAJF49aZwyVJ1Zkds7vYt3ivfHO5Jn5Ud6Bmyg9zjFB1lUBHOuR0Hnw==","_nodeVersion":"26.3.0","_npmVersion":"10.8.3","shasum":"8ba795c6df4c0b9abe854ecb3ceea5b9927648cb","dist":{"integrity":"sha512-00HxKld7suwCNNZYNM+vIAirk40+fXQuAJF49aZwyVJ1Zkds7vYt3ivfHO5Jn5Ud6Bmyg9zjFB1lUBHOuR0Hnw==","shasum":"8ba795c6df4c0b9abe854ecb3ceea5b9927648cb","tarball":"https://registry.npmjs.org/@bun-win32/wevtapi/-/wevtapi-2.0.1.tgz","fileCount":6,"unpackedSize":32061,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQDS48yUMx6yZ1ahwu9WmaiLhH9ng12GlpzWH97X6WlPwgIgEtty7SyKrj9vR2zPFykcsIV7mjjMGbgMzPi1SBQQy2E="}]},"_npmUser":{"name":"obscuritysrl","email":"stev.p@outlook.com"},"directories":{},"maintainers":[{"name":"obscuritysrl","email":"stev.p@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/wevtapi_2.0.1_1782438211709_0.05927417673583535"},"_hasShrinkwrap":false}},"time":{"created":"2026-04-09T04:48:20.271Z","modified":"2026-06-26T01:43:32.018Z","1.0.0":"2026-04-09T04:48:20.522Z","2.0.0":"2026-06-26T01:06:25.745Z","2.0.1":"2026-06-26T01:43:31.881Z"},"bugs":{"url":"https://github.com/ObscuritySRL/bun-win32/issues"},"author":"Stev Peifer <stev.p@outlook.com>","license":"MIT","homepage":"https://github.com/ObscuritySRL/bun-win32#readme","keywords":["bun","ffi","win32","windows","wevtapi","windows-event-log","event-log","subscriptions","bindings","typescript","dll"],"repository":{"type":"git","url":"git://github.com/ObscuritySRL/bun-win32.git","directory":"packages/wevtapi"},"description":"Zero-dependency, zero-overhead Win32 WEVTAPI bindings for Bun (FFI) on Windows.","maintainers":[{"name":"obscuritysrl","email":"stev.p@outlook.com"}],"readme":"# @bun-win32/wevtapi\n\nZero-dependency, zero-overhead Win32 Wevtapi bindings for [Bun](https://bun.sh) on Windows.\n\n## Overview\n\n`@bun-win32/wevtapi` exposes the `wevtapi.dll` exports using [Bun](https://bun.sh)'s FFI. It provides a single class, `Wevtapi`, which lazily binds native symbols on first use. You can optionally preload a subset or all symbols up-front via `Preload()`.\n\nThe bindings are strongly typed for a smooth DX in TypeScript.\n\n## Features\n\n- [Bun](https://bun.sh)-first ergonomics on Windows 10/11.\n- Direct FFI to `wevtapi.dll` (Windows Event Log queries, rendering, subscriptions, channel configuration, and publisher metadata).\n- In-source docs in `structs/Wevtapi.ts` with links to Microsoft Learn.\n- Lazy binding on first call; optional eager preload (`Wevtapi.Preload()`).\n- No wrapper overhead; calls map 1:1 to native APIs.\n- Strongly-typed Win32 aliases, enums, and constants (see `types/Wevtapi.ts`).\n\n## Requirements\n\n- [Bun](https://bun.sh) runtime\n- Windows 10 or later\n\n## Installation\n\n```sh\nbun add @bun-win32/wevtapi\n```\n\n## Quick Start\n\n```ts\nimport Wevtapi, { EvtQueryFlags } from '@bun-win32/wevtapi';\n\nconst channelPath = Buffer.from('System\\0', 'utf16le');\nconst query = Buffer.from('*\\0', 'utf16le');\nconst resultSet = Wevtapi.EvtQuery(0n, channelPath.ptr, query.ptr, EvtQueryFlags.EvtQueryChannelPath);\n\nif (resultSet === 0n) {\n  throw new Error('EvtQuery failed');\n}\n\nWevtapi.EvtClose(resultSet);\n```\n\n> [!NOTE]\n> AI agents: see `AI.md` for the package binding contract and source-navigation guidance. It explains how to use the package without scanning the entire implementation.\n\n## Examples\n\nRun the included examples:\n\n```sh\nbun run example:event-tail\nbun run example:channel-report\n```\n\n## Notes\n\n- Either rely on lazy binding or call `Wevtapi.Preload()`.\n- Windows only. Bun runtime required.\n- **SAL types & naming:** nullability is in the **type** — `Optional<T>` (formally optional, SAL `_*opt_`) and `Nullable<T>` (plain `[in]`/`[out]` the docs say can be NULL), the null sentinel derived from `T` (`null` for pointers `LP*`/`P*`, `0n` for handles/by-value addresses); direction is in the **parameter name** — `_out` (`_Out_`), `_in_out` (`_Inout_`), `_In_` bare. See `AI.md` and the repo `AGENTS.md`.\n","readmeFilename":"README.md"}