@omniharmonic/openspace-cli 0.1.9 → 0.1.10

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.
@@ -1,9 +1,9 @@
1
1
  import { createRequire as __osCreateRequire } from "node:module"; const require = __osCreateRequire(import.meta.url);
2
2
  import {
3
3
  generateAgentsMd
4
- } from "./chunk-KAJOS2YV.js";
4
+ } from "./chunk-RD24SW4M.js";
5
5
  import "./chunk-26AZCID5.js";
6
6
  export {
7
7
  generateAgentsMd
8
8
  };
9
- //# sourceMappingURL=agents-md-A4JWPOMG.js.map
9
+ //# sourceMappingURL=agents-md-UYV4JIOW.js.map
package/dist/bin.js CHANGED
@@ -3,9 +3,9 @@ import { createRequire as __osCreateRequire } from "node:module"; const require
3
3
  import {
4
4
  processIo,
5
5
  run
6
- } from "./chunk-ZOCHSBTR.js";
7
- import "./chunk-TOGLFCCF.js";
8
- import "./chunk-KAJOS2YV.js";
6
+ } from "./chunk-RLERIG46.js";
7
+ import "./chunk-OS5MWJZG.js";
8
+ import "./chunk-RD24SW4M.js";
9
9
  import "./chunk-26AZCID5.js";
10
10
 
11
11
  // src/bin.ts
@@ -8702,7 +8702,8 @@ function formFrom(el) {
8702
8702
  successMessage: text(find(el, byClass("form-submission-text"))) || void 0
8703
8703
  };
8704
8704
  }
8705
- var stripTags = (html) => html.replace(/<br\s*\/?>/gi, " ").replace(/<[^>]+>/g, "").replace(/&nbsp;/g, " ").replace(/&amp;/g, "&").replace(/&lt;/g, "<").replace(/&gt;/g, ">").replace(/&quot;/g, '"').replace(/&#39;/g, "'").replace(/\s+/g, " ").trim();
8705
+ var stripTags = (html) => html.replace(/<br\s*\/?>/gi, " ").replace(/<\/(?:p|pre|h[1-6]|li|div|blockquote|dd|dt|tr|td|th)>/gi, " ").replace(/<[^>]+>/g, "").replace(/&nbsp;/g, " ").replace(/&amp;/g, "&").replace(/&lt;/g, "<").replace(/&gt;/g, ">").replace(/&quot;/g, '"').replace(/&#39;/g, "'").replace(/&#x([0-9a-f]{1,6});/gi, (_, h) => safeChar(Number.parseInt(h, 16))).replace(/&#(\d{1,7});/g, (_, n) => safeChar(Number(n))).replace(/\s+/g, " ").trim();
8706
+ var safeChar = (code) => code > 0 && code <= 1114111 && !(code >= 55296 && code <= 57343) ? String.fromCodePoint(code) : "";
8706
8707
  function imageCard(el) {
8707
8708
  const wrapper = find(el, (e) => hasClass(e, "image-card-wrapper") || hasClass(e, "image-card"));
8708
8709
  if (!wrapper) return void 0;
@@ -11626,9 +11627,20 @@ function parsePage(html) {
11626
11627
  );
11627
11628
  let sections = [];
11628
11629
  let version;
11630
+ let collectionAt;
11629
11631
  if (pageSections.length) {
11630
11632
  version = "7.1";
11631
- sections = pageSections.map(parseSection).filter((s) => !!s);
11633
+ for (const el of pageSections) {
11634
+ if (collectionAt === void 0 && find(
11635
+ el,
11636
+ (e) => /(?:^|\s)(?:product-list|ProductList|blog-list|blog-basic-grid|blog-side-by-side|blog-alternating|blog-single-column|blog-masonry|events-list|eventlist|collection-content-wrapper)(?:\s|$|-)/.test(
11637
+ attr(e, "class") ?? ""
11638
+ )
11639
+ ))
11640
+ collectionAt = sections.length;
11641
+ const sec = parseSection(el);
11642
+ if (sec) sections.push(sec);
11643
+ }
11632
11644
  } else if (indexSections.length) {
11633
11645
  version = "7.0";
11634
11646
  sections = indexSections.map(parseSection).filter((s) => !!s);
@@ -11740,6 +11752,7 @@ function parsePage(html) {
11740
11752
  ...lang ? { lang } : {},
11741
11753
  bodyClasses,
11742
11754
  sections,
11755
+ ...collectionAt !== void 0 ? { collectionAt } : {},
11743
11756
  footer,
11744
11757
  header: {
11745
11758
  ...siteTitle ? { siteTitle } : {},
@@ -12420,7 +12433,14 @@ ${r.text}`;
12420
12433
  }
12421
12434
  collections.push(c);
12422
12435
  if (path === "/")
12423
- pages.push({ path: "/", title: "Home", seo, sections: got.page.sections, homeOf: c.path });
12436
+ pages.push({
12437
+ path: "/",
12438
+ title: "Home",
12439
+ seo,
12440
+ sections: got.page.sections,
12441
+ homeOf: c.path,
12442
+ ...got.page.collectionAt !== void 0 ? { homeAt: got.page.collectionAt } : {}
12443
+ });
12424
12444
  if (kind === "products")
12425
12445
  notices.push({
12426
12446
  kind: "commerce",
@@ -12871,4 +12891,4 @@ export {
12871
12891
  crawlSquarespace,
12872
12892
  crawlGeneric
12873
12893
  };
12874
- //# sourceMappingURL=chunk-TOGLFCCF.js.map
12894
+ //# sourceMappingURL=chunk-OS5MWJZG.js.map