@storyshelf/db-mysql 0.12.0 → 0.14.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 +22 -1
- package/dist/baseline-preparation.mjs +154 -0
- package/dist/baseline-preparation.mjs.map +1 -0
- package/dist/build-deletion-steps.mjs +98 -0
- package/dist/build-deletion-steps.mjs.map +1 -0
- package/dist/build-reference-lifecycle.mjs +157 -0
- package/dist/build-reference-lifecycle.mjs.map +1 -0
- package/dist/content-uses.mjs +192 -0
- package/dist/content-uses.mjs.map +1 -0
- package/dist/ddl.d.mts +1 -1
- package/dist/ddl.mjs +80 -0
- package/dist/ddl.mjs.map +1 -1
- package/dist/drizzle-factory-mysql.mjs +6 -2
- package/dist/drizzle-factory-mysql.mjs.map +1 -1
- package/dist/foreign-keys.mjs +57 -0
- package/dist/foreign-keys.mjs.map +1 -1
- package/dist/index.d.mts +9 -1
- package/dist/index.mjs +36 -10
- package/dist/index.mjs.map +1 -1
- package/dist/lifecycle-transaction.mjs +105 -0
- package/dist/lifecycle-transaction.mjs.map +1 -0
- package/dist/migrate.mjs +41 -1
- package/dist/migrate.mjs.map +1 -1
- package/dist/planetscale.mjs +2 -2
- package/dist/planetscale.mjs.map +1 -1
- package/dist/retention-activation.mjs +127 -0
- package/dist/retention-activation.mjs.map +1 -0
- package/dist/schema/build.d.mts +73 -2
- package/dist/schema/build.mjs +8 -1
- package/dist/schema/build.mjs.map +1 -1
- package/dist/schema/git-connection.d.mts +505 -0
- package/dist/schema/git-connection.mjs +66 -0
- package/dist/schema/git-connection.mjs.map +1 -0
- package/dist/schema/project.d.mts +18 -0
- package/dist/schema/project.mjs +1 -0
- package/dist/schema/project.mjs.map +1 -1
- package/dist/schema.d.mts +4 -1
- package/dist/schema.mjs +5 -2
- package/dist/schema.mjs.map +1 -1
- package/dist/tidb.mjs +2 -2
- package/dist/tidb.mjs.map +1 -1
- package/package.json +3 -2
|
@@ -0,0 +1,505 @@
|
|
|
1
|
+
import __tsdown_shims_path from 'node:path';
|
|
2
|
+
import __tsdown_shims_url from 'node:url';
|
|
3
|
+
import { GitConnectionProvider, GitRepositoryLinkState } from "@storyshelf/core/schema";
|
|
4
|
+
/** Narrow `git_connections` table definition: one credential per git host account (epic #1117). */
|
|
5
|
+
declare const gitConnections: import("drizzle-orm/mysql-core/table.js").MySqlTableWithColumns<{
|
|
6
|
+
name: "git_connections";
|
|
7
|
+
schema: undefined;
|
|
8
|
+
columns: {
|
|
9
|
+
id: import("drizzle-orm/mysql-core/index.js").MySqlColumn<{
|
|
10
|
+
name: "id";
|
|
11
|
+
tableName: "git_connections";
|
|
12
|
+
dataType: "string";
|
|
13
|
+
columnType: "MySqlText";
|
|
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
|
+
provider: import("drizzle-orm/mysql-core/index.js").MySqlColumn<{
|
|
27
|
+
name: "provider";
|
|
28
|
+
tableName: "git_connections";
|
|
29
|
+
dataType: "string";
|
|
30
|
+
columnType: "MySqlText";
|
|
31
|
+
data: GitConnectionProvider;
|
|
32
|
+
driverParam: string;
|
|
33
|
+
notNull: true;
|
|
34
|
+
hasDefault: false;
|
|
35
|
+
isPrimaryKey: false;
|
|
36
|
+
isAutoincrement: false;
|
|
37
|
+
hasRuntimeDefault: false;
|
|
38
|
+
enumValues: [string, ...string[]];
|
|
39
|
+
baseColumn: never;
|
|
40
|
+
identity: undefined;
|
|
41
|
+
generated: undefined;
|
|
42
|
+
}, {}, {
|
|
43
|
+
$type: GitConnectionProvider;
|
|
44
|
+
}>;
|
|
45
|
+
name: import("drizzle-orm/mysql-core/index.js").MySqlColumn<{
|
|
46
|
+
name: "name";
|
|
47
|
+
tableName: "git_connections";
|
|
48
|
+
dataType: "string";
|
|
49
|
+
columnType: "MySqlText";
|
|
50
|
+
data: string;
|
|
51
|
+
driverParam: string;
|
|
52
|
+
notNull: true;
|
|
53
|
+
hasDefault: false;
|
|
54
|
+
isPrimaryKey: false;
|
|
55
|
+
isAutoincrement: false;
|
|
56
|
+
hasRuntimeDefault: false;
|
|
57
|
+
enumValues: [string, ...string[]];
|
|
58
|
+
baseColumn: never;
|
|
59
|
+
identity: undefined;
|
|
60
|
+
generated: undefined;
|
|
61
|
+
}, {}, {}>;
|
|
62
|
+
apiBase: import("drizzle-orm/mysql-core/index.js").MySqlColumn<{
|
|
63
|
+
name: "api_base";
|
|
64
|
+
tableName: "git_connections";
|
|
65
|
+
dataType: "string";
|
|
66
|
+
columnType: "MySqlText";
|
|
67
|
+
data: string;
|
|
68
|
+
driverParam: string;
|
|
69
|
+
notNull: false;
|
|
70
|
+
hasDefault: false;
|
|
71
|
+
isPrimaryKey: false;
|
|
72
|
+
isAutoincrement: false;
|
|
73
|
+
hasRuntimeDefault: false;
|
|
74
|
+
enumValues: [string, ...string[]];
|
|
75
|
+
baseColumn: never;
|
|
76
|
+
identity: undefined;
|
|
77
|
+
generated: undefined;
|
|
78
|
+
}, {}, {}>;
|
|
79
|
+
config: import("drizzle-orm/mysql-core/index.js").MySqlColumn<{
|
|
80
|
+
name: "config";
|
|
81
|
+
tableName: "git_connections";
|
|
82
|
+
dataType: "string";
|
|
83
|
+
columnType: "MySqlText";
|
|
84
|
+
data: string;
|
|
85
|
+
driverParam: string;
|
|
86
|
+
notNull: true;
|
|
87
|
+
hasDefault: false;
|
|
88
|
+
isPrimaryKey: false;
|
|
89
|
+
isAutoincrement: false;
|
|
90
|
+
hasRuntimeDefault: false;
|
|
91
|
+
enumValues: [string, ...string[]];
|
|
92
|
+
baseColumn: never;
|
|
93
|
+
identity: undefined;
|
|
94
|
+
generated: undefined;
|
|
95
|
+
}, {}, {}>;
|
|
96
|
+
secretEncrypted: import("drizzle-orm/mysql-core/index.js").MySqlColumn<{
|
|
97
|
+
name: "secret_encrypted";
|
|
98
|
+
tableName: "git_connections";
|
|
99
|
+
dataType: "string";
|
|
100
|
+
columnType: "MySqlText";
|
|
101
|
+
data: string;
|
|
102
|
+
driverParam: string;
|
|
103
|
+
notNull: false;
|
|
104
|
+
hasDefault: false;
|
|
105
|
+
isPrimaryKey: false;
|
|
106
|
+
isAutoincrement: false;
|
|
107
|
+
hasRuntimeDefault: false;
|
|
108
|
+
enumValues: [string, ...string[]];
|
|
109
|
+
baseColumn: never;
|
|
110
|
+
identity: undefined;
|
|
111
|
+
generated: undefined;
|
|
112
|
+
}, {}, {}>;
|
|
113
|
+
createdBy: import("drizzle-orm/mysql-core/index.js").MySqlColumn<{
|
|
114
|
+
name: "created_by";
|
|
115
|
+
tableName: "git_connections";
|
|
116
|
+
dataType: "string";
|
|
117
|
+
columnType: "MySqlText";
|
|
118
|
+
data: string;
|
|
119
|
+
driverParam: string;
|
|
120
|
+
notNull: false;
|
|
121
|
+
hasDefault: false;
|
|
122
|
+
isPrimaryKey: false;
|
|
123
|
+
isAutoincrement: false;
|
|
124
|
+
hasRuntimeDefault: false;
|
|
125
|
+
enumValues: [string, ...string[]];
|
|
126
|
+
baseColumn: never;
|
|
127
|
+
identity: undefined;
|
|
128
|
+
generated: undefined;
|
|
129
|
+
}, {}, {}>;
|
|
130
|
+
state: import("drizzle-orm/mysql-core/index.js").MySqlColumn<{
|
|
131
|
+
name: "state";
|
|
132
|
+
tableName: "git_connections";
|
|
133
|
+
dataType: "string";
|
|
134
|
+
columnType: "MySqlText";
|
|
135
|
+
data: string;
|
|
136
|
+
driverParam: string;
|
|
137
|
+
notNull: true;
|
|
138
|
+
hasDefault: true;
|
|
139
|
+
isPrimaryKey: false;
|
|
140
|
+
isAutoincrement: false;
|
|
141
|
+
hasRuntimeDefault: false;
|
|
142
|
+
enumValues: [string, ...string[]];
|
|
143
|
+
baseColumn: never;
|
|
144
|
+
identity: undefined;
|
|
145
|
+
generated: undefined;
|
|
146
|
+
}, {}, {}>;
|
|
147
|
+
createdAt: import("drizzle-orm/mysql-core/index.js").MySqlColumn<{
|
|
148
|
+
name: "created_at";
|
|
149
|
+
tableName: "git_connections";
|
|
150
|
+
dataType: "custom";
|
|
151
|
+
columnType: "MySqlCustomColumn";
|
|
152
|
+
data: string;
|
|
153
|
+
driverParam: string;
|
|
154
|
+
notNull: true;
|
|
155
|
+
hasDefault: false;
|
|
156
|
+
isPrimaryKey: false;
|
|
157
|
+
isAutoincrement: false;
|
|
158
|
+
hasRuntimeDefault: false;
|
|
159
|
+
enumValues: undefined;
|
|
160
|
+
baseColumn: never;
|
|
161
|
+
identity: undefined;
|
|
162
|
+
generated: undefined;
|
|
163
|
+
}, {}, {}>;
|
|
164
|
+
updatedAt: import("drizzle-orm/mysql-core/index.js").MySqlColumn<{
|
|
165
|
+
name: "updated_at";
|
|
166
|
+
tableName: "git_connections";
|
|
167
|
+
dataType: "custom";
|
|
168
|
+
columnType: "MySqlCustomColumn";
|
|
169
|
+
data: string;
|
|
170
|
+
driverParam: string;
|
|
171
|
+
notNull: true;
|
|
172
|
+
hasDefault: false;
|
|
173
|
+
isPrimaryKey: false;
|
|
174
|
+
isAutoincrement: false;
|
|
175
|
+
hasRuntimeDefault: false;
|
|
176
|
+
enumValues: undefined;
|
|
177
|
+
baseColumn: never;
|
|
178
|
+
identity: undefined;
|
|
179
|
+
generated: undefined;
|
|
180
|
+
}, {}, {}>;
|
|
181
|
+
};
|
|
182
|
+
dialect: 'mysql';
|
|
183
|
+
}>;
|
|
184
|
+
/** Narrow `git_repository_links` table definition: a project's link to one repository. */
|
|
185
|
+
declare const gitRepositoryLinks: import("drizzle-orm/mysql-core/table.js").MySqlTableWithColumns<{
|
|
186
|
+
name: "git_repository_links";
|
|
187
|
+
schema: undefined;
|
|
188
|
+
columns: {
|
|
189
|
+
id: import("drizzle-orm/mysql-core/index.js").MySqlColumn<{
|
|
190
|
+
name: "id";
|
|
191
|
+
tableName: "git_repository_links";
|
|
192
|
+
dataType: "string";
|
|
193
|
+
columnType: "MySqlText";
|
|
194
|
+
data: string;
|
|
195
|
+
driverParam: string;
|
|
196
|
+
notNull: true;
|
|
197
|
+
hasDefault: false;
|
|
198
|
+
isPrimaryKey: true;
|
|
199
|
+
isAutoincrement: false;
|
|
200
|
+
hasRuntimeDefault: false;
|
|
201
|
+
enumValues: [string, ...string[]];
|
|
202
|
+
baseColumn: never;
|
|
203
|
+
identity: undefined;
|
|
204
|
+
generated: undefined;
|
|
205
|
+
}, {}, {}>;
|
|
206
|
+
projectId: import("drizzle-orm/mysql-core/index.js").MySqlColumn<{
|
|
207
|
+
name: "project_id";
|
|
208
|
+
tableName: "git_repository_links";
|
|
209
|
+
dataType: "string";
|
|
210
|
+
columnType: "MySqlText";
|
|
211
|
+
data: string;
|
|
212
|
+
driverParam: string;
|
|
213
|
+
notNull: true;
|
|
214
|
+
hasDefault: false;
|
|
215
|
+
isPrimaryKey: false;
|
|
216
|
+
isAutoincrement: false;
|
|
217
|
+
hasRuntimeDefault: false;
|
|
218
|
+
enumValues: [string, ...string[]];
|
|
219
|
+
baseColumn: never;
|
|
220
|
+
identity: undefined;
|
|
221
|
+
generated: undefined;
|
|
222
|
+
}, {}, {}>;
|
|
223
|
+
connectionId: import("drizzle-orm/mysql-core/index.js").MySqlColumn<{
|
|
224
|
+
name: "connection_id";
|
|
225
|
+
tableName: "git_repository_links";
|
|
226
|
+
dataType: "string";
|
|
227
|
+
columnType: "MySqlText";
|
|
228
|
+
data: string;
|
|
229
|
+
driverParam: string;
|
|
230
|
+
notNull: true;
|
|
231
|
+
hasDefault: false;
|
|
232
|
+
isPrimaryKey: false;
|
|
233
|
+
isAutoincrement: false;
|
|
234
|
+
hasRuntimeDefault: false;
|
|
235
|
+
enumValues: [string, ...string[]];
|
|
236
|
+
baseColumn: never;
|
|
237
|
+
identity: undefined;
|
|
238
|
+
generated: undefined;
|
|
239
|
+
}, {}, {}>;
|
|
240
|
+
host: import("drizzle-orm/mysql-core/index.js").MySqlColumn<{
|
|
241
|
+
name: "host";
|
|
242
|
+
tableName: "git_repository_links";
|
|
243
|
+
dataType: "string";
|
|
244
|
+
columnType: "MySqlText";
|
|
245
|
+
data: string;
|
|
246
|
+
driverParam: string;
|
|
247
|
+
notNull: true;
|
|
248
|
+
hasDefault: false;
|
|
249
|
+
isPrimaryKey: false;
|
|
250
|
+
isAutoincrement: false;
|
|
251
|
+
hasRuntimeDefault: false;
|
|
252
|
+
enumValues: [string, ...string[]];
|
|
253
|
+
baseColumn: never;
|
|
254
|
+
identity: undefined;
|
|
255
|
+
generated: undefined;
|
|
256
|
+
}, {}, {}>;
|
|
257
|
+
owner: import("drizzle-orm/mysql-core/index.js").MySqlColumn<{
|
|
258
|
+
name: "owner";
|
|
259
|
+
tableName: "git_repository_links";
|
|
260
|
+
dataType: "string";
|
|
261
|
+
columnType: "MySqlText";
|
|
262
|
+
data: string;
|
|
263
|
+
driverParam: string;
|
|
264
|
+
notNull: true;
|
|
265
|
+
hasDefault: false;
|
|
266
|
+
isPrimaryKey: false;
|
|
267
|
+
isAutoincrement: false;
|
|
268
|
+
hasRuntimeDefault: false;
|
|
269
|
+
enumValues: [string, ...string[]];
|
|
270
|
+
baseColumn: never;
|
|
271
|
+
identity: undefined;
|
|
272
|
+
generated: undefined;
|
|
273
|
+
}, {}, {}>;
|
|
274
|
+
repo: import("drizzle-orm/mysql-core/index.js").MySqlColumn<{
|
|
275
|
+
name: "repo";
|
|
276
|
+
tableName: "git_repository_links";
|
|
277
|
+
dataType: "string";
|
|
278
|
+
columnType: "MySqlText";
|
|
279
|
+
data: string;
|
|
280
|
+
driverParam: string;
|
|
281
|
+
notNull: true;
|
|
282
|
+
hasDefault: false;
|
|
283
|
+
isPrimaryKey: false;
|
|
284
|
+
isAutoincrement: false;
|
|
285
|
+
hasRuntimeDefault: false;
|
|
286
|
+
enumValues: [string, ...string[]];
|
|
287
|
+
baseColumn: never;
|
|
288
|
+
identity: undefined;
|
|
289
|
+
generated: undefined;
|
|
290
|
+
}, {}, {}>;
|
|
291
|
+
hostRepositoryId: import("drizzle-orm/mysql-core/index.js").MySqlColumn<{
|
|
292
|
+
name: "host_repository_id";
|
|
293
|
+
tableName: "git_repository_links";
|
|
294
|
+
dataType: "string";
|
|
295
|
+
columnType: "MySqlText";
|
|
296
|
+
data: string;
|
|
297
|
+
driverParam: string;
|
|
298
|
+
notNull: false;
|
|
299
|
+
hasDefault: false;
|
|
300
|
+
isPrimaryKey: false;
|
|
301
|
+
isAutoincrement: false;
|
|
302
|
+
hasRuntimeDefault: false;
|
|
303
|
+
enumValues: [string, ...string[]];
|
|
304
|
+
baseColumn: never;
|
|
305
|
+
identity: undefined;
|
|
306
|
+
generated: undefined;
|
|
307
|
+
}, {}, {}>;
|
|
308
|
+
prefix: import("drizzle-orm/mysql-core/index.js").MySqlColumn<{
|
|
309
|
+
name: "prefix";
|
|
310
|
+
tableName: "git_repository_links";
|
|
311
|
+
dataType: "string";
|
|
312
|
+
columnType: "MySqlText";
|
|
313
|
+
data: string;
|
|
314
|
+
driverParam: string;
|
|
315
|
+
notNull: true;
|
|
316
|
+
hasDefault: true;
|
|
317
|
+
isPrimaryKey: false;
|
|
318
|
+
isAutoincrement: false;
|
|
319
|
+
hasRuntimeDefault: false;
|
|
320
|
+
enumValues: [string, ...string[]];
|
|
321
|
+
baseColumn: never;
|
|
322
|
+
identity: undefined;
|
|
323
|
+
generated: undefined;
|
|
324
|
+
}, {}, {}>;
|
|
325
|
+
state: import("drizzle-orm/mysql-core/index.js").MySqlColumn<{
|
|
326
|
+
name: "state";
|
|
327
|
+
tableName: "git_repository_links";
|
|
328
|
+
dataType: "string";
|
|
329
|
+
columnType: "MySqlText";
|
|
330
|
+
data: GitRepositoryLinkState;
|
|
331
|
+
driverParam: string;
|
|
332
|
+
notNull: true;
|
|
333
|
+
hasDefault: true;
|
|
334
|
+
isPrimaryKey: false;
|
|
335
|
+
isAutoincrement: false;
|
|
336
|
+
hasRuntimeDefault: false;
|
|
337
|
+
enumValues: [string, ...string[]];
|
|
338
|
+
baseColumn: never;
|
|
339
|
+
identity: undefined;
|
|
340
|
+
generated: undefined;
|
|
341
|
+
}, {}, {
|
|
342
|
+
$type: GitRepositoryLinkState;
|
|
343
|
+
}>;
|
|
344
|
+
reason: import("drizzle-orm/mysql-core/index.js").MySqlColumn<{
|
|
345
|
+
name: "reason";
|
|
346
|
+
tableName: "git_repository_links";
|
|
347
|
+
dataType: "string";
|
|
348
|
+
columnType: "MySqlText";
|
|
349
|
+
data: string;
|
|
350
|
+
driverParam: string;
|
|
351
|
+
notNull: false;
|
|
352
|
+
hasDefault: false;
|
|
353
|
+
isPrimaryKey: false;
|
|
354
|
+
isAutoincrement: false;
|
|
355
|
+
hasRuntimeDefault: false;
|
|
356
|
+
enumValues: [string, ...string[]];
|
|
357
|
+
baseColumn: never;
|
|
358
|
+
identity: undefined;
|
|
359
|
+
generated: undefined;
|
|
360
|
+
}, {}, {}>;
|
|
361
|
+
outputs: import("drizzle-orm/mysql-core/index.js").MySqlColumn<{
|
|
362
|
+
name: "outputs";
|
|
363
|
+
tableName: "git_repository_links";
|
|
364
|
+
dataType: "string";
|
|
365
|
+
columnType: "MySqlText";
|
|
366
|
+
data: string;
|
|
367
|
+
driverParam: string;
|
|
368
|
+
notNull: true;
|
|
369
|
+
hasDefault: false;
|
|
370
|
+
isPrimaryKey: false;
|
|
371
|
+
isAutoincrement: false;
|
|
372
|
+
hasRuntimeDefault: false;
|
|
373
|
+
enumValues: [string, ...string[]];
|
|
374
|
+
baseColumn: never;
|
|
375
|
+
identity: undefined;
|
|
376
|
+
generated: undefined;
|
|
377
|
+
}, {}, {}>;
|
|
378
|
+
installationId: import("drizzle-orm/mysql-core/index.js").MySqlColumn<{
|
|
379
|
+
name: "installation_id";
|
|
380
|
+
tableName: "git_repository_links";
|
|
381
|
+
dataType: "string";
|
|
382
|
+
columnType: "MySqlText";
|
|
383
|
+
data: string;
|
|
384
|
+
driverParam: string;
|
|
385
|
+
notNull: false;
|
|
386
|
+
hasDefault: false;
|
|
387
|
+
isPrimaryKey: false;
|
|
388
|
+
isAutoincrement: false;
|
|
389
|
+
hasRuntimeDefault: false;
|
|
390
|
+
enumValues: [string, ...string[]];
|
|
391
|
+
baseColumn: never;
|
|
392
|
+
identity: undefined;
|
|
393
|
+
generated: undefined;
|
|
394
|
+
}, {}, {}>;
|
|
395
|
+
requestedBy: import("drizzle-orm/mysql-core/index.js").MySqlColumn<{
|
|
396
|
+
name: "requested_by";
|
|
397
|
+
tableName: "git_repository_links";
|
|
398
|
+
dataType: "string";
|
|
399
|
+
columnType: "MySqlText";
|
|
400
|
+
data: string;
|
|
401
|
+
driverParam: string;
|
|
402
|
+
notNull: false;
|
|
403
|
+
hasDefault: false;
|
|
404
|
+
isPrimaryKey: false;
|
|
405
|
+
isAutoincrement: false;
|
|
406
|
+
hasRuntimeDefault: false;
|
|
407
|
+
enumValues: [string, ...string[]];
|
|
408
|
+
baseColumn: never;
|
|
409
|
+
identity: undefined;
|
|
410
|
+
generated: undefined;
|
|
411
|
+
}, {}, {}>;
|
|
412
|
+
approvedBy: import("drizzle-orm/mysql-core/index.js").MySqlColumn<{
|
|
413
|
+
name: "approved_by";
|
|
414
|
+
tableName: "git_repository_links";
|
|
415
|
+
dataType: "string";
|
|
416
|
+
columnType: "MySqlText";
|
|
417
|
+
data: string;
|
|
418
|
+
driverParam: string;
|
|
419
|
+
notNull: false;
|
|
420
|
+
hasDefault: false;
|
|
421
|
+
isPrimaryKey: false;
|
|
422
|
+
isAutoincrement: false;
|
|
423
|
+
hasRuntimeDefault: false;
|
|
424
|
+
enumValues: [string, ...string[]];
|
|
425
|
+
baseColumn: never;
|
|
426
|
+
identity: undefined;
|
|
427
|
+
generated: undefined;
|
|
428
|
+
}, {}, {}>;
|
|
429
|
+
approvedAt: import("drizzle-orm/mysql-core/index.js").MySqlColumn<{
|
|
430
|
+
name: "approved_at";
|
|
431
|
+
tableName: "git_repository_links";
|
|
432
|
+
dataType: "custom";
|
|
433
|
+
columnType: "MySqlCustomColumn";
|
|
434
|
+
data: string;
|
|
435
|
+
driverParam: string;
|
|
436
|
+
notNull: false;
|
|
437
|
+
hasDefault: false;
|
|
438
|
+
isPrimaryKey: false;
|
|
439
|
+
isAutoincrement: false;
|
|
440
|
+
hasRuntimeDefault: false;
|
|
441
|
+
enumValues: undefined;
|
|
442
|
+
baseColumn: never;
|
|
443
|
+
identity: undefined;
|
|
444
|
+
generated: undefined;
|
|
445
|
+
}, {}, {}>;
|
|
446
|
+
lastDeliveredAt: import("drizzle-orm/mysql-core/index.js").MySqlColumn<{
|
|
447
|
+
name: "last_delivered_at";
|
|
448
|
+
tableName: "git_repository_links";
|
|
449
|
+
dataType: "custom";
|
|
450
|
+
columnType: "MySqlCustomColumn";
|
|
451
|
+
data: string;
|
|
452
|
+
driverParam: string;
|
|
453
|
+
notNull: false;
|
|
454
|
+
hasDefault: false;
|
|
455
|
+
isPrimaryKey: false;
|
|
456
|
+
isAutoincrement: false;
|
|
457
|
+
hasRuntimeDefault: false;
|
|
458
|
+
enumValues: undefined;
|
|
459
|
+
baseColumn: never;
|
|
460
|
+
identity: undefined;
|
|
461
|
+
generated: undefined;
|
|
462
|
+
}, {}, {}>;
|
|
463
|
+
createdAt: import("drizzle-orm/mysql-core/index.js").MySqlColumn<{
|
|
464
|
+
name: "created_at";
|
|
465
|
+
tableName: "git_repository_links";
|
|
466
|
+
dataType: "custom";
|
|
467
|
+
columnType: "MySqlCustomColumn";
|
|
468
|
+
data: string;
|
|
469
|
+
driverParam: string;
|
|
470
|
+
notNull: true;
|
|
471
|
+
hasDefault: false;
|
|
472
|
+
isPrimaryKey: false;
|
|
473
|
+
isAutoincrement: false;
|
|
474
|
+
hasRuntimeDefault: false;
|
|
475
|
+
enumValues: undefined;
|
|
476
|
+
baseColumn: never;
|
|
477
|
+
identity: undefined;
|
|
478
|
+
generated: undefined;
|
|
479
|
+
}, {}, {}>;
|
|
480
|
+
updatedAt: import("drizzle-orm/mysql-core/index.js").MySqlColumn<{
|
|
481
|
+
name: "updated_at";
|
|
482
|
+
tableName: "git_repository_links";
|
|
483
|
+
dataType: "custom";
|
|
484
|
+
columnType: "MySqlCustomColumn";
|
|
485
|
+
data: string;
|
|
486
|
+
driverParam: string;
|
|
487
|
+
notNull: true;
|
|
488
|
+
hasDefault: false;
|
|
489
|
+
isPrimaryKey: false;
|
|
490
|
+
isAutoincrement: false;
|
|
491
|
+
hasRuntimeDefault: false;
|
|
492
|
+
enumValues: undefined;
|
|
493
|
+
baseColumn: never;
|
|
494
|
+
identity: undefined;
|
|
495
|
+
generated: undefined;
|
|
496
|
+
}, {}, {}>;
|
|
497
|
+
};
|
|
498
|
+
dialect: 'mysql';
|
|
499
|
+
}>;
|
|
500
|
+
/** Git connection row. */
|
|
501
|
+
type GitConnection = typeof gitConnections.$inferSelect;
|
|
502
|
+
/** Git repository link row. */
|
|
503
|
+
type GitRepositoryLink = typeof gitRepositoryLinks.$inferSelect;
|
|
504
|
+
export { GitConnection, GitRepositoryLink, gitConnections, gitRepositoryLinks };
|
|
505
|
+
//# sourceMappingURL=git-connection.d.mts.map
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import "node:path";
|
|
2
|
+
import "node:url";
|
|
3
|
+
import.meta.url;
|
|
4
|
+
import { datetime } from "./datetime.mjs";
|
|
5
|
+
import { projects } from "./project.mjs";
|
|
6
|
+
import { index, mysqlTable, text, uniqueIndex } from "drizzle-orm/mysql-core";
|
|
7
|
+
// src/schema/git-connection.ts
|
|
8
|
+
/** Narrow `git_connections` table definition: one credential per git host account (epic #1117). */
|
|
9
|
+
const gitConnections = mysqlTable("git_connections", {
|
|
10
|
+
id: text("id").primaryKey(),
|
|
11
|
+
provider: text("provider").$type().notNull(),
|
|
12
|
+
name: text("name").notNull(),
|
|
13
|
+
apiBase: text("api_base"),
|
|
14
|
+
config: text("config").notNull(),
|
|
15
|
+
secretEncrypted: text("secret_encrypted"),
|
|
16
|
+
createdBy: text("created_by"),
|
|
17
|
+
state: text("state").notNull().default("active"),
|
|
18
|
+
createdAt: datetime("created_at", {
|
|
19
|
+
mode: "string",
|
|
20
|
+
fsp: 3
|
|
21
|
+
}).notNull(),
|
|
22
|
+
updatedAt: datetime("updated_at", {
|
|
23
|
+
mode: "string",
|
|
24
|
+
fsp: 3
|
|
25
|
+
}).notNull()
|
|
26
|
+
});
|
|
27
|
+
/** Narrow `git_repository_links` table definition: a project's link to one repository. */
|
|
28
|
+
const gitRepositoryLinks = mysqlTable("git_repository_links", {
|
|
29
|
+
id: text("id").primaryKey(),
|
|
30
|
+
projectId: text("project_id").notNull().references(() => projects.id, { onDelete: "cascade" }),
|
|
31
|
+
connectionId: text("connection_id").notNull().references(() => gitConnections.id),
|
|
32
|
+
host: text("host").notNull(),
|
|
33
|
+
owner: text("owner").notNull(),
|
|
34
|
+
repo: text("repo").notNull(),
|
|
35
|
+
hostRepositoryId: text("host_repository_id"),
|
|
36
|
+
prefix: text("prefix").notNull().default(""),
|
|
37
|
+
state: text("state").$type().notNull().default("pending"),
|
|
38
|
+
reason: text("reason"),
|
|
39
|
+
outputs: text("outputs").notNull(),
|
|
40
|
+
installationId: text("installation_id"),
|
|
41
|
+
requestedBy: text("requested_by"),
|
|
42
|
+
approvedBy: text("approved_by"),
|
|
43
|
+
approvedAt: datetime("approved_at", {
|
|
44
|
+
mode: "string",
|
|
45
|
+
fsp: 3
|
|
46
|
+
}),
|
|
47
|
+
lastDeliveredAt: datetime("last_delivered_at", {
|
|
48
|
+
mode: "string",
|
|
49
|
+
fsp: 3
|
|
50
|
+
}),
|
|
51
|
+
createdAt: datetime("created_at", {
|
|
52
|
+
mode: "string",
|
|
53
|
+
fsp: 3
|
|
54
|
+
}).notNull(),
|
|
55
|
+
updatedAt: datetime("updated_at", {
|
|
56
|
+
mode: "string",
|
|
57
|
+
fsp: 3
|
|
58
|
+
}).notNull()
|
|
59
|
+
}, (t) => [
|
|
60
|
+
uniqueIndex("git_repository_links_repository_idx").on(t.host, t.owner, t.repo, t.prefix),
|
|
61
|
+
index("git_repository_links_project_id_idx").on(t.projectId),
|
|
62
|
+
index("git_repository_links_connection_id_idx").on(t.connectionId)
|
|
63
|
+
]);
|
|
64
|
+
export { gitConnections, gitRepositoryLinks };
|
|
65
|
+
|
|
66
|
+
//# sourceMappingURL=git-connection.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"git-connection.mjs","names":[],"sources":["../../src/schema/git-connection.ts"],"sourcesContent":["import type { GitConnectionProvider, GitRepositoryLinkState } from \"@storyshelf/core/schema\";\nimport { index, mysqlTable, text, uniqueIndex } from \"drizzle-orm/mysql-core\";\nimport { datetime } from \"./datetime.ts\";\nimport { projects } from \"./project.ts\";\n\n/** Narrow `git_connections` table definition: one credential per git host account (epic #1117). */\nexport const gitConnections = mysqlTable(\"git_connections\", {\n id: text(\"id\").primaryKey(),\n provider: text(\"provider\").$type<GitConnectionProvider>().notNull(),\n name: text(\"name\").notNull(),\n apiBase: text(\"api_base\"),\n config: text(\"config\").notNull(),\n secretEncrypted: text(\"secret_encrypted\"),\n createdBy: text(\"created_by\"),\n state: text(\"state\").notNull().default(\"active\"),\n createdAt: datetime(\"created_at\", { mode: \"string\", fsp: 3 }).notNull(),\n updatedAt: datetime(\"updated_at\", { mode: \"string\", fsp: 3 }).notNull(),\n});\n\n/** Narrow `git_repository_links` table definition: a project's link to one repository. */\nexport const gitRepositoryLinks = mysqlTable(\n \"git_repository_links\",\n {\n id: text(\"id\").primaryKey(),\n projectId: text(\"project_id\")\n .notNull()\n .references(() => projects.id, { onDelete: \"cascade\" }),\n connectionId: text(\"connection_id\")\n .notNull()\n .references(() => gitConnections.id),\n host: text(\"host\").notNull(),\n owner: text(\"owner\").notNull(),\n repo: text(\"repo\").notNull(),\n hostRepositoryId: text(\"host_repository_id\"),\n prefix: text(\"prefix\").notNull().default(\"\"),\n state: text(\"state\").$type<GitRepositoryLinkState>().notNull().default(\"pending\"),\n reason: text(\"reason\"),\n outputs: text(\"outputs\").notNull(),\n installationId: text(\"installation_id\"),\n requestedBy: text(\"requested_by\"),\n approvedBy: text(\"approved_by\"),\n approvedAt: datetime(\"approved_at\", { mode: \"string\", fsp: 3 }),\n lastDeliveredAt: datetime(\"last_delivered_at\", { mode: \"string\", fsp: 3 }),\n createdAt: datetime(\"created_at\", { mode: \"string\", fsp: 3 }).notNull(),\n updatedAt: datetime(\"updated_at\", { mode: \"string\", fsp: 3 }).notNull(),\n },\n (t) => [\n uniqueIndex(\"git_repository_links_repository_idx\").on(t.host, t.owner, t.repo, t.prefix),\n index(\"git_repository_links_project_id_idx\").on(t.projectId),\n index(\"git_repository_links_connection_id_idx\").on(t.connectionId),\n ],\n);\n\n/** Git connection row. */\nexport type GitConnection = typeof gitConnections.$inferSelect;\n/** Git repository link row. */\nexport type GitRepositoryLink = typeof gitRepositoryLinks.$inferSelect;\n"],"mappings":";;;;;;;;AAMA,MAAa,iBAAiB,WAAW,mBAAmB;CAC1D,IAAI,KAAK,IAAI,CAAC,CAAC,WAAW;CAC1B,UAAU,KAAK,UAAU,CAAC,CAAC,MAA6B,CAAC,CAAC,QAAQ;CAClE,MAAM,KAAK,MAAM,CAAC,CAAC,QAAQ;CAC3B,SAAS,KAAK,UAAU;CACxB,QAAQ,KAAK,QAAQ,CAAC,CAAC,QAAQ;CAC/B,iBAAiB,KAAK,kBAAkB;CACxC,WAAW,KAAK,YAAY;CAC5B,OAAO,KAAK,OAAO,CAAC,CAAC,QAAQ,CAAC,CAAC,QAAQ,QAAQ;CAC/C,WAAW,SAAS,cAAc;EAAE,MAAM;EAAU,KAAK;CAAE,CAAC,CAAC,CAAC,QAAQ;CACtE,WAAW,SAAS,cAAc;EAAE,MAAM;EAAU,KAAK;CAAE,CAAC,CAAC,CAAC,QAAQ;AACxE,CAAC;;AAGD,MAAa,qBAAqB,WAChC,wBACA;CACE,IAAI,KAAK,IAAI,CAAC,CAAC,WAAW;CAC1B,WAAW,KAAK,YAAY,CAAC,CAC1B,QAAQ,CAAC,CACT,iBAAiB,SAAS,IAAI,EAAE,UAAU,UAAU,CAAC;CACxD,cAAc,KAAK,eAAe,CAAC,CAChC,QAAQ,CAAC,CACT,iBAAiB,eAAe,EAAE;CACrC,MAAM,KAAK,MAAM,CAAC,CAAC,QAAQ;CAC3B,OAAO,KAAK,OAAO,CAAC,CAAC,QAAQ;CAC7B,MAAM,KAAK,MAAM,CAAC,CAAC,QAAQ;CAC3B,kBAAkB,KAAK,oBAAoB;CAC3C,QAAQ,KAAK,QAAQ,CAAC,CAAC,QAAQ,CAAC,CAAC,QAAQ,EAAE;CAC3C,OAAO,KAAK,OAAO,CAAC,CAAC,MAA8B,CAAC,CAAC,QAAQ,CAAC,CAAC,QAAQ,SAAS;CAChF,QAAQ,KAAK,QAAQ;CACrB,SAAS,KAAK,SAAS,CAAC,CAAC,QAAQ;CACjC,gBAAgB,KAAK,iBAAiB;CACtC,aAAa,KAAK,cAAc;CAChC,YAAY,KAAK,aAAa;CAC9B,YAAY,SAAS,eAAe;EAAE,MAAM;EAAU,KAAK;CAAE,CAAC;CAC9D,iBAAiB,SAAS,qBAAqB;EAAE,MAAM;EAAU,KAAK;CAAE,CAAC;CACzE,WAAW,SAAS,cAAc;EAAE,MAAM;EAAU,KAAK;CAAE,CAAC,CAAC,CAAC,QAAQ;CACtE,WAAW,SAAS,cAAc;EAAE,MAAM;EAAU,KAAK;CAAE,CAAC,CAAC,CAAC,QAAQ;AACxE,IACC,MAAM;CACL,YAAY,qCAAqC,CAAC,CAAC,GAAG,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM;CACvF,MAAM,qCAAqC,CAAC,CAAC,GAAG,EAAE,SAAS;CAC3D,MAAM,wCAAwC,CAAC,CAAC,GAAG,EAAE,YAAY;AACnE,CACF"}
|
|
@@ -449,6 +449,23 @@ declare const projects: import("drizzle-orm/mysql-core/table.js").MySqlTableWith
|
|
|
449
449
|
identity: undefined;
|
|
450
450
|
generated: undefined;
|
|
451
451
|
}, {}, {}>;
|
|
452
|
+
cancelSuperseded: import("drizzle-orm/mysql-core/index.js").MySqlColumn<{
|
|
453
|
+
name: "cancel_superseded";
|
|
454
|
+
tableName: "projects";
|
|
455
|
+
dataType: "boolean";
|
|
456
|
+
columnType: "MySqlBoolean";
|
|
457
|
+
data: boolean;
|
|
458
|
+
driverParam: number | boolean;
|
|
459
|
+
notNull: true;
|
|
460
|
+
hasDefault: true;
|
|
461
|
+
isPrimaryKey: false;
|
|
462
|
+
isAutoincrement: false;
|
|
463
|
+
hasRuntimeDefault: false;
|
|
464
|
+
enumValues: undefined;
|
|
465
|
+
baseColumn: never;
|
|
466
|
+
identity: undefined;
|
|
467
|
+
generated: undefined;
|
|
468
|
+
}, {}, {}>;
|
|
452
469
|
createdAt: import("drizzle-orm/mysql-core/index.js").MySqlColumn<{
|
|
453
470
|
name: "created_at";
|
|
454
471
|
tableName: "projects";
|
|
@@ -514,6 +531,7 @@ interface Project {
|
|
|
514
531
|
requireVerifiedDefault: boolean;
|
|
515
532
|
storybookUrlTtlSeconds: number | null;
|
|
516
533
|
componentOwners: string | null;
|
|
534
|
+
cancelSuperseded: boolean;
|
|
517
535
|
createdAt: string;
|
|
518
536
|
updatedAt: string;
|
|
519
537
|
}
|
package/dist/schema/project.mjs
CHANGED
|
@@ -32,6 +32,7 @@ const projects = mysqlTable("projects", {
|
|
|
32
32
|
requireVerifiedDefault: boolean("require_verified_default").notNull().default(true),
|
|
33
33
|
storybookUrlTtlSeconds: int("storybook_url_ttl_seconds"),
|
|
34
34
|
componentOwners: text("component_owners"),
|
|
35
|
+
cancelSuperseded: boolean("cancel_superseded").notNull().default(true),
|
|
35
36
|
createdAt: datetime("created_at", {
|
|
36
37
|
mode: "string",
|
|
37
38
|
fsp: 3
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"project.mjs","names":[],"sources":["../../src/schema/project.ts"],"sourcesContent":["import { boolean, double, int, mysqlTable, text } from \"drizzle-orm/mysql-core\";\nimport { datetime } from \"./datetime.ts\";\n\n/** Narrow `projects` table definition. */\nexport const projects = mysqlTable(\"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: double(\"pixel_threshold\").notNull().default(0.1),\n maxDiffRatio: double(\"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: boolean(\"execute_play\").notNull().default(false),\n playTimeoutMs: int(\"play_timeout_ms\").notNull().default(10_000),\n runA11y: boolean(\"run_a11y\").notNull().default(true),\n runTests: boolean(\"run_tests\").notNull().default(false),\n switchStories: boolean(\"switch_stories\").notNull().default(false),\n detectUnstable: boolean(\"detect_unstable\").notNull().default(true),\n browser: text(\"browser\").notNull().default(\"chromium\"),\n viewports: text(\"viewports\"),\n browsers: text(\"browsers\"),\n modesAllowlist: text(\"modes_allowlist\"),\n automigrate: boolean(\"automigrate\").notNull().default(false),\n aiProfile: text(\"ai_profile\"),\n reviewEnabled: boolean(\"review_enabled\").notNull().default(true),\n reviewApprovals: int(\"review_approvals\").notNull().default(1),\n requireVerifiedDefault: boolean(\"require_verified_default\").notNull().default(true),\n storybookUrlTtlSeconds: int(\"storybook_url_ttl_seconds\"),\n componentOwners: text(\"component_owners\"),\n createdAt: datetime(\"created_at\", { mode: \"string\", fsp: 3 }).notNull(),\n updatedAt: datetime(\"updated_at\", { mode: \"string\", fsp: 3 }).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 switchStories?: boolean;\n detectUnstable?: 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 requireVerifiedDefault: boolean;\n storybookUrlTtlSeconds: number | null;\n componentOwners: string | 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":";;;;;;;AAIA,MAAa,WAAW,WAAW,YAAY;CAC7C,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,OAAO,iBAAiB,CAAC,CAAC,QAAQ,CAAC,CAAC,QAAQ,EAAG;CAC/D,cAAc,OAAO,gBAAgB,CAAC,CAAC,QAAQ,CAAC,CAAC,QAAQ,GAAI;CAC7D,mBAAmB,KAAK,qBAAqB;CAC7C,eAAe,KAAK,gBAAgB,CAAC,CAAC,MAAiC,CAAC,CAAC,QAAQ,IAAI;CACrF,aAAa,QAAQ,cAAc,CAAC,CAAC,QAAQ,CAAC,CAAC,QAAQ,KAAK;CAC5D,eAAe,IAAI,iBAAiB,CAAC,CAAC,QAAQ,CAAC,CAAC,QAAQ,GAAM;CAC9D,SAAS,QAAQ,UAAU,CAAC,CAAC,QAAQ,CAAC,CAAC,QAAQ,IAAI;CACnD,UAAU,QAAQ,WAAW,CAAC,CAAC,QAAQ,CAAC,CAAC,QAAQ,KAAK;CACtD,eAAe,QAAQ,gBAAgB,CAAC,CAAC,QAAQ,CAAC,CAAC,QAAQ,KAAK;CAChE,gBAAgB,QAAQ,iBAAiB,CAAC,CAAC,QAAQ,CAAC,CAAC,QAAQ,IAAI;CACjE,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,aAAa,CAAC,CAAC,QAAQ,CAAC,CAAC,QAAQ,KAAK;CAC3D,WAAW,KAAK,YAAY;CAC5B,eAAe,QAAQ,gBAAgB,CAAC,CAAC,QAAQ,CAAC,CAAC,QAAQ,IAAI;CAC/D,iBAAiB,IAAI,kBAAkB,CAAC,CAAC,QAAQ,CAAC,CAAC,QAAQ,CAAC;CAC5D,wBAAwB,QAAQ,0BAA0B,CAAC,CAAC,QAAQ,CAAC,CAAC,QAAQ,IAAI;CAClF,wBAAwB,IAAI,2BAA2B;CACvD,iBAAiB,KAAK,kBAAkB;CACxC,WAAW,SAAS,cAAc;EAAE,MAAM;EAAU,KAAK;CAAE,CAAC,CAAC,CAAC,QAAQ;CACtE,WAAW,SAAS,cAAc;EAAE,MAAM;EAAU,KAAK;CAAE,CAAC,CAAC,CAAC,QAAQ;AACxE,CAAC"}
|
|
1
|
+
{"version":3,"file":"project.mjs","names":[],"sources":["../../src/schema/project.ts"],"sourcesContent":["import { boolean, double, int, mysqlTable, text } from \"drizzle-orm/mysql-core\";\nimport { datetime } from \"./datetime.ts\";\n\n/** Narrow `projects` table definition. */\nexport const projects = mysqlTable(\"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: double(\"pixel_threshold\").notNull().default(0.1),\n maxDiffRatio: double(\"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: boolean(\"execute_play\").notNull().default(false),\n playTimeoutMs: int(\"play_timeout_ms\").notNull().default(10_000),\n runA11y: boolean(\"run_a11y\").notNull().default(true),\n runTests: boolean(\"run_tests\").notNull().default(false),\n switchStories: boolean(\"switch_stories\").notNull().default(false),\n detectUnstable: boolean(\"detect_unstable\").notNull().default(true),\n browser: text(\"browser\").notNull().default(\"chromium\"),\n viewports: text(\"viewports\"),\n browsers: text(\"browsers\"),\n modesAllowlist: text(\"modes_allowlist\"),\n automigrate: boolean(\"automigrate\").notNull().default(false),\n aiProfile: text(\"ai_profile\"),\n reviewEnabled: boolean(\"review_enabled\").notNull().default(true),\n reviewApprovals: int(\"review_approvals\").notNull().default(1),\n requireVerifiedDefault: boolean(\"require_verified_default\").notNull().default(true),\n storybookUrlTtlSeconds: int(\"storybook_url_ttl_seconds\"),\n componentOwners: text(\"component_owners\"),\n cancelSuperseded: boolean(\"cancel_superseded\").notNull().default(true),\n createdAt: datetime(\"created_at\", { mode: \"string\", fsp: 3 }).notNull(),\n updatedAt: datetime(\"updated_at\", { mode: \"string\", fsp: 3 }).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 switchStories?: boolean;\n detectUnstable?: 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 requireVerifiedDefault: boolean;\n storybookUrlTtlSeconds: number | null;\n componentOwners: string | null;\n cancelSuperseded: 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":";;;;;;;AAIA,MAAa,WAAW,WAAW,YAAY;CAC7C,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,OAAO,iBAAiB,CAAC,CAAC,QAAQ,CAAC,CAAC,QAAQ,EAAG;CAC/D,cAAc,OAAO,gBAAgB,CAAC,CAAC,QAAQ,CAAC,CAAC,QAAQ,GAAI;CAC7D,mBAAmB,KAAK,qBAAqB;CAC7C,eAAe,KAAK,gBAAgB,CAAC,CAAC,MAAiC,CAAC,CAAC,QAAQ,IAAI;CACrF,aAAa,QAAQ,cAAc,CAAC,CAAC,QAAQ,CAAC,CAAC,QAAQ,KAAK;CAC5D,eAAe,IAAI,iBAAiB,CAAC,CAAC,QAAQ,CAAC,CAAC,QAAQ,GAAM;CAC9D,SAAS,QAAQ,UAAU,CAAC,CAAC,QAAQ,CAAC,CAAC,QAAQ,IAAI;CACnD,UAAU,QAAQ,WAAW,CAAC,CAAC,QAAQ,CAAC,CAAC,QAAQ,KAAK;CACtD,eAAe,QAAQ,gBAAgB,CAAC,CAAC,QAAQ,CAAC,CAAC,QAAQ,KAAK;CAChE,gBAAgB,QAAQ,iBAAiB,CAAC,CAAC,QAAQ,CAAC,CAAC,QAAQ,IAAI;CACjE,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,aAAa,CAAC,CAAC,QAAQ,CAAC,CAAC,QAAQ,KAAK;CAC3D,WAAW,KAAK,YAAY;CAC5B,eAAe,QAAQ,gBAAgB,CAAC,CAAC,QAAQ,CAAC,CAAC,QAAQ,IAAI;CAC/D,iBAAiB,IAAI,kBAAkB,CAAC,CAAC,QAAQ,CAAC,CAAC,QAAQ,CAAC;CAC5D,wBAAwB,QAAQ,0BAA0B,CAAC,CAAC,QAAQ,CAAC,CAAC,QAAQ,IAAI;CAClF,wBAAwB,IAAI,2BAA2B;CACvD,iBAAiB,KAAK,kBAAkB;CACxC,kBAAkB,QAAQ,mBAAmB,CAAC,CAAC,QAAQ,CAAC,CAAC,QAAQ,IAAI;CACrE,WAAW,SAAS,cAAc;EAAE,MAAM;EAAU,KAAK;CAAE,CAAC,CAAC,CAAC,QAAQ;CACtE,WAAW,SAAS,cAAc;EAAE,MAAM;EAAU,KAAK;CAAE,CAAC,CAAC,CAAC,QAAQ;AACxE,CAAC"}
|
package/dist/schema.d.mts
CHANGED
|
@@ -25,6 +25,7 @@ import { Webhook, webhooks } from "./schema/webhook.mjs";
|
|
|
25
25
|
import { AiBudgetAlert, AiUsage, Insight, aiBudgetAlerts, aiUsage, insights } from "./schema/insight.mjs";
|
|
26
26
|
import { NotificationChannel, NotificationSubscription, notificationChannels, notificationSubscriptions } from "./schema/notification.mjs";
|
|
27
27
|
import { ContentUse, contentUses } from "./schema/content-uses.mjs";
|
|
28
|
+
import { GitConnection, GitRepositoryLink, gitConnections, gitRepositoryLinks } from "./schema/git-connection.mjs";
|
|
28
29
|
import { AnyMySqlTable } from "drizzle-orm/mysql-core";
|
|
29
30
|
/** Full Drizzle schema object passed to the database client. */
|
|
30
31
|
declare const schema: {
|
|
@@ -61,8 +62,10 @@ declare const schema: {
|
|
|
61
62
|
projectMembers: AnyMySqlTable;
|
|
62
63
|
projectGroupMappings: AnyMySqlTable;
|
|
63
64
|
contentUses: AnyMySqlTable;
|
|
65
|
+
gitConnections: AnyMySqlTable;
|
|
66
|
+
gitRepositoryLinks: AnyMySqlTable;
|
|
64
67
|
};
|
|
65
68
|
/** The full database schema type. */
|
|
66
69
|
type Schema = typeof schema;
|
|
67
|
-
export { type AiBudgetAlert, type AiUsage, type Baseline, type Build, type BuildLabel, type BuildPackageUsage, type CaptureAttempt, type CaptureLog, type Comment, type ContentUse, type DesignCredential, type DesignLink, type DesignNode, type Insight, type LabelType, type NotificationChannel, type NotificationSubscription, type Project, type ProjectGroupMapping, type ProjectLink, type ProjectMember, Schema, type Snapshot, type StorybookMeta, type Token, type User, type UserConnection, type UserInviteToken, type Webhook, aiBudgetAlerts, aiUsage, baselines, buildComponents, buildLabels, buildPackageUsage, buildReviews, builds, captureAttempts, captureJobs, captureLogs, captureShards, comments, contentUses, designCredentials, designLinks, designNodes, insights, labelTypes, notificationChannels, notificationSubscriptions, projectGroupMappings, projectLinks, projectMembers, projects, schema, schemaMeta, siteSettings, snapshots, tokens, userConnections, userInviteTokens, users, webhooks };
|
|
70
|
+
export { type AiBudgetAlert, type AiUsage, type Baseline, type Build, type BuildLabel, type BuildPackageUsage, type CaptureAttempt, type CaptureLog, type Comment, type ContentUse, type DesignCredential, type DesignLink, type DesignNode, type GitConnection, type GitRepositoryLink, type Insight, type LabelType, type NotificationChannel, type NotificationSubscription, type Project, type ProjectGroupMapping, type ProjectLink, type ProjectMember, Schema, type Snapshot, type StorybookMeta, type Token, type User, type UserConnection, type UserInviteToken, type Webhook, aiBudgetAlerts, aiUsage, baselines, buildComponents, buildLabels, buildPackageUsage, buildReviews, builds, captureAttempts, captureJobs, captureLogs, captureShards, comments, contentUses, designCredentials, designLinks, designNodes, gitConnections, gitRepositoryLinks, insights, labelTypes, notificationChannels, notificationSubscriptions, projectGroupMappings, projectLinks, projectMembers, projects, schema, schemaMeta, siteSettings, snapshots, tokens, userConnections, userInviteTokens, users, webhooks };
|
|
68
71
|
//# sourceMappingURL=schema.d.mts.map
|