MCPcopy Create free account
hub / github.com/WICG/webpackage / onCreateBundle

Method onCreateBundle

js/bundle/src/encoder.ts:133–142  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

131 constructor(private bundleBuilder: BundleBuilder) {}
132
133 onCreateBundle(): void {
134 if (this.primaryURL === null) {
135 throw new Error('Primary URL is not set');
136 }
137 if (!this.index.has(this.primaryURL)) {
138 throw new Error(
139 `Exchange for primary URL (${this.primaryURL}) does not exist`
140 );
141 }
142 }
143
144 setPrimaryURL(url: string): BundleBuilder {
145 if (this.primaryURL !== null) {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected