@storyshelf/db-sqlite 0.6.1 → 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 +14 -3
- package/dist/better-sqlite3.mjs.map +1 -1
- package/dist/bun-sqlite.mjs +14 -3
- 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/ensure-db-dir.mjs +19 -0
- package/dist/ensure-db-dir.mjs.map +1 -0
- package/dist/index.mjs +9 -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 -2
- package/dist/schema/status-config.mjs +0 -20
- package/dist/schema/status-config.mjs.map +0 -1
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import __tsdown_shims_path from 'node:path';
|
|
2
2
|
import __tsdown_shims_url from 'node:url';
|
|
3
|
-
//#region src/schema/
|
|
4
|
-
/** Narrow `
|
|
5
|
-
declare const
|
|
6
|
-
name: "
|
|
3
|
+
//#region src/schema/build-component.d.ts
|
|
4
|
+
/** Narrow `build_components` table definition: one row per component of a published build. */
|
|
5
|
+
declare const buildComponents: import("drizzle-orm/sqlite-core").SQLiteTableWithColumns<{
|
|
6
|
+
name: "build_components";
|
|
7
7
|
schema: undefined;
|
|
8
8
|
columns: {
|
|
9
9
|
id: import("drizzle-orm/sqlite-core").SQLiteColumn<{
|
|
10
10
|
name: "id";
|
|
11
|
-
tableName: "
|
|
11
|
+
tableName: "build_components";
|
|
12
12
|
dataType: "string";
|
|
13
13
|
columnType: "SQLiteText";
|
|
14
14
|
data: string;
|
|
@@ -27,7 +27,7 @@ declare const projectStatusConfigs: import("drizzle-orm/sqlite-core").SQLiteTabl
|
|
|
27
27
|
}>;
|
|
28
28
|
projectId: import("drizzle-orm/sqlite-core").SQLiteColumn<{
|
|
29
29
|
name: "project_id";
|
|
30
|
-
tableName: "
|
|
30
|
+
tableName: "build_components";
|
|
31
31
|
dataType: "string";
|
|
32
32
|
columnType: "SQLiteText";
|
|
33
33
|
data: string;
|
|
@@ -44,9 +44,9 @@ declare const projectStatusConfigs: import("drizzle-orm/sqlite-core").SQLiteTabl
|
|
|
44
44
|
}, {}, {
|
|
45
45
|
length: number | undefined;
|
|
46
46
|
}>;
|
|
47
|
-
|
|
48
|
-
name: "
|
|
49
|
-
tableName: "
|
|
47
|
+
buildId: import("drizzle-orm/sqlite-core").SQLiteColumn<{
|
|
48
|
+
name: "build_id";
|
|
49
|
+
tableName: "build_components";
|
|
50
50
|
dataType: "string";
|
|
51
51
|
columnType: "SQLiteText";
|
|
52
52
|
data: string;
|
|
@@ -63,9 +63,9 @@ declare const projectStatusConfigs: import("drizzle-orm/sqlite-core").SQLiteTabl
|
|
|
63
63
|
}, {}, {
|
|
64
64
|
length: number | undefined;
|
|
65
65
|
}>;
|
|
66
|
-
|
|
67
|
-
name: "
|
|
68
|
-
tableName: "
|
|
66
|
+
importPath: import("drizzle-orm/sqlite-core").SQLiteColumn<{
|
|
67
|
+
name: "import_path";
|
|
68
|
+
tableName: "build_components";
|
|
69
69
|
dataType: "string";
|
|
70
70
|
columnType: "SQLiteText";
|
|
71
71
|
data: string;
|
|
@@ -82,9 +82,9 @@ declare const projectStatusConfigs: import("drizzle-orm/sqlite-core").SQLiteTabl
|
|
|
82
82
|
}, {}, {
|
|
83
83
|
length: number | undefined;
|
|
84
84
|
}>;
|
|
85
|
-
|
|
86
|
-
name: "
|
|
87
|
-
tableName: "
|
|
85
|
+
title: import("drizzle-orm/sqlite-core").SQLiteColumn<{
|
|
86
|
+
name: "title";
|
|
87
|
+
tableName: "build_components";
|
|
88
88
|
dataType: "string";
|
|
89
89
|
columnType: "SQLiteText";
|
|
90
90
|
data: string;
|
|
@@ -101,9 +101,26 @@ declare const projectStatusConfigs: import("drizzle-orm/sqlite-core").SQLiteTabl
|
|
|
101
101
|
}, {}, {
|
|
102
102
|
length: number | undefined;
|
|
103
103
|
}>;
|
|
104
|
-
|
|
105
|
-
name: "
|
|
106
|
-
tableName: "
|
|
104
|
+
storyCount: import("drizzle-orm/sqlite-core").SQLiteColumn<{
|
|
105
|
+
name: "story_count";
|
|
106
|
+
tableName: "build_components";
|
|
107
|
+
dataType: "number";
|
|
108
|
+
columnType: "SQLiteInteger";
|
|
109
|
+
data: number;
|
|
110
|
+
driverParam: number;
|
|
111
|
+
notNull: true;
|
|
112
|
+
hasDefault: true;
|
|
113
|
+
isPrimaryKey: false;
|
|
114
|
+
isAutoincrement: false;
|
|
115
|
+
hasRuntimeDefault: false;
|
|
116
|
+
enumValues: undefined;
|
|
117
|
+
baseColumn: never;
|
|
118
|
+
identity: undefined;
|
|
119
|
+
generated: undefined;
|
|
120
|
+
}, {}, {}>;
|
|
121
|
+
hash: import("drizzle-orm/sqlite-core").SQLiteColumn<{
|
|
122
|
+
name: "hash";
|
|
123
|
+
tableName: "build_components";
|
|
107
124
|
dataType: "string";
|
|
108
125
|
columnType: "SQLiteText";
|
|
109
126
|
data: string;
|
|
@@ -120,9 +137,9 @@ declare const projectStatusConfigs: import("drizzle-orm/sqlite-core").SQLiteTabl
|
|
|
120
137
|
}, {}, {
|
|
121
138
|
length: number | undefined;
|
|
122
139
|
}>;
|
|
123
|
-
|
|
124
|
-
name: "
|
|
125
|
-
tableName: "
|
|
140
|
+
createdAt: import("drizzle-orm/sqlite-core").SQLiteColumn<{
|
|
141
|
+
name: "created_at";
|
|
142
|
+
tableName: "build_components";
|
|
126
143
|
dataType: "string";
|
|
127
144
|
columnType: "SQLiteText";
|
|
128
145
|
data: string;
|
|
@@ -142,16 +159,6 @@ declare const projectStatusConfigs: import("drizzle-orm/sqlite-core").SQLiteTabl
|
|
|
142
159
|
};
|
|
143
160
|
dialect: 'sqlite';
|
|
144
161
|
}>;
|
|
145
|
-
/** A project status-config row. */
|
|
146
|
-
interface ProjectStatusConfig {
|
|
147
|
-
id: string;
|
|
148
|
-
projectId: string;
|
|
149
|
-
provider: string;
|
|
150
|
-
config: string;
|
|
151
|
-
tokenEncrypted: string;
|
|
152
|
-
createdAt: string;
|
|
153
|
-
updatedAt: string;
|
|
154
|
-
}
|
|
155
162
|
//#endregion
|
|
156
|
-
export {
|
|
157
|
-
//# sourceMappingURL=
|
|
163
|
+
export { buildComponents };
|
|
164
|
+
//# sourceMappingURL=build-component.d.mts.map
|
|
@@ -0,0 +1,22 @@
|
|
|
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 { index, integer, sqliteTable, text } from "drizzle-orm/sqlite-core";
|
|
7
|
+
//#region src/schema/build-component.ts
|
|
8
|
+
/** Narrow `build_components` table definition: one row per component of a published build. */
|
|
9
|
+
const buildComponents = sqliteTable("build_components", {
|
|
10
|
+
id: text("id").primaryKey(),
|
|
11
|
+
projectId: text("project_id").notNull().references(() => projects.id, { onDelete: "cascade" }),
|
|
12
|
+
buildId: text("build_id").notNull().references(() => builds.id, { onDelete: "cascade" }),
|
|
13
|
+
importPath: text("import_path").notNull(),
|
|
14
|
+
title: text("title").notNull(),
|
|
15
|
+
storyCount: integer("story_count").notNull().default(0),
|
|
16
|
+
hash: text("hash").notNull(),
|
|
17
|
+
createdAt: text("created_at").notNull()
|
|
18
|
+
}, (table) => [index("build_components_build_id_idx").on(table.buildId), index("build_components_project_import_path_idx").on(table.projectId, table.importPath)]);
|
|
19
|
+
//#endregion
|
|
20
|
+
export { buildComponents };
|
|
21
|
+
|
|
22
|
+
//# sourceMappingURL=build-component.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"build-component.mjs","names":[],"sources":["../../src/schema/build-component.ts"],"sourcesContent":["import { index, integer, sqliteTable, text } from \"drizzle-orm/sqlite-core\";\nimport { builds } from \"./build.ts\";\nimport { projects } from \"./project.ts\";\n\n/** Narrow `build_components` table definition: one row per component of a published build. */\nexport const buildComponents = sqliteTable(\n \"build_components\",\n {\n id: text(\"id\").primaryKey(),\n projectId: text(\"project_id\")\n .notNull()\n .references(() => projects.id, { onDelete: \"cascade\" }),\n buildId: text(\"build_id\")\n .notNull()\n .references(() => builds.id, { onDelete: \"cascade\" }),\n importPath: text(\"import_path\").notNull(),\n title: text(\"title\").notNull(),\n storyCount: integer(\"story_count\").notNull().default(0),\n hash: text(\"hash\").notNull(),\n createdAt: text(\"created_at\").notNull(),\n },\n (table) => [\n index(\"build_components_build_id_idx\").on(table.buildId),\n index(\"build_components_project_import_path_idx\").on(table.projectId, table.importPath),\n ],\n);\n"],"mappings":";;;;;;;;AAKA,MAAa,kBAAkB,YAC7B,oBACA;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,CACtB,QAAQ,CAAC,CACT,iBAAiB,OAAO,IAAI,EAAE,UAAU,UAAU,CAAC;CACtD,YAAY,KAAK,aAAa,CAAC,CAAC,QAAQ;CACxC,OAAO,KAAK,OAAO,CAAC,CAAC,QAAQ;CAC7B,YAAY,QAAQ,aAAa,CAAC,CAAC,QAAQ,CAAC,CAAC,QAAQ,CAAC;CACtD,MAAM,KAAK,MAAM,CAAC,CAAC,QAAQ;CAC3B,WAAW,KAAK,YAAY,CAAC,CAAC,QAAQ;AACxC,IACC,UAAU,CACT,MAAM,+BAA+B,CAAC,CAAC,GAAG,MAAM,OAAO,GACvD,MAAM,0CAA0C,CAAC,CAAC,GAAG,MAAM,WAAW,MAAM,UAAU,CACxF,CACF"}
|
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
import __tsdown_shims_path from 'node:path';
|
|
2
|
+
import __tsdown_shims_url from 'node:url';
|
|
3
|
+
//#region src/schema/build-review.d.ts
|
|
4
|
+
/** Narrow `build_reviews` table definition: one verdict of one reviewer on one build. */
|
|
5
|
+
declare const buildReviews: import("drizzle-orm/sqlite-core").SQLiteTableWithColumns<{
|
|
6
|
+
name: "build_reviews";
|
|
7
|
+
schema: undefined;
|
|
8
|
+
columns: {
|
|
9
|
+
id: import("drizzle-orm/sqlite-core").SQLiteColumn<{
|
|
10
|
+
name: "id";
|
|
11
|
+
tableName: "build_reviews";
|
|
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
|
+
buildId: import("drizzle-orm/sqlite-core").SQLiteColumn<{
|
|
29
|
+
name: "build_id";
|
|
30
|
+
tableName: "build_reviews";
|
|
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
|
+
userId: import("drizzle-orm/sqlite-core").SQLiteColumn<{
|
|
48
|
+
name: "user_id";
|
|
49
|
+
tableName: "build_reviews";
|
|
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
|
+
verdict: import("drizzle-orm/sqlite-core").SQLiteColumn<{
|
|
67
|
+
name: "verdict";
|
|
68
|
+
tableName: "build_reviews";
|
|
69
|
+
dataType: "string";
|
|
70
|
+
columnType: "SQLiteText";
|
|
71
|
+
data: "approved" | "rejected";
|
|
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
|
+
$type: "approved" | "rejected";
|
|
85
|
+
}>;
|
|
86
|
+
body: import("drizzle-orm/sqlite-core").SQLiteColumn<{
|
|
87
|
+
name: "body";
|
|
88
|
+
tableName: "build_reviews";
|
|
89
|
+
dataType: "string";
|
|
90
|
+
columnType: "SQLiteText";
|
|
91
|
+
data: string;
|
|
92
|
+
driverParam: string;
|
|
93
|
+
notNull: false;
|
|
94
|
+
hasDefault: false;
|
|
95
|
+
isPrimaryKey: false;
|
|
96
|
+
isAutoincrement: false;
|
|
97
|
+
hasRuntimeDefault: false;
|
|
98
|
+
enumValues: [string, ...string[]];
|
|
99
|
+
baseColumn: never;
|
|
100
|
+
identity: undefined;
|
|
101
|
+
generated: undefined;
|
|
102
|
+
}, {}, {
|
|
103
|
+
length: number | undefined;
|
|
104
|
+
}>;
|
|
105
|
+
createdAt: import("drizzle-orm/sqlite-core").SQLiteColumn<{
|
|
106
|
+
name: "created_at";
|
|
107
|
+
tableName: "build_reviews";
|
|
108
|
+
dataType: "string";
|
|
109
|
+
columnType: "SQLiteText";
|
|
110
|
+
data: string;
|
|
111
|
+
driverParam: string;
|
|
112
|
+
notNull: true;
|
|
113
|
+
hasDefault: false;
|
|
114
|
+
isPrimaryKey: false;
|
|
115
|
+
isAutoincrement: false;
|
|
116
|
+
hasRuntimeDefault: false;
|
|
117
|
+
enumValues: [string, ...string[]];
|
|
118
|
+
baseColumn: never;
|
|
119
|
+
identity: undefined;
|
|
120
|
+
generated: undefined;
|
|
121
|
+
}, {}, {
|
|
122
|
+
length: number | undefined;
|
|
123
|
+
}>;
|
|
124
|
+
};
|
|
125
|
+
dialect: 'sqlite';
|
|
126
|
+
}>;
|
|
127
|
+
//#endregion
|
|
128
|
+
export { buildReviews };
|
|
129
|
+
//# sourceMappingURL=build-review.d.mts.map
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import "node:path";
|
|
2
|
+
import "node:url";
|
|
3
|
+
import.meta.url;
|
|
4
|
+
import { builds } from "./build.mjs";
|
|
5
|
+
import { users } from "./user.mjs";
|
|
6
|
+
import { index, sqliteTable, text } from "drizzle-orm/sqlite-core";
|
|
7
|
+
//#region src/schema/build-review.ts
|
|
8
|
+
/** Narrow `build_reviews` table definition: one verdict of one reviewer on one build. */
|
|
9
|
+
const buildReviews = sqliteTable("build_reviews", {
|
|
10
|
+
id: text("id").primaryKey(),
|
|
11
|
+
buildId: text("build_id").notNull().references(() => builds.id, { onDelete: "cascade" }),
|
|
12
|
+
userId: text("user_id").references(() => users.id, { onDelete: "cascade" }),
|
|
13
|
+
verdict: text("verdict").$type().notNull(),
|
|
14
|
+
body: text("body"),
|
|
15
|
+
createdAt: text("created_at").notNull()
|
|
16
|
+
}, (table) => [index("build_reviews_build_id_idx").on(table.buildId)]);
|
|
17
|
+
//#endregion
|
|
18
|
+
export { buildReviews };
|
|
19
|
+
|
|
20
|
+
//# sourceMappingURL=build-review.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"build-review.mjs","names":[],"sources":["../../src/schema/build-review.ts"],"sourcesContent":["import { index, sqliteTable, text } from \"drizzle-orm/sqlite-core\";\nimport { builds } from \"./build.ts\";\nimport { users } from \"./user.ts\";\n\n/** Narrow `build_reviews` table definition: one verdict of one reviewer on one build. */\nexport const buildReviews = sqliteTable(\n \"build_reviews\",\n {\n id: text(\"id\").primaryKey(),\n buildId: text(\"build_id\")\n .notNull()\n .references(() => builds.id, { onDelete: \"cascade\" }),\n userId: text(\"user_id\").references(() => users.id, { onDelete: \"cascade\" }),\n verdict: text(\"verdict\").$type<\"approved\" | \"rejected\">().notNull(),\n body: text(\"body\"),\n createdAt: text(\"created_at\").notNull(),\n },\n (table) => [index(\"build_reviews_build_id_idx\").on(table.buildId)],\n);\n"],"mappings":";;;;;;;;AAKA,MAAa,eAAe,YAC1B,iBACA;CACE,IAAI,KAAK,IAAI,CAAC,CAAC,WAAW;CAC1B,SAAS,KAAK,UAAU,CAAC,CACtB,QAAQ,CAAC,CACT,iBAAiB,OAAO,IAAI,EAAE,UAAU,UAAU,CAAC;CACtD,QAAQ,KAAK,SAAS,CAAC,CAAC,iBAAiB,MAAM,IAAI,EAAE,UAAU,UAAU,CAAC;CAC1E,SAAS,KAAK,SAAS,CAAC,CAAC,MAA+B,CAAC,CAAC,QAAQ;CAClE,MAAM,KAAK,MAAM;CACjB,WAAW,KAAK,YAAY,CAAC,CAAC,QAAQ;AACxC,IACC,UAAU,CAAC,MAAM,4BAA4B,CAAC,CAAC,GAAG,MAAM,OAAO,CAAC,CACnE"}
|
package/dist/schema/build.d.mts
CHANGED
|
@@ -179,7 +179,7 @@ declare const builds: import("drizzle-orm/sqlite-core").SQLiteTableWithColumns<{
|
|
|
179
179
|
tableName: "builds";
|
|
180
180
|
dataType: "string";
|
|
181
181
|
columnType: "SQLiteText";
|
|
182
|
-
data: "approved" | "capturing" | "comparing" | "failed" | "pending" | "rejected" | "reviewing";
|
|
182
|
+
data: "approved" | "cancelled" | "capturing" | "comparing" | "failed" | "pending" | "rejected" | "reviewing";
|
|
183
183
|
driverParam: string;
|
|
184
184
|
notNull: true;
|
|
185
185
|
hasDefault: true;
|
|
@@ -192,7 +192,7 @@ declare const builds: import("drizzle-orm/sqlite-core").SQLiteTableWithColumns<{
|
|
|
192
192
|
generated: undefined;
|
|
193
193
|
}, {}, {
|
|
194
194
|
length: number | undefined;
|
|
195
|
-
$type: "approved" | "capturing" | "comparing" | "failed" | "pending" | "rejected" | "reviewing";
|
|
195
|
+
$type: "approved" | "cancelled" | "capturing" | "comparing" | "failed" | "pending" | "rejected" | "reviewing";
|
|
196
196
|
}>;
|
|
197
197
|
snapshotCount: import("drizzle-orm/sqlite-core").SQLiteColumn<{
|
|
198
198
|
name: "snapshot_count";
|
|
@@ -262,6 +262,23 @@ declare const builds: import("drizzle-orm/sqlite-core").SQLiteTableWithColumns<{
|
|
|
262
262
|
identity: undefined;
|
|
263
263
|
generated: undefined;
|
|
264
264
|
}, {}, {}>;
|
|
265
|
+
inheritedCount: import("drizzle-orm/sqlite-core").SQLiteColumn<{
|
|
266
|
+
name: "inherited_count";
|
|
267
|
+
tableName: "builds";
|
|
268
|
+
dataType: "number";
|
|
269
|
+
columnType: "SQLiteInteger";
|
|
270
|
+
data: number;
|
|
271
|
+
driverParam: number;
|
|
272
|
+
notNull: true;
|
|
273
|
+
hasDefault: true;
|
|
274
|
+
isPrimaryKey: false;
|
|
275
|
+
isAutoincrement: false;
|
|
276
|
+
hasRuntimeDefault: false;
|
|
277
|
+
enumValues: undefined;
|
|
278
|
+
baseColumn: never;
|
|
279
|
+
identity: undefined;
|
|
280
|
+
generated: undefined;
|
|
281
|
+
}, {}, {}>;
|
|
265
282
|
affectedOnly: import("drizzle-orm/sqlite-core").SQLiteColumn<{
|
|
266
283
|
name: "affected_only";
|
|
267
284
|
tableName: "builds";
|
|
@@ -336,6 +353,25 @@ declare const builds: import("drizzle-orm/sqlite-core").SQLiteTableWithColumns<{
|
|
|
336
353
|
}, {}, {
|
|
337
354
|
length: number | undefined;
|
|
338
355
|
}>;
|
|
356
|
+
testResults: import("drizzle-orm/sqlite-core").SQLiteColumn<{
|
|
357
|
+
name: "test_results";
|
|
358
|
+
tableName: "builds";
|
|
359
|
+
dataType: "string";
|
|
360
|
+
columnType: "SQLiteText";
|
|
361
|
+
data: string;
|
|
362
|
+
driverParam: string;
|
|
363
|
+
notNull: false;
|
|
364
|
+
hasDefault: false;
|
|
365
|
+
isPrimaryKey: false;
|
|
366
|
+
isAutoincrement: false;
|
|
367
|
+
hasRuntimeDefault: false;
|
|
368
|
+
enumValues: [string, ...string[]];
|
|
369
|
+
baseColumn: never;
|
|
370
|
+
identity: undefined;
|
|
371
|
+
generated: undefined;
|
|
372
|
+
}, {}, {
|
|
373
|
+
length: number | undefined;
|
|
374
|
+
}>;
|
|
339
375
|
createdAt: import("drizzle-orm/sqlite-core").SQLiteColumn<{
|
|
340
376
|
name: "created_at";
|
|
341
377
|
tableName: "builds";
|
|
@@ -393,10 +429,12 @@ interface Build {
|
|
|
393
429
|
changedCount: number;
|
|
394
430
|
approvedCount: number;
|
|
395
431
|
rejectedCount: number;
|
|
432
|
+
inheritedCount: number;
|
|
396
433
|
affectedOnly: boolean;
|
|
397
434
|
baselineSha: string | null;
|
|
398
435
|
changedFiles: string | null;
|
|
399
436
|
affectedImportPaths: string | null;
|
|
437
|
+
testResults: string | null;
|
|
400
438
|
createdAt: string;
|
|
401
439
|
updatedAt: string;
|
|
402
440
|
}
|
package/dist/schema/build.mjs
CHANGED
|
@@ -20,10 +20,13 @@ const builds = sqliteTable("builds", {
|
|
|
20
20
|
changedCount: integer("changed_count").notNull().default(0),
|
|
21
21
|
approvedCount: integer("approved_count").notNull().default(0),
|
|
22
22
|
rejectedCount: integer("rejected_count").notNull().default(0),
|
|
23
|
+
/** Snapshots inherited from the baseline without rendering (affected capture). */
|
|
24
|
+
inheritedCount: integer("inherited_count").notNull().default(0),
|
|
23
25
|
affectedOnly: integer("affected_only", { mode: "boolean" }).notNull().default(true),
|
|
24
26
|
baselineSha: text("baseline_sha"),
|
|
25
27
|
changedFiles: text("changed_files"),
|
|
26
28
|
affectedImportPaths: text("affected_import_paths"),
|
|
29
|
+
testResults: text("test_results"),
|
|
27
30
|
createdAt: text("created_at").notNull(),
|
|
28
31
|
updatedAt: text("updated_at").notNull()
|
|
29
32
|
}, (t) => [index("builds_project_gitsha_idx").on(t.projectId, t.gitSha), index("builds_git_branch_idx").on(t.gitBranch)]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"build.mjs","names":[],"sources":["../../src/schema/build.ts"],"sourcesContent":["import type { BuildStatus } from \"@storyshelf/core/types\";\nimport { index, integer, sqliteTable, text } from \"drizzle-orm/sqlite-core\";\nimport { projects } from \"./project.ts\";\n\n/** Narrow `builds` table definition. */\nexport const builds = sqliteTable(\n \"builds\",\n {\n id: text(\"id\").primaryKey(),\n projectId: text(\"project_id\")\n .notNull()\n .references(() => projects.id, { onDelete: \"cascade\" }),\n gitSha: text(\"git_sha\").notNull(),\n gitBranch: text(\"git_branch\").notNull(),\n isDefault: integer(\"is_default\", { mode: \"boolean\" }).notNull().default(false),\n authorEmail: text(\"author_email\"),\n authorName: text(\"author_name\"),\n message: text(\"message\"),\n public: integer(\"public\", { mode: \"boolean\" }).notNull().default(false),\n status: text(\"status\").$type<BuildStatus>().notNull().default(\"pending\"),\n snapshotCount: integer(\"snapshot_count\").notNull().default(0),\n changedCount: integer(\"changed_count\").notNull().default(0),\n approvedCount: integer(\"approved_count\").notNull().default(0),\n rejectedCount: integer(\"rejected_count\").notNull().default(0),\n affectedOnly: integer(\"affected_only\", { mode: \"boolean\" }).notNull().default(true),\n baselineSha: text(\"baseline_sha\"),\n changedFiles: text(\"changed_files\"),\n affectedImportPaths: text(\"affected_import_paths\"),\n createdAt: text(\"created_at\").notNull(),\n updatedAt: text(\"updated_at\").notNull(),\n },\n (t) => [\n index(\"builds_project_gitsha_idx\").on(t.projectId, t.gitSha),\n index(\"builds_git_branch_idx\").on(t.gitBranch),\n ],\n);\n\n/** A build row. */\nexport interface Build {\n id: string;\n projectId: string;\n gitSha: string;\n gitBranch: string;\n isDefault: boolean;\n authorEmail: string | null;\n authorName: string | null;\n message: string | null;\n public: boolean;\n status: BuildStatus;\n snapshotCount: number;\n changedCount: number;\n approvedCount: number;\n rejectedCount: number;\n affectedOnly: boolean;\n baselineSha: string | null;\n changedFiles: string | null;\n affectedImportPaths: string | null;\n createdAt: string;\n updatedAt: string;\n}\n"],"mappings":";;;;;;;AAKA,MAAa,SAAS,YACpB,UACA;CACE,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,CAAC,QAAQ;CAChC,WAAW,KAAK,YAAY,CAAC,CAAC,QAAQ;CACtC,WAAW,QAAQ,cAAc,EAAE,MAAM,UAAU,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,QAAQ,KAAK;CAC7E,aAAa,KAAK,cAAc;CAChC,YAAY,KAAK,aAAa;CAC9B,SAAS,KAAK,SAAS;CACvB,QAAQ,QAAQ,UAAU,EAAE,MAAM,UAAU,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,QAAQ,KAAK;CACtE,QAAQ,KAAK,QAAQ,CAAC,CAAC,MAAmB,CAAC,CAAC,QAAQ,CAAC,CAAC,QAAQ,SAAS;CACvE,eAAe,QAAQ,gBAAgB,CAAC,CAAC,QAAQ,CAAC,CAAC,QAAQ,CAAC;CAC5D,cAAc,QAAQ,eAAe,CAAC,CAAC,QAAQ,CAAC,CAAC,QAAQ,CAAC;CAC1D,eAAe,QAAQ,gBAAgB,CAAC,CAAC,QAAQ,CAAC,CAAC,QAAQ,CAAC;CAC5D,eAAe,QAAQ,gBAAgB,CAAC,CAAC,QAAQ,CAAC,CAAC,QAAQ,CAAC;
|
|
1
|
+
{"version":3,"file":"build.mjs","names":[],"sources":["../../src/schema/build.ts"],"sourcesContent":["import type { BuildStatus } from \"@storyshelf/core/types\";\nimport { index, integer, sqliteTable, text } from \"drizzle-orm/sqlite-core\";\nimport { projects } from \"./project.ts\";\n\n/** Narrow `builds` table definition. */\nexport const builds = sqliteTable(\n \"builds\",\n {\n id: text(\"id\").primaryKey(),\n projectId: text(\"project_id\")\n .notNull()\n .references(() => projects.id, { onDelete: \"cascade\" }),\n gitSha: text(\"git_sha\").notNull(),\n gitBranch: text(\"git_branch\").notNull(),\n isDefault: integer(\"is_default\", { mode: \"boolean\" }).notNull().default(false),\n authorEmail: text(\"author_email\"),\n authorName: text(\"author_name\"),\n message: text(\"message\"),\n public: integer(\"public\", { mode: \"boolean\" }).notNull().default(false),\n status: text(\"status\").$type<BuildStatus>().notNull().default(\"pending\"),\n snapshotCount: integer(\"snapshot_count\").notNull().default(0),\n changedCount: integer(\"changed_count\").notNull().default(0),\n approvedCount: integer(\"approved_count\").notNull().default(0),\n rejectedCount: integer(\"rejected_count\").notNull().default(0),\n /** Snapshots inherited from the baseline without rendering (affected capture). */\n inheritedCount: integer(\"inherited_count\").notNull().default(0),\n affectedOnly: integer(\"affected_only\", { mode: \"boolean\" }).notNull().default(true),\n baselineSha: text(\"baseline_sha\"),\n changedFiles: text(\"changed_files\"),\n affectedImportPaths: text(\"affected_import_paths\"),\n testResults: text(\"test_results\"),\n createdAt: text(\"created_at\").notNull(),\n updatedAt: text(\"updated_at\").notNull(),\n },\n (t) => [\n index(\"builds_project_gitsha_idx\").on(t.projectId, t.gitSha),\n index(\"builds_git_branch_idx\").on(t.gitBranch),\n ],\n);\n\n/** A build row. */\nexport interface Build {\n id: string;\n projectId: string;\n gitSha: string;\n gitBranch: string;\n isDefault: boolean;\n authorEmail: string | null;\n authorName: string | null;\n message: string | null;\n public: boolean;\n status: BuildStatus;\n snapshotCount: number;\n changedCount: number;\n approvedCount: number;\n rejectedCount: number;\n inheritedCount: number;\n affectedOnly: boolean;\n baselineSha: string | null;\n changedFiles: string | null;\n affectedImportPaths: string | null;\n testResults: string | null;\n createdAt: string;\n updatedAt: string;\n}\n"],"mappings":";;;;;;;AAKA,MAAa,SAAS,YACpB,UACA;CACE,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,CAAC,QAAQ;CAChC,WAAW,KAAK,YAAY,CAAC,CAAC,QAAQ;CACtC,WAAW,QAAQ,cAAc,EAAE,MAAM,UAAU,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,QAAQ,KAAK;CAC7E,aAAa,KAAK,cAAc;CAChC,YAAY,KAAK,aAAa;CAC9B,SAAS,KAAK,SAAS;CACvB,QAAQ,QAAQ,UAAU,EAAE,MAAM,UAAU,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,QAAQ,KAAK;CACtE,QAAQ,KAAK,QAAQ,CAAC,CAAC,MAAmB,CAAC,CAAC,QAAQ,CAAC,CAAC,QAAQ,SAAS;CACvE,eAAe,QAAQ,gBAAgB,CAAC,CAAC,QAAQ,CAAC,CAAC,QAAQ,CAAC;CAC5D,cAAc,QAAQ,eAAe,CAAC,CAAC,QAAQ,CAAC,CAAC,QAAQ,CAAC;CAC1D,eAAe,QAAQ,gBAAgB,CAAC,CAAC,QAAQ,CAAC,CAAC,QAAQ,CAAC;CAC5D,eAAe,QAAQ,gBAAgB,CAAC,CAAC,QAAQ,CAAC,CAAC,QAAQ,CAAC;;CAE5D,gBAAgB,QAAQ,iBAAiB,CAAC,CAAC,QAAQ,CAAC,CAAC,QAAQ,CAAC;CAC9D,cAAc,QAAQ,iBAAiB,EAAE,MAAM,UAAU,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,QAAQ,IAAI;CAClF,aAAa,KAAK,cAAc;CAChC,cAAc,KAAK,eAAe;CAClC,qBAAqB,KAAK,uBAAuB;CACjD,aAAa,KAAK,cAAc;CAChC,WAAW,KAAK,YAAY,CAAC,CAAC,QAAQ;CACtC,WAAW,KAAK,YAAY,CAAC,CAAC,QAAQ;AACxC,IACC,MAAM,CACL,MAAM,2BAA2B,CAAC,CAAC,GAAG,EAAE,WAAW,EAAE,MAAM,GAC3D,MAAM,uBAAuB,CAAC,CAAC,GAAG,EAAE,SAAS,CAC/C,CACF"}
|