@storyshelf/db-sqlite 0.6.2 → 0.7.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.
- package/README.md +9 -9
- package/dist/better-sqlite3.mjs +7 -2
- package/dist/better-sqlite3.mjs.map +1 -1
- package/dist/bun-sqlite.mjs +7 -2
- package/dist/bun-sqlite.mjs.map +1 -1
- package/dist/d1.mjs +5 -3
- package/dist/d1.mjs.map +1 -1
- package/dist/ddl.d.mts +10 -2
- package/dist/ddl.mjs +226 -14
- package/dist/ddl.mjs.map +1 -1
- package/dist/index.mjs +7 -2
- package/dist/index.mjs.map +1 -1
- package/dist/schema/baseline.d.mts +57 -0
- package/dist/schema/baseline.mjs +4 -1
- package/dist/schema/baseline.mjs.map +1 -1
- package/dist/schema/{status-config.d.mts → build-component.d.mts} +40 -33
- package/dist/schema/build-component.mjs +22 -0
- package/dist/schema/build-component.mjs.map +1 -0
- package/dist/schema/build-review.d.mts +129 -0
- package/dist/schema/build-review.mjs +20 -0
- package/dist/schema/build-review.mjs.map +1 -0
- package/dist/schema/build.d.mts +40 -2
- package/dist/schema/build.mjs +3 -0
- package/dist/schema/build.mjs.map +1 -1
- package/dist/schema/capture-job.d.mts +359 -0
- package/dist/schema/capture-job.mjs +38 -0
- package/dist/schema/capture-job.mjs.map +1 -0
- package/dist/schema/capture-shard.d.mts +281 -0
- package/dist/schema/capture-shard.mjs +28 -0
- package/dist/schema/capture-shard.mjs.map +1 -0
- package/dist/schema/comment.d.mts +20 -0
- package/dist/schema/comment.mjs +3 -2
- package/dist/schema/comment.mjs.map +1 -1
- package/dist/schema/connection.d.mts +191 -0
- package/dist/schema/connection.mjs +26 -0
- package/dist/schema/connection.mjs.map +1 -0
- package/dist/schema/design.d.mts +649 -0
- package/dist/schema/design.mjs +49 -0
- package/dist/schema/design.mjs.map +1 -0
- package/dist/schema/insight.d.mts +689 -0
- package/dist/schema/insight.mjs +53 -0
- package/dist/schema/insight.mjs.map +1 -0
- package/dist/schema/notification.d.mts +40 -0
- package/dist/schema/notification.mjs +2 -0
- package/dist/schema/notification.mjs.map +1 -1
- package/dist/schema/project.d.mts +132 -0
- package/dist/schema/project.mjs +8 -1
- package/dist/schema/project.mjs.map +1 -1
- package/dist/schema/site-setting.d.mts +109 -0
- package/dist/schema/site-setting.mjs +17 -0
- package/dist/schema/site-setting.mjs.map +1 -0
- package/dist/schema/snapshot.d.mts +118 -0
- package/dist/schema/snapshot.mjs +11 -1
- package/dist/schema/snapshot.mjs.map +1 -1
- package/dist/schema/usage.d.mts +293 -0
- package/dist/schema/usage.mjs +30 -0
- package/dist/schema/usage.mjs.map +1 -0
- package/dist/schema.d.mts +24 -3
- package/dist/schema.mjs +25 -4
- package/dist/schema.mjs.map +1 -1
- package/dist/turso.d.mts +2 -2
- package/dist/turso.mjs +19 -6
- package/dist/turso.mjs.map +1 -1
- package/package.json +5 -5
- package/dist/schema/status-config.mjs +0 -20
- package/dist/schema/status-config.mjs.map +0 -1
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import "node:path";
|
|
2
|
+
import "node:url";
|
|
3
|
+
import.meta.url;
|
|
4
|
+
import { projects } from "./project.mjs";
|
|
5
|
+
import { builds } from "./build.mjs";
|
|
6
|
+
import { integer, sqliteTable, text } from "drizzle-orm/sqlite-core";
|
|
7
|
+
//#region src/schema/insight.ts
|
|
8
|
+
/** Narrow `insights` table definition (build triage and project health results). */
|
|
9
|
+
const insights = sqliteTable("insights", {
|
|
10
|
+
id: text("id").primaryKey(),
|
|
11
|
+
projectId: text("project_id").notNull().references(() => projects.id, { onDelete: "cascade" }),
|
|
12
|
+
buildId: text("build_id").references(() => builds.id, { onDelete: "cascade" }),
|
|
13
|
+
kind: text("kind").notNull(),
|
|
14
|
+
windowKey: text("window_key"),
|
|
15
|
+
inputHash: text("input_hash").notNull(),
|
|
16
|
+
status: text("status").notNull(),
|
|
17
|
+
profile: text("profile").notNull(),
|
|
18
|
+
model: text("model").notNull(),
|
|
19
|
+
promptVersion: text("prompt_version").notNull(),
|
|
20
|
+
verdict: text("verdict"),
|
|
21
|
+
summary: text("summary"),
|
|
22
|
+
result: text("result"),
|
|
23
|
+
errorCode: text("error_code"),
|
|
24
|
+
createdAt: text("created_at").notNull(),
|
|
25
|
+
startedAt: text("started_at"),
|
|
26
|
+
finishedAt: text("finished_at")
|
|
27
|
+
});
|
|
28
|
+
/** Narrow `ai_usage` table definition (provider-reported usage; survives build purge). */
|
|
29
|
+
const aiUsage = sqliteTable("ai_usage", {
|
|
30
|
+
id: text("id").primaryKey(),
|
|
31
|
+
insightId: text("insight_id"),
|
|
32
|
+
projectId: text("project_id").notNull().references(() => projects.id, { onDelete: "cascade" }),
|
|
33
|
+
profile: text("profile").notNull(),
|
|
34
|
+
task: text("task").notNull(),
|
|
35
|
+
model: text("model").notNull(),
|
|
36
|
+
inputTokens: integer("input_tokens").notNull().default(0),
|
|
37
|
+
outputTokens: integer("output_tokens").notNull().default(0),
|
|
38
|
+
estimated: integer("estimated", { mode: "boolean" }).notNull().default(false),
|
|
39
|
+
images: integer("images").notNull().default(0),
|
|
40
|
+
status: text("status").notNull(),
|
|
41
|
+
createdAt: text("created_at").notNull()
|
|
42
|
+
});
|
|
43
|
+
/** Narrow `ai_budget_alerts` table definition (primary key `${day}:${threshold}` is the claim). */
|
|
44
|
+
const aiBudgetAlerts = sqliteTable("ai_budget_alerts", {
|
|
45
|
+
id: text("id").primaryKey(),
|
|
46
|
+
day: text("day").notNull(),
|
|
47
|
+
threshold: integer("threshold").notNull(),
|
|
48
|
+
createdAt: text("created_at").notNull()
|
|
49
|
+
});
|
|
50
|
+
//#endregion
|
|
51
|
+
export { aiBudgetAlerts, aiUsage, insights };
|
|
52
|
+
|
|
53
|
+
//# sourceMappingURL=insight.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"insight.mjs","names":[],"sources":["../../src/schema/insight.ts"],"sourcesContent":["import { integer, sqliteTable, text } from \"drizzle-orm/sqlite-core\";\nimport { builds } from \"./build.ts\";\nimport { projects } from \"./project.ts\";\n\n/** Narrow `insights` table definition (build triage and project health results). */\nexport const insights = sqliteTable(\"insights\", {\n id: text(\"id\").primaryKey(),\n projectId: text(\"project_id\")\n .notNull()\n .references(() => projects.id, { onDelete: \"cascade\" }),\n buildId: text(\"build_id\").references(() => builds.id, { onDelete: \"cascade\" }),\n kind: text(\"kind\").notNull(),\n windowKey: text(\"window_key\"),\n inputHash: text(\"input_hash\").notNull(),\n status: text(\"status\").notNull(),\n profile: text(\"profile\").notNull(),\n model: text(\"model\").notNull(),\n promptVersion: text(\"prompt_version\").notNull(),\n verdict: text(\"verdict\"),\n summary: text(\"summary\"),\n result: text(\"result\"),\n errorCode: text(\"error_code\"),\n createdAt: text(\"created_at\").notNull(),\n startedAt: text(\"started_at\"),\n finishedAt: text(\"finished_at\"),\n});\n\n/** Narrow `ai_usage` table definition (provider-reported usage; survives build purge). */\nexport const aiUsage = sqliteTable(\"ai_usage\", {\n id: text(\"id\").primaryKey(),\n insightId: text(\"insight_id\"),\n projectId: text(\"project_id\")\n .notNull()\n .references(() => projects.id, { onDelete: \"cascade\" }),\n profile: text(\"profile\").notNull(),\n task: text(\"task\").notNull(),\n model: text(\"model\").notNull(),\n inputTokens: integer(\"input_tokens\").notNull().default(0),\n outputTokens: integer(\"output_tokens\").notNull().default(0),\n estimated: integer(\"estimated\", { mode: \"boolean\" }).notNull().default(false),\n images: integer(\"images\").notNull().default(0),\n status: text(\"status\").notNull(),\n createdAt: text(\"created_at\").notNull(),\n});\n\n/** Narrow `ai_budget_alerts` table definition (primary key `${day}:${threshold}` is the claim). */\nexport const aiBudgetAlerts = sqliteTable(\"ai_budget_alerts\", {\n id: text(\"id\").primaryKey(),\n day: text(\"day\").notNull(),\n threshold: integer(\"threshold\").notNull(),\n createdAt: text(\"created_at\").notNull(),\n});\n\n/** An insight row. */\nexport interface Insight {\n id: string;\n projectId: string;\n buildId: string | null;\n kind: string;\n windowKey: string | null;\n inputHash: string;\n status: string;\n profile: string;\n model: string;\n promptVersion: string;\n verdict: string | null;\n summary: string | null;\n result: string | null;\n errorCode: string | null;\n createdAt: string;\n startedAt: string | null;\n finishedAt: string | null;\n}\n\n/** An AI usage row. */\nexport interface AiUsage {\n id: string;\n insightId: string | null;\n projectId: string;\n profile: string;\n task: string;\n model: string;\n inputTokens: number;\n outputTokens: number;\n estimated: boolean;\n images: number;\n status: string;\n createdAt: string;\n}\n\n/** A budget-threshold alert claim row. */\nexport interface AiBudgetAlert {\n id: string;\n day: string;\n threshold: number;\n createdAt: string;\n}\n"],"mappings":";;;;;;;;AAKA,MAAa,WAAW,YAAY,YAAY;CAC9C,IAAI,KAAK,IAAI,CAAC,CAAC,WAAW;CAC1B,WAAW,KAAK,YAAY,CAAC,CAC1B,QAAQ,CAAC,CACT,iBAAiB,SAAS,IAAI,EAAE,UAAU,UAAU,CAAC;CACxD,SAAS,KAAK,UAAU,CAAC,CAAC,iBAAiB,OAAO,IAAI,EAAE,UAAU,UAAU,CAAC;CAC7E,MAAM,KAAK,MAAM,CAAC,CAAC,QAAQ;CAC3B,WAAW,KAAK,YAAY;CAC5B,WAAW,KAAK,YAAY,CAAC,CAAC,QAAQ;CACtC,QAAQ,KAAK,QAAQ,CAAC,CAAC,QAAQ;CAC/B,SAAS,KAAK,SAAS,CAAC,CAAC,QAAQ;CACjC,OAAO,KAAK,OAAO,CAAC,CAAC,QAAQ;CAC7B,eAAe,KAAK,gBAAgB,CAAC,CAAC,QAAQ;CAC9C,SAAS,KAAK,SAAS;CACvB,SAAS,KAAK,SAAS;CACvB,QAAQ,KAAK,QAAQ;CACrB,WAAW,KAAK,YAAY;CAC5B,WAAW,KAAK,YAAY,CAAC,CAAC,QAAQ;CACtC,WAAW,KAAK,YAAY;CAC5B,YAAY,KAAK,aAAa;AAChC,CAAC;;AAGD,MAAa,UAAU,YAAY,YAAY;CAC7C,IAAI,KAAK,IAAI,CAAC,CAAC,WAAW;CAC1B,WAAW,KAAK,YAAY;CAC5B,WAAW,KAAK,YAAY,CAAC,CAC1B,QAAQ,CAAC,CACT,iBAAiB,SAAS,IAAI,EAAE,UAAU,UAAU,CAAC;CACxD,SAAS,KAAK,SAAS,CAAC,CAAC,QAAQ;CACjC,MAAM,KAAK,MAAM,CAAC,CAAC,QAAQ;CAC3B,OAAO,KAAK,OAAO,CAAC,CAAC,QAAQ;CAC7B,aAAa,QAAQ,cAAc,CAAC,CAAC,QAAQ,CAAC,CAAC,QAAQ,CAAC;CACxD,cAAc,QAAQ,eAAe,CAAC,CAAC,QAAQ,CAAC,CAAC,QAAQ,CAAC;CAC1D,WAAW,QAAQ,aAAa,EAAE,MAAM,UAAU,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,QAAQ,KAAK;CAC5E,QAAQ,QAAQ,QAAQ,CAAC,CAAC,QAAQ,CAAC,CAAC,QAAQ,CAAC;CAC7C,QAAQ,KAAK,QAAQ,CAAC,CAAC,QAAQ;CAC/B,WAAW,KAAK,YAAY,CAAC,CAAC,QAAQ;AACxC,CAAC;;AAGD,MAAa,iBAAiB,YAAY,oBAAoB;CAC5D,IAAI,KAAK,IAAI,CAAC,CAAC,WAAW;CAC1B,KAAK,KAAK,KAAK,CAAC,CAAC,QAAQ;CACzB,WAAW,QAAQ,WAAW,CAAC,CAAC,QAAQ;CACxC,WAAW,KAAK,YAAY,CAAC,CAAC,QAAQ;AACxC,CAAC"}
|
|
@@ -137,6 +137,44 @@ declare const notificationChannels: import("drizzle-orm/sqlite-core").SQLiteTabl
|
|
|
137
137
|
identity: undefined;
|
|
138
138
|
generated: undefined;
|
|
139
139
|
}, {}, {}>;
|
|
140
|
+
lastError: import("drizzle-orm/sqlite-core").SQLiteColumn<{
|
|
141
|
+
name: "last_error";
|
|
142
|
+
tableName: "notification_channels";
|
|
143
|
+
dataType: "string";
|
|
144
|
+
columnType: "SQLiteText";
|
|
145
|
+
data: string;
|
|
146
|
+
driverParam: string;
|
|
147
|
+
notNull: false;
|
|
148
|
+
hasDefault: false;
|
|
149
|
+
isPrimaryKey: false;
|
|
150
|
+
isAutoincrement: false;
|
|
151
|
+
hasRuntimeDefault: false;
|
|
152
|
+
enumValues: [string, ...string[]];
|
|
153
|
+
baseColumn: never;
|
|
154
|
+
identity: undefined;
|
|
155
|
+
generated: undefined;
|
|
156
|
+
}, {}, {
|
|
157
|
+
length: number | undefined;
|
|
158
|
+
}>;
|
|
159
|
+
lastErrorAt: import("drizzle-orm/sqlite-core").SQLiteColumn<{
|
|
160
|
+
name: "last_error_at";
|
|
161
|
+
tableName: "notification_channels";
|
|
162
|
+
dataType: "string";
|
|
163
|
+
columnType: "SQLiteText";
|
|
164
|
+
data: string;
|
|
165
|
+
driverParam: string;
|
|
166
|
+
notNull: false;
|
|
167
|
+
hasDefault: false;
|
|
168
|
+
isPrimaryKey: false;
|
|
169
|
+
isAutoincrement: false;
|
|
170
|
+
hasRuntimeDefault: false;
|
|
171
|
+
enumValues: [string, ...string[]];
|
|
172
|
+
baseColumn: never;
|
|
173
|
+
identity: undefined;
|
|
174
|
+
generated: undefined;
|
|
175
|
+
}, {}, {
|
|
176
|
+
length: number | undefined;
|
|
177
|
+
}>;
|
|
140
178
|
createdAt: import("drizzle-orm/sqlite-core").SQLiteColumn<{
|
|
141
179
|
name: "created_at";
|
|
142
180
|
tableName: "notification_channels";
|
|
@@ -326,6 +364,8 @@ interface NotificationChannel {
|
|
|
326
364
|
secretEncrypted: string | null;
|
|
327
365
|
events: string | null;
|
|
328
366
|
enabled: boolean;
|
|
367
|
+
lastError: string | null;
|
|
368
|
+
lastErrorAt: string | null;
|
|
329
369
|
createdAt: string;
|
|
330
370
|
updatedAt: string;
|
|
331
371
|
}
|
|
@@ -14,6 +14,8 @@ const notificationChannels = sqliteTable("notification_channels", {
|
|
|
14
14
|
secretEncrypted: text("secret_encrypted"),
|
|
15
15
|
events: text("events"),
|
|
16
16
|
enabled: integer("enabled", { mode: "boolean" }).notNull().default(true),
|
|
17
|
+
lastError: text("last_error"),
|
|
18
|
+
lastErrorAt: text("last_error_at"),
|
|
17
19
|
createdAt: text("created_at").notNull(),
|
|
18
20
|
updatedAt: text("updated_at").notNull()
|
|
19
21
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"notification.mjs","names":[],"sources":["../../src/schema/notification.ts"],"sourcesContent":["import { integer, sqliteTable, text } from \"drizzle-orm/sqlite-core\";\nimport { projects } from \"./project.ts\";\nimport { users } from \"./user.ts\";\n\n/** Narrow `notification_channels` table definition. */\nexport const notificationChannels = sqliteTable(\"notification_channels\", {\n id: text(\"id\").primaryKey(),\n projectId: text(\"project_id\").references(() => projects.id, { onDelete: \"cascade\" }),\n provider: text(\"provider\").notNull(),\n config: text(\"config\").notNull(),\n secretEncrypted: text(\"secret_encrypted\"),\n events: text(\"events\"),\n enabled: integer(\"enabled\", { mode: \"boolean\" }).notNull().default(true),\n createdAt: text(\"created_at\").notNull(),\n updatedAt: text(\"updated_at\").notNull(),\n});\n\n/** Narrow `notification_subscriptions` table definition. */\nexport const notificationSubscriptions = sqliteTable(\"notification_subscriptions\", {\n id: text(\"id\").primaryKey(),\n projectId: text(\"project_id\")\n .notNull()\n .references(() => projects.id, { onDelete: \"cascade\" }),\n userId: text(\"user_id\")\n .notNull()\n .references(() => users.id, { onDelete: \"cascade\" }),\n events: text(\"events\"),\n via: text(\"via\"),\n enabled: integer(\"enabled\", { mode: \"boolean\" }).notNull().default(true),\n createdAt: text(\"created_at\").notNull(),\n});\n\n/** A notification channel row. */\nexport interface NotificationChannel {\n id: string;\n projectId: string | null;\n provider: string;\n config: string;\n secretEncrypted: string | null;\n events: string | null;\n enabled: boolean;\n createdAt: string;\n updatedAt: string;\n}\n\n/** A per-user notification subscription row. */\nexport interface NotificationSubscription {\n id: string;\n projectId: string;\n userId: string;\n events: string | null;\n via: string | null;\n enabled: boolean;\n createdAt: string;\n}\n"],"mappings":";;;;;;;;AAKA,MAAa,uBAAuB,YAAY,yBAAyB;CACvE,IAAI,KAAK,IAAI,CAAC,CAAC,WAAW;CAC1B,WAAW,KAAK,YAAY,CAAC,CAAC,iBAAiB,SAAS,IAAI,EAAE,UAAU,UAAU,CAAC;CACnF,UAAU,KAAK,UAAU,CAAC,CAAC,QAAQ;CACnC,QAAQ,KAAK,QAAQ,CAAC,CAAC,QAAQ;CAC/B,iBAAiB,KAAK,kBAAkB;CACxC,QAAQ,KAAK,QAAQ;CACrB,SAAS,QAAQ,WAAW,EAAE,MAAM,UAAU,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,QAAQ,IAAI;CACvE,WAAW,KAAK,YAAY,CAAC,CAAC,QAAQ;CACtC,WAAW,KAAK,YAAY,CAAC,CAAC,QAAQ;AACxC,CAAC;;AAGD,MAAa,4BAA4B,YAAY,8BAA8B;CACjF,IAAI,KAAK,IAAI,CAAC,CAAC,WAAW;CAC1B,WAAW,KAAK,YAAY,CAAC,CAC1B,QAAQ,CAAC,CACT,iBAAiB,SAAS,IAAI,EAAE,UAAU,UAAU,CAAC;CACxD,QAAQ,KAAK,SAAS,CAAC,CACpB,QAAQ,CAAC,CACT,iBAAiB,MAAM,IAAI,EAAE,UAAU,UAAU,CAAC;CACrD,QAAQ,KAAK,QAAQ;CACrB,KAAK,KAAK,KAAK;CACf,SAAS,QAAQ,WAAW,EAAE,MAAM,UAAU,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,QAAQ,IAAI;CACvE,WAAW,KAAK,YAAY,CAAC,CAAC,QAAQ;AACxC,CAAC"}
|
|
1
|
+
{"version":3,"file":"notification.mjs","names":[],"sources":["../../src/schema/notification.ts"],"sourcesContent":["import { integer, sqliteTable, text } from \"drizzle-orm/sqlite-core\";\nimport { projects } from \"./project.ts\";\nimport { users } from \"./user.ts\";\n\n/** Narrow `notification_channels` table definition. */\nexport const notificationChannels = sqliteTable(\"notification_channels\", {\n id: text(\"id\").primaryKey(),\n projectId: text(\"project_id\").references(() => projects.id, { onDelete: \"cascade\" }),\n provider: text(\"provider\").notNull(),\n config: text(\"config\").notNull(),\n secretEncrypted: text(\"secret_encrypted\"),\n events: text(\"events\"),\n enabled: integer(\"enabled\", { mode: \"boolean\" }).notNull().default(true),\n lastError: text(\"last_error\"),\n lastErrorAt: text(\"last_error_at\"),\n createdAt: text(\"created_at\").notNull(),\n updatedAt: text(\"updated_at\").notNull(),\n});\n\n/** Narrow `notification_subscriptions` table definition. */\nexport const notificationSubscriptions = sqliteTable(\"notification_subscriptions\", {\n id: text(\"id\").primaryKey(),\n projectId: text(\"project_id\")\n .notNull()\n .references(() => projects.id, { onDelete: \"cascade\" }),\n userId: text(\"user_id\")\n .notNull()\n .references(() => users.id, { onDelete: \"cascade\" }),\n events: text(\"events\"),\n via: text(\"via\"),\n enabled: integer(\"enabled\", { mode: \"boolean\" }).notNull().default(true),\n createdAt: text(\"created_at\").notNull(),\n});\n\n/** A notification channel row. */\nexport interface NotificationChannel {\n id: string;\n projectId: string | null;\n provider: string;\n config: string;\n secretEncrypted: string | null;\n events: string | null;\n enabled: boolean;\n lastError: string | null;\n lastErrorAt: string | null;\n createdAt: string;\n updatedAt: string;\n}\n\n/** A per-user notification subscription row. */\nexport interface NotificationSubscription {\n id: string;\n projectId: string;\n userId: string;\n events: string | null;\n via: string | null;\n enabled: boolean;\n createdAt: string;\n}\n"],"mappings":";;;;;;;;AAKA,MAAa,uBAAuB,YAAY,yBAAyB;CACvE,IAAI,KAAK,IAAI,CAAC,CAAC,WAAW;CAC1B,WAAW,KAAK,YAAY,CAAC,CAAC,iBAAiB,SAAS,IAAI,EAAE,UAAU,UAAU,CAAC;CACnF,UAAU,KAAK,UAAU,CAAC,CAAC,QAAQ;CACnC,QAAQ,KAAK,QAAQ,CAAC,CAAC,QAAQ;CAC/B,iBAAiB,KAAK,kBAAkB;CACxC,QAAQ,KAAK,QAAQ;CACrB,SAAS,QAAQ,WAAW,EAAE,MAAM,UAAU,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,QAAQ,IAAI;CACvE,WAAW,KAAK,YAAY;CAC5B,aAAa,KAAK,eAAe;CACjC,WAAW,KAAK,YAAY,CAAC,CAAC,QAAQ;CACtC,WAAW,KAAK,YAAY,CAAC,CAAC,QAAQ;AACxC,CAAC;;AAGD,MAAa,4BAA4B,YAAY,8BAA8B;CACjF,IAAI,KAAK,IAAI,CAAC,CAAC,WAAW;CAC1B,WAAW,KAAK,YAAY,CAAC,CAC1B,QAAQ,CAAC,CACT,iBAAiB,SAAS,IAAI,EAAE,UAAU,UAAU,CAAC;CACxD,QAAQ,KAAK,SAAS,CAAC,CACpB,QAAQ,CAAC,CACT,iBAAiB,MAAM,IAAI,EAAE,UAAU,UAAU,CAAC;CACrD,QAAQ,KAAK,QAAQ;CACrB,KAAK,KAAK,KAAK;CACf,SAAS,QAAQ,WAAW,EAAE,MAAM,UAAU,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,QAAQ,IAAI;CACvE,WAAW,KAAK,YAAY,CAAC,CAAC,QAAQ;AACxC,CAAC"}
|
|
@@ -225,6 +225,23 @@ declare const projects: import("drizzle-orm/sqlite-core").SQLiteTableWithColumns
|
|
|
225
225
|
identity: undefined;
|
|
226
226
|
generated: undefined;
|
|
227
227
|
}, {}, {}>;
|
|
228
|
+
runTests: import("drizzle-orm/sqlite-core").SQLiteColumn<{
|
|
229
|
+
name: "run_tests";
|
|
230
|
+
tableName: "projects";
|
|
231
|
+
dataType: "boolean";
|
|
232
|
+
columnType: "SQLiteBoolean";
|
|
233
|
+
data: boolean;
|
|
234
|
+
driverParam: number;
|
|
235
|
+
notNull: true;
|
|
236
|
+
hasDefault: true;
|
|
237
|
+
isPrimaryKey: false;
|
|
238
|
+
isAutoincrement: false;
|
|
239
|
+
hasRuntimeDefault: false;
|
|
240
|
+
enumValues: undefined;
|
|
241
|
+
baseColumn: never;
|
|
242
|
+
identity: undefined;
|
|
243
|
+
generated: undefined;
|
|
244
|
+
}, {}, {}>;
|
|
228
245
|
browser: import("drizzle-orm/sqlite-core").SQLiteColumn<{
|
|
229
246
|
name: "browser";
|
|
230
247
|
tableName: "projects";
|
|
@@ -263,6 +280,44 @@ declare const projects: import("drizzle-orm/sqlite-core").SQLiteTableWithColumns
|
|
|
263
280
|
}, {}, {
|
|
264
281
|
length: number | undefined;
|
|
265
282
|
}>;
|
|
283
|
+
browsers: import("drizzle-orm/sqlite-core").SQLiteColumn<{
|
|
284
|
+
name: "browsers";
|
|
285
|
+
tableName: "projects";
|
|
286
|
+
dataType: "string";
|
|
287
|
+
columnType: "SQLiteText";
|
|
288
|
+
data: string;
|
|
289
|
+
driverParam: string;
|
|
290
|
+
notNull: false;
|
|
291
|
+
hasDefault: false;
|
|
292
|
+
isPrimaryKey: false;
|
|
293
|
+
isAutoincrement: false;
|
|
294
|
+
hasRuntimeDefault: false;
|
|
295
|
+
enumValues: [string, ...string[]];
|
|
296
|
+
baseColumn: never;
|
|
297
|
+
identity: undefined;
|
|
298
|
+
generated: undefined;
|
|
299
|
+
}, {}, {
|
|
300
|
+
length: number | undefined;
|
|
301
|
+
}>;
|
|
302
|
+
modesAllowlist: import("drizzle-orm/sqlite-core").SQLiteColumn<{
|
|
303
|
+
name: "modes_allowlist";
|
|
304
|
+
tableName: "projects";
|
|
305
|
+
dataType: "string";
|
|
306
|
+
columnType: "SQLiteText";
|
|
307
|
+
data: string;
|
|
308
|
+
driverParam: string;
|
|
309
|
+
notNull: false;
|
|
310
|
+
hasDefault: false;
|
|
311
|
+
isPrimaryKey: false;
|
|
312
|
+
isAutoincrement: false;
|
|
313
|
+
hasRuntimeDefault: false;
|
|
314
|
+
enumValues: [string, ...string[]];
|
|
315
|
+
baseColumn: never;
|
|
316
|
+
identity: undefined;
|
|
317
|
+
generated: undefined;
|
|
318
|
+
}, {}, {
|
|
319
|
+
length: number | undefined;
|
|
320
|
+
}>;
|
|
266
321
|
automigrate: import("drizzle-orm/sqlite-core").SQLiteColumn<{
|
|
267
322
|
name: "automigrate";
|
|
268
323
|
tableName: "projects";
|
|
@@ -280,6 +335,76 @@ declare const projects: import("drizzle-orm/sqlite-core").SQLiteTableWithColumns
|
|
|
280
335
|
identity: undefined;
|
|
281
336
|
generated: undefined;
|
|
282
337
|
}, {}, {}>;
|
|
338
|
+
aiProfile: import("drizzle-orm/sqlite-core").SQLiteColumn<{
|
|
339
|
+
name: "ai_profile";
|
|
340
|
+
tableName: "projects";
|
|
341
|
+
dataType: "string";
|
|
342
|
+
columnType: "SQLiteText";
|
|
343
|
+
data: string;
|
|
344
|
+
driverParam: string;
|
|
345
|
+
notNull: false;
|
|
346
|
+
hasDefault: false;
|
|
347
|
+
isPrimaryKey: false;
|
|
348
|
+
isAutoincrement: false;
|
|
349
|
+
hasRuntimeDefault: false;
|
|
350
|
+
enumValues: [string, ...string[]];
|
|
351
|
+
baseColumn: never;
|
|
352
|
+
identity: undefined;
|
|
353
|
+
generated: undefined;
|
|
354
|
+
}, {}, {
|
|
355
|
+
length: number | undefined;
|
|
356
|
+
}>;
|
|
357
|
+
reviewEnabled: import("drizzle-orm/sqlite-core").SQLiteColumn<{
|
|
358
|
+
name: "review_enabled";
|
|
359
|
+
tableName: "projects";
|
|
360
|
+
dataType: "boolean";
|
|
361
|
+
columnType: "SQLiteBoolean";
|
|
362
|
+
data: boolean;
|
|
363
|
+
driverParam: number;
|
|
364
|
+
notNull: true;
|
|
365
|
+
hasDefault: true;
|
|
366
|
+
isPrimaryKey: false;
|
|
367
|
+
isAutoincrement: false;
|
|
368
|
+
hasRuntimeDefault: false;
|
|
369
|
+
enumValues: undefined;
|
|
370
|
+
baseColumn: never;
|
|
371
|
+
identity: undefined;
|
|
372
|
+
generated: undefined;
|
|
373
|
+
}, {}, {}>;
|
|
374
|
+
reviewApprovals: import("drizzle-orm/sqlite-core").SQLiteColumn<{
|
|
375
|
+
name: "review_approvals";
|
|
376
|
+
tableName: "projects";
|
|
377
|
+
dataType: "number";
|
|
378
|
+
columnType: "SQLiteInteger";
|
|
379
|
+
data: number;
|
|
380
|
+
driverParam: number;
|
|
381
|
+
notNull: true;
|
|
382
|
+
hasDefault: true;
|
|
383
|
+
isPrimaryKey: false;
|
|
384
|
+
isAutoincrement: false;
|
|
385
|
+
hasRuntimeDefault: false;
|
|
386
|
+
enumValues: undefined;
|
|
387
|
+
baseColumn: never;
|
|
388
|
+
identity: undefined;
|
|
389
|
+
generated: undefined;
|
|
390
|
+
}, {}, {}>;
|
|
391
|
+
storybookUrlTtlSeconds: import("drizzle-orm/sqlite-core").SQLiteColumn<{
|
|
392
|
+
name: "storybook_url_ttl_seconds";
|
|
393
|
+
tableName: "projects";
|
|
394
|
+
dataType: "number";
|
|
395
|
+
columnType: "SQLiteInteger";
|
|
396
|
+
data: number;
|
|
397
|
+
driverParam: number;
|
|
398
|
+
notNull: false;
|
|
399
|
+
hasDefault: false;
|
|
400
|
+
isPrimaryKey: false;
|
|
401
|
+
isAutoincrement: false;
|
|
402
|
+
hasRuntimeDefault: false;
|
|
403
|
+
enumValues: undefined;
|
|
404
|
+
baseColumn: never;
|
|
405
|
+
identity: undefined;
|
|
406
|
+
generated: undefined;
|
|
407
|
+
}, {}, {}>;
|
|
283
408
|
createdAt: import("drizzle-orm/sqlite-core").SQLiteColumn<{
|
|
284
409
|
name: "created_at";
|
|
285
410
|
tableName: "projects";
|
|
@@ -335,9 +460,16 @@ interface Project {
|
|
|
335
460
|
executePlay: boolean;
|
|
336
461
|
playTimeoutMs: number;
|
|
337
462
|
runA11y: boolean;
|
|
463
|
+
runTests: boolean;
|
|
338
464
|
browser: string;
|
|
339
465
|
viewports: string | null;
|
|
466
|
+
browsers: string | null;
|
|
467
|
+
modesAllowlist: string | null;
|
|
340
468
|
automigrate: boolean;
|
|
469
|
+
aiProfile: string | null;
|
|
470
|
+
reviewEnabled: boolean;
|
|
471
|
+
reviewApprovals: number;
|
|
472
|
+
storybookUrlTtlSeconds: number | null;
|
|
341
473
|
createdAt: string;
|
|
342
474
|
updatedAt: string;
|
|
343
475
|
}
|
package/dist/schema/project.mjs
CHANGED
|
@@ -16,10 +16,17 @@ const projects = sqliteTable("projects", {
|
|
|
16
16
|
storybookMeta: text("storybook_meta").$type().default(null),
|
|
17
17
|
executePlay: integer("execute_play", { mode: "boolean" }).notNull().default(false),
|
|
18
18
|
playTimeoutMs: integer("play_timeout_ms").notNull().default(1e4),
|
|
19
|
-
runA11y: integer("run_a11y", { mode: "boolean" }).notNull().default(
|
|
19
|
+
runA11y: integer("run_a11y", { mode: "boolean" }).notNull().default(true),
|
|
20
|
+
runTests: integer("run_tests", { mode: "boolean" }).notNull().default(false),
|
|
20
21
|
browser: text("browser").notNull().default("chromium"),
|
|
21
22
|
viewports: text("viewports"),
|
|
23
|
+
browsers: text("browsers"),
|
|
24
|
+
modesAllowlist: text("modes_allowlist"),
|
|
22
25
|
automigrate: integer("automigrate", { mode: "boolean" }).notNull().default(false),
|
|
26
|
+
aiProfile: text("ai_profile"),
|
|
27
|
+
reviewEnabled: integer("review_enabled", { mode: "boolean" }).notNull().default(true),
|
|
28
|
+
reviewApprovals: integer("review_approvals").notNull().default(1),
|
|
29
|
+
storybookUrlTtlSeconds: integer("storybook_url_ttl_seconds"),
|
|
23
30
|
createdAt: text("created_at").notNull(),
|
|
24
31
|
updatedAt: text("updated_at").notNull()
|
|
25
32
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"project.mjs","names":[],"sources":["../../src/schema/project.ts"],"sourcesContent":["import { integer, real, sqliteTable, text } from \"drizzle-orm/sqlite-core\";\n\n/** Narrow `projects` table definition. */\nexport const projects = sqliteTable(\"projects\", {\n id: text(\"id\").primaryKey(),\n name: text(\"name\").notNull(),\n slug: text(\"slug\").notNull(),\n gitRepository: text(\"git_repository\"),\n gitDefaultBranch: text(\"git_default_branch\").notNull().default(\"main\"),\n pixelThreshold: real(\"pixel_threshold\").notNull().default(0.1),\n maxDiffRatio: real(\"max_diff_ratio\").notNull().default(0.01),\n publicBranchRegex: text(\"public_branch_regex\"),\n storybookMeta: text(\"storybook_meta\").$type<string | null | undefined>().default(null),\n executePlay: integer(\"execute_play\", { mode: \"boolean\" }).notNull().default(false),\n playTimeoutMs: integer(\"play_timeout_ms\").notNull().default(10_000),\n runA11y: integer(\"run_a11y\", { mode: \"boolean\" }).notNull().default(false),\n browser: text(\"browser\").notNull().default(\"chromium\"),\n viewports: text(\"viewports\"),\n automigrate: integer(\"automigrate\", { mode: \"boolean\" }).notNull().default(false),\n createdAt: text(\"created_at\").notNull(),\n updatedAt: text(\"updated_at\").notNull(),\n});\n\n/** A project row. */\nexport interface Project {\n id: string;\n name: string;\n slug: string;\n gitRepository: string | null;\n gitDefaultBranch: string;\n pixelThreshold: number;\n maxDiffRatio: number;\n publicBranchRegex: string | null;\n storybookMeta: string | null | undefined;\n executePlay: boolean;\n playTimeoutMs: number;\n runA11y: boolean;\n browser: string;\n viewports: string | null;\n automigrate: boolean;\n createdAt: string;\n updatedAt: string;\n}\n\n/** Storybook metadata synced from a project's published Storybook. */\nexport interface StorybookMeta {\n framework?: { name?: string; options?: unknown };\n addons?: string[];\n storiesGlobs?: string[];\n staticDirs?: string[];\n packagePath?: string;\n previewParameters?: Record<string, unknown>;\n}\n"],"mappings":";;;;;;AAGA,MAAa,WAAW,YAAY,YAAY;CAC9C,IAAI,KAAK,IAAI,CAAC,CAAC,WAAW;CAC1B,MAAM,KAAK,MAAM,CAAC,CAAC,QAAQ;CAC3B,MAAM,KAAK,MAAM,CAAC,CAAC,QAAQ;CAC3B,eAAe,KAAK,gBAAgB;CACpC,kBAAkB,KAAK,oBAAoB,CAAC,CAAC,QAAQ,CAAC,CAAC,QAAQ,MAAM;CACrE,gBAAgB,KAAK,iBAAiB,CAAC,CAAC,QAAQ,CAAC,CAAC,QAAQ,EAAG;CAC7D,cAAc,KAAK,gBAAgB,CAAC,CAAC,QAAQ,CAAC,CAAC,QAAQ,GAAI;CAC3D,mBAAmB,KAAK,qBAAqB;CAC7C,eAAe,KAAK,gBAAgB,CAAC,CAAC,MAAiC,CAAC,CAAC,QAAQ,IAAI;CACrF,aAAa,QAAQ,gBAAgB,EAAE,MAAM,UAAU,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,QAAQ,KAAK;CACjF,eAAe,QAAQ,iBAAiB,CAAC,CAAC,QAAQ,CAAC,CAAC,QAAQ,GAAM;CAClE,SAAS,QAAQ,YAAY,EAAE,MAAM,UAAU,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,QAAQ,KAAK;
|
|
1
|
+
{"version":3,"file":"project.mjs","names":[],"sources":["../../src/schema/project.ts"],"sourcesContent":["import { integer, real, sqliteTable, text } from \"drizzle-orm/sqlite-core\";\n\n/** Narrow `projects` table definition. */\nexport const projects = sqliteTable(\"projects\", {\n id: text(\"id\").primaryKey(),\n name: text(\"name\").notNull(),\n slug: text(\"slug\").notNull(),\n gitRepository: text(\"git_repository\"),\n gitDefaultBranch: text(\"git_default_branch\").notNull().default(\"main\"),\n pixelThreshold: real(\"pixel_threshold\").notNull().default(0.1),\n maxDiffRatio: real(\"max_diff_ratio\").notNull().default(0.01),\n publicBranchRegex: text(\"public_branch_regex\"),\n storybookMeta: text(\"storybook_meta\").$type<string | null | undefined>().default(null),\n executePlay: integer(\"execute_play\", { mode: \"boolean\" }).notNull().default(false),\n playTimeoutMs: integer(\"play_timeout_ms\").notNull().default(10_000),\n runA11y: integer(\"run_a11y\", { mode: \"boolean\" }).notNull().default(true),\n runTests: integer(\"run_tests\", { mode: \"boolean\" }).notNull().default(false),\n browser: text(\"browser\").notNull().default(\"chromium\"),\n viewports: text(\"viewports\"),\n browsers: text(\"browsers\"),\n modesAllowlist: text(\"modes_allowlist\"),\n automigrate: integer(\"automigrate\", { mode: \"boolean\" }).notNull().default(false),\n aiProfile: text(\"ai_profile\"),\n reviewEnabled: integer(\"review_enabled\", { mode: \"boolean\" }).notNull().default(true),\n reviewApprovals: integer(\"review_approvals\").notNull().default(1),\n storybookUrlTtlSeconds: integer(\"storybook_url_ttl_seconds\"),\n createdAt: text(\"created_at\").notNull(),\n updatedAt: text(\"updated_at\").notNull(),\n});\n\n/** A project row. */\nexport interface Project {\n id: string;\n name: string;\n slug: string;\n gitRepository: string | null;\n gitDefaultBranch: string;\n pixelThreshold: number;\n maxDiffRatio: number;\n publicBranchRegex: string | null;\n storybookMeta: string | null | undefined;\n executePlay: boolean;\n playTimeoutMs: number;\n runA11y: boolean;\n runTests: boolean;\n browser: string;\n viewports: string | null;\n browsers: string | null;\n modesAllowlist: string | null;\n automigrate: boolean;\n aiProfile: string | null;\n reviewEnabled: boolean;\n reviewApprovals: number;\n storybookUrlTtlSeconds: number | null;\n createdAt: string;\n updatedAt: string;\n}\n\n/** Storybook metadata synced from a project's published Storybook. */\nexport interface StorybookMeta {\n framework?: { name?: string; options?: unknown };\n addons?: string[];\n storiesGlobs?: string[];\n staticDirs?: string[];\n packagePath?: string;\n previewParameters?: Record<string, unknown>;\n}\n"],"mappings":";;;;;;AAGA,MAAa,WAAW,YAAY,YAAY;CAC9C,IAAI,KAAK,IAAI,CAAC,CAAC,WAAW;CAC1B,MAAM,KAAK,MAAM,CAAC,CAAC,QAAQ;CAC3B,MAAM,KAAK,MAAM,CAAC,CAAC,QAAQ;CAC3B,eAAe,KAAK,gBAAgB;CACpC,kBAAkB,KAAK,oBAAoB,CAAC,CAAC,QAAQ,CAAC,CAAC,QAAQ,MAAM;CACrE,gBAAgB,KAAK,iBAAiB,CAAC,CAAC,QAAQ,CAAC,CAAC,QAAQ,EAAG;CAC7D,cAAc,KAAK,gBAAgB,CAAC,CAAC,QAAQ,CAAC,CAAC,QAAQ,GAAI;CAC3D,mBAAmB,KAAK,qBAAqB;CAC7C,eAAe,KAAK,gBAAgB,CAAC,CAAC,MAAiC,CAAC,CAAC,QAAQ,IAAI;CACrF,aAAa,QAAQ,gBAAgB,EAAE,MAAM,UAAU,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,QAAQ,KAAK;CACjF,eAAe,QAAQ,iBAAiB,CAAC,CAAC,QAAQ,CAAC,CAAC,QAAQ,GAAM;CAClE,SAAS,QAAQ,YAAY,EAAE,MAAM,UAAU,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,QAAQ,IAAI;CACxE,UAAU,QAAQ,aAAa,EAAE,MAAM,UAAU,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,QAAQ,KAAK;CAC3E,SAAS,KAAK,SAAS,CAAC,CAAC,QAAQ,CAAC,CAAC,QAAQ,UAAU;CACrD,WAAW,KAAK,WAAW;CAC3B,UAAU,KAAK,UAAU;CACzB,gBAAgB,KAAK,iBAAiB;CACtC,aAAa,QAAQ,eAAe,EAAE,MAAM,UAAU,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,QAAQ,KAAK;CAChF,WAAW,KAAK,YAAY;CAC5B,eAAe,QAAQ,kBAAkB,EAAE,MAAM,UAAU,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,QAAQ,IAAI;CACpF,iBAAiB,QAAQ,kBAAkB,CAAC,CAAC,QAAQ,CAAC,CAAC,QAAQ,CAAC;CAChE,wBAAwB,QAAQ,2BAA2B;CAC3D,WAAW,KAAK,YAAY,CAAC,CAAC,QAAQ;CACtC,WAAW,KAAK,YAAY,CAAC,CAAC,QAAQ;AACxC,CAAC"}
|
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
import __tsdown_shims_path from 'node:path';
|
|
2
|
+
import __tsdown_shims_url from 'node:url';
|
|
3
|
+
//#region src/schema/site-setting.d.ts
|
|
4
|
+
/** Narrow `site_settings` table definition: key-value facts the app learns at runtime. */
|
|
5
|
+
declare const siteSettings: import("drizzle-orm/sqlite-core").SQLiteTableWithColumns<{
|
|
6
|
+
name: "site_settings";
|
|
7
|
+
schema: undefined;
|
|
8
|
+
columns: {
|
|
9
|
+
id: import("drizzle-orm/sqlite-core").SQLiteColumn<{
|
|
10
|
+
name: "id";
|
|
11
|
+
tableName: "site_settings";
|
|
12
|
+
dataType: "string";
|
|
13
|
+
columnType: "SQLiteText";
|
|
14
|
+
data: string;
|
|
15
|
+
driverParam: string;
|
|
16
|
+
notNull: true;
|
|
17
|
+
hasDefault: false;
|
|
18
|
+
isPrimaryKey: true;
|
|
19
|
+
isAutoincrement: false;
|
|
20
|
+
hasRuntimeDefault: false;
|
|
21
|
+
enumValues: [string, ...string[]];
|
|
22
|
+
baseColumn: never;
|
|
23
|
+
identity: undefined;
|
|
24
|
+
generated: undefined;
|
|
25
|
+
}, {}, {
|
|
26
|
+
length: number | undefined;
|
|
27
|
+
}>;
|
|
28
|
+
value: import("drizzle-orm/sqlite-core").SQLiteColumn<{
|
|
29
|
+
name: "value";
|
|
30
|
+
tableName: "site_settings";
|
|
31
|
+
dataType: "string";
|
|
32
|
+
columnType: "SQLiteText";
|
|
33
|
+
data: string;
|
|
34
|
+
driverParam: string;
|
|
35
|
+
notNull: true;
|
|
36
|
+
hasDefault: false;
|
|
37
|
+
isPrimaryKey: false;
|
|
38
|
+
isAutoincrement: false;
|
|
39
|
+
hasRuntimeDefault: false;
|
|
40
|
+
enumValues: [string, ...string[]];
|
|
41
|
+
baseColumn: never;
|
|
42
|
+
identity: undefined;
|
|
43
|
+
generated: undefined;
|
|
44
|
+
}, {}, {
|
|
45
|
+
length: number | undefined;
|
|
46
|
+
}>;
|
|
47
|
+
updatedBy: import("drizzle-orm/sqlite-core").SQLiteColumn<{
|
|
48
|
+
name: "updated_by";
|
|
49
|
+
tableName: "site_settings";
|
|
50
|
+
dataType: "string";
|
|
51
|
+
columnType: "SQLiteText";
|
|
52
|
+
data: string;
|
|
53
|
+
driverParam: string;
|
|
54
|
+
notNull: false;
|
|
55
|
+
hasDefault: false;
|
|
56
|
+
isPrimaryKey: false;
|
|
57
|
+
isAutoincrement: false;
|
|
58
|
+
hasRuntimeDefault: false;
|
|
59
|
+
enumValues: [string, ...string[]];
|
|
60
|
+
baseColumn: never;
|
|
61
|
+
identity: undefined;
|
|
62
|
+
generated: undefined;
|
|
63
|
+
}, {}, {
|
|
64
|
+
length: number | undefined;
|
|
65
|
+
}>;
|
|
66
|
+
createdAt: import("drizzle-orm/sqlite-core").SQLiteColumn<{
|
|
67
|
+
name: "created_at";
|
|
68
|
+
tableName: "site_settings";
|
|
69
|
+
dataType: "string";
|
|
70
|
+
columnType: "SQLiteText";
|
|
71
|
+
data: string;
|
|
72
|
+
driverParam: string;
|
|
73
|
+
notNull: true;
|
|
74
|
+
hasDefault: false;
|
|
75
|
+
isPrimaryKey: false;
|
|
76
|
+
isAutoincrement: false;
|
|
77
|
+
hasRuntimeDefault: false;
|
|
78
|
+
enumValues: [string, ...string[]];
|
|
79
|
+
baseColumn: never;
|
|
80
|
+
identity: undefined;
|
|
81
|
+
generated: undefined;
|
|
82
|
+
}, {}, {
|
|
83
|
+
length: number | undefined;
|
|
84
|
+
}>;
|
|
85
|
+
updatedAt: import("drizzle-orm/sqlite-core").SQLiteColumn<{
|
|
86
|
+
name: "updated_at";
|
|
87
|
+
tableName: "site_settings";
|
|
88
|
+
dataType: "string";
|
|
89
|
+
columnType: "SQLiteText";
|
|
90
|
+
data: string;
|
|
91
|
+
driverParam: string;
|
|
92
|
+
notNull: true;
|
|
93
|
+
hasDefault: false;
|
|
94
|
+
isPrimaryKey: false;
|
|
95
|
+
isAutoincrement: false;
|
|
96
|
+
hasRuntimeDefault: false;
|
|
97
|
+
enumValues: [string, ...string[]];
|
|
98
|
+
baseColumn: never;
|
|
99
|
+
identity: undefined;
|
|
100
|
+
generated: undefined;
|
|
101
|
+
}, {}, {
|
|
102
|
+
length: number | undefined;
|
|
103
|
+
}>;
|
|
104
|
+
};
|
|
105
|
+
dialect: 'sqlite';
|
|
106
|
+
}>;
|
|
107
|
+
//#endregion
|
|
108
|
+
export { siteSettings };
|
|
109
|
+
//# sourceMappingURL=site-setting.d.mts.map
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import "node:path";
|
|
2
|
+
import "node:url";
|
|
3
|
+
import.meta.url;
|
|
4
|
+
import { sqliteTable, text } from "drizzle-orm/sqlite-core";
|
|
5
|
+
//#region src/schema/site-setting.ts
|
|
6
|
+
/** Narrow `site_settings` table definition: key-value facts the app learns at runtime. */
|
|
7
|
+
const siteSettings = sqliteTable("site_settings", {
|
|
8
|
+
id: text("id").primaryKey(),
|
|
9
|
+
value: text("value").notNull(),
|
|
10
|
+
updatedBy: text("updated_by"),
|
|
11
|
+
createdAt: text("created_at").notNull(),
|
|
12
|
+
updatedAt: text("updated_at").notNull()
|
|
13
|
+
});
|
|
14
|
+
//#endregion
|
|
15
|
+
export { siteSettings };
|
|
16
|
+
|
|
17
|
+
//# sourceMappingURL=site-setting.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"site-setting.mjs","names":[],"sources":["../../src/schema/site-setting.ts"],"sourcesContent":["import { sqliteTable, text } from \"drizzle-orm/sqlite-core\";\n\n/** Narrow `site_settings` table definition: key-value facts the app learns at runtime. */\nexport const siteSettings = sqliteTable(\"site_settings\", {\n id: text(\"id\").primaryKey(),\n value: text(\"value\").notNull(),\n updatedBy: text(\"updated_by\"),\n createdAt: text(\"created_at\").notNull(),\n updatedAt: text(\"updated_at\").notNull(),\n});\n"],"mappings":";;;;;;AAGA,MAAa,eAAe,YAAY,iBAAiB;CACvD,IAAI,KAAK,IAAI,CAAC,CAAC,WAAW;CAC1B,OAAO,KAAK,OAAO,CAAC,CAAC,QAAQ;CAC7B,WAAW,KAAK,YAAY;CAC5B,WAAW,KAAK,YAAY,CAAC,CAAC,QAAQ;CACtC,WAAW,KAAK,YAAY,CAAC,CAAC,QAAQ;AACxC,CAAC"}
|
|
@@ -140,6 +140,25 @@ declare const snapshots: import("drizzle-orm/sqlite-core").SQLiteTableWithColumn
|
|
|
140
140
|
}, {}, {
|
|
141
141
|
length: number | undefined;
|
|
142
142
|
}>;
|
|
143
|
+
designUrl: import("drizzle-orm/sqlite-core").SQLiteColumn<{
|
|
144
|
+
name: "design_url";
|
|
145
|
+
tableName: "snapshots";
|
|
146
|
+
dataType: "string";
|
|
147
|
+
columnType: "SQLiteText";
|
|
148
|
+
data: string;
|
|
149
|
+
driverParam: string;
|
|
150
|
+
notNull: false;
|
|
151
|
+
hasDefault: false;
|
|
152
|
+
isPrimaryKey: false;
|
|
153
|
+
isAutoincrement: false;
|
|
154
|
+
hasRuntimeDefault: false;
|
|
155
|
+
enumValues: [string, ...string[]];
|
|
156
|
+
baseColumn: never;
|
|
157
|
+
identity: undefined;
|
|
158
|
+
generated: undefined;
|
|
159
|
+
}, {}, {
|
|
160
|
+
length: number | undefined;
|
|
161
|
+
}>;
|
|
143
162
|
viewportName: import("drizzle-orm/sqlite-core").SQLiteColumn<{
|
|
144
163
|
name: "viewport_name";
|
|
145
164
|
tableName: "snapshots";
|
|
@@ -359,6 +378,25 @@ declare const snapshots: import("drizzle-orm/sqlite-core").SQLiteTableWithColumn
|
|
|
359
378
|
}, {}, {
|
|
360
379
|
length: number | undefined;
|
|
361
380
|
}>;
|
|
381
|
+
envChange: import("drizzle-orm/sqlite-core").SQLiteColumn<{
|
|
382
|
+
name: "env_change";
|
|
383
|
+
tableName: "snapshots";
|
|
384
|
+
dataType: "string";
|
|
385
|
+
columnType: "SQLiteText";
|
|
386
|
+
data: string;
|
|
387
|
+
driverParam: string;
|
|
388
|
+
notNull: false;
|
|
389
|
+
hasDefault: false;
|
|
390
|
+
isPrimaryKey: false;
|
|
391
|
+
isAutoincrement: false;
|
|
392
|
+
hasRuntimeDefault: false;
|
|
393
|
+
enumValues: [string, ...string[]];
|
|
394
|
+
baseColumn: never;
|
|
395
|
+
identity: undefined;
|
|
396
|
+
generated: undefined;
|
|
397
|
+
}, {}, {
|
|
398
|
+
length: number | undefined;
|
|
399
|
+
}>;
|
|
362
400
|
inherited: import("drizzle-orm/sqlite-core").SQLiteColumn<{
|
|
363
401
|
name: "inherited";
|
|
364
402
|
tableName: "snapshots";
|
|
@@ -414,6 +452,80 @@ declare const snapshots: import("drizzle-orm/sqlite-core").SQLiteTableWithColumn
|
|
|
414
452
|
}, {}, {
|
|
415
453
|
length: number | undefined;
|
|
416
454
|
}>;
|
|
455
|
+
mode: import("drizzle-orm/sqlite-core").SQLiteColumn<{
|
|
456
|
+
name: "mode";
|
|
457
|
+
tableName: "snapshots";
|
|
458
|
+
dataType: "string";
|
|
459
|
+
columnType: "SQLiteText";
|
|
460
|
+
data: string;
|
|
461
|
+
driverParam: string;
|
|
462
|
+
notNull: false;
|
|
463
|
+
hasDefault: false;
|
|
464
|
+
isPrimaryKey: false;
|
|
465
|
+
isAutoincrement: false;
|
|
466
|
+
hasRuntimeDefault: false;
|
|
467
|
+
enumValues: [string, ...string[]];
|
|
468
|
+
baseColumn: never;
|
|
469
|
+
identity: undefined;
|
|
470
|
+
generated: undefined;
|
|
471
|
+
}, {}, {
|
|
472
|
+
length: number | undefined;
|
|
473
|
+
}>;
|
|
474
|
+
browser: import("drizzle-orm/sqlite-core").SQLiteColumn<{
|
|
475
|
+
name: "browser";
|
|
476
|
+
tableName: "snapshots";
|
|
477
|
+
dataType: "string";
|
|
478
|
+
columnType: "SQLiteText";
|
|
479
|
+
data: string;
|
|
480
|
+
driverParam: string;
|
|
481
|
+
notNull: true;
|
|
482
|
+
hasDefault: true;
|
|
483
|
+
isPrimaryKey: false;
|
|
484
|
+
isAutoincrement: false;
|
|
485
|
+
hasRuntimeDefault: false;
|
|
486
|
+
enumValues: [string, ...string[]];
|
|
487
|
+
baseColumn: never;
|
|
488
|
+
identity: undefined;
|
|
489
|
+
generated: undefined;
|
|
490
|
+
}, {}, {
|
|
491
|
+
length: number | undefined;
|
|
492
|
+
}>;
|
|
493
|
+
durationMs: import("drizzle-orm/sqlite-core").SQLiteColumn<{
|
|
494
|
+
name: "duration_ms";
|
|
495
|
+
tableName: "snapshots";
|
|
496
|
+
dataType: "number";
|
|
497
|
+
columnType: "SQLiteInteger";
|
|
498
|
+
data: number;
|
|
499
|
+
driverParam: number;
|
|
500
|
+
notNull: false;
|
|
501
|
+
hasDefault: false;
|
|
502
|
+
isPrimaryKey: false;
|
|
503
|
+
isAutoincrement: false;
|
|
504
|
+
hasRuntimeDefault: false;
|
|
505
|
+
enumValues: undefined;
|
|
506
|
+
baseColumn: never;
|
|
507
|
+
identity: undefined;
|
|
508
|
+
generated: undefined;
|
|
509
|
+
}, {}, {}>;
|
|
510
|
+
a11yViolations: import("drizzle-orm/sqlite-core").SQLiteColumn<{
|
|
511
|
+
name: "a11y_violations";
|
|
512
|
+
tableName: "snapshots";
|
|
513
|
+
dataType: "string";
|
|
514
|
+
columnType: "SQLiteText";
|
|
515
|
+
data: string;
|
|
516
|
+
driverParam: string;
|
|
517
|
+
notNull: false;
|
|
518
|
+
hasDefault: false;
|
|
519
|
+
isPrimaryKey: false;
|
|
520
|
+
isAutoincrement: false;
|
|
521
|
+
hasRuntimeDefault: false;
|
|
522
|
+
enumValues: [string, ...string[]];
|
|
523
|
+
baseColumn: never;
|
|
524
|
+
identity: undefined;
|
|
525
|
+
generated: undefined;
|
|
526
|
+
}, {}, {
|
|
527
|
+
length: number | undefined;
|
|
528
|
+
}>;
|
|
417
529
|
createdAt: import("drizzle-orm/sqlite-core").SQLiteColumn<{
|
|
418
530
|
name: "created_at";
|
|
419
531
|
tableName: "snapshots";
|
|
@@ -464,6 +576,7 @@ interface Snapshot {
|
|
|
464
576
|
storyName: string;
|
|
465
577
|
storyTitle: string;
|
|
466
578
|
storyImportPath: string | null;
|
|
579
|
+
designUrl: string | null;
|
|
467
580
|
viewportName: string;
|
|
468
581
|
viewportWidth: number;
|
|
469
582
|
viewportHeight: number;
|
|
@@ -476,9 +589,14 @@ interface Snapshot {
|
|
|
476
589
|
reviewedBy: string | null;
|
|
477
590
|
reviewedAt: string | null;
|
|
478
591
|
infraHash: string | null;
|
|
592
|
+
envChange: string | null;
|
|
479
593
|
inherited: boolean;
|
|
480
594
|
baselineId: string | null;
|
|
481
595
|
baselineVersion: string | null;
|
|
596
|
+
mode: string | null;
|
|
597
|
+
browser: string;
|
|
598
|
+
durationMs: number | null;
|
|
599
|
+
a11yViolations: string | null;
|
|
482
600
|
createdAt: string;
|
|
483
601
|
updatedAt: string;
|
|
484
602
|
}
|
package/dist/schema/snapshot.mjs
CHANGED
|
@@ -14,6 +14,7 @@ const snapshots = sqliteTable("snapshots", {
|
|
|
14
14
|
storyName: text("story_name").notNull(),
|
|
15
15
|
storyTitle: text("story_title").notNull(),
|
|
16
16
|
storyImportPath: text("story_import_path"),
|
|
17
|
+
designUrl: text("design_url"),
|
|
17
18
|
viewportName: text("viewport_name").notNull().default("desktop"),
|
|
18
19
|
viewportWidth: integer("viewport_width").notNull().default(1280),
|
|
19
20
|
viewportHeight: integer("viewport_height").notNull().default(720),
|
|
@@ -26,12 +27,21 @@ const snapshots = sqliteTable("snapshots", {
|
|
|
26
27
|
reviewedBy: text("reviewed_by"),
|
|
27
28
|
reviewedAt: text("reviewed_at"),
|
|
28
29
|
infraHash: text("infra_hash"),
|
|
30
|
+
envChange: text("env_change"),
|
|
29
31
|
inherited: integer("inherited", { mode: "boolean" }).notNull().default(false),
|
|
30
32
|
baselineId: text("baseline_id"),
|
|
31
33
|
baselineVersion: text("baseline_version"),
|
|
34
|
+
mode: text("mode"),
|
|
35
|
+
browser: text("browser").notNull().default("chromium"),
|
|
36
|
+
durationMs: integer("duration_ms"),
|
|
37
|
+
a11yViolations: text("a11y_violations"),
|
|
32
38
|
createdAt: text("created_at").notNull(),
|
|
33
39
|
updatedAt: text("updated_at").notNull()
|
|
34
|
-
}, (t) => [
|
|
40
|
+
}, (t) => [
|
|
41
|
+
uniqueIndex("snapshots_build_story_mode_browser_idx").on(t.buildId, t.storyId, t.viewportName, t.browser),
|
|
42
|
+
index("snapshots_build_id_idx").on(t.buildId),
|
|
43
|
+
index("snapshots_project_import_path_idx").on(t.projectId, t.storyImportPath)
|
|
44
|
+
]);
|
|
35
45
|
//#endregion
|
|
36
46
|
export { snapshots };
|
|
37
47
|
|