{"_id":"@anylist-napi/anylist-napi","name":"@anylist-napi/anylist-napi","dist-tags":{"latest":"1.1.1"},"versions":{"1.1.1":{"name":"@anylist-napi/anylist-napi","version":"1.1.1","description":"Typescript bindings for anylist_rs","keywords":["N-API","NAPI","Rust","napi-rs","node-addon","node-addon-api"],"license":"MIT","repository":{"type":"git","url":"git+ssh://git@github.com/phildenhoff/anylist-napi.git"},"type":"module","main":"index.js","types":"index.d.ts","exports":{".":{"types":"./index.d.ts","import":"./index.js"}},"publishConfig":{"access":"public","registry":"https://registry.npmjs.org/"},"scripts":{"artifacts":"napi artifacts","bench":"vitest bench --run","build":"napi build --platform --release --esm","build:debug":"napi build --platform --esm","postbuild":"oxfmt","format":"bun run format:ts & bun run format:rs & wait","format:ts":"oxfmt","format:rs":"cargo fmt","lint":"oxlint --ignore-pattern 'examples/**'","prepublishOnly":"napi prepublish -t npm","test":"vitest run","test:watch":"vitest","test:coverage":"vitest run --coverage","preversion":"napi build --platform --esm && git add .","version":"napi version"},"devDependencies":{"@napi-rs/cli":"^3.2.0","@types/node":"^25.0.9","chalk":"^5.6.2","oxfmt":"^0.26.0","oxlint":"^1.14.0","typescript":"^5.9.2","vitest":"^4.0.17"},"napi":{"binaryName":"anylist-napi","targets":["x86_64-pc-windows-msvc","x86_64-apple-darwin","x86_64-unknown-linux-gnu","x86_64-unknown-linux-musl","aarch64-apple-darwin","aarch64-unknown-linux-gnu"]},"engines":{"node":">= 12.22.0 < 13 || >= 14.17.0 < 15 || >= 15.12.0 < 16 || >= 16.0.0"},"optionalDependencies":{"@anylist-napi/anylist-napi-win32-x64-msvc":"1.1.1","@anylist-napi/anylist-napi-darwin-x64":"1.1.1","@anylist-napi/anylist-napi-linux-x64-gnu":"1.1.1","@anylist-napi/anylist-napi-linux-x64-musl":"1.1.1","@anylist-napi/anylist-napi-darwin-arm64":"1.1.1","@anylist-napi/anylist-napi-linux-arm64-gnu":"1.1.1"},"gitHead":"860f50e4b54fea5376310d24a28c465992ea83d7","_id":"@anylist-napi/anylist-napi@1.1.1","bugs":{"url":"https://github.com/phildenhoff/anylist-napi/issues"},"homepage":"https://github.com/phildenhoff/anylist-napi#readme","_nodeVersion":"24.13.0","_npmVersion":"11.6.2","dist":{"integrity":"sha512-2DCdibEpDwAYL1uCN+75uSKMgzS1w5QxeByDjVoLYrEFDMVFKRozOj43a1lrE+GD8xYyF+/ZCSO3Dyk74Wguiw==","shasum":"7d7ef2dba6b8e74f7275ab219ac1f853d94e6dd3","tarball":"https://registry.npmjs.org/@anylist-napi/anylist-napi/-/anylist-napi-1.1.1.tgz","fileCount":5,"unpackedSize":44576,"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@anylist-napi%2fanylist-napi@1.1.1","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQD+eTcSkpUoB4VTrI85nTbtUW0d2n0uRaTDhx1lavJOvAIgeD4pfr/485UQMdLt+Sf2Ee2GMgS3kdFrKB4T8FEHkOg="}]},"_npmUser":{"name":"phildenhoff","email":"tiny.bell0608@denhoff.ca"},"directories":{},"maintainers":[{"name":"phildenhoff","email":"tiny.bell0608@denhoff.ca"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/anylist-napi_1.1.1_1769760071213_0.9033838935843956"},"_hasShrinkwrap":false}},"time":{"created":"2026-01-30T08:01:11.088Z","1.1.1":"2026-01-30T08:01:11.438Z","modified":"2026-01-30T08:01:11.888Z"},"maintainers":[{"name":"phildenhoff","email":"tiny.bell0608@denhoff.ca"}],"description":"Typescript bindings for anylist_rs","homepage":"https://github.com/phildenhoff/anylist-napi#readme","keywords":["N-API","NAPI","Rust","napi-rs","node-addon","node-addon-api"],"repository":{"type":"git","url":"git+ssh://git@github.com/phildenhoff/anylist-napi.git"},"bugs":{"url":"https://github.com/phildenhoff/anylist-napi/issues"},"license":"MIT","readme":"# anylist-napi\n\nTypeScript/JavaScript bindings for [anylist_rs](https://github.com/phildenhoff/anylist_rs) using [NAPI](https://napi.rs).\n\n## Installation\n\n```bash\npnpm add anylist-napi\n# or\nbun add anylist-napi\n```\n\n## Runtime Support\n\nThis package targets multiple JavaScript runtimes:\n\n- **Node.js** v20+ (primary target, fully tested)\n- **Deno** v2+ (officially supported, CI tested)\n- **Bun** (NAPI support is experimental, not tested)\n\n## Usage\n\nSee [examples/](./examples/) for more.\n\n```typescript\nimport { AnyListClient } from \"anylist-napi\";\n\nasync function main() {\n  const email = process.env.ANYLIST_EMAIL;\n  const password = process.env.ANYLIST_PASSWORD;\n\n  if (!email || !password) {\n    throw new Error(\"Email and password must be provided\");\n  }\n\n  // Authenticate\n  const client = await AnyListClient.login(email, password);\n\n  console.log(\"Creating a new list...\");\n  const list = await client.createList(\"Weekend Shopping\");\n\n  console.log(\"Adding some items...\");\n  await client.addItem(list.id, \"Bread\");\n  await client.addItem(list.id, \"Eggs\");\n  await client.addItemWithDetails(list.id, \"Chicken\", \"2 lbs\", null, \"Meat\");\n\n  console.log(\"Listing all items from all lists...\");\n  const allLists = await client.getLists();\n  for (const l of allLists) {\n    console.log(`\\n${l.name}:`);\n    for (const item of l.items) {\n      const status = item.checked ? \"✓\" : \" \";\n      console.log(`  [${status}] ${item.name} ${item.quantity || \"\"}`);\n    }\n  }\n\n  // Save tokens for next time\n  const tokens = client.getTokens();\n  // Store tokens securely...\n}\n\nmain().catch(console.error);\n```\n\n## Development\n\n### Prerequisites\n\n- **Rust** (latest stable) - for building native bindings\n- **Node.js 20+** OR **Deno 2+** - runtime for testing\n- **Bun** (optional, recommended) - for development tooling\n\n### Common Commands\n\n| Task              | Command                                            | Description                                                  |\n| ----------------- | -------------------------------------------------- | ------------------------------------------------------------ |\n| **Setup**         | `bun install`                                      | Install dependencies (or use `npm install` / `yarn install`) |\n| **Build**         | `bun run build`                                    | Release build                                                |\n|                   | `bun run build:debug`                              | Debug build                                                  |\n| **Test**          | `bun run test`                                     | Run tests (Node.js runtime)                                  |\n|                   | `bun run test:watch`                               | Watch mode                                                   |\n|                   | `deno run --allow-ffi --allow-read npm:vitest run` | Test on Deno                                                 |\n| **Benchmark**     | `bun run bench`                                    | Run performance benchmarks                                   |\n| **Lint & Format** | `bun run lint`                                     | Lint TypeScript with oxlint                                  |\n|                   | `bun run format`                                   | Format TypeScript and Rust code                              |\n\n### Integration tests\n\nYou can run the integration tests with a real Anylist account.\nEach run will create a new list, named with the current time.\n\n```sh\nANYLIST_EMAIL=<your email> ANYLIST_PASSWORD=<your password> bun run test\n```\n\n## Platform Support\n\nPre-built native binaries are available for:\n\n- macOS (Intel & Apple Silicon)\n- Windows x64\n- Linux GNU (x86_64)\n- Linux musl (x86_64)\n\n## Contributing\n\nContributions are welcome! Please ensure:\n\n1. Tests pass on Node.js (`bun run test`)\n2. Code is formatted (`bun run format`)\n3. Linting passes (`bun run lint`)\n4. Benchmarks still work (`bun run bench`)\n\n## License\n\nMIT\n","readmeFilename":"README.md","_rev":"1-bf38c721ef828041bc8a4f8f4d926292"}