react-lib-tools 0.0.39 → 0.0.42
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/{CommonQuestionsRoute-DKgVI5bf.cjs → CommonQuestionsRoute-BaUo7C5J.cjs} +2 -2
- package/dist/{CommonQuestionsRoute-DKgVI5bf.cjs.map → CommonQuestionsRoute-BaUo7C5J.cjs.map} +1 -1
- package/dist/{CommonQuestionsRoute-XeGPl1Yz.js → CommonQuestionsRoute-xnhbeLos.js} +2 -2
- package/dist/{CommonQuestionsRoute-XeGPl1Yz.js.map → CommonQuestionsRoute-xnhbeLos.js.map} +1 -1
- package/dist/{GettingStartedRoute-Dj9vAFwF.cjs → GettingStartedRoute-Caqc6Q58.cjs} +2 -2
- package/dist/{GettingStartedRoute-Dj9vAFwF.cjs.map → GettingStartedRoute-Caqc6Q58.cjs.map} +1 -1
- package/dist/{GettingStartedRoute-B1_jfqKR.js → GettingStartedRoute-Cp6EFnMw.js} +2 -2
- package/dist/{GettingStartedRoute-B1_jfqKR.js.map → GettingStartedRoute-Cp6EFnMw.js.map} +1 -1
- package/dist/{PageNotFound-pPQgf0wT.cjs → PageNotFound-7zWg_AHz.cjs} +2 -2
- package/dist/{PageNotFound-pPQgf0wT.cjs.map → PageNotFound-7zWg_AHz.cjs.map} +1 -1
- package/dist/{PageNotFound-BcpV_MGp.js → PageNotFound-CB141q5L.js} +2 -2
- package/dist/{PageNotFound-BcpV_MGp.js.map → PageNotFound-CB141q5L.js.map} +1 -1
- package/dist/{SupportRoute-CxxAV1Mo.js → SupportRoute-BdQqhjzf.js} +2 -2
- package/dist/{SupportRoute-CxxAV1Mo.js.map → SupportRoute-BdQqhjzf.js.map} +1 -1
- package/dist/{SupportRoute-BbSurNA_.cjs → SupportRoute-CIsa-DtE.cjs} +2 -2
- package/dist/{SupportRoute-BbSurNA_.cjs.map → SupportRoute-CIsa-DtE.cjs.map} +1 -1
- package/dist/{VersionsRoute-DpDr0_Rf.cjs → VersionsRoute-5s8sUTHm.cjs} +2 -2
- package/dist/{VersionsRoute-DpDr0_Rf.cjs.map → VersionsRoute-5s8sUTHm.cjs.map} +1 -1
- package/dist/{VersionsRoute-CeLRC38k.js → VersionsRoute-BuGTWWLr.js} +2 -2
- package/dist/{VersionsRoute-CeLRC38k.js.map → VersionsRoute-BuGTWWLr.js.map} +1 -1
- package/dist/{index-5mMRCwy2.js → index-Cpw2WkF7.js} +7 -7
- package/dist/{index-5mMRCwy2.js.map → index-Cpw2WkF7.js.map} +1 -1
- package/dist/{index-BWhTJgvX.cjs → index-rOOr2GGh.cjs} +2 -2
- package/dist/{index-BWhTJgvX.cjs.map → index-rOOr2GGh.cjs.map} +1 -1
- package/dist/react-lib-tools.cjs +1 -1
- package/dist/react-lib-tools.js +1 -1
- package/package.json +1 -2
- package/scripts/compile-search-index.ts +3 -10
- package/scripts/utils/search/crawlPage.ts +12 -3
package/dist/react-lib-tools.cjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("./index-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("./index-rOOr2GGh.cjs");exports.AppRoot=o.AppRoot;exports.Block=o.Block;exports.Box=o.Box;exports.Button=o.Button;exports.Callout=o.Callout;exports.Checkbox=o.Checkbox;exports.Code=o.Code;exports.ComponentProps=o.ComponentProps;exports.ComponentPropsSection=o.ComponentPropsSection;exports.DocsSection=o.DocsSection;exports.ErrorBoundary=o.ErrorBoundary;exports.ExternalLink=o.ExternalLink;exports.Header=o.Header;exports.ImperativeHandle=o.ImperativeHandle;exports.Input=o.Input;exports.Link=o.Link;exports.LoadingSpinner=o.LoadingSpinner;exports.NavLink=o.NavLink;exports.NavSection=o.NavSection;exports.Radio=o.Radio;exports.Select=o.Select;exports.Tooltip=o.Tooltip;exports.assert=o.assert;exports.cn=o.cn;exports.getIntentClassNames=o.getIntentClassNames;
|
|
2
2
|
//# sourceMappingURL=react-lib-tools.cjs.map
|
package/dist/react-lib-tools.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { A as o, a as e, B as n, b as t, C as r, c as i, d as p, i as c, j as l, D as d, e as C, E as k, H as m, I as B, f as L, L as S, g as u, N as x, h as I, R as N, k as g, T as v, l as E, m as H, n as R } from "./index-
|
|
1
|
+
import { A as o, a as e, B as n, b as t, C as r, c as i, d as p, i as c, j as l, D as d, e as C, E as k, H as m, I as B, f as L, L as S, g as u, N as x, h as I, R as N, k as g, T as v, l as E, m as H, n as R } from "./index-Cpw2WkF7.js";
|
|
2
2
|
export {
|
|
3
3
|
o as AppRoot,
|
|
4
4
|
e as Block,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "react-lib-tools",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.42",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"author": "Brian Vaughn <brian.david.vaughn@gmail.com> (https://github.com/bvaughn/)",
|
|
6
6
|
"contributors": [
|
|
@@ -62,7 +62,6 @@
|
|
|
62
62
|
"@headlessui/react": "^2.2.4",
|
|
63
63
|
"@headlessui/tailwindcss": "^0.2.2",
|
|
64
64
|
"@heroicons/react": "^2.2.0",
|
|
65
|
-
"@puppeteer/browsers": "^2.13.0",
|
|
66
65
|
"@tailwindcss/vite": "^4.1.11",
|
|
67
66
|
"@tailwindplus/elements": "^1.0.5",
|
|
68
67
|
"@testing-library/jest-dom": "^6.6.4",
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { Browser, BrowserPlatform, install } from "@puppeteer/browsers";
|
|
2
1
|
import Fuse from "fuse.js";
|
|
3
2
|
import { writeFile } from "node:fs/promises";
|
|
4
3
|
import { join } from "node:path";
|
|
@@ -7,26 +6,20 @@ import { crawlPage } from "./utils/search/crawlPage";
|
|
|
7
6
|
import type { SiteSearchPage } from "./utils/search/types";
|
|
8
7
|
|
|
9
8
|
export async function compileSearchIndex({
|
|
9
|
+
chromeExecutablePath,
|
|
10
10
|
filterSelector,
|
|
11
11
|
host = "http://localhost:3000",
|
|
12
12
|
outputPath = ["public", "generated"]
|
|
13
13
|
}: {
|
|
14
|
+
chromeExecutablePath?: string | undefined;
|
|
14
15
|
filterSelector?: string | undefined;
|
|
15
16
|
host?: string;
|
|
16
17
|
outputPath?: string[];
|
|
17
18
|
} = {}) {
|
|
18
19
|
const recordsMap: Record<string, SiteSearchPage> = {};
|
|
19
20
|
|
|
20
|
-
console.log("Installing browsers ...");
|
|
21
|
-
|
|
22
|
-
await install({
|
|
23
|
-
browser: Browser.CHROME,
|
|
24
|
-
buildId: "120.0.6099.109",
|
|
25
|
-
platform: BrowserPlatform.LINUX,
|
|
26
|
-
cacheDir: "/tmp/puppeteer-cache"
|
|
27
|
-
});
|
|
28
|
-
|
|
29
21
|
await crawlPage({
|
|
22
|
+
chromeExecutablePath,
|
|
30
23
|
filterSelector,
|
|
31
24
|
host,
|
|
32
25
|
path: "/",
|
|
@@ -3,11 +3,13 @@ import { stopWords } from "./stopWords";
|
|
|
3
3
|
import type { SiteSearchPage } from "./types";
|
|
4
4
|
|
|
5
5
|
export async function crawlPage({
|
|
6
|
+
chromeExecutablePath,
|
|
6
7
|
filterSelector,
|
|
7
8
|
host,
|
|
8
9
|
path,
|
|
9
10
|
records
|
|
10
11
|
}: {
|
|
12
|
+
chromeExecutablePath?: string | undefined;
|
|
11
13
|
filterSelector?: string | undefined;
|
|
12
14
|
host: string;
|
|
13
15
|
path: string;
|
|
@@ -15,9 +17,16 @@ export async function crawlPage({
|
|
|
15
17
|
}) {
|
|
16
18
|
console.log(`Crawling ${host}${path} ...`);
|
|
17
19
|
|
|
18
|
-
const browser = await puppeteer.launch(
|
|
19
|
-
|
|
20
|
-
|
|
20
|
+
const browser = await puppeteer.launch(
|
|
21
|
+
chromeExecutablePath
|
|
22
|
+
? {
|
|
23
|
+
executablePath: chromeExecutablePath,
|
|
24
|
+
headless: true
|
|
25
|
+
}
|
|
26
|
+
: {
|
|
27
|
+
headless: true
|
|
28
|
+
}
|
|
29
|
+
);
|
|
21
30
|
|
|
22
31
|
const page = await browser.newPage();
|
|
23
32
|
|