@riboseinc/anafero-cli 0.0.41 → 0.0.43

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/build-site.css CHANGED
@@ -31171,6 +31171,17 @@ tbody.vars_bd693cb4_hm005a_spectrum-Table-body .vars_bd693cb4_hm005a_spectrum-Ta
31171
31171
  background: var(--spectrum-alias-background-color-default);
31172
31172
  border: none;
31173
31173
  border-radius: 0;
31174
+ .style_navListViewItemLink {
31175
+ white-space: nowrap;
31176
+ overflow: hidden;
31177
+ text-overflow: ellipsis;
31178
+ &:link,
31179
+ &:hover,
31180
+ &:visited {
31181
+ text-decoration: none;
31182
+ color: inherit;
31183
+ }
31184
+ }
31174
31185
  }
31175
31186
  .style_browserBar {
31176
31187
  position: fixed;
package/build-site.mjs CHANGED
@@ -313125,6 +313125,7 @@ __export(anafero_exports, {
313125
313125
  gatherDescribedResourcesFromJsonifiedProseMirrorNode: () => gatherDescribedResourcesFromJsonifiedProseMirrorNode,
313126
313126
  gatherTextFromJsonifiedProseMirrorNode: () => gatherTextFromJsonifiedProseMirrorNode,
313127
313127
  getAllParentPaths: () => getAllParentPaths,
313128
+ isURIString: () => isURIString,
313128
313129
  makeDummyInMemoryCache: () => makeDummyInMemoryCache,
313129
313130
  parseModuleRef: () => parseModuleRef,
313130
313131
  stripLeadingSlash: () => stripLeadingSlash,
@@ -313192,6 +313193,38 @@ function getAllParentPaths(aPath) {
313192
313193
  return parents;
313193
313194
  }
313194
313195
 
313196
+ // ../anafero/URI.mts
313197
+ init_cjs_shim();
313198
+ function makeURI(input) {
313199
+ const match19 = ("" + input).match(pattern2);
313200
+ if (!match19) {
313201
+ throw new SyntaxError("Invalid URI");
313202
+ }
313203
+ return {
313204
+ protocol: match19[1],
313205
+ slashes: match19[2],
313206
+ authority: match19[3],
313207
+ host: match19[4],
313208
+ port: match19[5],
313209
+ path: match19[6] || match19[7] || match19[8],
313210
+ query: match19[9],
313211
+ hash: match19[10]
313212
+ };
313213
+ }
313214
+ function isURIString(input) {
313215
+ return ["urn:", "http:", "https:", "ftp:", "file:"].find((prefix) => input.startsWith(prefix)) !== void 0;
313216
+ if (input.startsWith("urn:")) {
313217
+ return true;
313218
+ }
313219
+ try {
313220
+ makeURI(input);
313221
+ return true;
313222
+ } catch (e3) {
313223
+ return false;
313224
+ }
313225
+ }
313226
+ var pattern2 = new RegExp("([A-Za-z][A-Za-z0-9+\\-.]{2,6}):(?:(//)(?:((?:[A-Za-z0-9\\-._~!$&'()*+,;=:]|%[0-9A-Fa-f]{2})*)@)?((?:\\[(?:(?:(?:(?:[0-9A-Fa-f]{1,4}:){6}|::(?:[0-9A-Fa-f]{1,4}:){5}|(?:[0-9A-Fa-f]{1,4})?::(?:[0-9A-Fa-f]{1,4}:){4}|(?:(?:[0-9A-Fa-f]{1,4}:){0,1}[0-9A-Fa-f]{1,4})?::(?:[0-9A-Fa-f]{1,4}:){3}|(?:(?:[0-9A-Fa-f]{1,4}:){0,2}[0-9A-Fa-f]{1,4})?::(?:[0-9A-Fa-f]{1,4}:){2}|(?:(?:[0-9A-Fa-f]{1,4}:){0,3}[0-9A-Fa-f]{1,4})?::[0-9A-Fa-f]{1,4}:|(?:(?:[0-9A-Fa-f]{1,4}:){0,4}[0-9A-Fa-f]{1,4})?::)(?:[0-9A-Fa-f]{1,4}:[0-9A-Fa-f]{1,4}|(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?))|(?:(?:[0-9A-Fa-f]{1,4}:){0,5}[0-9A-Fa-f]{1,4})?::[0-9A-Fa-f]{1,4}|(?:(?:[0-9A-Fa-f]{1,4}:){0,6}[0-9A-Fa-f]{1,4})?::)|[Vv][0-9A-Fa-f]+\\.[A-Za-z0-9\\-._~!$&'()*+,;=:]+)\\]|(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)|(?:[A-Za-z0-9\\-._~!$&'()*+,;=]|%[0-9A-Fa-f]{2})*))(?::([0-9]*))?((?:/(?:[A-Za-z0-9\\-._~!$&'()*+,;=:@]|%[0-9A-Fa-f]{2})*)*)|/((?:(?:[A-Za-z0-9\\-._~!$&'()*+,;=:@]|%[0-9A-Fa-f]{2})+(?:/(?:[A-Za-z0-9\\-._~!$&'()*+,;=:@]|%[0-9A-Fa-f]{2})*)*)?)|((?:[A-Za-z0-9\\-._~!$&'()*+,;=:@]|%[0-9A-Fa-f]{2})+(?:/(?:[A-Za-z0-9\\-._~!$&'()*+,;=:@]|%[0-9A-Fa-f]{2})*)*)|)(?:\\?((?:[A-Za-z0-9\\-._~!$&'()*+,;=:@/?]|%[0-9A-Fa-f]{2})*))?(?:\\#((?:[A-Za-z0-9\\-._~!$&'()*+,;=:@/?]|%[0-9A-Fa-f]{2})*))?");
313227
+
313195
313228
  // ../firelight-gui/loader.mts
313196
313229
  init_cjs_shim();
313197
313230
 
@@ -316082,6 +316115,7 @@ var style_default = {
316082
316115
  "is-disabled": "style_is-disabled",
316083
316116
  resourceBreadcrumbsNav: "style_resourceBreadcrumbsNav",
316084
316117
  navListView: "style_navListView",
316118
+ navListViewItemLink: "style_navListViewItemLink",
316085
316119
  browserBar: "style_browserBar",
316086
316120
  browserBarTitle: "style_browserBarTitle",
316087
316121
  browserBarTitleLink: "style_browserBarTitleLink",
@@ -316110,8 +316144,14 @@ var BrowserBar = function({
316110
316144
  }, []);
316111
316145
  const showToolbar = onActivateBrowsingMode || activeBrowsingMode;
316112
316146
  (0, import_react124.useEffect)(() => {
316113
- console.debug("Load progress", loadProgress);
316114
- }, [loadProgress]);
316147
+ if (loadProgress) {
316148
+ console.time("BrowserBar progress spinner");
316149
+ return function cleanUp() {
316150
+ console.timeEnd("BrowserBar progress spinner");
316151
+ };
316152
+ }
316153
+ return;
316154
+ }, [!!loadProgress]);
316115
316155
  return /* @__PURE__ */ import_react124.default.createElement($7167f8da3cce35e4$export$2881499e37b75b9a, { theme: $bf24a13e98395dd3$export$bca14c5b3b88a9c9, ...providerProps }, /* @__PURE__ */ import_react124.default.createElement("div", { className: style_default.browserBar }, /* @__PURE__ */ import_react124.default.createElement("header", { className: style_default.browserBarTitle }, /* @__PURE__ */ import_react124.default.createElement("h1", null, /* @__PURE__ */ import_react124.default.createElement("a", { href: rootURL, className: style_default.browserBarTitleLink }, title))), showToolbar ? /* @__PURE__ */ import_react124.default.createElement(
316116
316156
  $13c3c67164f4d5be$export$4c260019440d418f,
316117
316157
  {
@@ -316439,40 +316479,6 @@ function processAttributes(el, locateResource, reverseResource, onIntegrityViola
316439
316479
 
316440
316480
  // ../anafero/ContentReader.mts
316441
316481
  init_cjs_shim();
316442
-
316443
- // ../anafero/URI.mts
316444
- init_cjs_shim();
316445
- function makeURI(input) {
316446
- const match19 = ("" + input).match(pattern2);
316447
- if (!match19) {
316448
- throw new SyntaxError("Invalid URI");
316449
- }
316450
- return {
316451
- protocol: match19[1],
316452
- slashes: match19[2],
316453
- authority: match19[3],
316454
- host: match19[4],
316455
- port: match19[5],
316456
- path: match19[6] || match19[7] || match19[8],
316457
- query: match19[9],
316458
- hash: match19[10]
316459
- };
316460
- }
316461
- function isURIString(input) {
316462
- return ["urn:", "http:", "https:", "ftp:", "file:"].find((prefix) => input.startsWith(prefix)) !== void 0;
316463
- if (input.startsWith("urn:")) {
316464
- return true;
316465
- }
316466
- try {
316467
- makeURI(input);
316468
- return true;
316469
- } catch (e3) {
316470
- return false;
316471
- }
316472
- }
316473
- var pattern2 = new RegExp("([A-Za-z][A-Za-z0-9+\\-.]{2,6}):(?:(//)(?:((?:[A-Za-z0-9\\-._~!$&'()*+,;=:]|%[0-9A-Fa-f]{2})*)@)?((?:\\[(?:(?:(?:(?:[0-9A-Fa-f]{1,4}:){6}|::(?:[0-9A-Fa-f]{1,4}:){5}|(?:[0-9A-Fa-f]{1,4})?::(?:[0-9A-Fa-f]{1,4}:){4}|(?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))?(?:\\#((?:[A-Za-z0-9\\-._~!$&'()*+,;=:@/?]|%[0-9A-Fa-f]{2})*))?");
316474
-
316475
- // ../anafero/ContentReader.mts
316476
316482
  var makeContentReader = async function(entryPointURI, storeAdapters, contentAdapter, { fetchBlob, reportProgress, decodeXML, cache: cache3 }) {
316477
316483
  let totalPathCount = 0;
316478
316484
  let totalRelationCount = 0;
@@ -316538,10 +316544,11 @@ var makeContentReader = async function(entryPointURI, storeAdapters, contentAdap
316538
316544
  }
316539
316545
  const maybeContributingRelations = contentAdapter.contributingToHierarchy.filter((r4) => r4[0] === relation.predicate).map((r4) => r4.slice(1));
316540
316546
  if (maybeContributingRelations.length > 0) {
316541
- return resolvePredicateChainsToFirstValue(
316547
+ const result = resolvePredicateChainsToFirstValue(
316542
316548
  relation.target,
316543
316549
  maybeContributingRelations
316544
316550
  );
316551
+ return result ? result.replaceAll(":", "_").replaceAll("/", "_") : result;
316545
316552
  }
316546
316553
  return null;
316547
316554
  }
@@ -316603,6 +316610,7 @@ var makeContentReader = async function(entryPointURI, storeAdapters, contentAdap
316603
316610
  }
316604
316611
  function getResourceGraph(resourceURI) {
316605
316612
  if (!cache3.has(`graphs/${resourceURI}`)) {
316613
+ cache3.add(`graphs/${resourceURI}`, []);
316606
316614
  const queue = [resourceURI];
316607
316615
  while (queue.length > 0) {
316608
316616
  const currentResource = queue.pop();
@@ -316672,10 +316680,10 @@ var makeContentReader = async function(entryPointURI, storeAdapters, contentAdap
316672
316680
  const maybePathComponent = maybeGetPathComponent(rel);
316673
316681
  if (maybePathComponent) {
316674
316682
  if (!isValidPathComponent(maybePathComponent)) {
316683
+ console.error("Generated path component is not valid", maybePathComponent, rel);
316675
316684
  throw new Error("Generated path component is not valid");
316676
316685
  }
316677
- const encodedComponent = maybePathComponent.replace(":", "_");
316678
- const newPath = pathPrefix ? `${pathPrefix}/${encodedComponent}` : encodedComponent;
316686
+ const newPath = pathPrefix ? `${pathPrefix}/${maybePathComponent}` : maybePathComponent;
316679
316687
  processHierarchy(rel.target, newPath, onProgress);
316680
316688
  } else {
316681
316689
  processResourceContents(rel.target, pathPrefix);
@@ -316744,16 +316752,16 @@ var makeContentReader = async function(entryPointURI, storeAdapters, contentAdap
316744
316752
  const validAdapters = storeAdapters.filter((mod) => mod.canResolve(resourceURI) && mod.readerFromBlob !== void 0);
316745
316753
  for (const mod of validAdapters) {
316746
316754
  try {
316747
- return (await mod.readerFromBlob(blob, { decodeXML }))[1];
316755
+ const reader = (await mod.readerFromBlob(blob, { decodeXML }))[1];
316756
+ return reader;
316748
316757
  } catch (e3) {
316749
- console.warn("Failed to create resource reader for URI", mod.name, resourceURI);
316750
316758
  }
316751
316759
  }
316752
- throw new Error("Failed to initialize resource reader");
316760
+ throw new Error(`Failed to initialize resource reader for ${resourceURI}`);
316753
316761
  }
316754
316762
  };
316755
316763
  function isValidPathComponent(val) {
316756
- return val.indexOf("/") < 0 && val.indexOf("#") < 0;
316764
+ return val.indexOf("/") < 0 && val.indexOf(":") < 0 && val.indexOf("#") < 0;
316757
316765
  }
316758
316766
  function joinFileURI(baseFileURI, fileURI) {
316759
316767
  const baseFilePath = baseFileURI.startsWith("file:") ? baseFileURI.split("file:")[1] : void 0;
@@ -316975,14 +316983,22 @@ ${inject.head ?? ""}`;
316975
316983
  for (const [, , o2] of relations) {
316976
316984
  if (o2.startsWith("file:")) {
316977
316985
  const filePath = o2.split("file:")[1];
316978
- const filename = encodeURIComponent(filePath);
316986
+ const filename = o2.replaceAll("/", "_").replaceAll(":", "_");
316979
316987
  if (!assetsToWrite[filename]) {
316980
- assetsToWrite[filename] = await fetchBlobAtThisVersion(filePath);
316981
- resourceGraph.push([resourceURI, "isDownloadableAt", filename]);
316982
- resourceMap[filename] = o2;
316983
- resourceDescriptions[o2] = {
316984
- labelInPlainText: filePath
316985
- };
316988
+ try {
316989
+ assetsToWrite[filename] = await fetchBlobAtThisVersion(filePath);
316990
+ resourceGraph.push([
316991
+ o2,
316992
+ "isDownloadableAt",
316993
+ filename
316994
+ ]);
316995
+ resourceMap[filename] = o2;
316996
+ resourceDescriptions[o2] = {
316997
+ labelInPlainText: filePath
316998
+ };
316999
+ } catch (e3) {
317000
+ console.error("Failed to fetch asset", filePath);
317001
+ }
316986
317002
  }
316987
317003
  }
316988
317004
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@riboseinc/anafero-cli",
3
3
  "type": "module",
4
- "version": "0.0.41",
4
+ "version": "0.0.43",
5
5
  "packageManager": "yarn@4.5.0",
6
6
  "bin": {
7
7
  "build-site": "build-site.mjs"
Binary file
Binary file