@sntlr/registry-shell 1.1.3 → 2.0.0

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,19 +0,0 @@
1
- import { NextRequest, NextResponse } from "next/server"
2
- import { registry } from "@shell/registry.config"
3
-
4
- /**
5
- * Serves the user registry's `public/props/{name}.json` files via the
6
- * adapter, so the props table inside the Docs tab can fetch them through a
7
- * stable URL even though the files live in the user's project.
8
- */
9
- export async function GET(
10
- _request: NextRequest,
11
- { params }: { params: Promise<{ name: string }> },
12
- ) {
13
- const { name } = await params
14
- const data = registry?.getPropsData ? await registry.getPropsData(name) : null
15
- if (!data) {
16
- return NextResponse.json({ error: "Props data not found" }, { status: 404 })
17
- }
18
- return NextResponse.json(data)
19
- }
@@ -1,14 +0,0 @@
1
- import { NextRequest, NextResponse } from "next/server"
2
- import { registry } from "@shell/registry.config"
3
-
4
- export async function GET(
5
- _request: NextRequest,
6
- { params }: { params: Promise<{ name: string }> },
7
- ) {
8
- const { name } = await params
9
- const data = registry ? await registry.getRegistryItem(name) : null
10
- if (!data) {
11
- return NextResponse.json({ error: "Registry item not found" }, { status: 404 })
12
- }
13
- return NextResponse.json(data)
14
- }
@@ -1,19 +0,0 @@
1
- import { NextRequest, NextResponse } from "next/server"
2
- import { registry } from "@shell/registry.config"
3
-
4
- /**
5
- * Serves the user registry's `public/tests/{name}.json` files via the
6
- * adapter, so the Tests tab can fetch them through standard URLs even though
7
- * the files live in the user's project rather than the shell's `public/`.
8
- */
9
- export async function GET(
10
- _request: NextRequest,
11
- { params }: { params: Promise<{ name: string }> },
12
- ) {
13
- const { name } = await params
14
- const data = registry?.getTestData ? await registry.getTestData(name) : null
15
- if (!data) {
16
- return NextResponse.json({ error: "Test data not found" }, { status: 404 })
17
- }
18
- return NextResponse.json(data)
19
- }