@twango/twiki 0.0.0-stage → 0.1.1

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 (225) hide show
  1. package/.github/actions/product-cache/action.yml +32 -0
  2. package/.github/actions/product-cache/index.mjs +450 -0
  3. package/LICENSE +21 -0
  4. package/README.md +146 -2
  5. package/bun.lock +1701 -0
  6. package/cli/runtime.test.ts +420 -0
  7. package/cli/runtime.ts +385 -0
  8. package/cli/twiki.ts +305 -0
  9. package/package.json +138 -4
  10. package/site/_headers +7 -0
  11. package/site/assets/fonts/OFL.txt +93 -0
  12. package/site/assets/fonts/OverusedGrotesk-SemiBold.ttf +0 -0
  13. package/site/assets/social-background.svg +38 -0
  14. package/site/bun.lock +1701 -0
  15. package/site/database/index.ts +7 -0
  16. package/site/database/schema.ts +95 -0
  17. package/site/drizzle.config.ts +7 -0
  18. package/site/migrations/0001_auth.sql +14 -0
  19. package/site/migrations/0002_site_access.sql +5 -0
  20. package/site/migrations/0003_github_username.sql +1 -0
  21. package/site/migrations/meta/0002_snapshot.json +432 -0
  22. package/site/migrations/meta/0003_snapshot.json +439 -0
  23. package/site/migrations/meta/_journal.json +27 -0
  24. package/site/package.json +120 -0
  25. package/site/src/app.d.ts +14 -0
  26. package/site/src/app.html +11 -0
  27. package/site/src/hooks.server.ts +12 -0
  28. package/site/src/lib/analytics-config.json +1 -0
  29. package/site/src/lib/analytics.ts +40 -0
  30. package/site/src/lib/auth-config.json +3 -0
  31. package/site/src/lib/components/SEO.svelte +113 -0
  32. package/site/src/lib/components/doc/AccessLink.svelte +27 -0
  33. package/site/src/lib/components/doc/Backlinks.svelte +59 -0
  34. package/site/src/lib/components/doc/Breadcrumbs.svelte +29 -0
  35. package/site/src/lib/components/doc/ContentMeta.svelte +61 -0
  36. package/site/src/lib/components/doc/DocPager.svelte +91 -0
  37. package/site/src/lib/components/doc/DocShell.svelte +115 -0
  38. package/site/src/lib/components/doc/LicenseNotice.svelte +26 -0
  39. package/site/src/lib/components/doc/LockedContent.svelte +29 -0
  40. package/site/src/lib/components/doc/NavTree.svelte +158 -0
  41. package/site/src/lib/components/doc/NoteActions.svelte +139 -0
  42. package/site/src/lib/components/doc/PublicationBadge.svelte +49 -0
  43. package/site/src/lib/components/doc/ReaderModeToggle.svelte +19 -0
  44. package/site/src/lib/components/doc/Sidebar.svelte +351 -0
  45. package/site/src/lib/components/doc/Toc.svelte +339 -0
  46. package/site/src/lib/components/doc/enhancements.ts +146 -0
  47. package/site/src/lib/components/doc/heading-tracker.svelte.ts +39 -0
  48. package/site/src/lib/components/doc/image-preview.ts +114 -0
  49. package/site/src/lib/components/doc/reader-mode.svelte.ts +40 -0
  50. package/site/src/lib/components/embeds/mermaid.ts +353 -0
  51. package/site/src/lib/components/files/FileCode.svelte +81 -0
  52. package/site/src/lib/components/files/FileExplorer.svelte +74 -0
  53. package/site/src/lib/components/files/FileHistory.svelte +170 -0
  54. package/site/src/lib/components/files/FileIcon.svelte +28 -0
  55. package/site/src/lib/components/files/FileRmd.svelte +209 -0
  56. package/site/src/lib/components/files/FileTabs.svelte +180 -0
  57. package/site/src/lib/components/files/FileTree.svelte +67 -0
  58. package/site/src/lib/components/files/blame-gutter.ts +45 -0
  59. package/site/src/lib/components/files/code-view.ts +98 -0
  60. package/site/src/lib/components/files/file-workspace.svelte.ts +100 -0
  61. package/site/src/lib/components/graph/GraphPanel.svelte +275 -0
  62. package/site/src/lib/components/graph/GraphView.svelte +100 -0
  63. package/site/src/lib/components/graph/graph-data.ts +137 -0
  64. package/site/src/lib/components/graph/graph-model.ts +103 -0
  65. package/site/src/lib/components/graph/index.ts +3 -0
  66. package/site/src/lib/components/graph/render-graph.ts +626 -0
  67. package/site/src/lib/components/popover/index.ts +1 -0
  68. package/site/src/lib/components/popover/link-popovers.ts +233 -0
  69. package/site/src/lib/components/popover/popover.css +82 -0
  70. package/site/src/lib/components/search/SearchButton.svelte +57 -0
  71. package/site/src/lib/components/search/SearchPalette.svelte +189 -0
  72. package/site/src/lib/components/search/index.ts +3 -0
  73. package/site/src/lib/components/search/pagefind-client.svelte.ts +129 -0
  74. package/site/src/lib/components/search/pagefind-query.ts +22 -0
  75. package/site/src/lib/components/search/pagefind-url.ts +12 -0
  76. package/site/src/lib/components/search/search-state.svelte.ts +22 -0
  77. package/site/src/lib/components/ui/IconButton.svelte +30 -0
  78. package/site/src/lib/components/ui/ThemeToggle.svelte +22 -0
  79. package/site/src/lib/components/ui/index.ts +1 -0
  80. package/site/src/lib/config.ts +9 -0
  81. package/site/src/lib/content-license.ts +7 -0
  82. package/site/src/lib/file-history.ts +37 -0
  83. package/site/src/lib/file-icons.ts +27 -0
  84. package/site/src/lib/file-tabs.ts +72 -0
  85. package/site/src/lib/files.ts +73 -0
  86. package/site/src/lib/github-user.ts +70 -0
  87. package/site/src/lib/metadata.ts +166 -0
  88. package/site/src/lib/notebook-nav.ts +63 -0
  89. package/site/src/lib/publication.ts +1 -0
  90. package/site/src/lib/rmd.ts +156 -0
  91. package/site/src/lib/server/access-admin.ts +33 -0
  92. package/site/src/lib/server/content-model.ts +253 -0
  93. package/site/src/lib/server/content-provider.ts +266 -0
  94. package/site/src/lib/server/content.ts +277 -0
  95. package/site/src/lib/server/runtime-content.ts +34 -0
  96. package/site/src/lib/site-config.json +9 -0
  97. package/site/src/lib/social-image.ts +13 -0
  98. package/site/src/lib/styles/article.css +607 -0
  99. package/site/src/lib/styles/foundation.css +138 -0
  100. package/site/src/lib/styles/print.css +115 -0
  101. package/site/src/lib/styles/shell.css +182 -0
  102. package/site/src/lib/text-exports.ts +5 -0
  103. package/site/src/lib/types.ts +140 -0
  104. package/site/src/lib/utils.ts +6 -0
  105. package/site/src/routes/+error.svelte +16 -0
  106. package/site/src/routes/+layout.server.ts +10 -0
  107. package/site/src/routes/+layout.svelte +72 -0
  108. package/site/src/routes/+layout.ts +3 -0
  109. package/site/src/routes/404/+page.svelte +13 -0
  110. package/site/src/routes/[...slug]/+page.server.ts +24 -0
  111. package/site/src/routes/[...slug]/+page.svelte +180 -0
  112. package/site/src/routes/[course]/files/[...file]/+page.svelte +373 -0
  113. package/site/src/routes/[course]/files/[...file]/+page.ts +38 -0
  114. package/site/src/routes/admin/access/+page.server.ts +53 -0
  115. package/site/src/routes/admin/access/+page.svelte +118 -0
  116. package/site/src/routes/graph.json/+server.ts +7 -0
  117. package/site/src/routes/index.xml/+server.ts +7 -0
  118. package/site/src/routes/layout.css +10 -0
  119. package/site/src/routes/robots.txt/+server.ts +9 -0
  120. package/site/src/routes/sitemap.xml/+server.ts +7 -0
  121. package/site/src/routes/tags/+page.server.ts +5 -0
  122. package/site/src/routes/tags/+page.svelte +38 -0
  123. package/site/src/routes/tags/[...tag]/+page.server.ts +22 -0
  124. package/site/src/routes/tags/[...tag]/+page.svelte +52 -0
  125. package/site/static/favicon.png +0 -0
  126. package/site/static/fonts/JetBrainsMono-Italic-VF.woff2 +0 -0
  127. package/site/static/fonts/JetBrainsMono-VF.woff2 +0 -0
  128. package/site/static/fonts/OverusedGrotesk-VF.woff2 +0 -0
  129. package/site/static/fonts/OverusedGroteskItalic-VF.woff2 +0 -0
  130. package/site/static/fonts/Virgil.woff2 +0 -0
  131. package/site/svelte.config.js +71 -0
  132. package/site/tooling/LICENSE-quartz +25 -0
  133. package/site/tooling/adapter.js +55 -0
  134. package/site/tooling/assets.ts +323 -0
  135. package/site/tooling/benchmark.ts +191 -0
  136. package/site/tooling/build.ts +407 -0
  137. package/site/tooling/cache.ts +133 -0
  138. package/site/tooling/check-diagrams.ts +164 -0
  139. package/site/tooling/check-links.ts +86 -0
  140. package/site/tooling/check-targets.ts +139 -0
  141. package/site/tooling/compiler.ts +1386 -0
  142. package/site/tooling/deploy.ts +112 -0
  143. package/site/tooling/fingerprint.ts +81 -0
  144. package/site/tooling/lib/app-version.js +92 -0
  145. package/site/tooling/lib/application-asset-urls.ts +27 -0
  146. package/site/tooling/lib/application-cache.ts +269 -0
  147. package/site/tooling/lib/asset-hash-cache.ts +116 -0
  148. package/site/tooling/lib/autotag.ts +99 -0
  149. package/site/tooling/lib/build-assembly.ts +148 -0
  150. package/site/tooling/lib/build-workspace.ts +386 -0
  151. package/site/tooling/lib/cache-selection.ts +70 -0
  152. package/site/tooling/lib/cloudflare-prewarm.js +40 -0
  153. package/site/tooling/lib/comments.ts +32 -0
  154. package/site/tooling/lib/content-cache.ts +244 -0
  155. package/site/tooling/lib/content-urls.ts +50 -0
  156. package/site/tooling/lib/course-cache.ts +298 -0
  157. package/site/tooling/lib/course-files.ts +281 -0
  158. package/site/tooling/lib/currency.ts +33 -0
  159. package/site/tooling/lib/deployment-config.ts +222 -0
  160. package/site/tooling/lib/deployment-manifest.ts +274 -0
  161. package/site/tooling/lib/deployment-prepare.ts +325 -0
  162. package/site/tooling/lib/deployment-upload.ts +293 -0
  163. package/site/tooling/lib/dev-git-state.ts +130 -0
  164. package/site/tooling/lib/dev-history.ts +86 -0
  165. package/site/tooling/lib/dev-social-images.ts +38 -0
  166. package/site/tooling/lib/dev-state.ts +107 -0
  167. package/site/tooling/lib/edition-builds.ts +184 -0
  168. package/site/tooling/lib/edition-paths.js +29 -0
  169. package/site/tooling/lib/empty-tag-route.js +23 -0
  170. package/site/tooling/lib/file-history.ts +201 -0
  171. package/site/tooling/lib/file-icons.ts +93 -0
  172. package/site/tooling/lib/file-policy.ts +38 -0
  173. package/site/tooling/lib/file-search.js +13 -0
  174. package/site/tooling/lib/git-revisions.ts +41 -0
  175. package/site/tooling/lib/history-pool.ts +74 -0
  176. package/site/tooling/lib/history-worker.ts +22 -0
  177. package/site/tooling/lib/knit-rmd.R +38 -0
  178. package/site/tooling/lib/lastmod.ts +201 -0
  179. package/site/tooling/lib/markdown-files.ts +51 -0
  180. package/site/tooling/lib/ofm.ts +634 -0
  181. package/site/tooling/lib/output.ts +60 -0
  182. package/site/tooling/lib/product-cache.ts +1006 -0
  183. package/site/tooling/lib/project-config.ts +288 -0
  184. package/site/tooling/lib/public-assets.ts +38 -0
  185. package/site/tooling/lib/public-links.ts +56 -0
  186. package/site/tooling/lib/publishing.ts +156 -0
  187. package/site/tooling/lib/r-runtime.ts +257 -0
  188. package/site/tooling/lib/rebuild-queue.ts +25 -0
  189. package/site/tooling/lib/rmd-preflight.ts +166 -0
  190. package/site/tooling/lib/rmd-preview-cache.ts +93 -0
  191. package/site/tooling/lib/rmd-previews.ts +129 -0
  192. package/site/tooling/lib/runtime-data-modules.ts +30 -0
  193. package/site/tooling/lib/runtime-packaging.ts +321 -0
  194. package/site/tooling/lib/search-cache.js +165 -0
  195. package/site/tooling/lib/search-inputs.js +129 -0
  196. package/site/tooling/lib/slug.ts +377 -0
  197. package/site/tooling/lib/social-images.ts +210 -0
  198. package/site/tooling/lib/text-exports.ts +51 -0
  199. package/site/tooling/lib/visit-elements.ts +17 -0
  200. package/site/tooling/live-test.ts +138 -0
  201. package/site/tooling/pipeline.ts +103 -0
  202. package/site/tooling/prepare.ts +3 -0
  203. package/site/tooling/publish.ts +28 -0
  204. package/site/tooling/r-cache.ts +45 -0
  205. package/site/tooling/r-render-profile.json +7 -0
  206. package/site/tooling/search.js +94 -0
  207. package/site/tooling/verify-deployment.ts +109 -0
  208. package/site/tooling/vite-content.ts +240 -0
  209. package/site/tooling/wrangler-paths.js +25 -0
  210. package/site/tooling/wrangler.ts +19 -0
  211. package/site/tsconfig.json +16 -0
  212. package/site/vite.config.ts +40 -0
  213. package/site/worker/access.ts +57 -0
  214. package/site/worker/analytics.ts +100 -0
  215. package/site/worker/auth-routes.ts +78 -0
  216. package/site/worker/auth.ts +78 -0
  217. package/site/worker/content-runtime.ts +226 -0
  218. package/site/worker/framing.ts +4 -0
  219. package/site/worker/gate.ts +147 -0
  220. package/site/worker/index.ts +9 -0
  221. package/site/worker/login.ts +62 -0
  222. package/site/worker/publication.ts +44 -0
  223. package/site/worker/runtime.ts +104 -0
  224. package/site/worker/tsconfig.json +13 -0
  225. package/site/wrangler.jsonc +37 -0
