Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,5 +49,8 @@ jobs:
- name: Generate the SDK reference
run: bun run generate-docs

- name: Generate the Prisma reference
run: bun run generate-docs:prisma

- name: Validate internal links and anchors
run: bun run validate-links
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,8 @@ content/stack/reference/stack/latest/
content/stack/reference/stack/v*/
content/stack/reference/drizzle/latest/
content/stack/reference/drizzle/v*/
content/docs/integrations/prisma/api-reference/*
!content/docs/integrations/prisma/api-reference/meta.json
.tmp-*
.env.local

Expand Down
2 changes: 1 addition & 1 deletion IA.md
Original file line number Diff line number Diff line change
Expand Up @@ -309,7 +309,7 @@ Two notes:
- [ ] ⛔ `/integrations/supabase/edge-functions` — pending Deno/FFI answer
- [ ] ⛔ `/integrations/supabase/realtime` — pending product verification
- [x] `/integrations/drizzle`
- [x] `/integrations/prisma` — Prisma ORM 8 RC, EQL v3, Prisma Postgres, and Prisma Compute
- [x] `/integrations/prisma` — Prisma ORM 8 RC, EQL v3, Prisma Postgres, Prisma Compute, and generated API reference
- [ ] `/integrations/aws/rds-aurora` — Proxy path
- [ ] `/integrations/aws/dynamodb`
- [ ] `/integrations/clerk`
Expand Down
14 changes: 14 additions & 0 deletions content/docs/integrations/prisma/api-reference/meta.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"title": "API reference",
"pages": [
"index",
"codec-types",
"column-types",
"control",
"operation-types",
"pack",
"runtime",
"stack",
"v3"
]
}
1 change: 1 addition & 0 deletions content/docs/integrations/prisma/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ It does not extend the classic `@prisma/client` API. For earlier Prisma releases
| --- | --- |
| Encrypt and query your first Prisma field | [Prisma ORM Quickstart](/integrations/prisma/quickstart) |
| Choose column types or look up query operators | [Schema and queries](/integrations/prisma/schema-and-queries) |
| Look up every exported function and type | [API reference](/integrations/prisma/api-reference) |
| Encrypt data already in production | [Prisma deployment guide](/integrations/prisma/deployment) |
| Use Prisma's managed database | [Prisma Postgres](/integrations/prisma/prisma-postgres) |
| Deploy the application with Prisma | [Prisma Compute](/integrations/prisma/prisma-compute) |
Expand Down
3 changes: 2 additions & 1 deletion content/docs/integrations/prisma/meta.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
"schema-and-queries",
"deployment",
"prisma-postgres",
"prisma-compute"
"prisma-compute",
"api-reference"
]
}
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"version": "0.0.0",
"private": true,
"scripts": {
"prebuild": "bun run generate-docs && bun run generate-docs:eql && bun run generate-docs:eql-api && bun run generate-docs:cli && bun run validate-content && bun run validate-mermaid && bun run validate-links && bun run validate-redirects",
"prebuild": "bun run generate-docs && bun run generate-docs:prisma && bun run generate-docs:eql && bun run generate-docs:eql-api && bun run generate-docs:cli && bun run validate-content && bun run validate-mermaid && bun run validate-links && bun run validate-redirects",
"build": "next build",
"dev": "next dev -p 3001",
"start": "next start",
Expand All @@ -12,6 +12,7 @@
"lint": "biome check",
"format": "biome format --write",
"generate-docs": "tsx scripts/generate-docs.ts",
"generate-docs:prisma": "tsx scripts/generate-prisma-docs.ts",
"generate-docs:eql": "tsx scripts/generate-eql-docs.ts",
"generate-docs:eql-api": "tsx scripts/generate-eql-api-docs.ts",
"generate-docs:cli": "tsx scripts/generate-cli-docs.ts",
Expand Down
45 changes: 45 additions & 0 deletions scripts/generate-prisma-docs.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
#!/usr/bin/env tsx
/** Generate the Prisma ORM integration's API reference from Stack main. */
import path from "node:path";
import { type DocsConfig, generateDocs } from "./lib/docs-generator.js";

const prismaConfig: DocsConfig = {
packageName: "@cipherstash/stack-prisma",
projectName: "@cipherstash/stack-prisma",
repoUrl: "https://github.com/cipherstash/stack.git",
sourceRef: "main",
tempDirName: ".tmp-stack-prisma",
baseOutputDir: path.join(
process.cwd(),
"content/docs/integrations/prisma/api-reference",
),
publicPath: "/integrations/prisma/api-reference",
metaTitle: "API reference",
versionedOutput: false,
entryPointBasePath: "packages/stack-prisma/src/exports",
router: "module",
flattenOutputFiles: true,
entryPoints: [
"./packages/stack-prisma/src/exports/codec-types.ts",
"./packages/stack-prisma/src/exports/column-types.ts",
"./packages/stack-prisma/src/exports/control.ts",
"./packages/stack-prisma/src/exports/operation-types.ts",
"./packages/stack-prisma/src/exports/pack.ts",
"./packages/stack-prisma/src/exports/runtime.ts",
"./packages/stack-prisma/src/exports/stack.ts",
"./packages/stack-prisma/src/exports/v3.ts",
],
tsconfigInclude: ["packages/stack-prisma/src/**/*"],
tagFilter: () => false,
referencePathSegment: "prisma",
frontmatterGlobals: {
type: "reference",
components: ["encryption", "eql"],
audience: ["developer"],
},
};

generateDocs(prismaConfig).catch((error) => {
console.error("Failed to generate the Prisma API reference:", error);
process.exit(1);
});
Loading