{"_id":"@absolutejs/sync-pack-counters","_rev":"8-771cd4bed30044b3b3add7c4677c74cb","name":"@absolutejs/sync-pack-counters","dist-tags":{"latest":"0.2.0"},"versions":{"0.1.0":{"name":"@absolutejs/sync-pack-counters","version":"0.1.0","keywords":["absolutejs","sync","sync-pack","counters","stats","reactive"],"author":"Alex Kahn","license":"CC BY-NC 4.0","_id":"@absolutejs/sync-pack-counters@0.1.0","maintainers":[{"name":"alexkahndev","email":"alexkahn2019@gmail.com"}],"dist":{"shasum":"d85084cccb38338917bf9f2870a0706cb375fadb","tarball":"https://registry.npmjs.org/@absolutejs/sync-pack-counters/-/sync-pack-counters-0.1.0.tgz","fileCount":5,"integrity":"sha512-cNDI8NK73dL/U+9Szf/Rd1CXhHOSXNotsfgCH324rc1rqvP5fKJAUAlNDFDAK9yEE/eH+RxCV5PvzX5GMDhd3w==","signatures":[{"sig":"MEUCIQCrXRDra2vRF6yvN9J+WJHCm2o8rV3wZcDshq5r8V2StAIgdkjPd8OvWGeeoqJktftzQpxkKDehBx6CJeE1kiJ/JdI=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":16520},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","module":"./dist/index.js","shasum":"d85084cccb38338917bf9f2870a0706cb375fadb","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","default":"./dist/index.js"}},"scripts":{"test":"bun test","build":"rm -rf dist && bun build src/index.ts --outdir dist --sourcemap --target=bun --external @absolutejs/sync && tsc --project tsconfig.build.json","format":"prettier --write \"./**/*.{ts,json,md}\"","release":"bun run format && bun run typecheck && bun run test && bun run build && bun publish","typecheck":"tsc --noEmit"},"_npmUser":{"name":"alexkahndev","email":"alexkahn2019@gmail.com"},"_integrity":"sha512-cNDI8NK73dL/U+9Szf/Rd1CXhHOSXNotsfgCH324rc1rqvP5fKJAUAlNDFDAK9yEE/eH+RxCV5PvzX5GMDhd3w==","repository":{"url":"https://github.com/absolutejs/sync-packs.git","type":"git","directory":"counters"},"_npmVersion":"10.8.3","description":"Read-set-tracked live counters for @absolutejs/sync — define a compute function, get a reactive count derived from host tables","directories":{},"_nodeVersion":"24.3.0","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"prettier":"3.5.3","@types/bun":"1.3.14","typescript":"5.8.3","@absolutejs/sync":"^1.9.2"},"peerDependencies":{"@absolutejs/sync":">= 1.9.2"},"_npmOperationalInternal":{"tmp":"tmp/sync-pack-counters_0.1.0_1780011907193_0.40159192650208064","host":"s3://npm-registry-packages-npm-production"}},"0.1.1":{"name":"@absolutejs/sync-pack-counters","version":"0.1.1","keywords":["absolutejs","sync","sync-pack","counters","stats","reactive"],"author":"Alex Kahn","license":"Apache-2.0","_id":"@absolutejs/sync-pack-counters@0.1.1","maintainers":[{"name":"alexkahndev","email":"alexkahn2019@gmail.com"}],"dist":{"shasum":"f56d08221797f9c364f8eda27e2da528f7dcdbf0","tarball":"https://registry.npmjs.org/@absolutejs/sync-pack-counters/-/sync-pack-counters-0.1.1.tgz","fileCount":6,"integrity":"sha512-hBAFM8R75qb8axhEY88z1yBg6fENWy72AkbOhyg9PVI2cUEdI0ytFptyqhy2c884DD1t5Tf1VXDxVcnFroO84w==","signatures":[{"sig":"MEUCIQCp5WsY6ilRppGn9w6IFwKtXnH7jgLUh8wNs32hZzsyfAIgdTpRhO8zfYkYlRgyo0dQvyaCuu54EHMHT3PKsm71CZQ=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":27876},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","module":"./dist/index.js","shasum":"f56d08221797f9c364f8eda27e2da528f7dcdbf0","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","default":"./dist/index.js"}},"scripts":{"test":"bun test","build":"rm -rf dist && bun build src/index.ts --outdir dist --sourcemap --target=bun --external @absolutejs/sync && tsc --project tsconfig.build.json","format":"prettier --write \"./**/*.{ts,json,md}\"","release":"bun run format && bun run typecheck && bun run test && bun run build && bun publish","typecheck":"tsc --noEmit"},"_npmUser":{"name":"alexkahndev","email":"alexkahn2019@gmail.com"},"_integrity":"sha512-hBAFM8R75qb8axhEY88z1yBg6fENWy72AkbOhyg9PVI2cUEdI0ytFptyqhy2c884DD1t5Tf1VXDxVcnFroO84w==","repository":{"url":"https://github.com/absolutejs/sync-packs.git","type":"git","directory":"counters"},"_npmVersion":"10.8.3","description":"Read-set-tracked live counters for @absolutejs/sync — define a compute function, get a reactive count derived from host tables","directories":{},"_nodeVersion":"24.3.0","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"prettier":"3.5.3","@types/bun":"1.3.14","typescript":"5.8.3","@absolutejs/sync":"^1.9.2"},"peerDependencies":{"@absolutejs/sync":">= 1.9.2"},"_npmOperationalInternal":{"tmp":"tmp/sync-pack-counters_0.1.1_1780071440402_0.622784993708023","host":"s3://npm-registry-packages-npm-production"}},"0.1.2":{"name":"@absolutejs/sync-pack-counters","version":"0.1.2","keywords":["absolutejs","sync","sync-pack","counters","stats","reactive"],"author":"Alex Kahn","license":"Apache-2.0","_id":"@absolutejs/sync-pack-counters@0.1.2","maintainers":[{"name":"alexkahndev","email":"alexkahn2019@gmail.com"}],"dist":{"shasum":"ef1ca889dc2a9a9aee5657d7e584d9826baf5712","tarball":"https://registry.npmjs.org/@absolutejs/sync-pack-counters/-/sync-pack-counters-0.1.2.tgz","fileCount":6,"integrity":"sha512-sOvq+OGFzA/jnrMhE8zOqyqQkPEQnpB+0EIf5aSUxBCAVkdcy0bwjsA6+jWd1qvySdfJO/LvvwHRFKofalOHCA==","signatures":[{"sig":"MEQCIGzEKZsirX9YFLO4jyvxIlxmErkGOiHsu/zexjSSPw1uAiBgbbFbg5ixiUzXFJIqe/ramJJSFoujrUqWqjgbCazKLw==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":27876},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","module":"./dist/index.js","shasum":"ef1ca889dc2a9a9aee5657d7e584d9826baf5712","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","default":"./dist/index.js"}},"scripts":{"test":"bun test","build":"rm -rf dist && bun build src/index.ts --outdir dist --sourcemap --target=bun --external @absolutejs/sync && tsc --project tsconfig.build.json","format":"prettier --write \"./**/*.{ts,json,md}\"","release":"bun run format && bun run typecheck && bun run test && bun run build && bun publish","typecheck":"tsc --noEmit"},"_npmUser":{"name":"alexkahndev","email":"alexkahn2019@gmail.com"},"_integrity":"sha512-sOvq+OGFzA/jnrMhE8zOqyqQkPEQnpB+0EIf5aSUxBCAVkdcy0bwjsA6+jWd1qvySdfJO/LvvwHRFKofalOHCA==","repository":{"url":"https://github.com/absolutejs/sync-packs.git","type":"git","directory":"counters"},"_npmVersion":"10.8.3","description":"Read-set-tracked live counters for @absolutejs/sync — define a compute function, get a reactive count derived from host tables","directories":{},"_nodeVersion":"24.3.0","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"prettier":"3.5.3","@types/bun":"1.3.14","typescript":"5.8.3","@absolutejs/sync":"^1.9.2"},"peerDependencies":{"@absolutejs/sync":">= 1.9.2"},"_npmOperationalInternal":{"tmp":"tmp/sync-pack-counters_0.1.2_1780071570911_0.08583719315056704","host":"s3://npm-registry-packages-npm-production"}},"0.1.3":{"name":"@absolutejs/sync-pack-counters","version":"0.1.3","keywords":["absolutejs","sync","sync-pack","counters","stats","reactive"],"author":"Alex Kahn","license":"Apache-2.0","_id":"@absolutejs/sync-pack-counters@0.1.3","maintainers":[{"name":"alexkahndev","email":"alexkahn2019@gmail.com"}],"homepage":"https://github.com/absolutejs/sync-packs/tree/main/counters","bugs":{"url":"https://github.com/absolutejs/sync-packs/issues"},"dist":{"shasum":"eac4ba953cb52143e15ce3e0eabf9131ba1de04e","tarball":"https://registry.npmjs.org/@absolutejs/sync-pack-counters/-/sync-pack-counters-0.1.3.tgz","fileCount":10,"integrity":"sha512-lZOc0VU8Jx0rhaiEHGwCoQk+JFTxZSC5/CNWpjM8d/2QgUq7LpVDDYg1jtvk6G3QUlj+Tr6FURWsZKk+Jdy5bA==","signatures":[{"sig":"MEUCIATyHv80KsK4PcNIamMtG6/YUjAiN0F57ws+2+FXU20zAiEA5CdV0jgq2bJ8s3KlkJ8QQ8ZUo1JolAFG44F3/5KU7+s=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":1123118},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","module":"./dist/index.js","shasum":"eac4ba953cb52143e15ce3e0eabf9131ba1de04e","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","default":"./dist/index.js"},"./manifest":{"types":"./dist/manifest.d.ts","import":"./dist/manifest.js","default":"./dist/manifest.js"},"./manifest.json":"./dist/manifest.json"},"scripts":{"test":"bun test","build":"rm -rf dist && bun build src/index.ts src/manifest.ts --outdir dist --sourcemap --target=bun --external @absolutejs/sync && tsc --project tsconfig.build.json && absolute-manifest emit","format":"prettier --write \"./**/*.{ts,json,md}\"","release":"bun run format && bun run typecheck && bun run test && bun run build && bun publish","typecheck":"tsc --noEmit"},"_npmUser":{"name":"alexkahndev","email":"alexkahn2019@gmail.com"},"_integrity":"sha512-lZOc0VU8Jx0rhaiEHGwCoQk+JFTxZSC5/CNWpjM8d/2QgUq7LpVDDYg1jtvk6G3QUlj+Tr6FURWsZKk+Jdy5bA==","absolutejs":{"manifestContract":1},"repository":{"url":"https://github.com/absolutejs/sync-packs.git","type":"git","directory":"counters"},"_npmVersion":"10.8.3","description":"Read-set-tracked live counters for @absolutejs/sync — define a compute function, get a reactive count derived from host tables","directories":{},"_nodeVersion":"24.3.0","dependencies":{"@sinclair/typebox":"^0.34.0","@absolutejs/manifest":"^0.1.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"prettier":"3.5.3","@types/bun":"1.3.14","typescript":"5.8.3","@absolutejs/sync":"^1.9.2"},"peerDependencies":{"@absolutejs/sync":">= 1.9.2"},"_npmOperationalInternal":{"tmp":"tmp/sync-pack-counters_0.1.3_1783965469545_0.6431515654116726","host":"s3://npm-registry-packages-npm-production"}},"0.1.4":{"name":"@absolutejs/sync-pack-counters","version":"0.1.4","keywords":["absolutejs","sync","sync-pack","counters","stats","reactive"],"author":"Alex Kahn","license":"Apache-2.0","_id":"@absolutejs/sync-pack-counters@0.1.4","maintainers":[{"name":"alexkahndev","email":"alexkahn2019@gmail.com"}],"homepage":"https://github.com/absolutejs/sync-packs/tree/main/counters","bugs":{"url":"https://github.com/absolutejs/sync-packs/issues"},"dist":{"shasum":"5986010b6272c3d5126fb0779e6da64318ebc923","tarball":"https://registry.npmjs.org/@absolutejs/sync-pack-counters/-/sync-pack-counters-0.1.4.tgz","fileCount":10,"integrity":"sha512-af7GuDZLElmi3u5EQ7wyClH8GQIlMlBDNKUS33ICmjgKn2RGOIqX9XvxFaS4e6Zy/rbpRvE0qxwEiGYRIfOt9w==","signatures":[{"sig":"MEQCIEkO0+C3mA5CEW+TNf/H7ioHa+Qr7d0xB5R2AQxlJnvgAiBMyW7DHX1oCmM5RH/7e+s69QbVyCQaDFAByU39wNRifA==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":1144288},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","module":"./dist/index.js","shasum":"5986010b6272c3d5126fb0779e6da64318ebc923","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","default":"./dist/index.js"},"./manifest":{"types":"./dist/manifest.d.ts","import":"./dist/manifest.js","default":"./dist/manifest.js"},"./manifest.json":"./dist/manifest.json"},"scripts":{"test":"bun test","build":"rm -rf dist && bun build src/index.ts src/manifest.ts --outdir dist --sourcemap --target=bun --external @absolutejs/sync && tsc --project tsconfig.build.json && absolute-manifest emit","format":"prettier --write \"./**/*.{ts,json,md}\"","release":"bun run format && bun run typecheck && bun run test && bun run build && bun publish","typecheck":"tsc --noEmit"},"_npmUser":{"name":"alexkahndev","email":"alexkahn2019@gmail.com"},"_integrity":"sha512-af7GuDZLElmi3u5EQ7wyClH8GQIlMlBDNKUS33ICmjgKn2RGOIqX9XvxFaS4e6Zy/rbpRvE0qxwEiGYRIfOt9w==","absolutejs":{"manifestContract":2},"repository":{"url":"https://github.com/absolutejs/sync-packs.git","type":"git","directory":"counters"},"_npmVersion":"10.8.3","description":"Read-set-tracked live counters for @absolutejs/sync — define a compute function, get a reactive count derived from host tables","directories":{},"_nodeVersion":"24.3.0","dependencies":{"@sinclair/typebox":"^0.34.0","@absolutejs/manifest":"^0.4.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"prettier":"3.5.3","@types/bun":"1.3.14","typescript":"5.8.3","@absolutejs/sync":"^1.9.2"},"peerDependencies":{"@absolutejs/sync":">= 1.9.2"},"_npmOperationalInternal":{"tmp":"tmp/sync-pack-counters_0.1.4_1784846209938_0.31243779135468697","host":"s3://npm-registry-packages-npm-production"}},"0.1.5":{"name":"@absolutejs/sync-pack-counters","version":"0.1.5","keywords":["absolutejs","sync","sync-pack","counters","stats","reactive"],"author":"Alex Kahn","license":"Apache-2.0","_id":"@absolutejs/sync-pack-counters@0.1.5","maintainers":[{"name":"alexkahndev","email":"alexkahn2019@gmail.com"}],"homepage":"https://github.com/absolutejs/sync-packs/tree/main/counters","bugs":{"url":"https://github.com/absolutejs/sync-packs/issues"},"dist":{"shasum":"98537a504f87604798666641a8077a2506febcbc","tarball":"https://registry.npmjs.org/@absolutejs/sync-pack-counters/-/sync-pack-counters-0.1.5.tgz","fileCount":10,"integrity":"sha512-npUT3y3HzqOY6eCmdmvwInSlvcoTQUcIMvLzSBU82y1jIq5Jv0Lym2/trnp7nR4v8wB72ZcobJRNTpjawuckPA==","signatures":[{"sig":"MEYCIQCaYnVGp/hcFaUIDvZugfB5+mJEE5/djjj/EtQ9H11eWAIhAMXOQOf9lETymBL7UVVcSSlmvSoQE1WQd+Nq4WW0XEM8","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":486938},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","module":"./dist/index.js","shasum":"98537a504f87604798666641a8077a2506febcbc","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","default":"./dist/index.js"},"./manifest":{"types":"./dist/manifest.d.ts","import":"./dist/manifest.js","default":"./dist/manifest.js"},"./manifest.json":"./dist/manifest.json"},"scripts":{"test":"bun test","build":"rm -rf dist && bun build src/index.ts src/manifest.ts --outdir dist --sourcemap --target=bun --external @absolutejs/sync && tsc --project tsconfig.build.json && absolute-manifest emit","format":"prettier --write \"./**/*.{ts,json,md}\"","release":"bun run format && bun run typecheck && bun run test && bun run build && bun publish","typecheck":"tsc --noEmit"},"_npmUser":{"name":"alexkahndev","email":"alexkahn2019@gmail.com"},"_integrity":"sha512-npUT3y3HzqOY6eCmdmvwInSlvcoTQUcIMvLzSBU82y1jIq5Jv0Lym2/trnp7nR4v8wB72ZcobJRNTpjawuckPA==","absolutejs":{"runtimePeers":{"@absolutejs/sync":{"range":">=2.11.0 <3","tested":"2.11.0","buildExternals":["@absolutejs/sync"],"artifactImports":["@absolutejs/sync/engine"]}},"manifestContract":2},"repository":{"url":"https://github.com/absolutejs/sync-packs.git","type":"git","directory":"counters"},"_npmVersion":"10.8.3","description":"Read-set-tracked live counters for @absolutejs/sync — define a compute function, get a reactive count derived from host tables","directories":{},"_nodeVersion":"24.3.0","dependencies":{"@sinclair/typebox":"^0.34.0","@absolutejs/manifest":"^0.7.1"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"prettier":"3.5.3","@types/bun":"1.3.14","typescript":"5.8.3","@absolutejs/sync":"2.11.0"},"peerDependencies":{"@absolutejs/sync":">=2.11.0 <3"},"_npmOperationalInternal":{"tmp":"tmp/sync-pack-counters_0.1.5_1784913347287_0.6201140034365495","host":"s3://npm-registry-packages-npm-production"}},"0.1.6":{"name":"@absolutejs/sync-pack-counters","version":"0.1.6","keywords":["absolutejs","sync","sync-pack","counters","stats","reactive"],"author":{"name":"Alex Kahn"},"license":"Apache-2.0","_id":"@absolutejs/sync-pack-counters@0.1.6","maintainers":[{"name":"alexkahndev","email":"alexkahn2019@gmail.com"}],"homepage":"https://github.com/absolutejs/sync-packs/tree/main/counters","bugs":{"url":"https://github.com/absolutejs/sync-packs/issues"},"dist":{"shasum":"3fb9f63951fc0b680b240e4ad98508b651154f7d","tarball":"https://registry.npmjs.org/@absolutejs/sync-pack-counters/-/sync-pack-counters-0.1.6.tgz","fileCount":10,"integrity":"sha512-CYy2Ppkv3Y/FSoVt9FZzpLSLNyYAgVDCAd4M7TeJ4R8AhUSFIJKWs+Z5kFbmdXzQdI7dLlZgpUWzh8Hv8IvtRQ==","signatures":[{"sig":"MEQCIC4LfgIVPAppiUk3mNjCfcThV8XaYa+amzjNay5PKeDyAiAKEmArb9XYPwvpAtSZzHTR9xzZDoQ4HxzkvCKXUN++tw==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":494943},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","module":"./dist/index.js","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","default":"./dist/index.js"},"./manifest":{"types":"./dist/manifest.d.ts","import":"./dist/manifest.js","default":"./dist/manifest.js"},"./manifest.json":"./dist/manifest.json"},"gitHead":"ba7c2594b58ad9e1cd434195d96823ba678f2260","scripts":{"test":"bun test","build":"rm -rf dist && bun build src/index.ts src/manifest.ts --outdir dist --sourcemap --target=bun --external @absolutejs/sync && tsc --project tsconfig.build.json && absolute-manifest emit","format":"prettier --write \"./**/*.{ts,json,md}\"","release":"bun run format && bun run typecheck && bun run test && bun run build && bun publish","typecheck":"tsc --noEmit"},"_npmUser":{"name":"alexkahndev","email":"alexkahn2019@gmail.com"},"absolutejs":{"manifestContract":2},"repository":{"url":"git+https://github.com/absolutejs/sync-packs.git","type":"git","directory":"counters"},"_npmVersion":"10.9.2","description":"Read-set-tracked live counters for @absolutejs/sync — define a compute function, get a reactive count derived from host tables","directories":{},"_nodeVersion":"22.14.0","dependencies":{"@sinclair/typebox":"^0.34.0","@absolutejs/manifest":"^0.9.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"prettier":"3.5.3","@types/bun":"1.3.14","typescript":"5.8.3","@absolutejs/sync":"2.11.0"},"peerDependencies":{"@absolutejs/sync":">=2.11.0 <3"},"_npmOperationalInternal":{"tmp":"tmp/sync-pack-counters_0.1.6_1787720833015_0.9579361965347875","host":"s3://npm-registry-packages-npm-production"}},"0.2.0":{"name":"@absolutejs/sync-pack-counters","version":"0.2.0","description":"Read-set-tracked live counters for @absolutejs/sync — define a compute function, get a reactive count derived from host tables","repository":{"type":"git","url":"git+https://github.com/absolutejs/sync-packs.git","directory":"counters"},"homepage":"https://github.com/absolutejs/sync-packs/tree/main/counters","bugs":{"url":"https://github.com/absolutejs/sync-packs/issues"},"main":"./dist/index.js","module":"./dist/index.js","types":"./dist/index.d.ts","type":"module","license":"Apache-2.0","author":{"name":"Alex Kahn"},"publishConfig":{"access":"public"},"keywords":["absolutejs","sync","sync-pack","counters","stats","reactive"],"scripts":{"build":"rm -rf dist && bun build src/index.ts src/manifest.ts --outdir dist --sourcemap --target=bun --external @absolutejs/sync && tsc --project tsconfig.build.json && absolute-manifest emit","test":"bun test","typecheck":"tsc --noEmit","format":"prettier --write \"./**/*.{ts,json,md}\"","release":"bun run format && bun run typecheck && bun run test && bun run build && bun publish"},"peerDependencies":{"@absolutejs/sync":">=2.11.0 <3"},"devDependencies":{"@absolutejs/sync":"2.28.0","@types/bun":"1.3.14","prettier":"3.5.3","typescript":"5.8.3"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","default":"./dist/index.js"},"./manifest":{"types":"./dist/manifest.d.ts","import":"./dist/manifest.js","default":"./dist/manifest.js"},"./manifest.json":"./dist/manifest.json"},"absolutejs":{"manifestContract":2,"sync":{"localSchema":{"version":1,"localData":{"collections":[{"match":"*counter:*","sensitivity":"private","protection":"required","onProtectionUnavailable":"memory-only","evictionPriority":"disposable"}]}}}},"dependencies":{"@absolutejs/manifest":"^0.9.0","@sinclair/typebox":"^0.34.0"},"_id":"@absolutejs/sync-pack-counters@0.2.0","gitHead":"f6a9d1a741b1b3f39977cea64ba6931b3f2f61db","_nodeVersion":"22.14.0","_npmVersion":"10.9.2","dist":{"integrity":"sha512-Q3f3UAt5FAFOKeb7EPZslLqJNBRK0yJXV7Uhn+zJsnF9VbKLpEHugp68LRYZ8AORouV+eDyeQNgIq8Y6dcsMkw==","shasum":"f5fabb90c087b9e03eded48ab47a9bb97f90b02c","tarball":"https://registry.npmjs.org/@absolutejs/sync-pack-counters/-/sync-pack-counters-0.2.0.tgz","fileCount":10,"unpackedSize":495337,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCIAs9V4Agv5rAHK8yoqOsL6S4FDKj61kboHkk9hiS0D6oAiAJt+oTi20/XT6Pl5DmnP5FbQH/fOv6i3ikhk7lTANKZg=="}]},"_npmUser":{"name":"alexkahndev","email":"alexkahn2019@gmail.com"},"directories":{},"maintainers":[{"name":"alexkahndev","email":"alexkahn2019@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/sync-pack-counters_0.2.0_1787723198763_0.36931447891760705"},"_hasShrinkwrap":false}},"time":{"created":"2026-05-28T23:45:07.108Z","modified":"2026-08-26T05:46:39.125Z","0.1.0":"2026-05-28T23:45:07.396Z","0.1.1":"2026-05-29T16:17:20.560Z","0.1.2":"2026-05-29T16:19:31.050Z","0.1.3":"2026-07-13T17:57:49.736Z","0.1.4":"2026-07-23T22:36:50.090Z","0.1.5":"2026-07-24T17:15:47.455Z","0.1.6":"2026-08-26T05:07:13.187Z","0.2.0":"2026-08-26T05:46:38.949Z"},"bugs":{"url":"https://github.com/absolutejs/sync-packs/issues"},"author":{"name":"Alex Kahn"},"license":"Apache-2.0","homepage":"https://github.com/absolutejs/sync-packs/tree/main/counters","keywords":["absolutejs","sync","sync-pack","counters","stats","reactive"],"repository":{"type":"git","url":"git+https://github.com/absolutejs/sync-packs.git","directory":"counters"},"description":"Read-set-tracked live counters for @absolutejs/sync — define a compute function, get a reactive count derived from host tables","maintainers":[{"name":"alexkahndev","email":"alexkahn2019@gmail.com"}],"readme":"# @absolutejs/sync-pack-counters\n\nRead-set-tracked live counters for\n[`@absolutejs/sync`](https://github.com/absolutejs/sync). Define a compute\nfunction that reads through `db`; the engine re-runs and pushes the new\nvalue whenever any table the compute read changes. No manual invalidation,\nno polling, no operator graph — just a function.\n\n```bash\nbun add @absolutejs/sync-pack-counters\n```\n\n## Usage\n\n```ts\nimport { createSyncEngine } from '@absolutejs/sync/engine';\nimport { createCountersPack } from '@absolutejs/sync-pack-counters';\n\nconst engine = createSyncEngine();\nengine.registerReader('tasks',         { all: () => db.tasks.list() });\nengine.registerReader('notifications', { all: () => db.notifications.list() });\n\nengine.registerPack(\n\tcreateCountersPack({\n\t\tcounters: {\n\t\t\t// Bare function form.\n\t\t\topenTasks: async ({ db }) =>\n\t\t\t\t(await db.all<Task>('tasks')).filter((t) => !t.done).length,\n\n\t\t\t// Per-actor counter using ctx.\n\t\t\tunreadNotifications: async ({ db, ctx }) =>\n\t\t\t\t(await db.all<Notification>('notifications'))\n\t\t\t\t\t.filter((n) => n.actorId === ctx.userId && n.readAt === null)\n\t\t\t\t\t.length,\n\n\t\t\t// Object form when you need a per-counter authorize override —\n\t\t\t// e.g. a public site-wide stat anyone can subscribe to.\n\t\t\ttotalUsers: {\n\t\t\t\tauthorize: () => true,\n\t\t\t\tcompute: async ({ db }) => (await db.all('users')).length,\n\t\t\t},\n\t\t},\n\t}),\n);\n```\n\nEach counter becomes its own reactive query collection named\n`counter:<key>` returning a single row. Subscribe from the client:\n\n```ts\nuseSyncCollection<CounterRow>({ collection: 'counter:openTasks' });\n// Emits { id: 'openTasks', key: 'openTasks', value: 3, computedAt: ... }\n```\n\n## Why `defineReactiveQuery`?\n\nThe pack is one big use case for sync's read-set tracking: a counter is\nliterally \"compute a number from one or more tables, and re-emit it when\nthose tables change.\" The engine instruments every `db.all` / `db.get` /\n`db.where` your compute makes, records the resulting dependency set, and\nparks the query on it. Any subsequent change to a touched table triggers\na re-run; rows that didn't change don't.\n\nPrefer `db.where(table, predicate)` over `db.all(table).filter(...)`\nwhen possible — `where` records a **range** dependency that re-runs only\nwhen a change matches the predicate now or matched it before, instead of\non every change to the table.\n\n## Permissions\n\nThe default `authorize` requires the caller's ctx to expose an actor id\n(via `getActorId`, defaulting to `(ctx) => ctx.userId`). Per-counter\n`authorize` overrides this — return `() => true` for a public counter,\nor implement role-based gating.\n\n## What the pack ships\n\n| Surface              | Name                  | What it does                               |\n| -------------------- | --------------------- | ------------------------------------------ |\n| Reactive query (×N)  | `counter:<key>`       | One per counter; emits a single CounterRow |\n\nThe pack owns no tables and reads no tables of its own — every counter's\nread-set comes from the host's registered readers. `engine.inspect().packs[0]`\nreports empty `ownsTables` and `readsTables`.\n\n## Multiple instances\n\nPass `prefix` to coexist with another counters pack instance:\n\n```ts\nengine.registerPack(createCountersPack({ prefix: 'team_', counters: { ... } }));\nengine.registerPack(createCountersPack({ prefix: 'org_',  counters: { ... } }));\n// Collections: team_counter:<key> and org_counter:<key>\n```\n","readmeFilename":"README.md"}