@riboseinc/anafero-cli 0.0.60 → 0.0.61

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.
Files changed (2) hide show
  1. package/build-site.mjs +18 -5
  2. package/package.json +1 -1
package/build-site.mjs CHANGED
@@ -316992,6 +316992,9 @@ function normalizeString(path3, allowAboveRoot = false, separator = "/", isPathS
316992
316992
  }
316993
316993
 
316994
316994
  // ../anafero/ContentReader.mts
316995
+ function isExternalReference(uri) {
316996
+ return uri.startsWith("http") || uri.startsWith("mailto:") || uri.startsWith("ftp:");
316997
+ }
316995
316998
  var makeContentReader = async function(entryPointURI, storeAdapters, findContentAdapter, { fetchBlob, reportProgress, decodeXML, cache: cache3 }) {
316996
316999
  const canonicalURIs = {};
316997
317000
  const originalURIs = {};
@@ -317045,7 +317048,11 @@ var makeContentReader = async function(entryPointURI, storeAdapters, findContent
317045
317048
  expanded = normalizedFileURI;
317046
317049
  }
317047
317050
  } else {
317048
- expanded = uri;
317051
+ if (isExternalReference(uri)) {
317052
+ expanded = uri;
317053
+ } else {
317054
+ expanded = `${uri}@${entryPointURI2}`;
317055
+ }
317049
317056
  }
317050
317057
  return expanded;
317051
317058
  }
@@ -317249,7 +317256,11 @@ var makeContentReader = async function(entryPointURI, storeAdapters, findContent
317249
317256
  seen.add(seenKey);
317250
317257
  newTargets.push(rel.target);
317251
317258
  } else {
317252
- console.warn("Duplicate rel", currentResource, rel);
317259
+ console.warn(
317260
+ "Omitting from graph a duplicate relation from",
317261
+ currentResource,
317262
+ rel
317263
+ );
317253
317264
  }
317254
317265
  }
317255
317266
  queue.push(...newTargets);
@@ -317643,11 +317654,12 @@ ${inject.head ?? ""}`;
317643
317654
  meta,
317644
317655
  relations
317645
317656
  );
317646
- pathProgress({ state: "generating page content & assets" });
317657
+ pathProgress({ state: "updating artifacts" });
317647
317658
  if (content?.content) {
317648
317659
  if (meta.primaryLanguageID) {
317649
317660
  allLanguages.add(meta.primaryLanguageID);
317650
317661
  }
317662
+ pathProgress({ state: "indexing page resource" });
317651
317663
  resourceMap[path3] = resourceURI;
317652
317664
  resourceGraph.push([resourceURI, "isDefinedBy", `${path3}/resource.json`]);
317653
317665
  resourceDescriptions[resourceURI] = resourceMeta;
@@ -317659,7 +317671,7 @@ ${inject.head ?? ""}`;
317659
317671
  extractRelationsForIndexing(resourceURI, relations, reader.exists).join("").trim()
317660
317672
  )
317661
317673
  };
317662
- pathProgress({ state: "processing on-page subresources" });
317674
+ pathProgress({ state: "indexing on-page subresources" });
317663
317675
  const describedResourceIDs = gatherDescribedResourcesFromJsonifiedProseMirrorNode(
317664
317676
  content.content.contentDoc
317665
317677
  );
@@ -317689,7 +317701,7 @@ ${inject.head ?? ""}`;
317689
317701
  );
317690
317702
  }
317691
317703
  }
317692
- pathProgress({ state: "processing resource assets" });
317704
+ pathProgress({ state: "indexing referenced assets" });
317693
317705
  for (const [, , o2] of relations) {
317694
317706
  if (o2.startsWith("file:")) {
317695
317707
  const filePath = o2.split("file:")[1];
@@ -317712,6 +317724,7 @@ ${inject.head ?? ""}`;
317712
317724
  }
317713
317725
  }
317714
317726
  }
317727
+ pathProgress({ state: "outputting assets" });
317715
317728
  const resourceAssetGenerator = generateResourceAssets(
317716
317729
  resourceURI,
317717
317730
  relations,
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@riboseinc/anafero-cli",
3
3
  "type": "module",
4
- "version": "0.0.60",
4
+ "version": "0.0.61",
5
5
  "packageManager": "yarn@4.5.0",
6
6
  "bin": {
7
7
  "build-site": "build-site.mjs"