{"_id":"birnam","_rev":"2-d91eba80712dc045e3066fd60de55a00","name":"birnam","dist-tags":{"latest":"1.0.0"},"versions":{"0.0.0":{"name":"birnam","version":"0.0.0","author":"","license":"ISC","_id":"birnam@0.0.0","maintainers":[{"name":"achingbrain","email":"alex@achingbrain.net"}],"dist":{"shasum":"cdea0200acbab5fdf7c6fe1fd28d3203745e426c","tarball":"https://registry.npmjs.org/birnam/-/birnam-0.0.0.tgz","fileCount":1,"integrity":"sha512-Jcwr71I1P2WjGbBKeJtS49ozIRjHn1cWWqPHKtwM/VFQE5CUo9rE/KfTOudlfQhmpQKPhRNIwXwAQW6cEnUSgA==","signatures":[{"sig":"MEUCIEZ80bwDoKvO1bN0oDJS0fD+VKcCNX6ZrGWqZ9aUVhtzAiEAp5TI4H4AxDezCwi3l8oUvsgiW8COb0A5wzF9Klp4FUg=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":224},"main":"index.js","type":"commonjs","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"_npmUser":{"name":"achingbrain","email":"alex@achingbrain.net"},"_npmVersion":"11.8.0","description":"","directories":{},"_nodeVersion":"24.13.1","_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/birnam_0.0.0_1779783251201_0.20118362008138613","host":"s3://npm-registry-packages-npm-production"}},"1.0.0":{"name":"birnam","version":"1.0.0","description":"Component-based logging for interplanetary applications","license":"Apache-2.0 OR MIT","homepage":"https://github.com/achingbrain/birnam#readme","repository":{"type":"git","url":"git+https://github.com/achingbrain/birnam.git"},"bugs":{"url":"https://github.com/achingbrain/birnam/issues"},"publishConfig":{"access":"public","provenance":true},"type":"module","types":"./dist/src/index.d.ts","exports":{".":{"types":"./dist/src/index.d.ts","import":"./dist/src/index.js","module-sync":"./dist/src/index.js"}},"release":{"branches":["main"],"plugins":[["@semantic-release/commit-analyzer",{"preset":"conventionalcommits","releaseRules":[{"breaking":true,"release":"major"},{"revert":true,"release":"patch"},{"type":"feat","release":"minor"},{"type":"fix","release":"patch"},{"type":"docs","release":"patch"},{"type":"test","release":"patch"},{"type":"deps","release":"patch"},{"scope":"no-release","release":false}]}],["@semantic-release/release-notes-generator",{"preset":"conventionalcommits","presetConfig":{"types":[{"type":"feat","section":"Features"},{"type":"fix","section":"Bug Fixes"},{"type":"chore","section":"Trivial Changes"},{"type":"docs","section":"Documentation"},{"type":"deps","section":"Dependencies"},{"type":"test","section":"Tests"}]}}],"@semantic-release/changelog","@semantic-release/npm","@semantic-release/github",["@semantic-release/git",{"assets":["CHANGELOG.md","package.json"]}]]},"scripts":{"build":"aegir build","clean":"aegir clean","lint":"aegir lint","dep-check":"aegir dep-check","doc-check":"aegir doc-check","spell-check":"aegir spell-check","docs":"aegir docs","test":"aegir test","test:chrome":"aegir test -t browser --cov","test:chrome-webworker":"aegir test -t webworker","test:firefox":"aegir test -t browser -- --browser firefox","test:firefox-webworker":"aegir test -t webworker -- --browser firefox","test:node":"aegir test -t node --cov","test:electron-main":"aegir test -t electron-main","test:deno":"aegir test -t deno","release":"aegir release"},"dependencies":{"multiformats":"^14.0.0","weald":"^1.1.2"},"devDependencies":{"aegir":"^48.0.6","uint8arrays":"^6.1.1"},"sideEffects":false,"gitHead":"e5f5bcb656cffc52efc509e1f8e8471154beae1c","_id":"birnam@1.0.0","_nodeVersion":"24.15.0","_npmVersion":"11.15.0","dist":{"integrity":"sha512-lropqEwi52w2aoOQQ+V4MGc8KP5mVef9DaEKv73dkVXb8UN6moQ7j/f19NesXPYt/l+8MkkHtMBAQsBKR8BqgQ==","shasum":"cac36773d2836586bfea61bffa66b80d1730b8cf","tarball":"https://registry.npmjs.org/birnam/-/birnam-1.0.0.tgz","fileCount":10,"unpackedSize":116113,"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/birnam@1.0.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQCy7FBegRe9mXw0YE5EW7frEZNPeeh9hgGbFiUYi9fAAgIgENoYv32QOFYew2fIK/JCagWU0XA5sAF/1gdcVjFSJZE="}]},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:3952a5d7-a6ea-4e22-b760-a99a89981e88"}},"directories":{},"maintainers":[{"name":"achingbrain","email":"alex@achingbrain.net"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/birnam_1.0.0_1779787557941_0.6101912162767615"},"_hasShrinkwrap":false}},"time":{"created":"2026-05-26T08:14:11.107Z","modified":"2026-05-26T09:25:58.388Z","0.0.0":"2026-05-26T08:14:11.349Z","1.0.0":"2026-05-26T09:25:58.077Z"},"license":"Apache-2.0 OR MIT","maintainers":[{"name":"achingbrain","email":"alex@achingbrain.net"}],"readme":"# birnam\n\n[![codecov](https://img.shields.io/codecov/c/github/achingbrain/birnam.svg?style=flat-square)](https://codecov.io/gh/achingbrain/birnam)\n[![CI](https://img.shields.io/github/actions/workflow/status/achingbrain/birnam/js-test-and-release.yml?branch=main\\&style=flat-square)](https://github.com/achingbrain/birnam/actions/workflows/js-test-and-release.yml?query=branch%3Amain)\n\n> Component-based logging for interplanetary applications\n\n# About\n\n<!--\n\n!IMPORTANT!\n\nEverything in this README between \"# About\" and \"# Install\" is automatically\ngenerated and will be overwritten the next time the doc generator is run.\n\nTo make changes to this section, please update the @packageDocumentation section\nof src/index.js or src/index.ts\n\nTo experiment with formatting, please run \"npm run docs\" from the root of this\nrepo and examine the changes made.\n\n-->\n\nA logger based on [weald](https://www.npmjs.com/package/weald) that contains custom formatters binary data in common multibase formats - base58btc, base32, base36 and base64 - all other logged objects ([CID](https://docs.ipfs.tech/concepts/content-addressing/)s, [Multiaddrs](https://multiformats.io/multiaddr/), etc) should contain a suitable `toString()` method.\n\n## Example\n\n```TypeScript\nimport { logger } from 'birnam'\n\nconst log = logger('helia:my:component:name')\n\ntry {\n  // an operation\n  log('something happened: %s', 'it was ok')\n} catch (err) {\n  log.error('something bad happened: %e', err)\n}\n\nlog('with this peer: %s', {\n  toString () {\n    return '12D3Foo'\n  }\n})\nlog('and this base58btc: %z', Uint8Array.from([0, 1, 2, 3]))\nlog('and this base32: %b', Uint8Array.from([4, 5, 6, 7]))\n```\n\n```console\n$ DEBUG=helia:* node index.js\nsomething happened: it was ok\nsomething bad happened: <stack trace>\nwith this peer: 12D3Foo\nwith this base58btc: zQmfoo\nwith this base32: bafyfoo\n```\n\n## What's in a name?\n\nGreat Birnam Wood is referenced in Shakespeare's [Scottish play](https://en.wikipedia.org/wiki/The_Scottish_Play)\nas part of the prophecy told by the three witches. The woods themselves have\nlargely been cut down since, and the trees (presumably) turned into logs.\n\n# Install\n\n```console\n$ npm i birnam\n```\n\n## Browser `<script>` tag\n\nLoading this module through a script tag will make its exports available as `Birnam` in the global namespace.\n\n```html\n<script src=\"https://unpkg.com/birnam/dist/index.min.js\"></script>\n```\n\n# API Docs\n\n- <https://achingbrain.github.io/birnam>\n\n# License\n\nLicensed under either of\n\n- Apache 2.0, ([LICENSE-APACHE](https://github.com/achingbrain/birnam/LICENSE-APACHE) / <http://www.apache.org/licenses/LICENSE-2.0>)\n- MIT ([LICENSE-MIT](https://github.com/achingbrain/birnam/LICENSE-MIT) / <http://opensource.org/licenses/MIT>)\n\n# Contribution\n\nUnless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.\n","readmeFilename":"README.md","description":"Component-based logging for interplanetary applications","homepage":"https://github.com/achingbrain/birnam#readme","repository":{"type":"git","url":"git+https://github.com/achingbrain/birnam.git"},"bugs":{"url":"https://github.com/achingbrain/birnam/issues"}}