blodemd 0.0.15 → 0.2.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.
Files changed (286) hide show
  1. package/README.md +26 -1
  2. package/dist/cli.mjs +217 -217
  3. package/dist/cli.mjs.map +1 -1
  4. package/package.json +3 -36
  5. package/dev-server/app/[[...slug]]/page.tsx +0 -140
  6. package/dev-server/app/blodemd-dev/invalidate/route.ts +0 -12
  7. package/dev-server/app/blodemd-dev/static/[...path]/route.ts +0 -32
  8. package/dev-server/app/blodemd-dev/version/route.ts +0 -14
  9. package/dev-server/app/blodemd-internal/proxy/route.ts +0 -86
  10. package/dev-server/app/error.tsx +0 -24
  11. package/dev-server/app/favicon.ico +0 -0
  12. package/dev-server/app/globals.css +0 -4
  13. package/dev-server/app/layout.tsx +0 -38
  14. package/dev-server/app/not-found.tsx +0 -18
  15. package/dev-server/app/search/route.ts +0 -17
  16. package/dev-server/components/dev-reload-script.tsx +0 -86
  17. package/dev-server/components/providers.tsx +0 -15
  18. package/dev-server/lib/dev-state.ts +0 -8
  19. package/dev-server/lib/local-content-source.ts +0 -103
  20. package/dev-server/lib/local-runtime.tsx +0 -555
  21. package/dev-server/next-env.d.ts +0 -5
  22. package/dev-server/next.config.js +0 -54
  23. package/dev-server/package.json +0 -61
  24. package/dev-server/postcss.config.mjs +0 -7
  25. package/dev-server/public/glide-variable.woff2 +0 -0
  26. package/dev-server/tsconfig.json +0 -50
  27. package/docs/app/globals.css +0 -471
  28. package/docs/components/animate-ui/primitives/buttons/button.tsx +0 -14
  29. package/docs/components/api/api-playground.tsx +0 -467
  30. package/docs/components/api/api-reference.tsx +0 -157
  31. package/docs/components/content/collection-index.tsx +0 -114
  32. package/docs/components/docs/contextual-menu.tsx +0 -495
  33. package/docs/components/docs/copy-page-menu.tsx +0 -364
  34. package/docs/components/docs/doc-header.tsx +0 -223
  35. package/docs/components/docs/doc-shell.tsx +0 -355
  36. package/docs/components/docs/doc-sidebar.tsx +0 -256
  37. package/docs/components/docs/doc-toc.tsx +0 -46
  38. package/docs/components/docs/mobile-nav.tsx +0 -195
  39. package/docs/components/docs/sidebar-active-highlight.tsx +0 -34
  40. package/docs/components/docs/sidebar-scroll-area.tsx +0 -63
  41. package/docs/components/git/repo-picker.tsx +0 -529
  42. package/docs/components/icons/doc-icon.tsx +0 -96
  43. package/docs/components/mdx/accordion.tsx +0 -83
  44. package/docs/components/mdx/agent-instructions.tsx +0 -17
  45. package/docs/components/mdx/badge.tsx +0 -79
  46. package/docs/components/mdx/callout.tsx +0 -88
  47. package/docs/components/mdx/card.tsx +0 -110
  48. package/docs/components/mdx/code-block.tsx +0 -80
  49. package/docs/components/mdx/code-group.tsx +0 -203
  50. package/docs/components/mdx/color.tsx +0 -87
  51. package/docs/components/mdx/columns.tsx +0 -25
  52. package/docs/components/mdx/expandable.tsx +0 -45
  53. package/docs/components/mdx/field-layout.tsx +0 -77
  54. package/docs/components/mdx/frame.tsx +0 -23
  55. package/docs/components/mdx/get-text-content.ts +0 -18
  56. package/docs/components/mdx/icon.tsx +0 -12
  57. package/docs/components/mdx/iframe.tsx +0 -62
  58. package/docs/components/mdx/index.tsx +0 -121
  59. package/docs/components/mdx/installer.tsx +0 -20
  60. package/docs/components/mdx/panel.tsx +0 -11
  61. package/docs/components/mdx/param-field.tsx +0 -56
  62. package/docs/components/mdx/preview.tsx +0 -36
  63. package/docs/components/mdx/prompt.tsx +0 -63
  64. package/docs/components/mdx/request-example.tsx +0 -27
  65. package/docs/components/mdx/response-field.tsx +0 -42
  66. package/docs/components/mdx/steps.tsx +0 -92
  67. package/docs/components/mdx/tabs.tsx +0 -193
  68. package/docs/components/mdx/tile.tsx +0 -43
  69. package/docs/components/mdx/tooltip.tsx +0 -71
  70. package/docs/components/mdx/tree.tsx +0 -120
  71. package/docs/components/mdx/type-table.tsx +0 -71
  72. package/docs/components/mdx/update.tsx +0 -44
  73. package/docs/components/mdx/video.tsx +0 -45
  74. package/docs/components/mdx/view.tsx +0 -66
  75. package/docs/components/posthog-provider.tsx +0 -42
  76. package/docs/components/providers.tsx +0 -15
  77. package/docs/components/tenant-analytics.tsx +0 -49
  78. package/docs/components/third-parties.tsx +0 -32
  79. package/docs/components/ui/badge.tsx +0 -61
  80. package/docs/components/ui/breadcrumb.tsx +0 -112
  81. package/docs/components/ui/button-group.tsx +0 -83
  82. package/docs/components/ui/button.tsx +0 -65
  83. package/docs/components/ui/card.tsx +0 -92
  84. package/docs/components/ui/command.tsx +0 -167
  85. package/docs/components/ui/copy-button.tsx +0 -129
  86. package/docs/components/ui/dialog.tsx +0 -146
  87. package/docs/components/ui/field.tsx +0 -237
  88. package/docs/components/ui/input.tsx +0 -23
  89. package/docs/components/ui/kbd.tsx +0 -98
  90. package/docs/components/ui/label.tsx +0 -22
  91. package/docs/components/ui/morph-icon.tsx +0 -79
  92. package/docs/components/ui/popover.tsx +0 -267
  93. package/docs/components/ui/search-dialog.tsx +0 -431
  94. package/docs/components/ui/search.tsx +0 -101
  95. package/docs/components/ui/separator.tsx +0 -26
  96. package/docs/components/ui/sheet.tsx +0 -133
  97. package/docs/components/ui/sidebar.tsx +0 -758
  98. package/docs/components/ui/skeleton.tsx +0 -11
  99. package/docs/components/ui/switch.tsx +0 -32
  100. package/docs/components/ui/tabs.tsx +0 -138
  101. package/docs/components/ui/theme-toggle.tsx +0 -62
  102. package/docs/components/ui/tooltip.tsx +0 -53
  103. package/docs/components/web-mcp.tsx +0 -115
  104. package/docs/lib/agent-skills.ts +0 -48
  105. package/docs/lib/api-client.ts +0 -72
  106. package/docs/lib/config.ts +0 -6
  107. package/docs/lib/content-root.ts +0 -33
  108. package/docs/lib/content-source.ts +0 -70
  109. package/docs/lib/contextual-options.ts +0 -222
  110. package/docs/lib/dashboard-session.ts +0 -167
  111. package/docs/lib/db.ts +0 -13
  112. package/docs/lib/docs-collection.ts +0 -7
  113. package/docs/lib/docs-runtime.tsx +0 -745
  114. package/docs/lib/edge-config.ts +0 -95
  115. package/docs/lib/env.ts +0 -23
  116. package/docs/lib/etag.ts +0 -22
  117. package/docs/lib/github-install.ts +0 -33
  118. package/docs/lib/llms-full.ts +0 -82
  119. package/docs/lib/marketing-markdown.ts +0 -79
  120. package/docs/lib/marketing-site.ts +0 -31
  121. package/docs/lib/mdx.ts +0 -98
  122. package/docs/lib/navigation.ts +0 -288
  123. package/docs/lib/openapi-proxy.ts +0 -88
  124. package/docs/lib/openapi.ts +0 -158
  125. package/docs/lib/platform-config.ts +0 -6
  126. package/docs/lib/project-authz.ts +0 -46
  127. package/docs/lib/routes.ts +0 -103
  128. package/docs/lib/server-cache.ts +0 -83
  129. package/docs/lib/shiki.ts +0 -44
  130. package/docs/lib/supabase.ts +0 -37
  131. package/docs/lib/tenancy.ts +0 -364
  132. package/docs/lib/tenant-headers.ts +0 -43
  133. package/docs/lib/tenant-static.ts +0 -705
  134. package/docs/lib/tenant-utility-context.ts +0 -62
  135. package/docs/lib/tenants.ts +0 -72
  136. package/docs/lib/theme.ts +0 -29
  137. package/docs/lib/time-ago.ts +0 -24
  138. package/docs/lib/toc.ts +0 -2
  139. package/docs/lib/use-mobile.ts +0 -19
  140. package/docs/lib/use-tab-observer.ts +0 -71
  141. package/docs/lib/utils.ts +0 -5
  142. package/packages/@repo/common/dist/index.d.ts +0 -16
  143. package/packages/@repo/common/dist/index.d.ts.map +0 -1
  144. package/packages/@repo/common/dist/index.js +0 -84
  145. package/packages/@repo/common/package.json +0 -34
  146. package/packages/@repo/common/src/index.ts +0 -101
  147. package/packages/@repo/contracts/dist/analytics.d.ts +0 -21
  148. package/packages/@repo/contracts/dist/analytics.d.ts.map +0 -1
  149. package/packages/@repo/contracts/dist/analytics.js +0 -18
  150. package/packages/@repo/contracts/dist/dates.d.ts +0 -4
  151. package/packages/@repo/contracts/dist/dates.d.ts.map +0 -1
  152. package/packages/@repo/contracts/dist/dates.js +0 -2
  153. package/packages/@repo/contracts/dist/deployment.d.ts +0 -71
  154. package/packages/@repo/contracts/dist/deployment.d.ts.map +0 -1
  155. package/packages/@repo/contracts/dist/deployment.js +0 -46
  156. package/packages/@repo/contracts/dist/domain.d.ts +0 -94
  157. package/packages/@repo/contracts/dist/domain.d.ts.map +0 -1
  158. package/packages/@repo/contracts/dist/domain.js +0 -36
  159. package/packages/@repo/contracts/dist/git.d.ts +0 -28
  160. package/packages/@repo/contracts/dist/git.d.ts.map +0 -1
  161. package/packages/@repo/contracts/dist/git.js +0 -24
  162. package/packages/@repo/contracts/dist/ids.d.ts +0 -14
  163. package/packages/@repo/contracts/dist/ids.d.ts.map +0 -1
  164. package/packages/@repo/contracts/dist/ids.js +0 -11
  165. package/packages/@repo/contracts/dist/index.d.ts +0 -11
  166. package/packages/@repo/contracts/dist/index.d.ts.map +0 -1
  167. package/packages/@repo/contracts/dist/index.js +0 -12
  168. package/packages/@repo/contracts/dist/pagination.d.ts +0 -23
  169. package/packages/@repo/contracts/dist/pagination.d.ts.map +0 -1
  170. package/packages/@repo/contracts/dist/pagination.js +0 -15
  171. package/packages/@repo/contracts/dist/project.d.ts +0 -42
  172. package/packages/@repo/contracts/dist/project.d.ts.map +0 -1
  173. package/packages/@repo/contracts/dist/project.js +0 -25
  174. package/packages/@repo/contracts/dist/tenant.d.ts +0 -147
  175. package/packages/@repo/contracts/dist/tenant.d.ts.map +0 -1
  176. package/packages/@repo/contracts/dist/tenant.js +0 -58
  177. package/packages/@repo/contracts/dist/user.d.ts +0 -9
  178. package/packages/@repo/contracts/dist/user.d.ts.map +0 -1
  179. package/packages/@repo/contracts/dist/user.js +0 -9
  180. package/packages/@repo/contracts/package.json +0 -37
  181. package/packages/@repo/contracts/src/analytics.ts +0 -33
  182. package/packages/@repo/contracts/src/dates.ts +0 -4
  183. package/packages/@repo/contracts/src/deployment.ts +0 -73
  184. package/packages/@repo/contracts/src/domain.ts +0 -51
  185. package/packages/@repo/contracts/src/git.ts +0 -31
  186. package/packages/@repo/contracts/src/ids.ts +0 -23
  187. package/packages/@repo/contracts/src/index.ts +0 -12
  188. package/packages/@repo/contracts/src/pagination.ts +0 -21
  189. package/packages/@repo/contracts/src/project.ts +0 -32
  190. package/packages/@repo/contracts/src/tenant.ts +0 -94
  191. package/packages/@repo/contracts/src/user.ts +0 -12
  192. package/packages/@repo/models/dist/docs-config.d.ts +0 -961
  193. package/packages/@repo/models/dist/docs-config.d.ts.map +0 -1
  194. package/packages/@repo/models/dist/docs-config.js +0 -531
  195. package/packages/@repo/models/dist/index.d.ts +0 -3
  196. package/packages/@repo/models/dist/index.d.ts.map +0 -1
  197. package/packages/@repo/models/dist/index.js +0 -3
  198. package/packages/@repo/models/dist/tenant.d.ts +0 -37
  199. package/packages/@repo/models/dist/tenant.d.ts.map +0 -1
  200. package/packages/@repo/models/dist/tenant.js +0 -1
  201. package/packages/@repo/models/package.json +0 -37
  202. package/packages/@repo/models/src/docs-config.ts +0 -629
  203. package/packages/@repo/models/src/index.ts +0 -3
  204. package/packages/@repo/models/src/tenant.ts +0 -44
  205. package/packages/@repo/prebuild/dist/index.d.ts +0 -2
  206. package/packages/@repo/prebuild/dist/index.d.ts.map +0 -1
  207. package/packages/@repo/prebuild/dist/index.js +0 -2
  208. package/packages/@repo/prebuild/dist/openapi.d.ts +0 -43
  209. package/packages/@repo/prebuild/dist/openapi.d.ts.map +0 -1
  210. package/packages/@repo/prebuild/dist/openapi.js +0 -86
  211. package/packages/@repo/prebuild/package.json +0 -39
  212. package/packages/@repo/prebuild/src/index.ts +0 -2
  213. package/packages/@repo/prebuild/src/openapi.ts +0 -154
  214. package/packages/@repo/previewing/dist/blob-source.d.ts +0 -16
  215. package/packages/@repo/previewing/dist/blob-source.d.ts.map +0 -1
  216. package/packages/@repo/previewing/dist/blob-source.js +0 -128
  217. package/packages/@repo/previewing/dist/config-loader.d.ts +0 -134
  218. package/packages/@repo/previewing/dist/config-loader.d.ts.map +0 -1
  219. package/packages/@repo/previewing/dist/config-loader.js +0 -231
  220. package/packages/@repo/previewing/dist/constants.d.ts +0 -15
  221. package/packages/@repo/previewing/dist/constants.d.ts.map +0 -1
  222. package/packages/@repo/previewing/dist/constants.js +0 -14
  223. package/packages/@repo/previewing/dist/content-index.d.ts +0 -7
  224. package/packages/@repo/previewing/dist/content-index.d.ts.map +0 -1
  225. package/packages/@repo/previewing/dist/content-index.js +0 -291
  226. package/packages/@repo/previewing/dist/content-source.d.ts +0 -12
  227. package/packages/@repo/previewing/dist/content-source.d.ts.map +0 -1
  228. package/packages/@repo/previewing/dist/content-source.js +0 -1
  229. package/packages/@repo/previewing/dist/fs-source.d.ts +0 -11
  230. package/packages/@repo/previewing/dist/fs-source.d.ts.map +0 -1
  231. package/packages/@repo/previewing/dist/fs-source.js +0 -71
  232. package/packages/@repo/previewing/dist/index.d.ts +0 -16
  233. package/packages/@repo/previewing/dist/index.d.ts.map +0 -1
  234. package/packages/@repo/previewing/dist/index.js +0 -13
  235. package/packages/@repo/previewing/dist/markdown/agent-markdown.d.ts +0 -3
  236. package/packages/@repo/previewing/dist/markdown/agent-markdown.d.ts.map +0 -1
  237. package/packages/@repo/previewing/dist/markdown/agent-markdown.js +0 -176
  238. package/packages/@repo/previewing/dist/markdown/format.d.ts +0 -8
  239. package/packages/@repo/previewing/dist/markdown/format.d.ts.map +0 -1
  240. package/packages/@repo/previewing/dist/markdown/format.js +0 -43
  241. package/packages/@repo/previewing/dist/markdown/links.d.ts +0 -3
  242. package/packages/@repo/previewing/dist/markdown/links.d.ts.map +0 -1
  243. package/packages/@repo/previewing/dist/markdown/links.js +0 -31
  244. package/packages/@repo/previewing/dist/openapi-pages.d.ts +0 -7
  245. package/packages/@repo/previewing/dist/openapi-pages.d.ts.map +0 -1
  246. package/packages/@repo/previewing/dist/openapi-pages.js +0 -200
  247. package/packages/@repo/previewing/dist/search-index.d.ts +0 -4
  248. package/packages/@repo/previewing/dist/search-index.d.ts.map +0 -1
  249. package/packages/@repo/previewing/dist/search-index.js +0 -23
  250. package/packages/@repo/previewing/dist/serialization.d.ts +0 -13
  251. package/packages/@repo/previewing/dist/serialization.d.ts.map +0 -1
  252. package/packages/@repo/previewing/dist/serialization.js +0 -108
  253. package/packages/@repo/previewing/dist/toc-index.d.ts +0 -5
  254. package/packages/@repo/previewing/dist/toc-index.d.ts.map +0 -1
  255. package/packages/@repo/previewing/dist/toc-index.js +0 -53
  256. package/packages/@repo/previewing/dist/types.d.ts +0 -92
  257. package/packages/@repo/previewing/dist/types.d.ts.map +0 -1
  258. package/packages/@repo/previewing/dist/types.js +0 -1
  259. package/packages/@repo/previewing/dist/utility-index.d.ts +0 -7
  260. package/packages/@repo/previewing/dist/utility-index.d.ts.map +0 -1
  261. package/packages/@repo/previewing/dist/utility-index.js +0 -201
  262. package/packages/@repo/previewing/package.json +0 -41
  263. package/packages/@repo/previewing/src/blob-source.ts +0 -185
  264. package/packages/@repo/previewing/src/config-loader.ts +0 -316
  265. package/packages/@repo/previewing/src/constants.ts +0 -16
  266. package/packages/@repo/previewing/src/content-index.ts +0 -384
  267. package/packages/@repo/previewing/src/content-source.ts +0 -12
  268. package/packages/@repo/previewing/src/fs-source.ts +0 -103
  269. package/packages/@repo/previewing/src/index.ts +0 -71
  270. package/packages/@repo/previewing/src/markdown/agent-markdown.ts +0 -254
  271. package/packages/@repo/previewing/src/markdown/format.ts +0 -63
  272. package/packages/@repo/previewing/src/markdown/links.ts +0 -46
  273. package/packages/@repo/previewing/src/openapi-pages.ts +0 -319
  274. package/packages/@repo/previewing/src/search-index.ts +0 -38
  275. package/packages/@repo/previewing/src/serialization.ts +0 -191
  276. package/packages/@repo/previewing/src/toc-index.ts +0 -72
  277. package/packages/@repo/previewing/src/types.ts +0 -105
  278. package/packages/@repo/previewing/src/utility-index.ts +0 -304
  279. package/packages/@repo/validation/dist/index.d.ts +0 -12
  280. package/packages/@repo/validation/dist/index.d.ts.map +0 -1
  281. package/packages/@repo/validation/dist/index.js +0 -30
  282. package/packages/@repo/validation/package.json +0 -38
  283. package/packages/@repo/validation/src/blodemd-docs-schema.json +0 -3575
  284. package/packages/@repo/validation/src/index.ts +0 -59
  285. package/scripts/prepare-package.mjs +0 -53
  286. package/scripts/repo-packages.mjs +0 -8
