@tscircuit/fake-snippets 0.0.106 → 0.0.108
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/CLAUDE.md +92 -0
- package/api/generated-index.js +84 -25
- package/biome.json +7 -1
- package/bun-tests/fake-snippets-api/routes/package_builds/get.test.ts +0 -15
- package/bun-tests/fake-snippets-api/routes/package_builds/list.test.ts +0 -12
- package/dist/bundle.js +360 -434
- package/dist/index.d.ts +26 -15
- package/dist/index.js +40 -21
- package/dist/schema.d.ts +32 -24
- package/dist/schema.js +7 -5
- package/fake-snippets-api/lib/db/db-client.ts +19 -1
- package/fake-snippets-api/lib/db/schema.ts +6 -3
- package/fake-snippets-api/lib/db/seed.ts +23 -12
- package/fake-snippets-api/lib/public-mapping/public-map-package-build.ts +0 -3
- package/fake-snippets-api/lib/public-mapping/public-map-package-release.ts +3 -0
- package/fake-snippets-api/routes/api/package_builds/list.ts +0 -1
- package/package.json +3 -2
- package/src/App.tsx +27 -9
- package/src/components/FileSidebar.tsx +14 -159
- package/src/components/PackageBreadcrumb.tsx +111 -0
- package/src/components/ViewPackagePage/components/mobile-sidebar.tsx +1 -1
- package/src/components/ViewPackagePage/components/sidebar-about-section.tsx +18 -2
- package/src/components/ViewPackagePage/components/sidebar-releases-section.tsx +18 -8
- package/src/components/preview/BuildsList.tsx +84 -167
- package/src/components/preview/ConnectedPackagesList.tsx +92 -62
- package/src/components/preview/ConnectedRepoOverview.tsx +171 -155
- package/src/components/preview/{ConnectedRepoDashboard.tsx → PackageReleasesDashboard.tsx} +31 -69
- package/src/components/preview/index.tsx +20 -154
- package/src/hooks/use-package-builds.ts +0 -48
- package/src/hooks/use-package-release-by-id-or-version.ts +36 -0
- package/src/hooks/use-package-release.ts +32 -0
- package/src/index.css +24 -0
- package/src/lib/utils/isUuid.ts +5 -0
- package/src/lib/utils/transformFilesToTreeData.tsx +195 -0
- package/src/pages/404.tsx +3 -5
- package/src/pages/preview-release.tsx +269 -0
- package/src/pages/release-builds.tsx +99 -0
- package/src/pages/release-detail.tsx +120 -0
- package/src/pages/releases.tsx +55 -0
- package/fake-snippets-api/routes/api/package_builds/latest.ts +0 -109
- package/src/hooks/use-snippets-base-api-url.ts +0 -3
- package/src/pages/preview-build.tsx +0 -380
- package/src/pages/view-connected-repo.tsx +0 -49
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
import { useParams } from "wouter"
|
|
2
|
-
import NotFoundPage from "./404"
|
|
3
|
-
import { ConnectedRepoDashboard } from "@/components/preview"
|
|
4
|
-
import { usePackageBuild } from "@/hooks/use-package-builds"
|
|
5
|
-
import { usePackageReleaseById } from "@/hooks/use-package-release"
|
|
6
|
-
import { usePackageById } from "@/hooks/use-package-by-package-id"
|
|
7
|
-
|
|
8
|
-
export default function ViewConnectedRepoOverview() {
|
|
9
|
-
const params = useParams<{ buildId: string }>()
|
|
10
|
-
const {
|
|
11
|
-
data: packageBuild,
|
|
12
|
-
isLoading: isLoadingBuild,
|
|
13
|
-
error: buildError,
|
|
14
|
-
} = usePackageBuild(params?.buildId)
|
|
15
|
-
const {
|
|
16
|
-
data: packageRelease,
|
|
17
|
-
isLoading: isLoadingRelease,
|
|
18
|
-
error: releaseError,
|
|
19
|
-
} = usePackageReleaseById(packageBuild?.package_release_id)
|
|
20
|
-
const {
|
|
21
|
-
data: buildPackage,
|
|
22
|
-
isLoading: isLoadingPackage,
|
|
23
|
-
error: packageError,
|
|
24
|
-
} = usePackageById(String(packageRelease?.package_id))
|
|
25
|
-
|
|
26
|
-
if (isLoadingBuild || isLoadingRelease || isLoadingPackage) {
|
|
27
|
-
return null
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
if (buildError?.status === 404 || !packageBuild) {
|
|
31
|
-
return <NotFoundPage heading="Build Not Found" />
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
if (releaseError?.status === 404 || !packageRelease) {
|
|
35
|
-
return <NotFoundPage heading="Package Release Not Found" />
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
if (packageError?.status === 404 || !buildPackage) {
|
|
39
|
-
return <NotFoundPage heading="Package Not Found" />
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
return (
|
|
43
|
-
<ConnectedRepoDashboard
|
|
44
|
-
latestBuild={packageBuild}
|
|
45
|
-
pkg={buildPackage}
|
|
46
|
-
packageRelease={packageRelease}
|
|
47
|
-
/>
|
|
48
|
-
)
|
|
49
|
-
}
|