Skip to content

Commit

Permalink
work on orama search
Browse files Browse the repository at this point in the history
  • Loading branch information
ssalbdivad committed Mar 6, 2025
1 parent b80b281 commit 5bcc374
Show file tree
Hide file tree
Showing 7 changed files with 25 additions and 9 deletions.
4 changes: 4 additions & 0 deletions ark/attest/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

NOTE: This changelog is incomplete, but will include notable attest-specific changes (many updates consist almost entirely of bumped `arktype` versions for assertions).

## 0.44.3

Decouple attest trace/stats from pnpm

## 0.44.0

Support assertions for JSDoc contents associated with an `attest`ed value
Expand Down
2 changes: 1 addition & 1 deletion ark/attest/cli/shared.ts
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
export const baseDiagnosticTscCmd =
"pnpm tsc --noEmit --extendedDiagnostics --incremental false --tsBuildInfoFile null"
"npm exec -- tsc --noEmit --extendedDiagnostics --incremental false --tsBuildInfoFile null"
2 changes: 1 addition & 1 deletion ark/attest/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@ark/attest",
"version": "0.44.2",
"version": "0.44.3",
"license": "MIT",
"author": {
"name": "David Blass",
Expand Down
10 changes: 5 additions & 5 deletions ark/docs/app/static.json/route.ts
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
import type { OramaDocument } from "fumadocs-core/search/orama-cloud"
import { NextResponse } from "next/server"
import { source } from "../../lib/source"
import { source } from "../../lib/source.tsx"

export const revalidate = false

export const GET = async () => {
export const GET = () => {
const results: OramaDocument[] = []

for (const page of source.getPages()) {
results.push({
id: page.url,
structured: (await page.data.load()).structuredData,
structured: (page.data as any).structuredData,
url: page.url,
title: page.data.title,
description: page.data.description ?? ""
})
description: page.data.description
} as never)
}

return NextResponse.json(results)
Expand Down
File renamed without changes.
5 changes: 3 additions & 2 deletions ark/docs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"private": true,
"type": "module",
"scripts": {
"build": "next build",
"build": "next build && ts ./lib/updateOramaSearch.ts",
"dev": "next dev --turbo",
"buildAndStart": "pnpm build && pnpm start",
"start": "pnpm serve out",
Expand All @@ -15,9 +15,11 @@
},
"dependencies": {
"@ark/fs": "workspace:*",
"@ark/repo": "workspace:*",
"@ark/util": "workspace:*",
"@fumadocs/mdx-remote": "1.2.0",
"@icons-pack/react-simple-icons": "11.1.0",
"@oramacloud/client": "2.1.4",
"@shikijs/transformers": "2.3.2",
"arkdark": "workspace:*",
"arkthemes": "workspace:*",
Expand All @@ -43,7 +45,6 @@
},
"devDependencies": {
"@fumadocs/cli": "0.0.7",
"@oramacloud/client": "^2.1.4",
"@tailwindcss/postcss": "4.0.4",
"@types/mdx": "2.0.13",
"@types/react": "19.0.8",
Expand Down
11 changes: 11 additions & 0 deletions ark/repo/scratch.ts
Original file line number Diff line number Diff line change
@@ -1 +1,12 @@
import { type } from "arktype"

const identical = type({
grouping: "(0 | (1 | (2 | (3 | (4 | 5)[])[])[])[])[]",
nestedGenerics:
"Extract<Record<string, unknown> | boolean | null | unknown[], object>"
})

// fully reduced inference
// and fully runtime introspectable
console.log(identical.get("grouping").expression)
console.log(identical.get("nestedGenerics").expression)

0 comments on commit 5bcc374

Please sign in to comment.