@atcute/car 3.1.1 → 3.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/LICENSE CHANGED
@@ -1,17 +1,14 @@
1
- Permission is hereby granted, free of charge, to any person obtaining a copy
2
- of this software and associated documentation files (the "Software"), to deal
3
- in the Software without restriction, including without limitation the rights
4
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
5
- copies of the Software, and to permit persons to whom the Software is
6
- furnished to do so, subject to the following conditions:
1
+ BSD Zero Clause License
7
2
 
8
- The above copyright notice and this permission notice shall be included in all
9
- copies or substantial portions of the Software.
3
+ Copyright (c) 2025 Mary
10
4
 
11
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
12
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
13
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
14
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
15
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
16
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
17
- SOFTWARE.
5
+ Permission to use, copy, modify, and/or distribute this software for any
6
+ purpose with or without fee is hereby granted.
7
+
8
+ THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
9
+ REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
10
+ AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
11
+ INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
12
+ LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
13
+ OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
14
+ PERFORMANCE OF THIS SOFTWARE.
@@ -1 +1,2 @@
1
1
  export { collectBlock, isCommit, isMstNode, isTreeEntry, fromUint8Array as iterateAtpRepo, readBlock, RepoEntry, walkMstEntries, type BlockMap, type Commit, type MstNode, type NodeEntry, type TreeEntry, } from '../v4/repo-reader/index.js';
2
+ //# sourceMappingURL=atproto-repo.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"atproto-repo.d.ts","sourceRoot":"","sources":["../../lib/v3/atproto-repo.ts"],"names":[],"mappings":"AAAA,OAAO,EACN,YAAY,EACZ,QAAQ,EACR,SAAS,EACT,WAAW,EACX,cAAc,IAAI,cAAc,EAChC,SAAS,EACT,SAAS,EACT,cAAc,EACd,KAAK,QAAQ,EACb,KAAK,MAAM,EACX,KAAK,OAAO,EACZ,KAAK,SAAS,EACd,KAAK,SAAS,GACd,MAAM,4BAA4B,CAAC"}
@@ -1,2 +1,3 @@
1
1
  export * from './atproto-repo.js';
2
2
  export * from './reader.js';
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../lib/v3/index.ts"],"names":[],"mappings":"AAAA,cAAc,mBAAmB,CAAC;AAClC,cAAc,aAAa,CAAC"}
@@ -1 +1,2 @@
1
1
  export { isCarV1Header, fromUint8Array as readCar, type CarEntry, type CarHeader, type CarV1Header, type StreamedCarReader, type SyncCarReader, } from '../v4/car-reader/index.js';
2
+ //# sourceMappingURL=reader.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"reader.d.ts","sourceRoot":"","sources":["../../lib/v3/reader.ts"],"names":[],"mappings":"AAAA,OAAO,EACN,aAAa,EACb,cAAc,IAAI,OAAO,EACzB,KAAK,QAAQ,EACb,KAAK,SAAS,EACd,KAAK,WAAW,EAChB,KAAK,iBAAiB,EACtB,KAAK,aAAa,GAClB,MAAM,2BAA2B,CAAC"}
@@ -1,3 +1,4 @@
1
1
  export * from './types.js';
2
2
  export * from './stream-car-reader.js';
3
3
  export * from './sync-car-reader.js';
4
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../lib/v4/car-reader/index.ts"],"names":[],"mappings":"AAAA,cAAc,YAAY,CAAC;AAE3B,cAAc,wBAAwB,CAAC;AACvC,cAAc,sBAAsB,CAAC"}
@@ -9,3 +9,4 @@ export interface StreamedCarReader {
9
9
  }
10
10
  export declare const carEntryTransform: () => ReadableWritablePair<CarEntry, Uint8Array>;
11
11
  export declare const fromStream: (stream: ReadableStream<Uint8Array>) => StreamedCarReader;
12
+ //# sourceMappingURL=stream-car-reader.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"stream-car-reader.d.ts","sourceRoot":"","sources":["../../../lib/v4/car-reader/stream-car-reader.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,IAAI,MAAM,cAAc,CAAC;AAIrC,OAAO,EAAiB,KAAK,QAAQ,EAAE,KAAK,SAAS,EAAE,MAAM,YAAY,CAAC;AAE1E,MAAM,WAAW,iBAAiB;IACjC,MAAM,IAAI,OAAO,CAAC,SAAS,CAAC,CAAC;IAC7B,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC,OAAO,EAAE,CAAC,CAAC;IAEjC,OAAO,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;IAEzB,CAAC,MAAM,CAAC,YAAY,CAAC,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;IACvC,CAAC,MAAM,CAAC,aAAa,CAAC,IAAI,aAAa,CAAC,QAAQ,CAAC,CAAC;CAClD;AAED,eAAO,MAAM,iBAAiB,QAAO,oBAAoB,CAAC,QAAQ,EAAE,UAAU,CA6B7E,CAAC;AAEF,eAAO,MAAM,UAAU,GAAI,QAAQ,cAAc,CAAC,UAAU,CAAC,KAAG,iBAgM/D,CAAC"}
@@ -8,3 +8,4 @@ export interface SyncCarReader {
8
8
  [Symbol.iterator](): Iterator<CarEntry>;
9
9
  }
