@d-i-t-a/reader 3.0.0-alpha.2 → 3.0.0-alpha.3
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/dist/esm/index.js +7 -5
- package/dist/esm/index.js.map +2 -2
- package/dist/reader.js +44 -44
- package/dist/reader.js.map +3 -3
- package/package.json +1 -1
package/dist/esm/index.js
CHANGED
|
@@ -88012,11 +88012,13 @@ var D2Reader = class _D2Reader {
|
|
|
88012
88012
|
let webPubManifestUrl = initialConfig.url;
|
|
88013
88013
|
let publication;
|
|
88014
88014
|
if (initialConfig.publication) {
|
|
88015
|
-
|
|
88016
|
-
|
|
88017
|
-
|
|
88018
|
-
|
|
88019
|
-
|
|
88015
|
+
const pubJson = initialConfig.publication;
|
|
88016
|
+
const manifest = Ue.deserialize(pubJson);
|
|
88017
|
+
if (!manifest) {
|
|
88018
|
+
throw new Error("Failed to parse publication manifest from config");
|
|
88019
|
+
}
|
|
88020
|
+
manifest.setSelfLink(webPubManifestUrl.href);
|
|
88021
|
+
publication = new Publication(manifest, new URL(webPubManifestUrl));
|
|
88020
88022
|
} else {
|
|
88021
88023
|
publication = await Publication.fromUrl(
|
|
88022
88024
|
webPubManifestUrl,
|