@storyshelf/db-postgres 0.7.0 → 0.8.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/dist/ddl.d.mts +1 -3
- package/dist/ddl.mjs +10 -3
- package/dist/ddl.mjs.map +1 -1
- package/dist/drizzle-factory-pg.mjs +9 -7
- package/dist/drizzle-factory-pg.mjs.map +1 -1
- package/dist/drizzle-factory.mjs +1 -2
- package/dist/index.d.mts +0 -2
- package/dist/index.mjs +2 -3
- package/dist/migrate.mjs +32 -2
- package/dist/migrate.mjs.map +1 -1
- package/dist/neon-http.d.mts +0 -2
- package/dist/neon-http.mjs +2 -3
- package/dist/neon.d.mts +0 -2
- package/dist/neon.mjs +2 -3
- package/dist/pg.d.mts +0 -2
- package/dist/pg.mjs +2 -3
- package/dist/pglite.d.mts +0 -2
- package/dist/pglite.mjs +2 -3
- package/dist/schema/baseline.d.mts +32 -16
- package/dist/schema/baseline.mjs +2 -2
- package/dist/schema/baseline.mjs.map +1 -1
- package/dist/schema/build-component.d.mts +9 -11
- package/dist/schema/build-component.mjs +1 -2
- package/dist/schema/build-review.d.mts +7 -9
- package/dist/schema/build-review.mjs +1 -2
- package/dist/schema/build.d.mts +23 -25
- package/dist/schema/build.mjs +1 -2
- package/dist/schema/capture-attempt.d.mts +25 -27
- package/dist/schema/capture-attempt.mjs +1 -2
- package/dist/schema/capture-job.d.mts +0 -2
- package/dist/schema/capture-job.mjs +1 -2
- package/dist/schema/capture-shard.d.mts +15 -17
- package/dist/schema/capture-shard.mjs +1 -2
- package/dist/schema/comment.d.mts +12 -14
- package/dist/schema/comment.mjs +1 -2
- package/dist/schema/connection.d.mts +10 -12
- package/dist/schema/connection.mjs +1 -2
- package/dist/schema/content-refs.d.mts +0 -2
- package/dist/schema/content-refs.mjs +1 -2
- package/dist/schema/design.d.mts +33 -35
- package/dist/schema/design.mjs +1 -2
- package/dist/schema/insight.d.mts +36 -38
- package/dist/schema/insight.mjs +1 -2
- package/dist/schema/label.d.mts +15 -17
- package/dist/schema/label.mjs +1 -2
- package/dist/schema/member.d.mts +7 -9
- package/dist/schema/member.mjs +1 -2
- package/dist/schema/notification.d.mts +20 -22
- package/dist/schema/notification.mjs +1 -2
- package/dist/schema/project-group-mapping.d.mts +6 -8
- package/dist/schema/project-group-mapping.mjs +1 -2
- package/dist/schema/project.d.mts +0 -2
- package/dist/schema/project.mjs +1 -2
- package/dist/schema/site-setting.d.mts +0 -2
- package/dist/schema/site-setting.mjs +1 -2
- package/dist/schema/snapshot.d.mts +85 -33
- package/dist/schema/snapshot.mjs +4 -2
- package/dist/schema/snapshot.mjs.map +1 -1
- package/dist/schema/token.d.mts +8 -10
- package/dist/schema/token.mjs +1 -2
- package/dist/schema/usage.d.mts +15 -17
- package/dist/schema/usage.mjs +1 -2
- package/dist/schema/user-invite.d.mts +7 -9
- package/dist/schema/user-invite.mjs +1 -2
- package/dist/schema/user.d.mts +74 -2
- package/dist/schema/user.mjs +7 -4
- package/dist/schema/user.mjs.map +1 -1
- package/dist/schema/webhook.d.mts +8 -10
- package/dist/schema/webhook.mjs +1 -2
- package/dist/schema.d.mts +0 -2
- package/dist/schema.mjs +1 -2
- package/dist/vercel.d.mts +0 -2
- package/dist/vercel.mjs +2 -3
- package/package.json +4 -4
package/dist/neon.mjs
CHANGED
|
@@ -6,7 +6,7 @@ import { runMigrations } from "./migrate.mjs";
|
|
|
6
6
|
import { schema } from "./schema.mjs";
|
|
7
7
|
import { Pool } from "@neondatabase/serverless";
|
|
8
8
|
import { drizzle } from "drizzle-orm/neon-serverless";
|
|
9
|
-
|
|
9
|
+
// src/neon.ts
|
|
10
10
|
/**
|
|
11
11
|
* Neon (WebSocket pool) preset for the Postgres database adapter.
|
|
12
12
|
*
|
|
@@ -31,7 +31,7 @@ function createNeonDatabase(options) {
|
|
|
31
31
|
return createDrizzlePgAdapter(db, {
|
|
32
32
|
metadata: {
|
|
33
33
|
name: "Neon",
|
|
34
|
-
version: "0.
|
|
34
|
+
version: "0.8.0",
|
|
35
35
|
description: "Neon Postgres database adapter (serverless driver + Drizzle)",
|
|
36
36
|
kind: "neon",
|
|
37
37
|
category: "database"
|
|
@@ -53,7 +53,6 @@ async function endClient(pool) {
|
|
|
53
53
|
if ("end" in pool && typeof pool.end === "function") await pool.end();
|
|
54
54
|
else if ("release" in pool && typeof pool.release === "function") pool.release();
|
|
55
55
|
}
|
|
56
|
-
//#endregion
|
|
57
56
|
export { createNeonDatabase };
|
|
58
57
|
|
|
59
58
|
//# sourceMappingURL=neon.mjs.map
|
package/dist/pg.d.mts
CHANGED
|
@@ -2,7 +2,6 @@ import __tsdown_shims_path from 'node:path';
|
|
|
2
2
|
import __tsdown_shims_url from 'node:url';
|
|
3
3
|
import { Client, Pool, PoolClient } from "pg";
|
|
4
4
|
import { DatabaseAdapter } from "@storyshelf/core/adapter/database";
|
|
5
|
-
//#region src/pg.d.ts
|
|
6
5
|
/**
|
|
7
6
|
* Options for creating a node-postgres-backed DatabaseAdapter.
|
|
8
7
|
*
|
|
@@ -28,6 +27,5 @@ interface PgDatabaseOptions {
|
|
|
28
27
|
* @returns A DatabaseAdapter backed by Postgres.
|
|
29
28
|
*/
|
|
30
29
|
declare function createPgDatabase(options: PgDatabaseOptions): DatabaseAdapter;
|
|
31
|
-
//#endregion
|
|
32
30
|
export { PgDatabaseOptions, createPgDatabase };
|
|
33
31
|
//# sourceMappingURL=pg.d.mts.map
|
package/dist/pg.mjs
CHANGED
|
@@ -6,7 +6,7 @@ import { runMigrations } from "./migrate.mjs";
|
|
|
6
6
|
import { schema } from "./schema.mjs";
|
|
7
7
|
import { drizzle } from "drizzle-orm/node-postgres";
|
|
8
8
|
import { Pool } from "pg";
|
|
9
|
-
|
|
9
|
+
// src/pg.ts
|
|
10
10
|
/**
|
|
11
11
|
* Create a node-postgres-backed DatabaseAdapter using Drizzle ORM.
|
|
12
12
|
*
|
|
@@ -29,7 +29,7 @@ function createPgDatabase(options) {
|
|
|
29
29
|
return createDrizzlePgAdapter(db, {
|
|
30
30
|
metadata: {
|
|
31
31
|
name: "Postgres (pg)",
|
|
32
|
-
version: "0.
|
|
32
|
+
version: "0.8.0",
|
|
33
33
|
description: "Postgres database adapter (node-postgres + Drizzle)",
|
|
34
34
|
kind: "pg",
|
|
35
35
|
category: "database"
|
|
@@ -50,7 +50,6 @@ function createPgDatabase(options) {
|
|
|
50
50
|
async function endClient(pool) {
|
|
51
51
|
if ("end" in pool && typeof pool.end === "function") await pool.end();
|
|
52
52
|
}
|
|
53
|
-
//#endregion
|
|
54
53
|
export { createPgDatabase };
|
|
55
54
|
|
|
56
55
|
//# sourceMappingURL=pg.mjs.map
|
package/dist/pglite.d.mts
CHANGED
|
@@ -2,7 +2,6 @@ import __tsdown_shims_path from 'node:path';
|
|
|
2
2
|
import __tsdown_shims_url from 'node:url';
|
|
3
3
|
import { PGlite } from "@electric-sql/pglite";
|
|
4
4
|
import { DatabaseAdapter } from "@storyshelf/core/adapter/database";
|
|
5
|
-
//#region src/pglite.d.ts
|
|
6
5
|
/**
|
|
7
6
|
* Options for creating a PGlite-backed DatabaseAdapter.
|
|
8
7
|
*
|
|
@@ -23,6 +22,5 @@ interface PgliteDatabaseOptions {
|
|
|
23
22
|
* @returns A DatabaseAdapter backed by the embedded Postgres instance.
|
|
24
23
|
*/
|
|
25
24
|
declare function createPgliteDatabase(options?: PgliteDatabaseOptions): DatabaseAdapter;
|
|
26
|
-
//#endregion
|
|
27
25
|
export { PgliteDatabaseOptions, createPgliteDatabase };
|
|
28
26
|
//# sourceMappingURL=pglite.d.mts.map
|
package/dist/pglite.mjs
CHANGED
|
@@ -6,7 +6,7 @@ import { runMigrations } from "./migrate.mjs";
|
|
|
6
6
|
import { schema } from "./schema.mjs";
|
|
7
7
|
import { PGlite } from "@electric-sql/pglite";
|
|
8
8
|
import { drizzle } from "drizzle-orm/pglite";
|
|
9
|
-
|
|
9
|
+
// src/pglite.ts
|
|
10
10
|
/**
|
|
11
11
|
* PGlite (embedded Postgres/WASM) preset for the Postgres database adapter.
|
|
12
12
|
*
|
|
@@ -29,7 +29,7 @@ function createPgliteDatabase(options = {}) {
|
|
|
29
29
|
return createDrizzlePgAdapter(db, {
|
|
30
30
|
metadata: {
|
|
31
31
|
name: "PGlite",
|
|
32
|
-
version: "0.
|
|
32
|
+
version: "0.8.0",
|
|
33
33
|
description: "PGlite database adapter (embedded Postgres/WASM + Drizzle)",
|
|
34
34
|
kind: "pglite",
|
|
35
35
|
category: "database"
|
|
@@ -48,7 +48,6 @@ function createPgliteDatabase(options = {}) {
|
|
|
48
48
|
}
|
|
49
49
|
});
|
|
50
50
|
}
|
|
51
|
-
//#endregion
|
|
52
51
|
export { createPgliteDatabase };
|
|
53
52
|
|
|
54
53
|
//# sourceMappingURL=pglite.mjs.map
|
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
import __tsdown_shims_path from 'node:path';
|
|
2
2
|
import __tsdown_shims_url from 'node:url';
|
|
3
|
-
//#region src/schema/baseline.d.ts
|
|
4
3
|
/** Narrow `baselines` table definition. */
|
|
5
|
-
declare const baselines: import("drizzle-orm/pg-core").PgTableWithColumns<{
|
|
4
|
+
declare const baselines: import("drizzle-orm/pg-core/table.js").PgTableWithColumns<{
|
|
6
5
|
name: "baselines";
|
|
7
6
|
schema: undefined;
|
|
8
7
|
columns: {
|
|
9
|
-
id: import("drizzle-orm/pg-core").PgColumn<{
|
|
8
|
+
id: import("drizzle-orm/pg-core/index.js").PgColumn<{
|
|
10
9
|
name: "id";
|
|
11
10
|
tableName: "baselines";
|
|
12
11
|
dataType: "string";
|
|
@@ -23,7 +22,7 @@ declare const baselines: import("drizzle-orm/pg-core").PgTableWithColumns<{
|
|
|
23
22
|
identity: undefined;
|
|
24
23
|
generated: undefined;
|
|
25
24
|
}, {}, {}>;
|
|
26
|
-
projectId: import("drizzle-orm/pg-core").PgColumn<{
|
|
25
|
+
projectId: import("drizzle-orm/pg-core/index.js").PgColumn<{
|
|
27
26
|
name: "project_id";
|
|
28
27
|
tableName: "baselines";
|
|
29
28
|
dataType: "string";
|
|
@@ -40,7 +39,7 @@ declare const baselines: import("drizzle-orm/pg-core").PgTableWithColumns<{
|
|
|
40
39
|
identity: undefined;
|
|
41
40
|
generated: undefined;
|
|
42
41
|
}, {}, {}>;
|
|
43
|
-
storyId: import("drizzle-orm/pg-core").PgColumn<{
|
|
42
|
+
storyId: import("drizzle-orm/pg-core/index.js").PgColumn<{
|
|
44
43
|
name: "story_id";
|
|
45
44
|
tableName: "baselines";
|
|
46
45
|
dataType: "string";
|
|
@@ -57,7 +56,7 @@ declare const baselines: import("drizzle-orm/pg-core").PgTableWithColumns<{
|
|
|
57
56
|
identity: undefined;
|
|
58
57
|
generated: undefined;
|
|
59
58
|
}, {}, {}>;
|
|
60
|
-
viewportName: import("drizzle-orm/pg-core").PgColumn<{
|
|
59
|
+
viewportName: import("drizzle-orm/pg-core/index.js").PgColumn<{
|
|
61
60
|
name: "viewport_name";
|
|
62
61
|
tableName: "baselines";
|
|
63
62
|
dataType: "string";
|
|
@@ -74,7 +73,7 @@ declare const baselines: import("drizzle-orm/pg-core").PgTableWithColumns<{
|
|
|
74
73
|
identity: undefined;
|
|
75
74
|
generated: undefined;
|
|
76
75
|
}, {}, {}>;
|
|
77
|
-
branch: import("drizzle-orm/pg-core").PgColumn<{
|
|
76
|
+
branch: import("drizzle-orm/pg-core/index.js").PgColumn<{
|
|
78
77
|
name: "branch";
|
|
79
78
|
tableName: "baselines";
|
|
80
79
|
dataType: "string";
|
|
@@ -91,7 +90,7 @@ declare const baselines: import("drizzle-orm/pg-core").PgTableWithColumns<{
|
|
|
91
90
|
identity: undefined;
|
|
92
91
|
generated: undefined;
|
|
93
92
|
}, {}, {}>;
|
|
94
|
-
snapshotId: import("drizzle-orm/pg-core").PgColumn<{
|
|
93
|
+
snapshotId: import("drizzle-orm/pg-core/index.js").PgColumn<{
|
|
95
94
|
name: "snapshot_id";
|
|
96
95
|
tableName: "baselines";
|
|
97
96
|
dataType: "string";
|
|
@@ -108,7 +107,24 @@ declare const baselines: import("drizzle-orm/pg-core").PgTableWithColumns<{
|
|
|
108
107
|
identity: undefined;
|
|
109
108
|
generated: undefined;
|
|
110
109
|
}, {}, {}>;
|
|
111
|
-
|
|
110
|
+
sourceBuildId: import("drizzle-orm/pg-core/index.js").PgColumn<{
|
|
111
|
+
name: "source_build_id";
|
|
112
|
+
tableName: "baselines";
|
|
113
|
+
dataType: "string";
|
|
114
|
+
columnType: "PgText";
|
|
115
|
+
data: string;
|
|
116
|
+
driverParam: string;
|
|
117
|
+
notNull: false;
|
|
118
|
+
hasDefault: false;
|
|
119
|
+
isPrimaryKey: false;
|
|
120
|
+
isAutoincrement: false;
|
|
121
|
+
hasRuntimeDefault: false;
|
|
122
|
+
enumValues: [string, ...string[]];
|
|
123
|
+
baseColumn: never;
|
|
124
|
+
identity: undefined;
|
|
125
|
+
generated: undefined;
|
|
126
|
+
}, {}, {}>;
|
|
127
|
+
screenshotPath: import("drizzle-orm/pg-core/index.js").PgColumn<{
|
|
112
128
|
name: "screenshot_path";
|
|
113
129
|
tableName: "baselines";
|
|
114
130
|
dataType: "string";
|
|
@@ -125,7 +141,7 @@ declare const baselines: import("drizzle-orm/pg-core").PgTableWithColumns<{
|
|
|
125
141
|
identity: undefined;
|
|
126
142
|
generated: undefined;
|
|
127
143
|
}, {}, {}>;
|
|
128
|
-
infraHash: import("drizzle-orm/pg-core").PgColumn<{
|
|
144
|
+
infraHash: import("drizzle-orm/pg-core/index.js").PgColumn<{
|
|
129
145
|
name: "infra_hash";
|
|
130
146
|
tableName: "baselines";
|
|
131
147
|
dataType: "string";
|
|
@@ -142,7 +158,7 @@ declare const baselines: import("drizzle-orm/pg-core").PgTableWithColumns<{
|
|
|
142
158
|
identity: undefined;
|
|
143
159
|
generated: undefined;
|
|
144
160
|
}, {}, {}>;
|
|
145
|
-
fingerprint: import("drizzle-orm/pg-core").PgColumn<{
|
|
161
|
+
fingerprint: import("drizzle-orm/pg-core/index.js").PgColumn<{
|
|
146
162
|
name: "fingerprint";
|
|
147
163
|
tableName: "baselines";
|
|
148
164
|
dataType: "string";
|
|
@@ -159,7 +175,7 @@ declare const baselines: import("drizzle-orm/pg-core").PgTableWithColumns<{
|
|
|
159
175
|
identity: undefined;
|
|
160
176
|
generated: undefined;
|
|
161
177
|
}, {}, {}>;
|
|
162
|
-
mode: import("drizzle-orm/pg-core").PgColumn<{
|
|
178
|
+
mode: import("drizzle-orm/pg-core/index.js").PgColumn<{
|
|
163
179
|
name: "mode";
|
|
164
180
|
tableName: "baselines";
|
|
165
181
|
dataType: "string";
|
|
@@ -176,7 +192,7 @@ declare const baselines: import("drizzle-orm/pg-core").PgTableWithColumns<{
|
|
|
176
192
|
identity: undefined;
|
|
177
193
|
generated: undefined;
|
|
178
194
|
}, {}, {}>;
|
|
179
|
-
browser: import("drizzle-orm/pg-core").PgColumn<{
|
|
195
|
+
browser: import("drizzle-orm/pg-core/index.js").PgColumn<{
|
|
180
196
|
name: "browser";
|
|
181
197
|
tableName: "baselines";
|
|
182
198
|
dataType: "string";
|
|
@@ -193,7 +209,7 @@ declare const baselines: import("drizzle-orm/pg-core").PgTableWithColumns<{
|
|
|
193
209
|
identity: undefined;
|
|
194
210
|
generated: undefined;
|
|
195
211
|
}, {}, {}>;
|
|
196
|
-
createdAt: import("drizzle-orm/pg-core").PgColumn<{
|
|
212
|
+
createdAt: import("drizzle-orm/pg-core/index.js").PgColumn<{
|
|
197
213
|
name: "created_at";
|
|
198
214
|
tableName: "baselines";
|
|
199
215
|
dataType: "string";
|
|
@@ -210,7 +226,7 @@ declare const baselines: import("drizzle-orm/pg-core").PgTableWithColumns<{
|
|
|
210
226
|
identity: undefined;
|
|
211
227
|
generated: undefined;
|
|
212
228
|
}, {}, {}>;
|
|
213
|
-
updatedAt: import("drizzle-orm/pg-core").PgColumn<{
|
|
229
|
+
updatedAt: import("drizzle-orm/pg-core/index.js").PgColumn<{
|
|
214
230
|
name: "updated_at";
|
|
215
231
|
tableName: "baselines";
|
|
216
232
|
dataType: "string";
|
|
@@ -238,6 +254,7 @@ interface Baseline {
|
|
|
238
254
|
viewportName: string;
|
|
239
255
|
branch: string;
|
|
240
256
|
snapshotId: string | null;
|
|
257
|
+
sourceBuildId: string | null;
|
|
241
258
|
screenshotPath: string;
|
|
242
259
|
infraHash: string | null;
|
|
243
260
|
fingerprint: string | null;
|
|
@@ -246,6 +263,5 @@ interface Baseline {
|
|
|
246
263
|
createdAt: string;
|
|
247
264
|
updatedAt: string;
|
|
248
265
|
}
|
|
249
|
-
//#endregion
|
|
250
266
|
export { Baseline, baselines };
|
|
251
267
|
//# sourceMappingURL=baseline.d.mts.map
|
package/dist/schema/baseline.mjs
CHANGED
|
@@ -3,7 +3,7 @@ import "node:url";
|
|
|
3
3
|
import.meta.url;
|
|
4
4
|
import { projects } from "./project.mjs";
|
|
5
5
|
import { index, pgTable, text, timestamp, uniqueIndex } from "drizzle-orm/pg-core";
|
|
6
|
-
|
|
6
|
+
// src/schema/baseline.ts
|
|
7
7
|
/** Narrow `baselines` table definition. */
|
|
8
8
|
const baselines = pgTable("baselines", {
|
|
9
9
|
id: text("id").primaryKey(),
|
|
@@ -12,6 +12,7 @@ const baselines = pgTable("baselines", {
|
|
|
12
12
|
viewportName: text("viewport_name").notNull().default("desktop"),
|
|
13
13
|
branch: text("branch").notNull(),
|
|
14
14
|
snapshotId: text("snapshot_id"),
|
|
15
|
+
sourceBuildId: text("source_build_id"),
|
|
15
16
|
screenshotPath: text("screenshot_path").notNull(),
|
|
16
17
|
infraHash: text("infra_hash"),
|
|
17
18
|
fingerprint: text("fingerprint"),
|
|
@@ -26,7 +27,6 @@ const baselines = pgTable("baselines", {
|
|
|
26
27
|
mode: "string"
|
|
27
28
|
}).notNull()
|
|
28
29
|
}, (t) => [uniqueIndex("baselines_project_story_mode_browser_branch_idx").on(t.projectId, t.storyId, t.viewportName, t.browser, t.branch), index("baselines_project_story_idx").on(t.projectId, t.storyId)]);
|
|
29
|
-
//#endregion
|
|
30
30
|
export { baselines };
|
|
31
31
|
|
|
32
32
|
//# sourceMappingURL=baseline.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"baseline.mjs","names":[],"sources":["../../src/schema/baseline.ts"],"sourcesContent":["import { index, pgTable, text, timestamp, uniqueIndex } from \"drizzle-orm/pg-core\";\nimport { projects } from \"./project.ts\";\n\n/** Narrow `baselines` table definition. */\nexport const baselines = pgTable(\n \"baselines\",\n {\n id: text(\"id\").primaryKey(),\n projectId: text(\"project_id\")\n .notNull()\n .references(() => projects.id, { onDelete: \"cascade\" }),\n storyId: text(\"story_id\").notNull(),\n viewportName: text(\"viewport_name\").notNull().default(\"desktop\"),\n branch: text(\"branch\").notNull(),\n snapshotId: text(\"snapshot_id\"),\n screenshotPath: text(\"screenshot_path\").notNull(),\n infraHash: text(\"infra_hash\"),\n fingerprint: text(\"fingerprint\"),\n mode: text(\"mode\"),\n browser: text(\"browser\").notNull().default(\"chromium\"),\n createdAt: timestamp(\"created_at\", { withTimezone: true, mode: \"string\" }).notNull(),\n updatedAt: timestamp(\"updated_at\", { withTimezone: true, mode: \"string\" }).notNull(),\n },\n (t) => [\n uniqueIndex(\"baselines_project_story_mode_browser_branch_idx\").on(\n t.projectId,\n t.storyId,\n t.viewportName,\n t.browser,\n t.branch,\n ),\n index(\"baselines_project_story_idx\").on(t.projectId, t.storyId),\n ],\n);\n\n/** A baseline row. */\nexport interface Baseline {\n id: string;\n projectId: string;\n storyId: string;\n viewportName: string;\n branch: string;\n snapshotId: string | null;\n screenshotPath: string;\n infraHash: string | null;\n fingerprint: string | null;\n mode?: string | null;\n browser?: string;\n createdAt: string;\n updatedAt: string;\n}\n"],"mappings":";;;;;;;AAIA,MAAa,YAAY,QACvB,aACA;CACE,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,QAAQ;CAClC,cAAc,KAAK,eAAe,CAAC,CAAC,QAAQ,CAAC,CAAC,QAAQ,SAAS;CAC/D,QAAQ,KAAK,QAAQ,CAAC,CAAC,QAAQ;CAC/B,YAAY,KAAK,aAAa;CAC9B,gBAAgB,KAAK,iBAAiB,CAAC,CAAC,QAAQ;CAChD,WAAW,KAAK,YAAY;CAC5B,aAAa,KAAK,aAAa;CAC/B,MAAM,KAAK,MAAM;CACjB,SAAS,KAAK,SAAS,CAAC,CAAC,QAAQ,CAAC,CAAC,QAAQ,UAAU;CACrD,WAAW,UAAU,cAAc;EAAE,cAAc;EAAM,MAAM;CAAS,CAAC,CAAC,CAAC,QAAQ;CACnF,WAAW,UAAU,cAAc;EAAE,cAAc;EAAM,MAAM;CAAS,CAAC,CAAC,CAAC,QAAQ;AACrF,IACC,MAAM,CACL,YAAY,iDAAiD,CAAC,CAAC,GAC7D,EAAE,WACF,EAAE,SACF,EAAE,cACF,EAAE,SACF,EAAE,MACJ,GACA,MAAM,6BAA6B,CAAC,CAAC,GAAG,EAAE,WAAW,EAAE,OAAO,CAChE,CACF"}
|
|
1
|
+
{"version":3,"file":"baseline.mjs","names":[],"sources":["../../src/schema/baseline.ts"],"sourcesContent":["import { index, pgTable, text, timestamp, uniqueIndex } from \"drizzle-orm/pg-core\";\nimport { projects } from \"./project.ts\";\n\n/** Narrow `baselines` table definition. */\nexport const baselines = pgTable(\n \"baselines\",\n {\n id: text(\"id\").primaryKey(),\n projectId: text(\"project_id\")\n .notNull()\n .references(() => projects.id, { onDelete: \"cascade\" }),\n storyId: text(\"story_id\").notNull(),\n viewportName: text(\"viewport_name\").notNull().default(\"desktop\"),\n branch: text(\"branch\").notNull(),\n snapshotId: text(\"snapshot_id\"),\n sourceBuildId: text(\"source_build_id\"),\n screenshotPath: text(\"screenshot_path\").notNull(),\n infraHash: text(\"infra_hash\"),\n fingerprint: text(\"fingerprint\"),\n mode: text(\"mode\"),\n browser: text(\"browser\").notNull().default(\"chromium\"),\n createdAt: timestamp(\"created_at\", { withTimezone: true, mode: \"string\" }).notNull(),\n updatedAt: timestamp(\"updated_at\", { withTimezone: true, mode: \"string\" }).notNull(),\n },\n (t) => [\n uniqueIndex(\"baselines_project_story_mode_browser_branch_idx\").on(\n t.projectId,\n t.storyId,\n t.viewportName,\n t.browser,\n t.branch,\n ),\n index(\"baselines_project_story_idx\").on(t.projectId, t.storyId),\n ],\n);\n\n/** A baseline row. */\nexport interface Baseline {\n id: string;\n projectId: string;\n storyId: string;\n viewportName: string;\n branch: string;\n snapshotId: string | null;\n sourceBuildId: string | null;\n screenshotPath: string;\n infraHash: string | null;\n fingerprint: string | null;\n mode?: string | null;\n browser?: string;\n createdAt: string;\n updatedAt: string;\n}\n"],"mappings":";;;;;;;AAIA,MAAa,YAAY,QACvB,aACA;CACE,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,QAAQ;CAClC,cAAc,KAAK,eAAe,CAAC,CAAC,QAAQ,CAAC,CAAC,QAAQ,SAAS;CAC/D,QAAQ,KAAK,QAAQ,CAAC,CAAC,QAAQ;CAC/B,YAAY,KAAK,aAAa;CAC9B,eAAe,KAAK,iBAAiB;CACrC,gBAAgB,KAAK,iBAAiB,CAAC,CAAC,QAAQ;CAChD,WAAW,KAAK,YAAY;CAC5B,aAAa,KAAK,aAAa;CAC/B,MAAM,KAAK,MAAM;CACjB,SAAS,KAAK,SAAS,CAAC,CAAC,QAAQ,CAAC,CAAC,QAAQ,UAAU;CACrD,WAAW,UAAU,cAAc;EAAE,cAAc;EAAM,MAAM;CAAS,CAAC,CAAC,CAAC,QAAQ;CACnF,WAAW,UAAU,cAAc;EAAE,cAAc;EAAM,MAAM;CAAS,CAAC,CAAC,CAAC,QAAQ;AACrF,IACC,MAAM,CACL,YAAY,iDAAiD,CAAC,CAAC,GAC7D,EAAE,WACF,EAAE,SACF,EAAE,cACF,EAAE,SACF,EAAE,MACJ,GACA,MAAM,6BAA6B,CAAC,CAAC,GAAG,EAAE,WAAW,EAAE,OAAO,CAChE,CACF"}
|
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
import __tsdown_shims_path from 'node:path';
|
|
2
2
|
import __tsdown_shims_url from 'node:url';
|
|
3
|
-
//#region src/schema/build-component.d.ts
|
|
4
3
|
/** Narrow `build_components` table definition: one row per component of a published build. */
|
|
5
|
-
declare const buildComponents: import("drizzle-orm/pg-core").PgTableWithColumns<{
|
|
4
|
+
declare const buildComponents: import("drizzle-orm/pg-core/table.js").PgTableWithColumns<{
|
|
6
5
|
name: "build_components";
|
|
7
6
|
schema: undefined;
|
|
8
7
|
columns: {
|
|
9
|
-
id: import("drizzle-orm/pg-core").PgColumn<{
|
|
8
|
+
id: import("drizzle-orm/pg-core/index.js").PgColumn<{
|
|
10
9
|
name: "id";
|
|
11
10
|
tableName: "build_components";
|
|
12
11
|
dataType: "string";
|
|
@@ -23,7 +22,7 @@ declare const buildComponents: import("drizzle-orm/pg-core").PgTableWithColumns<
|
|
|
23
22
|
identity: undefined;
|
|
24
23
|
generated: undefined;
|
|
25
24
|
}, {}, {}>;
|
|
26
|
-
projectId: import("drizzle-orm/pg-core").PgColumn<{
|
|
25
|
+
projectId: import("drizzle-orm/pg-core/index.js").PgColumn<{
|
|
27
26
|
name: "project_id";
|
|
28
27
|
tableName: "build_components";
|
|
29
28
|
dataType: "string";
|
|
@@ -40,7 +39,7 @@ declare const buildComponents: import("drizzle-orm/pg-core").PgTableWithColumns<
|
|
|
40
39
|
identity: undefined;
|
|
41
40
|
generated: undefined;
|
|
42
41
|
}, {}, {}>;
|
|
43
|
-
buildId: import("drizzle-orm/pg-core").PgColumn<{
|
|
42
|
+
buildId: import("drizzle-orm/pg-core/index.js").PgColumn<{
|
|
44
43
|
name: "build_id";
|
|
45
44
|
tableName: "build_components";
|
|
46
45
|
dataType: "string";
|
|
@@ -57,7 +56,7 @@ declare const buildComponents: import("drizzle-orm/pg-core").PgTableWithColumns<
|
|
|
57
56
|
identity: undefined;
|
|
58
57
|
generated: undefined;
|
|
59
58
|
}, {}, {}>;
|
|
60
|
-
importPath: import("drizzle-orm/pg-core").PgColumn<{
|
|
59
|
+
importPath: import("drizzle-orm/pg-core/index.js").PgColumn<{
|
|
61
60
|
name: "import_path";
|
|
62
61
|
tableName: "build_components";
|
|
63
62
|
dataType: "string";
|
|
@@ -74,7 +73,7 @@ declare const buildComponents: import("drizzle-orm/pg-core").PgTableWithColumns<
|
|
|
74
73
|
identity: undefined;
|
|
75
74
|
generated: undefined;
|
|
76
75
|
}, {}, {}>;
|
|
77
|
-
title: import("drizzle-orm/pg-core").PgColumn<{
|
|
76
|
+
title: import("drizzle-orm/pg-core/index.js").PgColumn<{
|
|
78
77
|
name: "title";
|
|
79
78
|
tableName: "build_components";
|
|
80
79
|
dataType: "string";
|
|
@@ -91,7 +90,7 @@ declare const buildComponents: import("drizzle-orm/pg-core").PgTableWithColumns<
|
|
|
91
90
|
identity: undefined;
|
|
92
91
|
generated: undefined;
|
|
93
92
|
}, {}, {}>;
|
|
94
|
-
storyCount: import("drizzle-orm/pg-core").PgColumn<{
|
|
93
|
+
storyCount: import("drizzle-orm/pg-core/index.js").PgColumn<{
|
|
95
94
|
name: "story_count";
|
|
96
95
|
tableName: "build_components";
|
|
97
96
|
dataType: "number";
|
|
@@ -108,7 +107,7 @@ declare const buildComponents: import("drizzle-orm/pg-core").PgTableWithColumns<
|
|
|
108
107
|
identity: undefined;
|
|
109
108
|
generated: undefined;
|
|
110
109
|
}, {}, {}>;
|
|
111
|
-
hash: import("drizzle-orm/pg-core").PgColumn<{
|
|
110
|
+
hash: import("drizzle-orm/pg-core/index.js").PgColumn<{
|
|
112
111
|
name: "hash";
|
|
113
112
|
tableName: "build_components";
|
|
114
113
|
dataType: "string";
|
|
@@ -125,7 +124,7 @@ declare const buildComponents: import("drizzle-orm/pg-core").PgTableWithColumns<
|
|
|
125
124
|
identity: undefined;
|
|
126
125
|
generated: undefined;
|
|
127
126
|
}, {}, {}>;
|
|
128
|
-
createdAt: import("drizzle-orm/pg-core").PgColumn<{
|
|
127
|
+
createdAt: import("drizzle-orm/pg-core/index.js").PgColumn<{
|
|
129
128
|
name: "created_at";
|
|
130
129
|
tableName: "build_components";
|
|
131
130
|
dataType: "string";
|
|
@@ -145,6 +144,5 @@ declare const buildComponents: import("drizzle-orm/pg-core").PgTableWithColumns<
|
|
|
145
144
|
};
|
|
146
145
|
dialect: 'pg';
|
|
147
146
|
}>;
|
|
148
|
-
//#endregion
|
|
149
147
|
export { buildComponents };
|
|
150
148
|
//# sourceMappingURL=build-component.d.mts.map
|
|
@@ -4,7 +4,7 @@ import.meta.url;
|
|
|
4
4
|
import { projects } from "./project.mjs";
|
|
5
5
|
import { builds } from "./build.mjs";
|
|
6
6
|
import { index, integer, pgTable, text, timestamp } from "drizzle-orm/pg-core";
|
|
7
|
-
|
|
7
|
+
// src/schema/build-component.ts
|
|
8
8
|
/** Narrow `build_components` table definition: one row per component of a published build. */
|
|
9
9
|
const buildComponents = pgTable("build_components", {
|
|
10
10
|
id: text("id").primaryKey(),
|
|
@@ -19,7 +19,6 @@ const buildComponents = pgTable("build_components", {
|
|
|
19
19
|
mode: "string"
|
|
20
20
|
}).notNull()
|
|
21
21
|
}, (table) => [index("build_components_build_id_idx").on(table.buildId), index("build_components_project_import_path_idx").on(table.projectId, table.importPath)]);
|
|
22
|
-
//#endregion
|
|
23
22
|
export { buildComponents };
|
|
24
23
|
|
|
25
24
|
//# sourceMappingURL=build-component.mjs.map
|
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
import __tsdown_shims_path from 'node:path';
|
|
2
2
|
import __tsdown_shims_url from 'node:url';
|
|
3
|
-
//#region src/schema/build-review.d.ts
|
|
4
3
|
/** Narrow `build_reviews` table definition: one verdict of one reviewer on one build. */
|
|
5
|
-
declare const buildReviews: import("drizzle-orm/pg-core").PgTableWithColumns<{
|
|
4
|
+
declare const buildReviews: import("drizzle-orm/pg-core/table.js").PgTableWithColumns<{
|
|
6
5
|
name: "build_reviews";
|
|
7
6
|
schema: undefined;
|
|
8
7
|
columns: {
|
|
9
|
-
id: import("drizzle-orm/pg-core").PgColumn<{
|
|
8
|
+
id: import("drizzle-orm/pg-core/index.js").PgColumn<{
|
|
10
9
|
name: "id";
|
|
11
10
|
tableName: "build_reviews";
|
|
12
11
|
dataType: "string";
|
|
@@ -23,7 +22,7 @@ declare const buildReviews: import("drizzle-orm/pg-core").PgTableWithColumns<{
|
|
|
23
22
|
identity: undefined;
|
|
24
23
|
generated: undefined;
|
|
25
24
|
}, {}, {}>;
|
|
26
|
-
buildId: import("drizzle-orm/pg-core").PgColumn<{
|
|
25
|
+
buildId: import("drizzle-orm/pg-core/index.js").PgColumn<{
|
|
27
26
|
name: "build_id";
|
|
28
27
|
tableName: "build_reviews";
|
|
29
28
|
dataType: "string";
|
|
@@ -40,7 +39,7 @@ declare const buildReviews: import("drizzle-orm/pg-core").PgTableWithColumns<{
|
|
|
40
39
|
identity: undefined;
|
|
41
40
|
generated: undefined;
|
|
42
41
|
}, {}, {}>;
|
|
43
|
-
userId: import("drizzle-orm/pg-core").PgColumn<{
|
|
42
|
+
userId: import("drizzle-orm/pg-core/index.js").PgColumn<{
|
|
44
43
|
name: "user_id";
|
|
45
44
|
tableName: "build_reviews";
|
|
46
45
|
dataType: "string";
|
|
@@ -57,7 +56,7 @@ declare const buildReviews: import("drizzle-orm/pg-core").PgTableWithColumns<{
|
|
|
57
56
|
identity: undefined;
|
|
58
57
|
generated: undefined;
|
|
59
58
|
}, {}, {}>;
|
|
60
|
-
verdict: import("drizzle-orm/pg-core").PgColumn<{
|
|
59
|
+
verdict: import("drizzle-orm/pg-core/index.js").PgColumn<{
|
|
61
60
|
name: "verdict";
|
|
62
61
|
tableName: "build_reviews";
|
|
63
62
|
dataType: "string";
|
|
@@ -76,7 +75,7 @@ declare const buildReviews: import("drizzle-orm/pg-core").PgTableWithColumns<{
|
|
|
76
75
|
}, {}, {
|
|
77
76
|
$type: "approved" | "rejected";
|
|
78
77
|
}>;
|
|
79
|
-
body: import("drizzle-orm/pg-core").PgColumn<{
|
|
78
|
+
body: import("drizzle-orm/pg-core/index.js").PgColumn<{
|
|
80
79
|
name: "body";
|
|
81
80
|
tableName: "build_reviews";
|
|
82
81
|
dataType: "string";
|
|
@@ -93,7 +92,7 @@ declare const buildReviews: import("drizzle-orm/pg-core").PgTableWithColumns<{
|
|
|
93
92
|
identity: undefined;
|
|
94
93
|
generated: undefined;
|
|
95
94
|
}, {}, {}>;
|
|
96
|
-
createdAt: import("drizzle-orm/pg-core").PgColumn<{
|
|
95
|
+
createdAt: import("drizzle-orm/pg-core/index.js").PgColumn<{
|
|
97
96
|
name: "created_at";
|
|
98
97
|
tableName: "build_reviews";
|
|
99
98
|
dataType: "string";
|
|
@@ -113,6 +112,5 @@ declare const buildReviews: import("drizzle-orm/pg-core").PgTableWithColumns<{
|
|
|
113
112
|
};
|
|
114
113
|
dialect: 'pg';
|
|
115
114
|
}>;
|
|
116
|
-
//#endregion
|
|
117
115
|
export { buildReviews };
|
|
118
116
|
//# sourceMappingURL=build-review.d.mts.map
|
|
@@ -4,7 +4,7 @@ import.meta.url;
|
|
|
4
4
|
import { builds } from "./build.mjs";
|
|
5
5
|
import { users } from "./user.mjs";
|
|
6
6
|
import { index, pgTable, text, timestamp } from "drizzle-orm/pg-core";
|
|
7
|
-
|
|
7
|
+
// src/schema/build-review.ts
|
|
8
8
|
/** Narrow `build_reviews` table definition: one verdict of one reviewer on one build. */
|
|
9
9
|
const buildReviews = pgTable("build_reviews", {
|
|
10
10
|
id: text("id").primaryKey(),
|
|
@@ -17,7 +17,6 @@ const buildReviews = pgTable("build_reviews", {
|
|
|
17
17
|
mode: "string"
|
|
18
18
|
}).notNull()
|
|
19
19
|
}, (table) => [index("build_reviews_build_id_idx").on(table.buildId)]);
|
|
20
|
-
//#endregion
|
|
21
20
|
export { buildReviews };
|
|
22
21
|
|
|
23
22
|
//# sourceMappingURL=build-review.mjs.map
|