10
10
  export declare const fromUint8Array: (buffer: Uint8Array) => SyncCarReader;
11
+ //# sourceMappingURL=sync-car-reader.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sync-car-reader.d.ts","sourceRoot":"","sources":["../../../lib/v4/car-reader/sync-car-reader.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,IAAI,MAAM,cAAc,CAAC;AAIrC,OAAO,EAAiB,KAAK,QAAQ,EAAE,KAAK,SAAS,EAAE,MAAM,YAAY,CAAC;AAS1E,MAAM,WAAW,aAAa;IAC7B,QAAQ,CAAC,MAAM,EAAE,SAAS,CAAC;IAC3B,QAAQ,CAAC,KAAK,EAAE,IAAI,CAAC,OAAO,EAAE,CAAC;IAE/B,oDAAoD;IACpD,OAAO,IAAI,SAAS,CAAC,QAAQ,CAAC,CAAC;IAC/B,CAAC,MAAM,CAAC,QAAQ,CAAC,IAAI,QAAQ,CAAC,QAAQ,CAAC,CAAC;CACxC;AAED,eAAO,MAAM,cAAc,GAAI,QAAQ,UAAU,KAAG,aA0CnD,CAAC"}
@@ -21,3 +21,4 @@ export interface CarEntry {
21
21
  bytesStart: number;
22
22
  bytesEnd: number;
23
23
  }
24
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../lib/v4/car-reader/types.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,GAAG,MAAM,aAAa,CAAC;AAEnC,MAAM,WAAW,WAAW;IAC3B,OAAO,EAAE,CAAC,CAAC;IACX,KAAK,EAAE,GAAG,CAAC,OAAO,EAAE,CAAC;CACrB;AAED,eAAO,MAAM,aAAa,GAAI,OAAO,OAAO,KAAG,KAAK,IAAI,WAOvD,CAAC;AAEF,MAAM,WAAW,SAAS;IACzB,WAAW,EAAE,MAAM,CAAC;IACpB,SAAS,EAAE,MAAM,CAAC;IAElB,IAAI,EAAE,WAAW,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;IAClB,OAAO,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,WAAW,QAAQ;IACxB,UAAU,EAAE,MAAM,CAAC;IACnB,QAAQ,EAAE,MAAM,CAAC;IAEjB,GAAG,EAAE,GAAG,CAAC,GAAG,CAAC;IACb,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,EAAE,MAAM,CAAC;IAEf,KAAK,EAAE,UAAU,CAAC;IAClB,UAAU,EAAE,MAAM,CAAC;IACnB,QAAQ,EAAE,MAAM,CAAC;CACjB"}
@@ -1,2 +1,3 @@
1
1
  export * as CarReader from './car-reader/index.js';
2
2
  export * as RepoReader from './repo-reader/index.js';
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../lib/v4/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,SAAS,MAAM,uBAAuB,CAAC;AACnD,OAAO,KAAK,UAAU,MAAM,wBAAwB,CAAC"}
@@ -3,3 +3,4 @@ export * from './mst.js';
3
3
  export * from './stream-repo-reader.js';
4
4
  export * from './sync-blockmap.js';
5
5
  export * from './sync-repo-reader.js';
