Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@atcute/car

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@atcute/car - npm Package Compare versions

Comparing version 1.1.0 to 1.1.1

lib/atproto-repo.ts

4

dist/atproto-repo.js
import * as CBOR from '@atcute/cbor';
import * as CID from '@atcute/cid';
import { fromUint8Array } from './reader.js';
import { readCar } from './reader.js';
const decoder = new TextDecoder();

@@ -21,3 +21,3 @@ export class RepoEntry {

export function* iterateAtpRepo(buf) {
const { roots, iterate } = fromUint8Array(new Uint8Array(buf));
const { roots, iterate } = readCar(new Uint8Array(buf));
assert(roots.length === 1, `expected only 1 root in the car archive; got=${roots.length}`);

@@ -24,0 +24,0 @@ // Collect all archive entries into a mapping of CID string -> actual bytes

{
"type": "module",
"name": "@atcute/car",
"version": "1.1.0",
"version": "1.1.1",
"description": "read AT Protocol's CAR (content-addressable archive) repositories",
"license": "MIT",
"repository": {
"url": "https://codeberg.org/mary-ext/atcute"
"url": "https://github.com/mary-ext/atcute",
"directory": "packages/utilities/car"
},
"files": [
"dist/"
"dist/",
"lib/",
"!lib/**/*.bench.ts",
"!lib/**/*.test.ts"
],

@@ -18,8 +22,8 @@ "exports": {

"devDependencies": {
"@types/bun": "^1.1.10"
"@types/bun": "^1.1.12"
},
"dependencies": {
"@atcute/cbor": "^1.0.2",
"@atcute/cid": "^1.0.1",
"@atcute/varint": "^1.0.0"
"@atcute/cbor": "^1.0.6",
"@atcute/varint": "^1.0.1",
"@atcute/cid": "^1.0.2"
},

@@ -26,0 +30,0 @@ "scripts": {

# @atcute/car
read AT Protocol's CAR (content-addressable archive) repositories
CAR (content-addressable archvie) repository decoder
```ts
// convenient iterator for reading through an AT Protocol CAR repository
for (const { collection, rkey, record } of iterateAtpRepo(buf)) {
// ...
}
// read through a CAR archive
const { roots, iterate } = readCar(buf);
for (const { cid, bytes } of iterate()) {
// ...
}
```

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc