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

@atcute/car

Package Overview
Dependencies
Maintainers
0
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.0.1 to 1.1.0

4

dist/atproto-repo.d.ts

@@ -10,4 +10,6 @@ import * as CBOR from '@atcute/cbor';

}
export declare function iterateAtpCar(buf: Uint8Array): Generator<RepoEntry>;
export declare function iterateAtpRepo(buf: Uint8Array): Generator<RepoEntry>;
/** @deprecated Use `iterateAtpRepo` instead */
export declare const iterateAtpCar: typeof iterateAtpRepo;
type BlockMap = Map<string, Uint8Array>;
export {};

@@ -20,3 +20,3 @@ import * as CBOR from '@atcute/cbor';

}
export function* iterateAtpCar(buf) {
export function* iterateAtpRepo(buf) {
const { roots, iterate } = fromUint8Array(new Uint8Array(buf));

@@ -36,2 +36,4 @@ assert(roots.length === 1, `expected only 1 root in the car archive; got=${roots.length}`);

}
/** @deprecated Use `iterateAtpRepo` instead */
export const iterateAtpCar = iterateAtpRepo;
function readObject(map, link) {

@@ -38,0 +40,0 @@ const cid = link.$link;

@@ -1,2 +0,2 @@

export { iterateAtpCar, type RepoEntry } from './atproto-repo.js';
export { fromUint8Array } from './reader.js';
export { iterateAtpCar, iterateAtpRepo, type RepoEntry } from './atproto-repo.js';
export { fromUint8Array, readCar } from './reader.js';

@@ -1,3 +0,3 @@

export { iterateAtpCar } from './atproto-repo.js';
export { fromUint8Array } from './reader.js';
export { iterateAtpCar, iterateAtpRepo } from './atproto-repo.js';
export { fromUint8Array, readCar } from './reader.js';
//# sourceMappingURL=index.js.map

@@ -0,1 +1,9 @@

export declare const readCar: (buffer: Uint8Array) => {
roots: import("@atcute/cbor").CIDLink[];
iterate(): Generator<{
cid: import("@atcute/cid").CID;
bytes: Uint8Array;
}>;
};
/** @deprecated Use `readCar` instead */
export declare const fromUint8Array: (buffer: Uint8Array) => {

@@ -2,0 +10,0 @@ roots: import("@atcute/cbor").CIDLink[];

import { createUint8Reader } from './utilities/byte-reader.js';
import { createCarReader } from './utilities/sync-car-reader.js';
export const fromUint8Array = (buffer) => {
export const readCar = (buffer) => {
const reader = createUint8Reader(buffer);
return createCarReader(reader);
};
/** @deprecated Use `readCar` instead */
export const fromUint8Array = readCar;
//# sourceMappingURL=reader.js.map
{
"type": "module",
"name": "@atcute/car",
"version": "1.0.1",
"version": "1.1.0",
"description": "read AT Protocol's CAR (content-addressable archive) repositories",

@@ -21,5 +21,5 @@ "license": "MIT",

"dependencies": {
"@atcute/cbor": "^1.0.2",
"@atcute/cid": "^1.0.1",
"@atcute/varint": "^1.0.0",
"@atcute/cbor": "^1.0.2"
"@atcute/varint": "^1.0.0"
},

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

@@ -6,5 +6,5 @@ # @atcute/car

```ts
for (const { collection, rkey, record } of iterateAtpCar(buf)) {
for (const { collection, rkey, record } of iterateAtpRepo(buf)) {
// ...
}
```

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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