6
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../lib/v4/repo-reader/index.ts"],"names":[],"mappings":"AAAA,cAAc,YAAY,CAAC;AAE3B,cAAc,UAAU,CAAC;AACzB,cAAc,yBAAyB,CAAC;AACxC,cAAc,oBAAoB,CAAC;AACnC,cAAc,uBAAuB,CAAC"}
@@ -45,3 +45,4 @@ export interface MstNode {
45
45
  * @returns true if the value is a valid mst node object, false otherwise
46
46
  */
47
47
  export declare const isMstNode: (value: unknown) => value is MstNode;
48
+ //# sourceMappingURL=mst.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"mst.d.ts","sourceRoot":"","sources":["../../../lib/v4/repo-reader/mst.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,IAAI,MAAM,cAAc,CAAC;AACrC,OAAO,KAAK,GAAG,MAAM,aAAa,CAAC;AA0BnC,oBAAoB;AACpB,MAAM,WAAW,MAAM;IACtB,OAAO,EAAE,CAAC,CAAC;IACX,GAAG,EAAE,MAAM,CAAC;IACZ,IAAI,EAAE,GAAG,CAAC,OAAO,CAAC;IAClB,GAAG,EAAE,MAAM,CAAC;IACZ,IAAI,EAAE,GAAG,CAAC,OAAO,GAAG,IAAI,CAAC;IACzB,GAAG,EAAE,IAAI,CAAC,KAAK,CAAC;CAChB;AAED;;;;GAIG;AACH,eAAO,MAAM,QAAQ,GAAI,OAAO,OAAO,KAAG,KAAK,IAAI,MAelD,CAAC;AAEF,4BAA4B;AAC5B,MAAM,WAAW,SAAS;IACzB,0EAA0E;IAC1E,CAAC,EAAE,MAAM,CAAC;IACV,+EAA+E;IAC/E,CAAC,EAAE,IAAI,CAAC,KAAK,CAAC;IACd,6KAA6K;IAC7K,CAAC,EAAE,GAAG,CAAC,OAAO,CAAC;IACf,0CAA0C;IAC1C,CAAC,EAAE,GAAG,CAAC,OAAO,GAAG,IAAI,CAAC;CACtB;AAED;;;;GAIG;AACH,eAAO,MAAM,WAAW,GAAI,OAAO,OAAO,KAAG,KAAK,IAAI,SAUrD,CAAC;AAEF,sBAAsB;AACtB,MAAM,WAAW,OAAO;IACvB,gGAAgG;IAChG,CAAC,EAAE,GAAG,CAAC,OAAO,GAAG,IAAI,CAAC;IACtB,wCAAwC;IACxC,CAAC,EAAE,SAAS,EAAE,CAAC;CACf;AAED;;;;GAIG;AACH,eAAO,MAAM,SAAS,GAAI,OAAO,OAAO,KAAG,KAAK,IAAI,OAQnD,CAAC"}
@@ -22,3 +22,4 @@ export interface StreamedRepoReader {
22
22
  }
23
23
  export declare const repoEntryTransform: () => ReadableWritablePair<RepoEntry, Uint8Array>;
24
24
  export declare const fromStream: (stream: ReadableStream<Uint8Array>) => StreamedRepoReader;
25
+ //# sourceMappingURL=stream-repo-reader.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"stream-repo-reader.d.ts","sourceRoot":"","sources":["../../../lib/v4/repo-reader/stream-repo-reader.ts"],"names":[],"mappings":"AAUA,OAAO,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AAUvC,MAAM,MAAM,iBAAiB,GAC1B;IACA,GAAG,EAAE,MAAM,CAAC;IACZ,IAAI,EAAE,QAAQ,CAAC;IACf,GAAG,EAAE,MAAM,CAAC;CACX,GACD;IACA,GAAG,EAAE,MAAM,CAAC;IACZ,IAAI,EAAE,UAAU,CAAC;CAChB,GACD;IACA,GAAG,EAAE,MAAM,CAAC;IACZ,IAAI,EAAE,QAAQ,CAAC;CACd,CAAC;AAEL,MAAM,WAAW,kBAAkB;IAClC;;;OAGG;IACH,QAAQ,CAAC,aAAa,EAAE,SAAS,iBAAiB,EAAE,CAAC;IAErD,OAAO,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;IAEzB,CAAC,MAAM,CAAC,YAAY,CAAC,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;IACvC,CAAC,MAAM,CAAC,aAAa,CAAC,IAAI,aAAa,CAAC,SAAS,CAAC,CAAC;CACnD;AAED,eAAO,MAAM,kBAAkB,QAAO,oBAAoB,CAAC,SAAS,EAAE,UAAU,CA6B/E,CAAC;AAEF,eAAO,MAAM,UAAU,GAAI,QAAQ,cAAc,CAAC,UAAU,CAAC,KAAG,kBAiI/D,CAAC"}
@@ -27,3 +27,4 @@ export interface NodeEntry {
27
27
  * @returns a generator that yields the entries of the MST
28
28
  */
29
29
  export declare function walkMstEntries(map: BlockMap, pointer: CID.CidLink): Generator<NodeEntry>;
30
+ //# sourceMappingURL=sync-blockmap.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sync-blockmap.d.ts","sourceRoot":"","sources":["../../../lib/v4/repo-reader/sync-blockmap.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,GAAG,MAAM,aAAa,CAAC;AAGnC,OAAO,KAAK,SAAS,MAAM,wBAAwB,CAAC;AAKpD,MAAM,MAAM,QAAQ,GAAG,GAAG,CAAC,MAAM,EAAE,SAAS,CAAC,QAAQ,CAAC,CAAC;AAEvD;;;;GAIG;AACH,eAAO,MAAM,YAAY,GAAI,UAAU,QAAQ,CAAC,SAAS,CAAC,QAAQ,CAAC,KAAG,QAOrE,CAAC;AAEF;;;;;;GAMG;AACH,eAAO,MAAM,SAAS,GAAI,CAAC,EAC1B,KAAK,QAAQ,EACb,MAAM,GAAG,CAAC,OAAO,EACjB,UAAU,CAAC,KAAK,EAAE,OAAO,KAAK,KAAK,IAAI,CAAC,KACtC,CAUF,CAAC;AAEF,wBAAwB;AACxB,MAAM,WAAW,SAAS;IACzB,GAAG,EAAE,MAAM,CAAC;IACZ,GAAG,EAAE,GAAG,CAAC,OAAO,CAAC;CACjB;AAED;;;;;GAKG;AACH,wBAAiB,cAAc,CAAC,GAAG,EAAE,QAAQ,EAAE,OAAO,EAAE,GAAG,CAAC,OAAO,GAAG,SAAS,CAAC,SAAS,CAAC,CAwBzF"}
@@ -1,2 +1,3 @@
1
1
  import { RepoEntry } from './types.js';
2
2
  export declare function fromUint8Array(buf: Uint8Array): Generator<RepoEntry>;
3
+ //# sourceMappingURL=sync-repo-reader.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sync-repo-reader.d.ts","sourceRoot":"","sources":["../../../lib/v4/repo-reader/sync-repo-reader.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AAEvC,wBAAiB,cAAc,CAAC,GAAG,EAAE,UAAU,GAAG,SAAS,CAAC,SAAS,CAAC,CAmBrE"}
@@ -18,3 +18,4 @@ export declare class RepoEntry {
18
18
  */
19
19
  get record(): unknown;
20
20
  }
21
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../lib/v4/repo-reader/types.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,GAAG,MAAM,aAAa,CAAC;AAEnC,OAAO,EAAE,KAAK,QAAQ,EAAE,MAAM,wBAAwB,CAAC;AAEvD,qBAAa,SAAS;IAGpB,4CAA4C;aAC5B,UAAU,EAAE,MAAM;IAClC,iBAAiB;aACD,IAAI,EAAE,MAAM;IAC5B,yBAAyB;aACT,GAAG,EAAE,GAAG,CAAC,OAAO;IAChC,8CAA8C;aAC9B,QAAQ,EAAE,QAAQ;IAGnC;;OAEG;IACH,IAAI,KAAK,IAAI,UAAU,CAEtB;IAED;;OAEG;IACH,IAAI,MAAM,IAAI,OAAO,CAEpB;CACD"}
@@ -1,3 +1,4 @@
1
1
  export declare const assert: {
2
2
  (condition: boolean, message: string): asserts condition;
3
3
  };
4
+ //# sourceMappingURL=utils.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../lib/v4/utils.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,MAAM,EAAE;IACpB,CAAC,SAAS,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,SAAS,CAAC;CAKzD,CAAC"}
package/package.json CHANGED
@@ -1,14 +1,14 @@
1
1
  {
2
2
  "type": "module",
3
3
  "name": "@atcute/car",
4
- "version": "3.1.1",
4
+ "version": "3.1.2",
5
5
  "description": "lightweight DASL CAR and atproto repository decoder for AT Protocol.",
6
6
  "keywords": [
7
7
  "atproto",
8
8
  "dasl",
9
9
  "car"
10
10
  ],
11
- "license": "MIT",
11
+ "license": "0BSD",
12
12
  "repository": {
13
13
  "url": "https://github.com/mary-ext/atcute",
14
14
  "directory": "packages/utilities/car"
@@ -27,15 +27,15 @@
27
27
  },
28
28
  "sideEffects": false,
29
29
  "devDependencies": {
30
- "@types/bun": "^1.2.13",
31
- "@atcute/multibase": "^1.1.4"
30
+ "@types/bun": "^1.2.21",
31
+ "@atcute/multibase": "^1.1.6"
32
32
  },
33
33
  "dependencies": {
34
34
  "yocto-queue": "^1.2.1",
35
- "@atcute/cbor": "^2.2.4",
36
- "@atcute/cid": "^2.2.3",
37
- "@atcute/uint8array": "^1.0.2",
38
- "@atcute/varint": "^1.0.2"
35
+ "@atcute/cbor": "^2.2.6",
36
+ "@atcute/cid": "^2.2.4",
37
+ "@atcute/uint8array": "^1.0.5",
38
+ "@atcute/varint": "^1.0.3"
39
39
  },
40
40
  "scripts": {
41
41
  "build": "tsc --project tsconfig.build.json",