@@ -1,37 +0,0 @@
1
- {
2
- "name": "@repo/contracts",
3
- "version": "0.0.0",
4
- "private": true,
5
- "type": "module",
6
- "exports": {
7
- ".": {
8
- "types": "./dist/index.d.ts",
9
- "import": "./dist/index.js",
10
- "default": "./dist/index.js"
11
- },
12
- "./*": {
13
- "types": "./dist/*.d.ts",
14
- "import": "./dist/*.js",
15
- "default": "./dist/*.js"
16
- }
17
- },
18
- "scripts": {
19
- "build": "rm -rf dist && tsc",
20
- "check-types": "tsc --noEmit",
21
- "lint": "oxlint .",
22
- "lint:fix": "oxlint --fix .",
23
- "format": "oxfmt --write .",
24
- "format:check": "oxfmt ."
25
- },
26
- "dependencies": {
27
- "zod": "^4.3.6"
28
- },
29
- "devDependencies": {
30
- "@repo/typescript-config": "*",
31
- "@types/node": "^24.12.2",
32
- "oxfmt": "^0.42.0",
33
- "oxlint": "^1.57.0",
34
- "typescript": "6.0.2",
35
- "ultracite": "^7.3.2"
36
- }
37
- }
@@ -1,33 +0,0 @@
1
- import { z } from "zod";
2
-
3
- const GA4_MEASUREMENT_ID_REGEX = /^G-[A-Z0-9]{4,20}$/;
4
- const POSTHOG_PROJECT_KEY_REGEX = /^phc_[A-Za-z0-9]{20,}$/;
5
-
6
- export const ProjectAnalyticsGa4Schema = z.object({
7
- measurementId: z
8
- .string()
9
- .regex(
10
- GA4_MEASUREMENT_ID_REGEX,
11
- "GA4 measurement IDs look like G-XXXXXXXXXX."
12
- ),
13
- });
14
- export type ProjectAnalyticsGa4 = z.infer<typeof ProjectAnalyticsGa4Schema>;
15
-
16
- export const ProjectAnalyticsPosthogSchema = z.object({
17
- host: z.string().url().optional(),
18
- projectKey: z
19
- .string()
20
- .regex(
21
- POSTHOG_PROJECT_KEY_REGEX,
22
- "PostHog project keys start with phc_. Personal API keys (phx_) are not supported."
23
- ),
24
- });
25
- export type ProjectAnalyticsPosthog = z.infer<
26
- typeof ProjectAnalyticsPosthogSchema
27
- >;
28
-
29
- export const ProjectAnalyticsSchema = z.object({
30
- ga4: ProjectAnalyticsGa4Schema.optional(),
31
- posthog: ProjectAnalyticsPosthogSchema.optional(),
32
- });
33
- export type ProjectAnalytics = z.infer<typeof ProjectAnalyticsSchema>;
@@ -1,4 +0,0 @@
1
- import { z } from "zod";
2
-
3
- export const IsoDateSchema = z.string().datetime();
4
- export type IsoDate = z.infer<typeof IsoDateSchema>;
@@ -1,73 +0,0 @@
1
- import { z } from "zod";
2
-
3
- import { IsoDateSchema } from "./dates.js";
4
- import { IdSchema, UrlSchema } from "./ids.js";
5
-
6
- export const DeploymentStatusSchema = z.enum([
7
- "Queued",
8
- "Building",
9
- "Successful",
10
- "Failed",
11
- ]);
12
- export type DeploymentStatus = z.infer<typeof DeploymentStatusSchema>;
13
-
14
- export const DeploymentEnvironmentSchema = z.enum(["production", "preview"]);
15
- export type DeploymentEnvironment = z.infer<typeof DeploymentEnvironmentSchema>;
16
-
17
- export const DeploymentSchema = z.object({
18
- branch: z.string().min(1),
19
- changes: z.string().min(1).optional(),
20
- commitMessage: z.string().min(1).optional(),
21
- createdAt: IsoDateSchema,
22
- environment: DeploymentEnvironmentSchema,
23
- fileCount: z.number().int().nonnegative().optional(),
24
- id: IdSchema,
25
- manifestUrl: UrlSchema.optional(),
26
- previewUrl: UrlSchema.optional(),
27
- projectId: IdSchema,
28
- promotedAt: IsoDateSchema.optional(),
29
- status: DeploymentStatusSchema,
30
- updatedAt: IsoDateSchema,
31
- });
32
- export type Deployment = z.infer<typeof DeploymentSchema>;
33
-
34
- export const PublishDeploymentCreateSchema = z.object({
35
- branch: z.string().min(1).optional(),
36
- changes: z.string().min(1).optional(),
37
- commitMessage: z.string().min(1).optional(),
38
- environment: DeploymentEnvironmentSchema.optional(),
39
- });
40
- export type PublishDeploymentCreateInput = z.infer<
41
- typeof PublishDeploymentCreateSchema
42
- >;
43
-
44
- export const PublishDeploymentFileSchema = z.object({
45
- contentBase64: z.string().base64(),
46
- contentType: z.string().min(1).optional(),
47
- path: z.string().min(1),
48
- });
49
- export type PublishDeploymentFileInput = z.infer<
50
- typeof PublishDeploymentFileSchema
51
- >;
52
-
53
- export const PublishDeploymentFileResponseSchema = z.object({
54
- path: z.string().min(1),
55
- url: UrlSchema,
56
- });
57
- export type PublishDeploymentFileResponse = z.infer<
58
- typeof PublishDeploymentFileResponseSchema
59
- >;
60
-
61
- export const PublishDeploymentFilesBatchSchema = z.object({
62
- files: z.array(PublishDeploymentFileSchema).min(1),
63
- });
64
- export type PublishDeploymentFilesBatchInput = z.infer<
65
- typeof PublishDeploymentFilesBatchSchema
66
- >;
67
-
68
- export const PublishDeploymentFinalizeSchema = z.object({
69
- promote: z.boolean().optional(),
70
- });
71
- export type PublishDeploymentFinalizeInput = z.infer<
72
- typeof PublishDeploymentFinalizeSchema
73
- >;
@@ -1,51 +0,0 @@
1
- import { z } from "zod";
2
-
3
- import { IsoDateSchema } from "./dates.js";
4
- import { HostnameSchema, IdSchema, PathSchema } from "./ids.js";
5
-
6
- export const DomainStatusSchema = z.enum([
7
- "Valid Configuration",
8
- "Pending Verification",
9
- "Invalid Configuration",
10
- ]);
11
- export type DomainStatus = z.infer<typeof DomainStatusSchema>;
12
-
13
- export const DomainSchema = z.object({
14
- createdAt: IsoDateSchema,
15
- hostname: HostnameSchema,
16
- id: IdSchema,
17
- pathPrefix: PathSchema.optional(),
18
- projectId: IdSchema,
19
- status: DomainStatusSchema,
20
- verifiedAt: IsoDateSchema.optional(),
21
- });
22
- export type Domain = z.infer<typeof DomainSchema>;
23
-
24
- export const DomainVerificationRecordSchema = z.object({
25
- name: z.string().min(1),
26
- ttl: z.string().optional(),
27
- type: z.enum(["A", "AAAA", "CNAME", "TXT", "MX", "NS", "CAA"]),
28
- value: z.string().min(1),
29
- });
30
- export type DomainVerificationRecord = z.infer<
31
- typeof DomainVerificationRecordSchema
32
- >;
33
-
34
- export const DomainVerificationSchema = z.object({
35
- records: z.array(DomainVerificationRecordSchema),
36
- verified: z.boolean(),
37
- });
38
- export type DomainVerification = z.infer<typeof DomainVerificationSchema>;
39
-
40
- export const DomainCreateSchema = z.object({
41
- hostname: HostnameSchema,
42
- pathPrefix: PathSchema.optional(),
43
- projectId: IdSchema,
44
- });
45
- export type DomainCreateInput = z.infer<typeof DomainCreateSchema>;
46
-
47
- export const DomainCreateResponseSchema = z.object({
48
- domain: DomainSchema,
49
- verification: DomainVerificationSchema.optional(),
50
- });
51
- export type DomainCreateResponse = z.infer<typeof DomainCreateResponseSchema>;
@@ -1,31 +0,0 @@
1
- import { z } from "zod";
2
-
3
- import { IsoDateSchema } from "./dates.js";
4
- import { IdSchema } from "./ids.js";
5
-
6
- export const GitProviderSchema = z.enum(["github"]);
7
- export type GitProvider = z.infer<typeof GitProviderSchema>;
8
-
9
- export const GitConnectionSchema = z.object({
10
- accountLogin: z.string().min(1),
11
- branch: z.string().min(1),
12
- createdAt: IsoDateSchema,
13
- docsPath: z.string().min(1),
14
- id: IdSchema,
15
- installationId: z.number().int().positive().safe(),
16
- projectId: IdSchema,
17
- provider: GitProviderSchema,
18
- repository: z.string().min(1),
19
- updatedAt: IsoDateSchema,
20
- });
21
- export type GitConnection = z.infer<typeof GitConnectionSchema>;
22
-
23
- export const GitConnectionBindSchema = z.object({
24
- branch: z.string().min(1).default("main"),
25
- docsPath: z.string().min(1).default("docs"),
26
- installationId: z.number().int().positive().safe(),
27
- repository: z.string().regex(/^[\w.-]+\/[\w.-]+$/, {
28
- message: "Repository must be in the format owner/repo.",
29
- }),
30
- });
31
- export type GitConnectionBindInput = z.infer<typeof GitConnectionBindSchema>;
@@ -1,23 +0,0 @@
1
- import { z } from "zod";
2
-
3
- export const IdSchema = z.string().uuid();
4
- export type Id = z.infer<typeof IdSchema>;
5
-
6
- export const SlugSchema = z
7
- .string()
8
- .min(1)
9
- .max(63)
10
- .regex(/^(?!-)[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$/);
11
- export type Slug = z.infer<typeof SlugSchema>;
12
-
13
- export const EmailSchema = z.string().email();
14
- export type Email = z.infer<typeof EmailSchema>;
15
-
16
- export const UrlSchema = z.string().url();
17
- export type Url = z.infer<typeof UrlSchema>;
18
-
19
- export const HostnameSchema = z.string().min(1);
20
- export type Hostname = z.infer<typeof HostnameSchema>;
21
-
22
- export const PathSchema = z.string().min(1);
23
- export type Path = z.infer<typeof PathSchema>;
@@ -1,12 +0,0 @@
1
- // biome-ignore lint/performance/noBarrelFile: This is the main entry point for the package
2
- // eslint-disable-next-line no-barrel-file
3
- export * from "./analytics.js";
4
- export * from "./dates.js";
5
- export * from "./deployment.js";
6
- export * from "./domain.js";
7
- export * from "./git.js";
8
- export * from "./ids.js";
9
- export * from "./pagination.js";
10
- export * from "./project.js";
11
- export * from "./tenant.js";
12
- export * from "./user.js";
@@ -1,21 +0,0 @@
1
- import { z } from "zod";
2
-
3
- export const PaginationSchema = z.object({
4
- page: z.number().int().min(1),
5
- pageSize: z.number().int().min(1).max(100),
6
- });
7
- export type Pagination = z.infer<typeof PaginationSchema>;
8
-
9
- export const PageInfoSchema = z.object({
10
- page: z.number().int().min(1),
11
- pageSize: z.number().int().min(1),
12
- total: z.number().int().min(0),
13
- totalPages: z.number().int().min(0),
14
- });
15
- export type PageInfo = z.infer<typeof PageInfoSchema>;
16
-
17
- export const createListResponseSchema = <T extends z.ZodTypeAny>(item: T) =>
18
- z.object({
19
- data: z.array(item),
20
- pageInfo: PageInfoSchema.optional(),
21
- });
@@ -1,32 +0,0 @@
1
- import { z } from "zod";
2
-
3
- import { ProjectAnalyticsSchema } from "./analytics.js";
4
- import { IsoDateSchema } from "./dates.js";
5
- import { IdSchema, SlugSchema } from "./ids.js";
6
-
7
- export const ProjectSchema = z.object({
8
- analytics: ProjectAnalyticsSchema.nullable().optional(),
9
- createdAt: IsoDateSchema,
10
- deploymentName: z.string().min(1),
11
- description: z.string().optional(),
12
- id: IdSchema,
13
- name: z.string().min(1),
14
- slug: SlugSchema,
15
- updatedAt: IsoDateSchema,
16
- });
17
- export type Project = z.infer<typeof ProjectSchema>;
18
-
19
- export const ProjectCreateSchema = z.object({
20
- description: z.string().optional(),
21
- name: z.string().min(1),
22
- slug: SlugSchema,
23
- });
24
- export type ProjectCreateInput = z.infer<typeof ProjectCreateSchema>;
25
-
26
- export const ProjectUpdateSchema = z.object({
27
- analytics: ProjectAnalyticsSchema.nullable().optional(),
28
- deploymentName: z.string().min(1).optional(),
29
- description: z.string().nullable().optional(),
30
- name: z.string().min(1).optional(),
31
- });
32
- export type ProjectUpdateInput = z.infer<typeof ProjectUpdateSchema>;
@@ -1,94 +0,0 @@
1
- import { z } from "zod";
2
-
3
- import { ProjectAnalyticsSchema } from "./analytics.js";
4
- import {
5
- HostnameSchema,
6
- IdSchema,
7
- PathSchema,
8
- SlugSchema,
9
- UrlSchema,
10
- } from "./ids.js";
11
-
12
- export const TenantStatusSchema = z.enum(["active", "disabled"]);
13
- export type TenantStatus = z.infer<typeof TenantStatusSchema>;
14
-
15
- export const TenantSchema = z.object({
16
- activeDeploymentId: IdSchema.optional(),
17
- activeDeploymentManifestUrl: UrlSchema.optional(),
18
- analytics: ProjectAnalyticsSchema.optional(),
19
- customDomains: z.array(HostnameSchema),
20
- description: z.string().optional(),
21
- id: IdSchema,
22
- name: z.string().min(1),
23
- pathPrefix: PathSchema.optional(),
24
- primaryDomain: HostnameSchema,
25
- slug: SlugSchema,
26
- status: TenantStatusSchema,
27
- subdomain: SlugSchema,
28
- });
29
- export type Tenant = z.infer<typeof TenantSchema>;
30
-
31
- export const TenantResolutionSchema = z.object({
32
- basePath: z.string(),
33
- host: HostnameSchema,
34
- rewrittenPath: z.string(),
35
- strategy: z.enum(["preview", "custom-domain", "subdomain", "path"]),
36
- tenant: TenantSchema,
37
- });
38
- export type TenantResolution = z.infer<typeof TenantResolutionSchema>;
39
-
40
- const TenantEdgeRecordVersionSchema = z.literal(1);
41
-
42
- export const TenantEdgeHostRecordSchema = z.object({
43
- host: HostnameSchema,
44
- pathPrefix: PathSchema.optional(),
45
- strategy: z.enum(["custom-domain", "subdomain"]),
46
- tenant: TenantSchema,
47
- version: TenantEdgeRecordVersionSchema,
48
- });
49
- export type TenantEdgeHostRecord = z.infer<typeof TenantEdgeHostRecordSchema>;
50
-
51
- export const TenantEdgeSlugRecordSchema = z.object({
52
- slug: SlugSchema,
53
- tenant: TenantSchema,
54
- version: TenantEdgeRecordVersionSchema,
55
- });
56
- export type TenantEdgeSlugRecord = z.infer<typeof TenantEdgeSlugRecordSchema>;
57
-
58
- export const TENANT_EDGE_HOST_KEY_PREFIX = "th_";
59
- export const TENANT_EDGE_SLUG_KEY_PREFIX = "ts_";
60
- export const LEGACY_TENANT_EDGE_HOST_KEY_PREFIX = "tenant:host:";
61
- export const LEGACY_TENANT_EDGE_SLUG_KEY_PREFIX = "tenant:slug:";
62
-
63
- export const normalizeTenantEdgeHost = (host: string) =>
64
- host.trim().toLowerCase().replace(/:\d+$/, "");
65
-
66
- export const normalizeTenantEdgeSlug = (slug: string) =>
67
- slug.trim().toLowerCase();
68
-
69
- const encodeTenantEdgeHost = (host: string) =>
70
- normalizeTenantEdgeHost(host).replaceAll(".", "_");
71
-
72
- const encodeTenantEdgeSlug = (slug: string) => normalizeTenantEdgeSlug(slug);
73
-
74
- export const getTenantEdgeHostKey = (host: string) =>
75
- `${TENANT_EDGE_HOST_KEY_PREFIX}${encodeTenantEdgeHost(host)}`;
76
-
77
- export const getTenantEdgeSlugKey = (slug: string) =>
78
- `${TENANT_EDGE_SLUG_KEY_PREFIX}${encodeTenantEdgeSlug(slug)}`;
79
-
80
- export const getLegacyTenantEdgeHostKey = (host: string) =>
81
- `${LEGACY_TENANT_EDGE_HOST_KEY_PREFIX}${normalizeTenantEdgeHost(host)}`;
82
-
83
- export const getLegacyTenantEdgeSlugKey = (slug: string) =>
84
- `${LEGACY_TENANT_EDGE_SLUG_KEY_PREFIX}${normalizeTenantEdgeSlug(slug)}`;
85
-
86
- export const getTenantEdgeHostKeys = (host: string) => [
87
- getTenantEdgeHostKey(host),
88
- getLegacyTenantEdgeHostKey(host),
89
- ];
90
-
91
- export const getTenantEdgeSlugKeys = (slug: string) => [
92
- getTenantEdgeSlugKey(slug),
93
- getLegacyTenantEdgeSlugKey(slug),
94
- ];
@@ -1,12 +0,0 @@
1
- import { z } from "zod";
2
-
3
- import { IsoDateSchema } from "./dates.js";
4
- import { EmailSchema, IdSchema } from "./ids.js";
5
-
6
- export const UserSchema = z.object({
7
- createdAt: IsoDateSchema,
8
- email: EmailSchema,
9
- id: IdSchema,
10
- name: z.string().nullable(),
11
- });
12
- export type User = z.infer<typeof UserSchema>;