@@ -0,0 +1,7 @@
1
+ import type { D1Database } from '@cloudflare/workers-types';
2
+ import { drizzle } from 'drizzle-orm/d1';
3
+ import * as schema from './schema';
4
+
5
+ export function database(binding: D1Database) {
6
+ return drizzle(binding, { schema });
7
+ }
@@ -0,0 +1,95 @@
1
+ import {
2
+ customType,
3
+ index,
4
+ integer,
5
+ sqliteTable,
6
+ text,
7
+ uniqueIndex
8
+ } from 'drizzle-orm/sqlite-core';
9
+
10
+ const isoDate = customType<{ data: Date; driverData: string }>({
11
+ dataType: () => 'date',
12
+ toDriver: (value) => value.toISOString(),
13
+ fromDriver: (value) => new Date(value)
14
+ });
15
+ const bigint = customType<{ data: number; driverData: number }>({ dataType: () => 'bigint' });
16
+
17
+ export const user = sqliteTable('user', {
18
+ id: text().primaryKey().notNull(),
19
+ name: text().notNull(),
20
+ githubUsername: text(),
21
+ email: text().notNull().unique(),
22
+ emailVerified: integer({ mode: 'boolean' }).notNull(),
23
+ image: text(),
24
+ createdAt: isoDate().notNull(),
25
+ updatedAt: isoDate().notNull()
26
+ });
27
+
28
+ export const session = sqliteTable(
29
+ 'session',
30
+ {
31
+ id: text().primaryKey().notNull(),
32
+ expiresAt: isoDate().notNull(),
33
+ token: text().notNull().unique(),
34
+ createdAt: isoDate().notNull(),
35
+ updatedAt: isoDate().notNull(),
36
+ ipAddress: text(),
37
+ userAgent: text(),
38
+ userId: text()
39
+ .notNull()
40
+ .references(() => user.id, { onDelete: 'cascade' })
41
+ },
42
+ (table) => [index('session_userId_idx').on(table.userId)]
43
+ );
44
+
45
+ export const account = sqliteTable(
46
+ 'account',
47
+ {
48
+ id: text().primaryKey().notNull(),
49
+ issuer: text().notNull(),
50
+ accountId: text().notNull(),
51
+ providerId: text().notNull(),
52
+ userId: text()
53
+ .notNull()
54
+ .references(() => user.id, { onDelete: 'cascade' }),
55
+ accessToken: text(),
56
+ refreshToken: text(),
57
+ idToken: text(),
58
+ accessTokenExpiresAt: isoDate(),
59
+ refreshTokenExpiresAt: isoDate(),
60
+ scope: text(),
61
+ password: text(),
62
+ createdAt: isoDate().notNull(),
63
+ updatedAt: isoDate().notNull()
64
+ },
65
+ (table) => [
66
+ index('account_userId_idx').on(table.userId),
67
+ uniqueIndex('account_issuer_accountId_uidx').on(table.issuer, table.accountId)
68
+ ]
69
+ );
70
+
71
+ export const verification = sqliteTable(
72
+ 'verification',
73
+ {
74
+ id: text().primaryKey().notNull(),
75
+ identifier: text().notNull(),
76
+ value: text().notNull(),
77
+ expiresAt: isoDate().notNull(),
78
+ createdAt: isoDate().notNull(),
79
+ updatedAt: isoDate().notNull()
80
+ },
81
+ (table) => [index('verification_identifier_idx').on(table.identifier)]
82
+ );
83
+
84
+ export const rateLimit = sqliteTable('rateLimit', {
85
+ id: text().primaryKey().notNull(),
86
+ key: text().notNull().unique(),
87
+ count: integer().notNull(),
88
+ lastRequest: bigint().notNull()
89
+ });
90
+
91
+ export const siteAccess = sqliteTable('siteAccess', {
92
+ githubId: text().primaryKey().notNull(),
93
+ githubLogin: text().notNull(),
94
+ createdAt: integer().notNull()
95
+ });
@@ -0,0 +1,7 @@
1
+ import { defineConfig } from 'drizzle-kit';
2
+
3
+ export default defineConfig({
4
+ dialect: 'sqlite',
5
+ schema: './database/schema.ts',
6
+ out: './migrations'
7
+ });
@@ -0,0 +1,14 @@
1
+ create table "user" ("id" text not null primary key, "name" text not null, "email" text not null unique, "emailVerified" integer not null, "image" text, "createdAt" date not null, "updatedAt" date not null);
2
+
3
+ create table "session" ("id" text not null primary key, "expiresAt" date not null, "token" text not null unique, "createdAt" date not null, "updatedAt" date not null, "ipAddress" text, "userAgent" text, "userId" text not null references "user" ("id") on delete cascade);
4
+
5
+ create table "account" ("id" text not null primary key, "issuer" text not null, "accountId" text not null, "providerId" text not null, "userId" text not null references "user" ("id") on delete cascade, "accessToken" text, "refreshToken" text, "idToken" text, "accessTokenExpiresAt" date, "refreshTokenExpiresAt" date, "scope" text, "password" text, "createdAt" date not null, "updatedAt" date not null);
6
+
7
+ create table "verification" ("id" text not null primary key, "identifier" text not null, "value" text not null, "expiresAt" date not null, "createdAt" date not null, "updatedAt" date not null);
8
+
9
+ create table "rateLimit" ("id" text not null primary key, "key" text not null unique, "count" integer not null, "lastRequest" bigint not null);
10
+
11
+ create index "session_userId_idx" on "session" ("userId");
12
+ create index "account_userId_idx" on "account" ("userId");
13
+ create index "verification_identifier_idx" on "verification" ("identifier");
14
+ create unique index "account_issuer_accountId_uidx" on "account" ("issuer", "accountId");
@@ -0,0 +1,5 @@
1
+ CREATE TABLE siteAccess (
2
+ githubId TEXT PRIMARY KEY NOT NULL,
3
+ githubLogin TEXT NOT NULL,
4
+ createdAt INTEGER NOT NULL
5
+ );
@@ -0,0 +1 @@
1
+ ALTER TABLE `user` ADD `githubUsername` text;
@@ -0,0 +1,432 @@
1
+ {
2
+ "version": "6",
3
+ "dialect": "sqlite",
4
+ "id": "73e8066d-0361-4459-b8da-1be8f9b1c6de",
5
+ "prevId": "00000000-0000-0000-0000-000000000000",
6
+ "tables": {
7
+ "account": {
8
+ "name": "account",
9
+ "columns": {
10
+ "id": {
11
+ "name": "id",
12
+ "type": "text",
13
+ "primaryKey": true,
14
+ "notNull": true,
15
+ "autoincrement": false
16
+ },
17
+ "issuer": {
18
+ "name": "issuer",
19
+ "type": "text",
20
+ "primaryKey": false,
21
+ "notNull": true,
22
+ "autoincrement": false
23
+ },
24
+ "accountId": {
25
+ "name": "accountId",
26
+ "type": "text",
27
+ "primaryKey": false,
28
+ "notNull": true,
29
+ "autoincrement": false
30
+ },
31
+ "providerId": {
32
+ "name": "providerId",
33
+ "type": "text",
34
+ "primaryKey": false,
35
+ "notNull": true,
36
+ "autoincrement": false
37
+ },
38
+ "userId": {
39
+ "name": "userId",
40
+ "type": "text",
41
+ "primaryKey": false,
42
+ "notNull": true,
43
+ "autoincrement": false
44
+ },
45
+ "accessToken": {
46
+ "name": "accessToken",
47
+ "type": "text",
48
+ "primaryKey": false,
49
+ "notNull": false,
50
+ "autoincrement": false
51
+ },
52
+ "refreshToken": {
53
+ "name": "refreshToken",
54
+ "type": "text",
55
+ "primaryKey": false,
56
+ "notNull": false,
57
+ "autoincrement": false
58
+ },
59
+ "idToken": {
60
+ "name": "idToken",
61
+ "type": "text",
62
+ "primaryKey": false,
63
+ "notNull": false,
64
+ "autoincrement": false
65
+ },
66
+ "accessTokenExpiresAt": {
67
+ "name": "accessTokenExpiresAt",
68
+ "type": "date",
69
+ "primaryKey": false,
70
+ "notNull": false,
71
+ "autoincrement": false
72
+ },
73
+ "refreshTokenExpiresAt": {
74
+ "name": "refreshTokenExpiresAt",
75
+ "type": "date",
76
+ "primaryKey": false,
77
+ "notNull": false,
78
+ "autoincrement": false
79
+ },
80
+ "scope": {
81
+ "name": "scope",
82
+ "type": "text",
83
+ "primaryKey": false,
84
+ "notNull": false,
85
+ "autoincrement": false
86
+ },
87
+ "password": {
88
+ "name": "password",
89
+ "type": "text",
90
+ "primaryKey": false,
91
+ "notNull": false,
92
+ "autoincrement": false
93
+ },
94
+ "createdAt": {
95
+ "name": "createdAt",
96
+ "type": "date",
97
+ "primaryKey": false,
98
+ "notNull": true,
99
+ "autoincrement": false
100
+ },
101
+ "updatedAt": {
102
+ "name": "updatedAt",
103
+ "type": "date",
104
+ "primaryKey": false,
105
+ "notNull": true,
106
+ "autoincrement": false
107
+ }
108
+ },
109
+ "indexes": {
110
+ "account_userId_idx": {
111
+ "name": "account_userId_idx",
112
+ "columns": ["userId"],
113
+ "isUnique": false
114
+ },
115
+ "account_issuer_accountId_uidx": {
116
+ "name": "account_issuer_accountId_uidx",
117
+ "columns": ["issuer", "accountId"],
118
+ "isUnique": true
119
+ }
120
+ },
121
+ "foreignKeys": {
122
+ "account_userId_user_id_fk": {
123
+ "name": "account_userId_user_id_fk",
124
+ "tableFrom": "account",
125
+ "tableTo": "user",
126
+ "columnsFrom": ["userId"],
127
+ "columnsTo": ["id"],
128
+ "onDelete": "cascade",
129
+ "onUpdate": "no action"
130
+ }
131
+ },
132
+ "compositePrimaryKeys": {},
133
+ "uniqueConstraints": {},
134
+ "checkConstraints": {}
135
+ },
136
+ "rateLimit": {
137
+ "name": "rateLimit",
138
+ "columns": {
139
+ "id": {
140
+ "name": "id",
141
+ "type": "text",
142
+ "primaryKey": true,
143
+ "notNull": true,
144
+ "autoincrement": false
145
+ },
146
+ "key": {
147
+ "name": "key",
148
+ "type": "text",
149
+ "primaryKey": false,
150
+ "notNull": true,
151
+ "autoincrement": false
152
+ },
153
+ "count": {
154
+ "name": "count",
155
+ "type": "integer",
156
+ "primaryKey": false,
157
+ "notNull": true,
158
+ "autoincrement": false
159
+ },
160
+ "lastRequest": {
161
+ "name": "lastRequest",
162
+ "type": "bigint",
163
+ "primaryKey": false,
164
+ "notNull": true,
165
+ "autoincrement": false
166
+ }
167
+ },
168
+ "indexes": {
169
+ "rateLimit_key_unique": {
170
+ "name": "rateLimit_key_unique",
171
+ "columns": ["key"],
172
+ "isUnique": true
173
+ }
174
+ },
175
+ "foreignKeys": {},
176
+ "compositePrimaryKeys": {},
177
+ "uniqueConstraints": {},
178
+ "checkConstraints": {}
179
+ },
180
+ "session": {
181
+ "name": "session",
182
+ "columns": {
183
+ "id": {
184
+ "name": "id",
185
+ "type": "text",
186
+ "primaryKey": true,
187
+ "notNull": true,
188
+ "autoincrement": false
189
+ },
190
+ "expiresAt": {
191
+ "name": "expiresAt",
192
+ "type": "date",
193
+ "primaryKey": false,
194
+ "notNull": true,
195
+ "autoincrement": false
196
+ },
197
+ "token": {
198
+ "name": "token",
199
+ "type": "text",
200
+ "primaryKey": false,
201
+ "notNull": true,
202
+ "autoincrement": false
203
+ },
204
+ "createdAt": {
205
+ "name": "createdAt",
206
+ "type": "date",
207
+ "primaryKey": false,
208
+ "notNull": true,
209
+ "autoincrement": false
210
+ },
211
+ "updatedAt": {
212
+ "name": "updatedAt",
213
+ "type": "date",
214
+ "primaryKey": false,
215
+ "notNull": true,
216
+ "autoincrement": false
217
+ },
218
+ "ipAddress": {
219
+ "name": "ipAddress",
220
+ "type": "text",
221
+ "primaryKey": false,
222
+ "notNull": false,
223
+ "autoincrement": false
224
+ },
225
+ "userAgent": {
226
+ "name": "userAgent",
227
+ "type": "text",
228
+ "primaryKey": false,
229
+ "notNull": false,
230
+ "autoincrement": false
231
+ },
232
+ "userId": {
233
+ "name": "userId",
234
+ "type": "text",
235
+ "primaryKey": false,
236
+ "notNull": true,
237
+ "autoincrement": false
238
+ }
239
+ },
240
+ "indexes": {
241
+ "session_token_unique": {
242
+ "name": "session_token_unique",
243
+ "columns": ["token"],
244
+ "isUnique": true
245
+ },
246
+ "session_userId_idx": {
247
+ "name": "session_userId_idx",
248
+ "columns": ["userId"],
249
+ "isUnique": false
250
+ }
251
+ },
252
+ "foreignKeys": {
253
+ "session_userId_user_id_fk": {
254
+ "name": "session_userId_user_id_fk",
255
+ "tableFrom": "session",
256
+ "tableTo": "user",
257
+ "columnsFrom": ["userId"],
258
+ "columnsTo": ["id"],
259
+ "onDelete": "cascade",
260
+ "onUpdate": "no action"
261
+ }
262
+ },
263
+ "compositePrimaryKeys": {},
264
+ "uniqueConstraints": {},
265
+ "checkConstraints": {}
266
+ },
267
+ "siteAccess": {
268
+ "name": "siteAccess",
269
+ "columns": {
270
+ "githubId": {
271
+ "name": "githubId",
272
+ "type": "text",
273
+ "primaryKey": true,
274
+ "notNull": true,
275
+ "autoincrement": false
276
+ },
277
+ "githubLogin": {
278
+ "name": "githubLogin",
279
+ "type": "text",
280
+ "primaryKey": false,
281
+ "notNull": true,
282
+ "autoincrement": false
283
+ },
284
+ "createdAt": {
285
+ "name": "createdAt",
286
+ "type": "integer",
287
+ "primaryKey": false,
288
+ "notNull": true,
289
+ "autoincrement": false
290
+ }
291
+ },
292
+ "indexes": {},
293
+ "foreignKeys": {},
294
+ "compositePrimaryKeys": {},
295
+ "uniqueConstraints": {},
296
+ "checkConstraints": {}
297
+ },
298
+ "user": {
299
+ "name": "user",
300
+ "columns": {
301
+ "id": {
302
+ "name": "id",
303
+ "type": "text",
304
+ "primaryKey": true,
305
+ "notNull": true,
306
+ "autoincrement": false
307
+ },
308
+ "name": {
309
+ "name": "name",
310
+ "type": "text",
311
+ "primaryKey": false,
312
+ "notNull": true,
313
+ "autoincrement": false
314
+ },
315
+ "email": {
316
+ "name": "email",
317
+ "type": "text",
318
+ "primaryKey": false,
319
+ "notNull": true,
320
+ "autoincrement": false
321
+ },
322
+ "emailVerified": {
323
+ "name": "emailVerified",
324
+ "type": "integer",
325
+ "primaryKey": false,
326
+ "notNull": true,
327
+ "autoincrement": false
328
+ },
329
+ "image": {
330
+ "name": "image",
331
+ "type": "text",
332
+ "primaryKey": false,
333
+ "notNull": false,
334
+ "autoincrement": false
335
+ },
336
+ "createdAt": {
337
+ "name": "createdAt",
338
+ "type": "date",
339
+ "primaryKey": false,
340
+ "notNull": true,
341
+ "autoincrement": false
342
+ },
343
+ "updatedAt": {
344
+ "name": "updatedAt",
345
+ "type": "date",
346
+ "primaryKey": false,
347
+ "notNull": true,
348
+ "autoincrement": false
349
+ }
350
+ },
351
+ "indexes": {
352
+ "user_email_unique": {
353
+ "name": "user_email_unique",
354
+ "columns": ["email"],
355
+ "isUnique": true
356
+ }
357
+ },
358
+ "foreignKeys": {},
359
+ "compositePrimaryKeys": {},
360
+ "uniqueConstraints": {},
361
+ "checkConstraints": {}
362
+ },
363
+ "verification": {
364
+ "name": "verification",
365
+ "columns": {
366
+ "id": {
367
+ "name": "id",
368
+ "type": "text",
369
+ "primaryKey": true,
370
+ "notNull": true,
371
+ "autoincrement": false
372
+ },
373
+ "identifier": {
374
+ "name": "identifier",
375
+ "type": "text",
376
+ "primaryKey": false,
377
+ "notNull": true,
378
+ "autoincrement": false
379
+ },
380
+ "value": {
381
+ "name": "value",
382
+ "type": "text",
383
+ "primaryKey": false,
384
+ "notNull": true,
385
+ "autoincrement": false
386
+ },
387
+ "expiresAt": {
388
+ "name": "expiresAt",
389
+ "type": "date",
390
+ "primaryKey": false,
391
+ "notNull": true,
392
+ "autoincrement": false
393
+ },
394
+ "createdAt": {
395
+ "name": "createdAt",
396
+ "type": "date",
397
+ "primaryKey": false,
398
+ "notNull": true,
399
+ "autoincrement": false
400
+ },
401
+ "updatedAt": {
402
+ "name": "updatedAt",
403
+ "type": "date",
404
+ "primaryKey": false,
405
+ "notNull": true,
406
+ "autoincrement": false
407
+ }
408
+ },
409
+ "indexes": {
410
+ "verification_identifier_idx": {
411
+ "name": "verification_identifier_idx",
412
+ "columns": ["identifier"],
413
+ "isUnique": false
414
+ }
415
+ },
416
+ "foreignKeys": {},
417
+ "compositePrimaryKeys": {},
418
+ "uniqueConstraints": {},
419
+ "checkConstraints": {}
420
+ }
421
+ },
422
+ "views": {},
423
+ "enums": {},
424
+ "_meta": {
425
+ "schemas": {},
426
+ "tables": {},
427
+ "columns": {}
428
+ },
429
+ "internal": {
430
+ "indexes": {}
431
+ }
432
+ }