()
| 172 | } |
| 173 | |
| 174 | createTopLevel(): unknown { |
| 175 | const sectionLengths: Array<string | number> = []; |
| 176 | for (const s of this.bundleBuilder.sectionLengths) { |
| 177 | sectionLengths.push(s.name, s.length); |
| 178 | } |
| 179 | return [ |
| 180 | byteString('🌐📦'), |
| 181 | byteString(`${formatVersion}\0\0`), |
| 182 | this.primaryURL, |
| 183 | cborg.encode(sectionLengths), |
| 184 | this.bundleBuilder.sections, |
| 185 | new Uint8Array(8), // Length (to be filled in later) |
| 186 | ]; |
| 187 | } |
| 188 | })(this); |
| 189 | } else { |
| 190 | // format version b2 |
nothing calls this directly
no test coverage detected