docs: update portal for WRNexusJS 0.2.17

This commit is contained in:
2026-07-13 14:07:37 +05:30
parent ce8c43da9d
commit 9fc364ea41
81 changed files with 4388 additions and 594 deletions
+20 -1
View File
@@ -20,6 +20,7 @@ const expected = [
"db",
"dev-server",
"encryption",
"helpers",
"i18n",
"jwt",
"mobile",
@@ -107,6 +108,24 @@ test("portal exposes truthful access and machine discovery", () => {
]) {
expect(existsSync(join(root, "public", asset))).toBe(true);
}
const llms = readFileSync(join(root, "public", "llms.txt"), "utf8");
expect(llms).toContain(`# WRNexusJS documentation ${frameworkVersion}`);
expect(llms).toContain("# Installed package documentation");
expect(llms).toContain("## @wrnexus/helpers");
expect(llms).toContain("redirectToLogin");
});
test("workspace guide documents app addition and safe forward-auth redirects", () => {
const source = readFileSync(
join(root, "app", "pages", "guides", "workspaces-and-gateway.wrn"),
"utf8",
);
expect(source).toContain("wrnexus workspace add reports --domain=reports.localhost");
expect(source).toContain("@wrnexus/helpers");
expect(source).toContain("redirectToLogin");
expect(source).toContain("allowedHosts");
expect(source).toContain("/api/verify");
});
test("package index includes searchable category filters", () => {
@@ -117,7 +136,7 @@ test("package index includes searchable category filters", () => {
expect(source).toContain("category === 'All'");
expect(source).not.toContain("category === 'All' ||");
expect(source).not.toContain(") && (query");
expect(source.match(/class="package-card"/g)).toHaveLength(25);
expect(source.match(/class="package-card"/g)).toHaveLength(expected.length);
});
test("clicking a category hides packages from other categories", async () => {