@atproto/common 0.0.0-spaces-alpha-20260818021221
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/CHANGELOG.md +439 -0
- package/LICENSE.txt +7 -0
- package/README.md +15 -0
- package/dist/buffers.d.ts +3 -0
- package/dist/buffers.d.ts.map +1 -0
- package/dist/buffers.js +10 -0
- package/dist/buffers.js.map +1 -0
- package/dist/car.d.ts +40 -0
- package/dist/car.d.ts.map +1 -0
- package/dist/car.js +267 -0
- package/dist/car.js.map +1 -0
- package/dist/dates.d.ts +2 -0
- package/dist/dates.d.ts.map +1 -0
- package/dist/dates.js +19 -0
- package/dist/dates.js.map +1 -0
- package/dist/env.d.ts +5 -0
- package/dist/env.d.ts.map +1 -0
- package/dist/env.js +26 -0
- package/dist/env.js.map +1 -0
- package/dist/fs.d.ts +5 -0
- package/dist/fs.d.ts.map +1 -0
- package/dist/fs.js +46 -0
- package/dist/fs.js.map +1 -0
- package/dist/index.d.ts +12 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +12 -0
- package/dist/index.js.map +1 -0
- package/dist/ipld-multi.d.ts +6 -0
- package/dist/ipld-multi.d.ts.map +1 -0
- package/dist/ipld-multi.js +8 -0
- package/dist/ipld-multi.js.map +1 -0
- package/dist/ipld.d.ts +52 -0
- package/dist/ipld.d.ts.map +1 -0
- package/dist/ipld.js +111 -0
- package/dist/ipld.js.map +1 -0
- package/dist/logger.d.ts +16 -0
- package/dist/logger.d.ts.map +1 -0
- package/dist/logger.js +31 -0
- package/dist/logger.js.map +1 -0
- package/dist/obfuscate.d.ts +9 -0
- package/dist/obfuscate.d.ts.map +1 -0
- package/dist/obfuscate.js +85 -0
- package/dist/obfuscate.js.map +1 -0
- package/dist/streams.d.ts +32 -0
- package/dist/streams.d.ts.map +1 -0
- package/dist/streams.js +190 -0
- package/dist/streams.js.map +1 -0
- package/package.json +46 -0
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,439 @@
|
|
|
1
|
+
# @atproto/common
|
|
2
|
+
|
|
3
|
+
## 0.0.0-spaces-alpha-20260818021221
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#5423](https://github.com/bluesky-social/atproto/pull/5423) [`2f77206`](https://github.com/bluesky-social/atproto/commit/2f77206ff8010710db5733c454abff9eb5ebb96b) Thanks [@dholms](https://github.com/dholms)! - atproto spaces
|
|
8
|
+
|
|
9
|
+
- Updated dependencies []:
|
|
10
|
+
- @atproto/common-web@0.0.0-spaces-alpha-20260818021221
|
|
11
|
+
|
|
12
|
+
## 0.7.6
|
|
13
|
+
|
|
14
|
+
### Patch Changes
|
|
15
|
+
|
|
16
|
+
- [#4805](https://github.com/bluesky-social/atproto/pull/4805) [`b66870d`](https://github.com/bluesky-social/atproto/commit/b66870d5a1efbcfa0cc07498c7cfcf3f0f243e86) Thanks [@matthieusieben](https://github.com/matthieusieben)! - Export new `createLogger` helper
|
|
17
|
+
|
|
18
|
+
- [#4805](https://github.com/bluesky-social/atproto/pull/4805) [`b66870d`](https://github.com/bluesky-social/atproto/commit/b66870d5a1efbcfa0cc07498c7cfcf3f0f243e86) Thanks [@matthieusieben](https://github.com/matthieusieben)! - Deprecate `subsystemLogger` in favor of `createLogger`
|
|
19
|
+
|
|
20
|
+
## 0.7.5
|
|
21
|
+
|
|
22
|
+
### Patch Changes
|
|
23
|
+
|
|
24
|
+
- Updated dependencies []:
|
|
25
|
+
- @atproto/common-web@0.5.9
|
|
26
|
+
|
|
27
|
+
## 0.7.4
|
|
28
|
+
|
|
29
|
+
### Patch Changes
|
|
30
|
+
|
|
31
|
+
- Updated dependencies [[`6a3d607`](https://github.com/bluesky-social/atproto/commit/6a3d6073cb66c527b5b109242049c85c36b9658c)]:
|
|
32
|
+
- @atproto/lex-cbor@0.1.6
|
|
33
|
+
- @atproto/lex-data@0.1.7
|
|
34
|
+
- @atproto/common-web@0.5.8
|
|
35
|
+
|
|
36
|
+
## 0.7.3
|
|
37
|
+
|
|
38
|
+
### Patch Changes
|
|
39
|
+
|
|
40
|
+
- Updated dependencies [[`95aa1d6`](https://github.com/bluesky-social/atproto/commit/95aa1d6dfea71316d5f30dd8bd4ed48afac31c81)]:
|
|
41
|
+
- @atproto/lex-cbor@0.1.5
|
|
42
|
+
- @atproto/lex-data@0.1.6
|
|
43
|
+
- @atproto/common-web@0.5.7
|
|
44
|
+
|
|
45
|
+
## 0.7.2
|
|
46
|
+
|
|
47
|
+
### Patch Changes
|
|
48
|
+
|
|
49
|
+
- Updated dependencies []:
|
|
50
|
+
- @atproto/common-web@0.5.6
|
|
51
|
+
|
|
52
|
+
## 0.7.1
|
|
53
|
+
|
|
54
|
+
### Patch Changes
|
|
55
|
+
|
|
56
|
+
- [#5197](https://github.com/bluesky-social/atproto/pull/5197) [`a0c49d9`](https://github.com/bluesky-social/atproto/commit/a0c49d9e8bc685c5a747a8d3b2775c73c63fdb6f) Thanks [@matthieusieben](https://github.com/matthieusieben)! - Rewrite import statements to be compatible with TypeScript's `verbatimModuleSyntax` config.
|
|
57
|
+
|
|
58
|
+
- Updated dependencies [[`a0c49d9`](https://github.com/bluesky-social/atproto/commit/a0c49d9e8bc685c5a747a8d3b2775c73c63fdb6f), [`cc6b901`](https://github.com/bluesky-social/atproto/commit/cc6b901496f607c0b477e48a23c94e6f727396c9), [`cc6b901`](https://github.com/bluesky-social/atproto/commit/cc6b901496f607c0b477e48a23c94e6f727396c9), [`cc6b901`](https://github.com/bluesky-social/atproto/commit/cc6b901496f607c0b477e48a23c94e6f727396c9)]:
|
|
59
|
+
- @atproto/lex-cbor@0.1.4
|
|
60
|
+
- @atproto/lex-data@0.1.5
|
|
61
|
+
- @atproto/common-web@0.5.5
|
|
62
|
+
|
|
63
|
+
## 0.7.0
|
|
64
|
+
|
|
65
|
+
### Minor Changes
|
|
66
|
+
|
|
67
|
+
- [#5162](https://github.com/bluesky-social/atproto/pull/5162) [`d1be0ce`](https://github.com/bluesky-social/atproto/commit/d1be0cead444ef95e64cac5ea5318edbec9d8112) Thanks [@nnabeyang](https://github.com/nnabeyang)! - Language-tag string-format validation now has strict and lenient variants, matching the pattern already used for `at-uri` and `datetime`. `isLanguageString` (and the default `language` string-format verifier) is now strict and rejects BCP 47 tags that violate RFC 5646 §4.1 (e.g. duplicate variant subtags or duplicate extension singletons). Pass `{ strict: false }` to fall back to the lenient (syntax-only) verifier, `isLanguageStringLenient`.
|
|
68
|
+
|
|
69
|
+
### Patch Changes
|
|
70
|
+
|
|
71
|
+
- Updated dependencies []:
|
|
72
|
+
- @atproto/common-web@0.5.4
|
|
73
|
+
|
|
74
|
+
## 0.6.5
|
|
75
|
+
|
|
76
|
+
### Patch Changes
|
|
77
|
+
|
|
78
|
+
- [#5099](https://github.com/bluesky-social/atproto/pull/5099) [`b43ec31`](https://github.com/bluesky-social/atproto/commit/b43ec31f247f4461725b01226885f88bd430ca07) Thanks [@matthieusieben](https://github.com/matthieusieben)! - Update TypeScript build to rely on references to composite internal projects
|
|
79
|
+
|
|
80
|
+
- [#5099](https://github.com/bluesky-social/atproto/pull/5099) [`b43ec31`](https://github.com/bluesky-social/atproto/commit/b43ec31f247f4461725b01226885f88bd430ca07) Thanks [@matthieusieben](https://github.com/matthieusieben)! - Bundle only necessary files in the NPM tarball, including the `CHANGELOG.md` and `README.md` files (if present).
|
|
81
|
+
|
|
82
|
+
- [#5099](https://github.com/bluesky-social/atproto/pull/5099) [`b43ec31`](https://github.com/bluesky-social/atproto/commit/b43ec31f247f4461725b01226885f88bd430ca07) Thanks [@matthieusieben](https://github.com/matthieusieben)! - Build with `noImplicitAny` enabled
|
|
83
|
+
|
|
84
|
+
- Updated dependencies [[`b43ec31`](https://github.com/bluesky-social/atproto/commit/b43ec31f247f4461725b01226885f88bd430ca07), [`b43ec31`](https://github.com/bluesky-social/atproto/commit/b43ec31f247f4461725b01226885f88bd430ca07), [`b43ec31`](https://github.com/bluesky-social/atproto/commit/b43ec31f247f4461725b01226885f88bd430ca07)]:
|
|
85
|
+
- @atproto/lex-cbor@0.1.3
|
|
86
|
+
- @atproto/lex-data@0.1.4
|
|
87
|
+
- @atproto/common-web@0.5.3
|
|
88
|
+
|
|
89
|
+
## 0.6.4
|
|
90
|
+
|
|
91
|
+
### Patch Changes
|
|
92
|
+
|
|
93
|
+
- [#5149](https://github.com/bluesky-social/atproto/pull/5149) [`f2cf8f7`](https://github.com/bluesky-social/atproto/commit/f2cf8f7fc5f3a10847f2e6d785e5fa2244ee8cfb) Thanks [@matthieusieben](https://github.com/matthieusieben)! - `LOG_ENABLED` now supports upper case (TRUE) for enabling logging
|
|
94
|
+
|
|
95
|
+
- [#5151](https://github.com/bluesky-social/atproto/pull/5151) [`a51c45d`](https://github.com/bluesky-social/atproto/commit/a51c45d38f6bd7b8765f640e564cf921d52162e7) Thanks [@matthieusieben](https://github.com/matthieusieben)! - Update dependencies
|
|
96
|
+
|
|
97
|
+
- [#5149](https://github.com/bluesky-social/atproto/pull/5149) [`f2cf8f7`](https://github.com/bluesky-social/atproto/commit/f2cf8f7fc5f3a10847f2e6d785e5fa2244ee8cfb) Thanks [@matthieusieben](https://github.com/matthieusieben)! - Update `pino` logger to version 10
|
|
98
|
+
|
|
99
|
+
- Updated dependencies [[`a51c45d`](https://github.com/bluesky-social/atproto/commit/a51c45d38f6bd7b8765f640e564cf921d52162e7)]:
|
|
100
|
+
- @atproto/common-web@0.5.2
|
|
101
|
+
- @atproto/lex-cbor@0.1.2
|
|
102
|
+
- @atproto/lex-data@0.1.3
|
|
103
|
+
|
|
104
|
+
## 0.6.3
|
|
105
|
+
|
|
106
|
+
### Patch Changes
|
|
107
|
+
|
|
108
|
+
- [#4967](https://github.com/bluesky-social/atproto/pull/4967) [`9fc720c`](https://github.com/bluesky-social/atproto/commit/9fc720ce75f3ee88a5e48a9be919b07c7647f6f5) Thanks [@matthieusieben](https://github.com/matthieusieben)! - Use TypeScript 7 to build package
|
|
109
|
+
|
|
110
|
+
- Updated dependencies [[`9fc720c`](https://github.com/bluesky-social/atproto/commit/9fc720ce75f3ee88a5e48a9be919b07c7647f6f5)]:
|
|
111
|
+
- @atproto/lex-cbor@0.1.1
|
|
112
|
+
- @atproto/lex-data@0.1.2
|
|
113
|
+
- @atproto/common-web@0.5.1
|
|
114
|
+
|
|
115
|
+
## 0.6.2
|
|
116
|
+
|
|
117
|
+
### Patch Changes
|
|
118
|
+
|
|
119
|
+
- [#5080](https://github.com/bluesky-social/atproto/pull/5080) [`b2c098f`](https://github.com/bluesky-social/atproto/commit/b2c098fdfa26137bb6f7d092ef89757e39748353) Thanks [@devinivy](https://github.com/devinivy)! - Make rmIfExists() more robust to partial failures.
|
|
120
|
+
|
|
121
|
+
- [#5078](https://github.com/bluesky-social/atproto/pull/5078) [`cc329bf`](https://github.com/bluesky-social/atproto/commit/cc329bf55c658752675d561dba792fedbe9c2626) Thanks [@jcalabro](https://github.com/jcalabro)! - Add `coalesceByteStream` utility to coalesce a byte stream into chunks with a minimal size.
|
|
122
|
+
|
|
123
|
+
## 0.6.1
|
|
124
|
+
|
|
125
|
+
### Patch Changes
|
|
126
|
+
|
|
127
|
+
- [#4954](https://github.com/bluesky-social/atproto/pull/4954) [`e6c6343`](https://github.com/bluesky-social/atproto/commit/e6c6343bd3727455bd0da12300bb4929a944e4f1) Thanks [@matthieusieben](https://github.com/matthieusieben)! - Add back support for any `Uint8Array` as input to the `ui8ToArrayBuffer` helper
|
|
128
|
+
|
|
129
|
+
- Updated dependencies [[`e6c6343`](https://github.com/bluesky-social/atproto/commit/e6c6343bd3727455bd0da12300bb4929a944e4f1)]:
|
|
130
|
+
- @atproto/lex-data@0.1.1
|
|
131
|
+
|
|
132
|
+
## 0.6.0
|
|
133
|
+
|
|
134
|
+
### Minor Changes
|
|
135
|
+
|
|
136
|
+
- [`affb50c`](https://github.com/bluesky-social/atproto/commit/affb50c040b497a12631df99a6310f8e78cab557) Thanks [@devinivy](https://github.com/devinivy)! - **BREAKING:** `ui8ToArrayBuffer(bytes)` now requires `Uint8Array<ArrayBuffer>` (rather than `Uint8Array`, which defaults to `<ArrayBufferLike>`). Most callers can pass the value through unchanged; in the rare case of a `SharedArrayBuffer`-backed `Uint8Array`, copy into a regular `Uint8Array` first.
|
|
137
|
+
|
|
138
|
+
- [#4929](https://github.com/bluesky-social/atproto/pull/4929) [`f01c59f`](https://github.com/bluesky-social/atproto/commit/f01c59f5bd3f75fb8b47a9eecd4858b84033fb7c) Thanks [@devinivy](https://github.com/devinivy)! - **BREAKING:** Drop support for Node.js 18 and 20. Node.js 22 is now the minimum supported version. Docker images now use Node.js 24.
|
|
139
|
+
|
|
140
|
+
- [#4943](https://github.com/bluesky-social/atproto/pull/4943) [`c459153`](https://github.com/bluesky-social/atproto/commit/c459153395a30ce89e050892c8fab7dc98e019b9) Thanks [@devinivy](https://github.com/devinivy)! - **BREAKING:** Convert to pure ESM. All packages now ship `"type": "module"` with ES module output and Node16 module resolution.
|
|
141
|
+
|
|
142
|
+
Node.js 22's `require()` compatibility layer can still load these packages in CommonJS code.
|
|
143
|
+
|
|
144
|
+
- [#4930](https://github.com/bluesky-social/atproto/pull/4930) [`908bece`](https://github.com/bluesky-social/atproto/commit/908bece169258bff5ad121e5eec157d6ded6f705) Thanks [@devinivy](https://github.com/devinivy)! - Build with TypeScript 6.0.
|
|
145
|
+
|
|
146
|
+
### Patch Changes
|
|
147
|
+
|
|
148
|
+
- Updated dependencies [[`f01c59f`](https://github.com/bluesky-social/atproto/commit/f01c59f5bd3f75fb8b47a9eecd4858b84033fb7c), [`c459153`](https://github.com/bluesky-social/atproto/commit/c459153395a30ce89e050892c8fab7dc98e019b9), [`908bece`](https://github.com/bluesky-social/atproto/commit/908bece169258bff5ad121e5eec157d6ded6f705)]:
|
|
149
|
+
- @atproto/common-web@0.5.0
|
|
150
|
+
- @atproto/lex-cbor@0.1.0
|
|
151
|
+
- @atproto/lex-data@0.1.0
|
|
152
|
+
|
|
153
|
+
## 0.5.16
|
|
154
|
+
|
|
155
|
+
### Patch Changes
|
|
156
|
+
|
|
157
|
+
- Updated dependencies [[`c62651d`](https://github.com/bluesky-social/atproto/commit/c62651dd69f1e18bd854b66e499b91fee9eaa856), [`f6f100c`](https://github.com/bluesky-social/atproto/commit/f6f100c33700a7ff58a1458109cc7420131feed0), [`c62651d`](https://github.com/bluesky-social/atproto/commit/c62651dd69f1e18bd854b66e499b91fee9eaa856), [`c62651d`](https://github.com/bluesky-social/atproto/commit/c62651dd69f1e18bd854b66e499b91fee9eaa856)]:
|
|
158
|
+
- @atproto/lex-data@0.0.15
|
|
159
|
+
- @atproto/common-web@0.4.20
|
|
160
|
+
- @atproto/lex-cbor@0.0.16
|
|
161
|
+
|
|
162
|
+
## 0.5.15
|
|
163
|
+
|
|
164
|
+
### Patch Changes
|
|
165
|
+
|
|
166
|
+
- Updated dependencies [[`6a88461`](https://github.com/bluesky-social/atproto/commit/6a88461c5aa9486269f0769b7a3d52f384581786)]:
|
|
167
|
+
- @atproto/lex-data@0.0.14
|
|
168
|
+
- @atproto/common-web@0.4.19
|
|
169
|
+
- @atproto/lex-cbor@0.0.15
|
|
170
|
+
|
|
171
|
+
## 0.5.14
|
|
172
|
+
|
|
173
|
+
### Patch Changes
|
|
174
|
+
|
|
175
|
+
- [#4689](https://github.com/bluesky-social/atproto/pull/4689) [`f7c2610`](https://github.com/bluesky-social/atproto/commit/f7c26103a6d4e24e5bedbb6fd908be140420e0dd) Thanks [@matthieusieben](https://github.com/matthieusieben)! - Remove unnecessary validation of already properly formatted ISO date string
|
|
176
|
+
|
|
177
|
+
- Updated dependencies [[`52834ab`](https://github.com/bluesky-social/atproto/commit/52834aba182da8df3611fd9dff924e6c6a3973a7), [`f7c2610`](https://github.com/bluesky-social/atproto/commit/f7c26103a6d4e24e5bedbb6fd908be140420e0dd), [`f7c2610`](https://github.com/bluesky-social/atproto/commit/f7c26103a6d4e24e5bedbb6fd908be140420e0dd), [`52834ab`](https://github.com/bluesky-social/atproto/commit/52834aba182da8df3611fd9dff924e6c6a3973a7)]:
|
|
178
|
+
- @atproto/lex-data@0.0.13
|
|
179
|
+
- @atproto/common-web@0.4.18
|
|
180
|
+
- @atproto/lex-cbor@0.0.14
|
|
181
|
+
|
|
182
|
+
## 0.5.13
|
|
183
|
+
|
|
184
|
+
### Patch Changes
|
|
185
|
+
|
|
186
|
+
- Updated dependencies [[`66b7295`](https://github.com/bluesky-social/atproto/commit/66b72950e8bcb39cac3382116bd282b3bb692f16)]:
|
|
187
|
+
- @atproto/lex-cbor@0.0.13
|
|
188
|
+
|
|
189
|
+
## 0.5.12
|
|
190
|
+
|
|
191
|
+
### Patch Changes
|
|
192
|
+
|
|
193
|
+
- Updated dependencies [[`ea5df64`](https://github.com/bluesky-social/atproto/commit/ea5df64db9e408d2b320f5f75eb2878aef6bc6df)]:
|
|
194
|
+
- @atproto/lex-data@0.0.12
|
|
195
|
+
- @atproto/common-web@0.4.17
|
|
196
|
+
- @atproto/lex-cbor@0.0.12
|
|
197
|
+
|
|
198
|
+
## 0.5.11
|
|
199
|
+
|
|
200
|
+
### Patch Changes
|
|
201
|
+
|
|
202
|
+
- Updated dependencies [[`ed61c62`](https://github.com/bluesky-social/atproto/commit/ed61c62f3161fcde85ee9a93f8ed339c7e06c015), [`ed61c62`](https://github.com/bluesky-social/atproto/commit/ed61c62f3161fcde85ee9a93f8ed339c7e06c015)]:
|
|
203
|
+
- @atproto/lex-cbor@0.0.11
|
|
204
|
+
- @atproto/lex-data@0.0.11
|
|
205
|
+
- @atproto/common-web@0.4.16
|
|
206
|
+
|
|
207
|
+
## 0.5.10
|
|
208
|
+
|
|
209
|
+
### Patch Changes
|
|
210
|
+
|
|
211
|
+
- [`49b3806`](https://github.com/bluesky-social/atproto/commit/49b38069ed4b5bd1ef71e967c78e5123b1c1f6f1) Thanks [@matthieusieben](https://github.com/matthieusieben)! - Update dependency on `@atproto/common-web`
|
|
212
|
+
|
|
213
|
+
- Updated dependencies [[`369bb02`](https://github.com/bluesky-social/atproto/commit/369bb02b9f80f0e15e5242e54f09bd4e01117f3a)]:
|
|
214
|
+
- @atproto/lex-data@0.0.10
|
|
215
|
+
- @atproto/common-web@0.4.15
|
|
216
|
+
- @atproto/lex-cbor@0.0.10
|
|
217
|
+
|
|
218
|
+
## 0.5.9
|
|
219
|
+
|
|
220
|
+
### Patch Changes
|
|
221
|
+
|
|
222
|
+
- Updated dependencies [[`7310b97`](https://github.com/bluesky-social/atproto/commit/7310b9704de678a3b389a741784d58bb7f79b10b), [`7310b97`](https://github.com/bluesky-social/atproto/commit/7310b9704de678a3b389a741784d58bb7f79b10b), [`7310b97`](https://github.com/bluesky-social/atproto/commit/7310b9704de678a3b389a741784d58bb7f79b10b), [`ecf5921`](https://github.com/bluesky-social/atproto/commit/ecf59214d59d9d2530c197c0679d26e76c6a60ef), [`7310b97`](https://github.com/bluesky-social/atproto/commit/7310b9704de678a3b389a741784d58bb7f79b10b), [`99963d0`](https://github.com/bluesky-social/atproto/commit/99963d002a9e030e79aed5fba700e0a68f31e101), [`99963d0`](https://github.com/bluesky-social/atproto/commit/99963d002a9e030e79aed5fba700e0a68f31e101)]:
|
|
223
|
+
- @atproto/common-web@0.4.13
|
|
224
|
+
- @atproto/lex-cbor@0.0.9
|
|
225
|
+
- @atproto/lex-data@0.0.9
|
|
226
|
+
|
|
227
|
+
## 0.5.8
|
|
228
|
+
|
|
229
|
+
### Patch Changes
|
|
230
|
+
|
|
231
|
+
- Updated dependencies [[`dfd4bee`](https://github.com/bluesky-social/atproto/commit/dfd4bee4abbc1a3e53531bb499a6f3169c13ed9e), [`dfd4bee`](https://github.com/bluesky-social/atproto/commit/dfd4bee4abbc1a3e53531bb499a6f3169c13ed9e), [`dfd4bee`](https://github.com/bluesky-social/atproto/commit/dfd4bee4abbc1a3e53531bb499a6f3169c13ed9e), [`dfd4bee`](https://github.com/bluesky-social/atproto/commit/dfd4bee4abbc1a3e53531bb499a6f3169c13ed9e)]:
|
|
232
|
+
- @atproto/lex-data@0.0.8
|
|
233
|
+
- @atproto/common-web@0.4.12
|
|
234
|
+
- @atproto/lex-cbor@0.0.8
|
|
235
|
+
|
|
236
|
+
## 0.5.7
|
|
237
|
+
|
|
238
|
+
### Patch Changes
|
|
239
|
+
|
|
240
|
+
- Updated dependencies [[`d78484f`](https://github.com/bluesky-social/atproto/commit/d78484f94d8ba1352ec66030115000d515c9dafe), [`d78484f`](https://github.com/bluesky-social/atproto/commit/d78484f94d8ba1352ec66030115000d515c9dafe), [`d78484f`](https://github.com/bluesky-social/atproto/commit/d78484f94d8ba1352ec66030115000d515c9dafe), [`d78484f`](https://github.com/bluesky-social/atproto/commit/d78484f94d8ba1352ec66030115000d515c9dafe), [`d78484f`](https://github.com/bluesky-social/atproto/commit/d78484f94d8ba1352ec66030115000d515c9dafe)]:
|
|
241
|
+
- @atproto/lex-data@0.0.7
|
|
242
|
+
- @atproto/lex-cbor@0.0.7
|
|
243
|
+
- @atproto/common-web@0.4.11
|
|
244
|
+
|
|
245
|
+
## 0.5.6
|
|
246
|
+
|
|
247
|
+
### Patch Changes
|
|
248
|
+
|
|
249
|
+
- Updated dependencies [[`2f78893`](https://github.com/bluesky-social/atproto/commit/2f78893ace3bbf14d4bac36837820ddb46658c98), [`2f78893`](https://github.com/bluesky-social/atproto/commit/2f78893ace3bbf14d4bac36837820ddb46658c98), [`2f78893`](https://github.com/bluesky-social/atproto/commit/2f78893ace3bbf14d4bac36837820ddb46658c98)]:
|
|
250
|
+
- @atproto/lex-data@0.0.6
|
|
251
|
+
- @atproto/common-web@0.4.10
|
|
252
|
+
- @atproto/lex-cbor@0.0.6
|
|
253
|
+
|
|
254
|
+
## 0.5.5
|
|
255
|
+
|
|
256
|
+
### Patch Changes
|
|
257
|
+
|
|
258
|
+
- Updated dependencies [[`9af7a2d`](https://github.com/bluesky-social/atproto/commit/9af7a2d12240e91248610ce4fe7d93387733c59c), [`9af7a2d`](https://github.com/bluesky-social/atproto/commit/9af7a2d12240e91248610ce4fe7d93387733c59c)]:
|
|
259
|
+
- @atproto/lex-data@0.0.5
|
|
260
|
+
- @atproto/common-web@0.4.9
|
|
261
|
+
- @atproto/lex-cbor@0.0.5
|
|
262
|
+
|
|
263
|
+
## 0.5.4
|
|
264
|
+
|
|
265
|
+
### Patch Changes
|
|
266
|
+
|
|
267
|
+
- Updated dependencies [[`e6b6107`](https://github.com/bluesky-social/atproto/commit/e6b6107e028fee964972274b71f5da1329a7bece), [`e6b6107`](https://github.com/bluesky-social/atproto/commit/e6b6107e028fee964972274b71f5da1329a7bece), [`e6b6107`](https://github.com/bluesky-social/atproto/commit/e6b6107e028fee964972274b71f5da1329a7bece), [`e6b6107`](https://github.com/bluesky-social/atproto/commit/e6b6107e028fee964972274b71f5da1329a7bece), [`e6b6107`](https://github.com/bluesky-social/atproto/commit/e6b6107e028fee964972274b71f5da1329a7bece), [`e6b6107`](https://github.com/bluesky-social/atproto/commit/e6b6107e028fee964972274b71f5da1329a7bece)]:
|
|
268
|
+
- @atproto/lex-data@0.0.4
|
|
269
|
+
- @atproto/lex-cbor@0.0.4
|
|
270
|
+
- @atproto/common-web@0.4.8
|
|
271
|
+
|
|
272
|
+
## 0.5.3
|
|
273
|
+
|
|
274
|
+
### Patch Changes
|
|
275
|
+
|
|
276
|
+
- Updated dependencies [[`693784c`](https://github.com/bluesky-social/atproto/commit/693784c3a0dee4b6a29aa1e018fce682dcae148f), [`693784c`](https://github.com/bluesky-social/atproto/commit/693784c3a0dee4b6a29aa1e018fce682dcae148f), [`7e1d458`](https://github.com/bluesky-social/atproto/commit/7e1d45877bca0f615e7b1313cfcc66823b3de758)]:
|
|
277
|
+
- @atproto/lex-data@0.0.3
|
|
278
|
+
- @atproto/common-web@0.4.7
|
|
279
|
+
- @atproto/lex-cbor@0.0.3
|
|
280
|
+
|
|
281
|
+
## 0.5.2
|
|
282
|
+
|
|
283
|
+
### Patch Changes
|
|
284
|
+
|
|
285
|
+
- Updated dependencies [[`1d445af`](https://github.com/bluesky-social/atproto/commit/1d445af2a7fc27eca5a45869b29266e6a2a7f3ba), [`1d445af`](https://github.com/bluesky-social/atproto/commit/1d445af2a7fc27eca5a45869b29266e6a2a7f3ba), [`688f9d6`](https://github.com/bluesky-social/atproto/commit/688f9d67597ba96d6e9c4a4aec4d394d42f4cbf4)]:
|
|
286
|
+
- @atproto/lex-data@0.0.2
|
|
287
|
+
- @atproto/lex-cbor@0.0.2
|
|
288
|
+
- @atproto/common-web@0.4.6
|
|
289
|
+
|
|
290
|
+
## 0.5.1
|
|
291
|
+
|
|
292
|
+
### Patch Changes
|
|
293
|
+
|
|
294
|
+
- Updated dependencies [[`46550d6`](https://github.com/bluesky-social/atproto/commit/46550d6c1ffb298f57d54eb1904067b2df5a40af)]:
|
|
295
|
+
- @atproto/lex-cbor@0.0.1
|
|
296
|
+
- @atproto/lex-data@0.0.1
|
|
297
|
+
- @atproto/common-web@0.4.5
|
|
298
|
+
|
|
299
|
+
## 0.5.0
|
|
300
|
+
|
|
301
|
+
### Minor Changes
|
|
302
|
+
|
|
303
|
+
- [#4366](https://github.com/bluesky-social/atproto/pull/4366) [`261968fd6`](https://github.com/bluesky-social/atproto/commit/261968fd65014ded613e2bf085d61a7864b8fba7) Thanks [@matthieusieben](https://github.com/matthieusieben)! - Remove `utf8ToB64Url` and `b64UrlToUtf8` utilities
|
|
304
|
+
|
|
305
|
+
- [#4366](https://github.com/bluesky-social/atproto/pull/4366) [`261968fd6`](https://github.com/bluesky-social/atproto/commit/261968fd65014ded613e2bf085d61a7864b8fba7) Thanks [@matthieusieben](https://github.com/matthieusieben)! - Remove `sha256ToCid` utility
|
|
306
|
+
|
|
307
|
+
### Patch Changes
|
|
308
|
+
|
|
309
|
+
- [#4366](https://github.com/bluesky-social/atproto/pull/4366) [`261968fd6`](https://github.com/bluesky-social/atproto/commit/261968fd65014ded613e2bf085d61a7864b8fba7) Thanks [@matthieusieben](https://github.com/matthieusieben)! - Deprecate "ipld" functions (use `@atproto/lex-data`, `@atproto/lex-json` and `@atproto/lex-cbor` instead)
|
|
310
|
+
|
|
311
|
+
- Updated dependencies [[`261968fd6`](https://github.com/bluesky-social/atproto/commit/261968fd65014ded613e2bf085d61a7864b8fba7), [`261968fd6`](https://github.com/bluesky-social/atproto/commit/261968fd65014ded613e2bf085d61a7864b8fba7), [`261968fd6`](https://github.com/bluesky-social/atproto/commit/261968fd65014ded613e2bf085d61a7864b8fba7)]:
|
|
312
|
+
- @atproto/common-web@0.4.4
|
|
313
|
+
|
|
314
|
+
## 0.4.12
|
|
315
|
+
|
|
316
|
+
### Patch Changes
|
|
317
|
+
|
|
318
|
+
- Updated dependencies [[`055a413fb`](https://github.com/bluesky-social/atproto/commit/055a413fba4fab510ec899377154f1204ab12099)]:
|
|
319
|
+
- @atproto/common-web@0.4.3
|
|
320
|
+
|
|
321
|
+
## 0.4.11
|
|
322
|
+
|
|
323
|
+
### Patch Changes
|
|
324
|
+
|
|
325
|
+
- Updated dependencies [[`cc485d296`](https://github.com/bluesky-social/atproto/commit/cc485d29638488928b5efec3d4b0627040589812)]:
|
|
326
|
+
- @atproto/common-web@0.4.2
|
|
327
|
+
|
|
328
|
+
## 0.4.10
|
|
329
|
+
|
|
330
|
+
### Patch Changes
|
|
331
|
+
|
|
332
|
+
- [#3672](https://github.com/bluesky-social/atproto/pull/3672) [`4db923ca1`](https://github.com/bluesky-social/atproto/commit/4db923ca1c4fadd31d41c851933659e5186ee144) Thanks [@dholms](https://github.com/dholms)! - Add DASL CID parser
|
|
333
|
+
|
|
334
|
+
- Updated dependencies [[`4db923ca1`](https://github.com/bluesky-social/atproto/commit/4db923ca1c4fadd31d41c851933659e5186ee144)]:
|
|
335
|
+
- @atproto/common-web@0.4.1
|
|
336
|
+
|
|
337
|
+
## 0.4.9
|
|
338
|
+
|
|
339
|
+
### Patch Changes
|
|
340
|
+
|
|
341
|
+
- [#2519](https://github.com/bluesky-social/atproto/pull/2519) [`bdbd3c3e3`](https://github.com/bluesky-social/atproto/commit/bdbd3c3e3f8fe8476a3fecac73810554846c938f) Thanks [@dholms](https://github.com/dholms)! - Add renameIfExists function
|
|
342
|
+
|
|
343
|
+
## 0.4.8
|
|
344
|
+
|
|
345
|
+
### Patch Changes
|
|
346
|
+
|
|
347
|
+
- [#3220](https://github.com/bluesky-social/atproto/pull/3220) [`61dc0d60e`](https://github.com/bluesky-social/atproto/commit/61dc0d60e19b88c6427a54c6d95a391b5f4da7bd) Thanks [@matthieusieben](https://github.com/matthieusieben)! - Apply new linting rules regarding import order
|
|
348
|
+
|
|
349
|
+
- [#3220](https://github.com/bluesky-social/atproto/pull/3220) [`61dc0d60e`](https://github.com/bluesky-social/atproto/commit/61dc0d60e19b88c6427a54c6d95a391b5f4da7bd) Thanks [@matthieusieben](https://github.com/matthieusieben)! - Update NodeJS engine requirement to >=18.7.0
|
|
350
|
+
|
|
351
|
+
- Updated dependencies [[`61dc0d60e`](https://github.com/bluesky-social/atproto/commit/61dc0d60e19b88c6427a54c6d95a391b5f4da7bd), [`8a30e0ed9`](https://github.com/bluesky-social/atproto/commit/8a30e0ed9239cb2037d54fb98e70e8b0cfbc3e39)]:
|
|
352
|
+
- @atproto/common-web@0.4.0
|
|
353
|
+
|
|
354
|
+
## 0.4.7
|
|
355
|
+
|
|
356
|
+
### Patch Changes
|
|
357
|
+
|
|
358
|
+
- [#3481](https://github.com/bluesky-social/atproto/pull/3481) [`52c687a05`](https://github.com/bluesky-social/atproto/commit/52c687a05c70d5660fae1de9e1bbc6297f37f1f4) Thanks [@dholms](https://github.com/dholms)! - Parse safe uint64 as number
|
|
359
|
+
|
|
360
|
+
## 0.4.6
|
|
361
|
+
|
|
362
|
+
### Patch Changes
|
|
363
|
+
|
|
364
|
+
- Updated dependencies [[`72eba67af`](https://github.com/bluesky-social/atproto/commit/72eba67af1af8320b5400bcb9319d5c3c8407d99), [`72eba67af`](https://github.com/bluesky-social/atproto/commit/72eba67af1af8320b5400bcb9319d5c3c8407d99)]:
|
|
365
|
+
- @atproto/common-web@0.3.2
|
|
366
|
+
|
|
367
|
+
## 0.4.5
|
|
368
|
+
|
|
369
|
+
### Patch Changes
|
|
370
|
+
|
|
371
|
+
- [#3178](https://github.com/bluesky-social/atproto/pull/3178) [`588baae12`](https://github.com/bluesky-social/atproto/commit/588baae1212a3cba3bf0d95d2f268e80513fd9c4) Thanks [@matthieusieben](https://github.com/matthieusieben)! - Minor adaptation of VerifyCidTransform
|
|
372
|
+
|
|
373
|
+
## 0.4.4
|
|
374
|
+
|
|
375
|
+
### Patch Changes
|
|
376
|
+
|
|
377
|
+
- [#2834](https://github.com/bluesky-social/atproto/pull/2834) [`4098d9890`](https://github.com/bluesky-social/atproto/commit/4098d9890173f4d6c6512f2d8994eebbf12b5e13) Thanks [@matthieusieben](https://github.com/matthieusieben)! - Allow contentEncoding to be an array for consistency with typing of headers
|
|
378
|
+
|
|
379
|
+
## 0.4.3
|
|
380
|
+
|
|
381
|
+
### Patch Changes
|
|
382
|
+
|
|
383
|
+
- [#2770](https://github.com/bluesky-social/atproto/pull/2770) [`a07b21151`](https://github.com/bluesky-social/atproto/commit/a07b21151f1850340c4b7797ebb11521b1a6cdf3) Thanks [@matthieusieben](https://github.com/matthieusieben)! - add streamToNodeBuffer utility to convert Uint8Array (async) iterables to Buffer
|
|
384
|
+
|
|
385
|
+
- Updated dependencies [[`a07b21151`](https://github.com/bluesky-social/atproto/commit/a07b21151f1850340c4b7797ebb11521b1a6cdf3), [`a07b21151`](https://github.com/bluesky-social/atproto/commit/a07b21151f1850340c4b7797ebb11521b1a6cdf3), [`eb20ff64a`](https://github.com/bluesky-social/atproto/commit/eb20ff64a2d8e3061c652e1e247bf9b0fe3c41a6)]:
|
|
386
|
+
- @atproto/common-web@0.3.1
|
|
387
|
+
|
|
388
|
+
## 0.4.2
|
|
389
|
+
|
|
390
|
+
### Patch Changes
|
|
391
|
+
|
|
392
|
+
- [#2464](https://github.com/bluesky-social/atproto/pull/2464) [`98711a147`](https://github.com/bluesky-social/atproto/commit/98711a147a8674337f605c6368f39fc10c2fae93) Thanks [@matthieusieben](https://github.com/matthieusieben)! - Minor optimization
|
|
393
|
+
|
|
394
|
+
## 0.4.1
|
|
395
|
+
|
|
396
|
+
### Patch Changes
|
|
397
|
+
|
|
398
|
+
- [#2633](https://github.com/bluesky-social/atproto/pull/2633) [`acc9093d2`](https://github.com/bluesky-social/atproto/commit/acc9093d2845eba02b68fb2f9db33e4f1b59bb10) Thanks [@matthieusieben](https://github.com/matthieusieben)! - Add obfuscation utilities
|
|
399
|
+
|
|
400
|
+
## 0.4.0
|
|
401
|
+
|
|
402
|
+
### Minor Changes
|
|
403
|
+
|
|
404
|
+
- [#2169](https://github.com/bluesky-social/atproto/pull/2169) [`f689bd51a`](https://github.com/bluesky-social/atproto/commit/f689bd51a2f4e02d4eca40eb2568a1fcb95494e9) Thanks [@matthieusieben](https://github.com/matthieusieben)! - Build system rework, stop bundling dependencies.
|
|
405
|
+
|
|
406
|
+
### Patch Changes
|
|
407
|
+
|
|
408
|
+
- Updated dependencies [[`f689bd51a`](https://github.com/bluesky-social/atproto/commit/f689bd51a2f4e02d4eca40eb2568a1fcb95494e9)]:
|
|
409
|
+
- @atproto/common-web@0.3.0
|
|
410
|
+
|
|
411
|
+
## 0.3.4
|
|
412
|
+
|
|
413
|
+
### Patch Changes
|
|
414
|
+
|
|
415
|
+
- Updated dependencies [[`4eaadc0ac`](https://github.com/bluesky-social/atproto/commit/4eaadc0acb6b73b9745dd7a2b929d02e58083ab0)]:
|
|
416
|
+
- @atproto/common-web@0.2.4
|
|
417
|
+
|
|
418
|
+
## 0.3.3
|
|
419
|
+
|
|
420
|
+
### Patch Changes
|
|
421
|
+
|
|
422
|
+
- [#1788](https://github.com/bluesky-social/atproto/pull/1788) [`84e2d4d2`](https://github.com/bluesky-social/atproto/commit/84e2d4d2b6694f344d80c18672c78b650189d423) Thanks [@bnewbold](https://github.com/bnewbold)! - update license to "MIT or Apache2"
|
|
423
|
+
|
|
424
|
+
- Updated dependencies [[`84e2d4d2`](https://github.com/bluesky-social/atproto/commit/84e2d4d2b6694f344d80c18672c78b650189d423)]:
|
|
425
|
+
- @atproto/common-web@0.2.3
|
|
426
|
+
|
|
427
|
+
## 0.3.2
|
|
428
|
+
|
|
429
|
+
### Patch Changes
|
|
430
|
+
|
|
431
|
+
- Updated dependencies [[`35d108ce`](https://github.com/bluesky-social/atproto/commit/35d108ce94866ce1b3d147cd0620a0ba1c4ebcd7)]:
|
|
432
|
+
- @atproto/common-web@0.2.2
|
|
433
|
+
|
|
434
|
+
## 0.3.1
|
|
435
|
+
|
|
436
|
+
### Patch Changes
|
|
437
|
+
|
|
438
|
+
- Updated dependencies [[`41ee177f`](https://github.com/bluesky-social/atproto/commit/41ee177f5a440490280d17acd8a89bcddaffb23b)]:
|
|
439
|
+
- @atproto/common-web@0.2.1
|
package/LICENSE.txt
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
Dual MIT/Apache-2.0 License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2022-2026 Bluesky Social PBC, and Contributors
|
|
4
|
+
|
|
5
|
+
Except as otherwise noted in individual files, this software is licensed under the MIT license (<http://opensource.org/licenses/MIT>), or the Apache License, Version 2.0 (<http://www.apache.org/licenses/LICENSE-2.0>).
|
|
6
|
+
|
|
7
|
+
Downstream projects and end users may chose either license individually, or both together, at their discretion. The motivation for this dual-licensing is the additional software patent assurance provided by Apache 2.0.
|
package/README.md
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
# @atproto/common
|
|
2
|
+
|
|
3
|
+
Shared TypeScript code for other `@atproto/*` packages. This package is oriented towards writing servers, and is not designed to be browser-compatible.
|
|
4
|
+
|
|
5
|
+
[](https://www.npmjs.com/package/@atproto/common)
|
|
6
|
+
[](https://github.com/bluesky-social/atproto/actions/workflows/repo.yaml)
|
|
7
|
+
|
|
8
|
+
## License
|
|
9
|
+
|
|
10
|
+
This project is dual-licensed under MIT and Apache 2.0 terms:
|
|
11
|
+
|
|
12
|
+
- MIT license ([LICENSE-MIT.txt](https://github.com/bluesky-social/atproto/blob/main/LICENSE-MIT.txt) or http://opensource.org/licenses/MIT)
|
|
13
|
+
- Apache License, Version 2.0, ([LICENSE-APACHE.txt](https://github.com/bluesky-social/atproto/blob/main/LICENSE-APACHE.txt) or http://www.apache.org/licenses/LICENSE-2.0)
|
|
14
|
+
|
|
15
|
+
Downstream projects and end users may chose either license individually, or both together, at their discretion. The motivation for this dual-licensing is the additional software patent assurance provided by Apache 2.0.
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"buffers.d.ts","sourceRoot":"","sources":["../src/buffers.ts"],"names":[],"mappings":"AAAA,wBAAgB,WAAW,CAAC,KAAK,EAAE,UAAU,GAAG,MAAM,CAErD;AAED,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,UAAU,GAAG,WAAW,CAS/D"}
|
package/dist/buffers.js
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export function ui8ToBuffer(bytes) {
|
|
2
|
+
return Buffer.from(bytes.buffer, bytes.byteOffset, bytes.byteLength);
|
|
3
|
+
}
|
|
4
|
+
export function ui8ToArrayBuffer(bytes) {
|
|
5
|
+
if (bytes.buffer instanceof ArrayBuffer) {
|
|
6
|
+
return bytes.buffer.slice(bytes.byteOffset, bytes.byteLength + bytes.byteOffset);
|
|
7
|
+
}
|
|
8
|
+
return new Uint8Array(bytes).buffer;
|
|
9
|
+
}
|
|
10
|
+
//# sourceMappingURL=buffers.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"buffers.js","sourceRoot":"","sources":["../src/buffers.ts"],"names":[],"mappings":"AAAA,MAAM,UAAU,WAAW,CAAC,KAAiB;IAC3C,OAAO,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,MAAM,EAAE,KAAK,CAAC,UAAU,EAAE,KAAK,CAAC,UAAU,CAAC,CAAA;AACtE,CAAC;AAED,MAAM,UAAU,gBAAgB,CAAC,KAAiB;IAChD,IAAI,KAAK,CAAC,MAAM,YAAY,WAAW,EAAE,CAAC;QACxC,OAAO,KAAK,CAAC,MAAM,CAAC,KAAK,CACvB,KAAK,CAAC,UAAU,EAChB,KAAK,CAAC,UAAU,GAAG,KAAK,CAAC,UAAU,CACpC,CAAA;IACH,CAAC;IAED,OAAO,IAAI,UAAU,CAAC,KAAK,CAAC,CAAC,MAAM,CAAA;AACrC,CAAC","sourcesContent":["export function ui8ToBuffer(bytes: Uint8Array): Buffer {\n return Buffer.from(bytes.buffer, bytes.byteOffset, bytes.byteLength)\n}\n\nexport function ui8ToArrayBuffer(bytes: Uint8Array): ArrayBuffer {\n if (bytes.buffer instanceof ArrayBuffer) {\n return bytes.buffer.slice(\n bytes.byteOffset,\n bytes.byteLength + bytes.byteOffset,\n )\n }\n\n return new Uint8Array(bytes).buffer\n}\n"]}
|
package/dist/car.d.ts
ADDED
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { type Cid } from '@atproto/lex-data';
|
|
2
|
+
export type CarBlock = {
|
|
3
|
+
cid: Cid;
|
|
4
|
+
bytes: Uint8Array;
|
|
5
|
+
};
|
|
6
|
+
export declare const encodeCarHeader: (roots: Cid | readonly Cid[] | null) => Uint8Array;
|
|
7
|
+
export declare const encodeCarBlock: (block: CarBlock) => Uint8Array;
|
|
8
|
+
/**
|
|
9
|
+
* Write a CAR v1 stream. Most callers have a single root; permissioned repos
|
|
10
|
+
* declare two (a commit and an index), so roots is a list.
|
|
11
|
+
*/
|
|
12
|
+
export declare function writeCarStream(roots: Cid | readonly Cid[] | null, blocks: AsyncIterable<CarBlock> | Iterable<CarBlock>): AsyncIterable<Uint8Array>;
|
|
13
|
+
export type ReadCarOptions = {
|
|
14
|
+
/**
|
|
15
|
+
* When true, does not verify CID-to-content mapping within CAR.
|
|
16
|
+
*/
|
|
17
|
+
skipCidVerification?: boolean;
|
|
18
|
+
};
|
|
19
|
+
export type CarBlockIterable = AsyncGenerator<CarBlock, void, unknown> & {
|
|
20
|
+
dump: () => Promise<void>;
|
|
21
|
+
};
|
|
22
|
+
export declare const readCarStream: (car: Iterable<Uint8Array> | AsyncIterable<Uint8Array>, opts?: ReadCarOptions) => Promise<{
|
|
23
|
+
roots: Cid[];
|
|
24
|
+
blocks: CarBlockIterable;
|
|
25
|
+
}>;
|
|
26
|
+
export declare const readCarBytes: (bytes: Uint8Array, opts?: ReadCarOptions) => Promise<{
|
|
27
|
+
roots: Cid[];
|
|
28
|
+
blocks: CarBlockIterable;
|
|
29
|
+
}>;
|
|
30
|
+
export declare const readCarReader: (reader: BytesReader, opts?: ReadCarOptions) => Promise<{
|
|
31
|
+
roots: Cid[];
|
|
32
|
+
blocks: CarBlockIterable;
|
|
33
|
+
}>;
|
|
34
|
+
export declare function verifyIncomingCarBlocks(car: AsyncIterable<CarBlock>): AsyncGenerator<CarBlock, void, unknown>;
|
|
35
|
+
export interface BytesReader {
|
|
36
|
+
isDone: boolean;
|
|
37
|
+
read(bytesToRead: number): Promise<Uint8Array>;
|
|
38
|
+
close(): Promise<void>;
|
|
39
|
+
}
|
|
40
|
+
//# sourceMappingURL=car.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"car.d.ts","sourceRoot":"","sources":["../src/car.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,KAAK,GAAG,EAAmC,MAAM,mBAAmB,CAAA;AAE7E,MAAM,MAAM,QAAQ,GAAG;IACrB,GAAG,EAAE,GAAG,CAAA;IACR,KAAK,EAAE,UAAU,CAAA;CAClB,CAAA;AAED,eAAO,MAAM,eAAe,UACnB,GAAG,GAAG,SAAS,GAAG,EAAE,GAAG,IAAI,KACjC,UAQF,CAAA;AAED,eAAO,MAAM,cAAc,UAAW,QAAQ,KAAG,UAO9C,CAAA;AAEH;;;GAGG;AACH,wBAAuB,cAAc,CACnC,KAAK,EAAE,GAAG,GAAG,SAAS,GAAG,EAAE,GAAG,IAAI,EAClC,MAAM,EAAE,aAAa,CAAC,QAAQ,CAAC,GAAG,QAAQ,CAAC,QAAQ,CAAC,GACnD,aAAa,CAAC,UAAU,CAAC,CAK3B;AAcD,MAAM,MAAM,cAAc,GAAG;IAC3B;;OAEG;IACH,mBAAmB,CAAC,EAAE,OAAO,CAAA;CAC9B,CAAA;AAED,MAAM,MAAM,gBAAgB,GAAG,cAAc,CAAC,QAAQ,EAAE,IAAI,EAAE,OAAO,CAAC,GAAG;IACvE,IAAI,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAA;CAC1B,CAAA;AAED,eAAO,MAAM,aAAa,QACnB,QAAQ,CAAC,UAAU,CAAC,GAAG,aAAa,CAAC,UAAU,CAAC,SAC9C,cAAc,KACpB,OAAO,CAAC;IACT,KAAK,EAAE,GAAG,EAAE,CAAA;IACZ,MAAM,EAAE,gBAAgB,CAAA;CACzB,CAEA,CAAA;AAED,eAAO,MAAM,YAAY,UAChB,UAAU,SACV,cAAc,KACpB,OAAO,CAAC;IACT,KAAK,EAAE,GAAG,EAAE,CAAA;IACZ,MAAM,EAAE,gBAAgB,CAAA;CACzB,CAEA,CAAA;AAED,eAAO,MAAM,aAAa,WAChB,WAAW,SACZ,cAAc,KACpB,OAAO,CAAC;IACT,KAAK,EAAE,GAAG,EAAE,CAAA;IACZ,MAAM,EAAE,gBAAgB,CAAA;CACzB,CAiCA,CAAA;AAoDD,wBAAuB,uBAAuB,CAC5C,GAAG,EAAE,aAAa,CAAC,QAAQ,CAAC,GAC3B,cAAc,CAAC,QAAQ,EAAE,IAAI,EAAE,OAAO,CAAC,CAOzC;AAuBD,MAAM,WAAW,WAAW;IAC1B,MAAM,EAAE,OAAO,CAAA;IACf,IAAI,CAAC,WAAW,EAAE,MAAM,GAAG,OAAO,CAAC,UAAU,CAAC,CAAA;IAC9C,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC,CAAA;CACvB"}
|