@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.
Files changed (42) hide show
  1. package/README.md +22 -1
  2. package/dist/baseline-preparation.mjs +154 -0
  3. package/dist/baseline-preparation.mjs.map +1 -0
  4. package/dist/build-deletion-steps.mjs +98 -0
  5. package/dist/build-deletion-steps.mjs.map +1 -0
  6. package/dist/build-reference-lifecycle.mjs +157 -0
  7. package/dist/build-reference-lifecycle.mjs.map +1 -0
  8. package/dist/content-uses.mjs +192 -0
  9. package/dist/content-uses.mjs.map +1 -0
  10. package/dist/ddl.d.mts +1 -1
  11. package/dist/ddl.mjs +80 -0
  12. package/dist/ddl.mjs.map +1 -1
  13. package/dist/drizzle-factory-mysql.mjs +6 -2
  14. package/dist/drizzle-factory-mysql.mjs.map +1 -1
  15. package/dist/foreign-keys.mjs +57 -0
  16. package/dist/foreign-keys.mjs.map +1 -1
  17. package/dist/index.d.mts +9 -1
  18. package/dist/index.mjs +36 -10
  19. package/dist/index.mjs.map +1 -1
  20. package/dist/lifecycle-transaction.mjs +105 -0
  21. package/dist/lifecycle-transaction.mjs.map +1 -0
  22. package/dist/migrate.mjs +41 -1
  23. package/dist/migrate.mjs.map +1 -1
  24. package/dist/planetscale.mjs +2 -2
  25. package/dist/planetscale.mjs.map +1 -1
  26. package/dist/retention-activation.mjs +127 -0
  27. package/dist/retention-activation.mjs.map +1 -0
  28. package/dist/schema/build.d.mts +73 -2
  29. package/dist/schema/build.mjs +8 -1
  30. package/dist/schema/build.mjs.map +1 -1
  31. package/dist/schema/git-connection.d.mts +505 -0
  32. package/dist/schema/git-connection.mjs +66 -0
  33. package/dist/schema/git-connection.mjs.map +1 -0
  34. package/dist/schema/project.d.mts +18 -0
  35. package/dist/schema/project.mjs +1 -0
  36. package/dist/schema/project.mjs.map +1 -1
  37. package/dist/schema.d.mts +4 -1
  38. package/dist/schema.mjs +5 -2
  39. package/dist/schema.mjs.map +1 -1
  40. package/dist/tidb.mjs +2 -2
  41. package/dist/tidb.mjs.map +1 -1
  42. package/package.json +3 -2
package/dist/schema.mjs CHANGED
@@ -15,6 +15,7 @@ import { comments } from "./schema/comment.mjs";
15
15
  import { userConnections } from "./schema/connection.mjs";
16
16
  import { contentUses } from "./schema/content-uses.mjs";
17
17
  import { designCredentials, designLinks, designNodes } from "./schema/design.mjs";
18
+ import { gitConnections, gitRepositoryLinks } from "./schema/git-connection.mjs";
18
19
  import { aiBudgetAlerts, aiUsage, insights } from "./schema/insight.mjs";
19
20
  import { buildLabels, labelTypes } from "./schema/label.mjs";
20
21
  import { projectMembers } from "./schema/member.mjs";
@@ -61,8 +62,10 @@ const schema = {
61
62
  userInviteTokens,
62
63
  projectMembers,
63
64
  projectGroupMappings,
64
- contentUses
65
+ contentUses,
66
+ gitConnections,
67
+ gitRepositoryLinks
65
68
  };
66
- export { 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 };
69
+ export { 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 };
67
70
 
68
71
  //# sourceMappingURL=schema.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"schema.mjs","names":["projectsTable","buildsTable","captureAttemptsTable","captureLogsTable","captureShardsTable","captureJobsTable","buildComponentsTable","buildReviewsTable","siteSettingsTable","schemaMetaTable","snapshotsTable","baselinesTable","commentsTable","labelTypesTable","buildLabelsTable","projectLinksTable","designLinksTable","designCredentialsTable","userConnectionsTable","designNodesTable","buildPackageUsageTable","tokensTable","webhooksTable","insightsTable","aiUsageTable","aiBudgetAlertsTable","notificationChannelsTable","notificationSubscriptionsTable","usersTable","userInviteTokensTable","projectMembersTable","projectGroupMappingsTable","contentUsesTable"],"sources":["../src/schema/index.ts"],"sourcesContent":["/**\n * Database schema: table handles, row types, and the schema object passed\n * to the database client.\n *\n * Table handles are available on the `schema` object with full type\n * inference (`schema.builds`, …); exact column types live on the narrow\n * per-entity definitions, and the row interfaces are pinned to them by\n * `schema-types.test.ts`.\n */\nimport type { AnyMySqlTable } from \"drizzle-orm/mysql-core\";\nimport { baselines as baselinesTable } from \"./baseline.ts\";\nimport { buildComponents as buildComponentsTable } from \"./build-component.ts\";\nimport { buildReviews as buildReviewsTable } from \"./build-review.ts\";\nimport { builds as buildsTable } from \"./build.ts\";\nimport {\n captureAttempts as captureAttemptsTable,\n captureLogs as captureLogsTable,\n} from \"./capture-attempt.ts\";\nimport { captureJobs as captureJobsTable } from \"./capture-job.ts\";\nimport { captureShards as captureShardsTable } from \"./capture-shard.ts\";\nimport { comments as commentsTable } from \"./comment.ts\";\nimport { userConnections as userConnectionsTable } from \"./connection.ts\";\nimport { contentUses as contentUsesTable } from \"./content-uses.ts\";\nimport {\n designLinks as designLinksTable,\n designCredentials as designCredentialsTable,\n designNodes as designNodesTable,\n} from \"./design.ts\";\nimport {\n aiBudgetAlerts as aiBudgetAlertsTable,\n aiUsage as aiUsageTable,\n insights as insightsTable,\n} from \"./insight.ts\";\nimport { buildLabels as buildLabelsTable, labelTypes as labelTypesTable } from \"./label.ts\";\nimport { projectMembers as projectMembersTable } from \"./member.ts\";\nimport {\n notificationChannels as notificationChannelsTable,\n notificationSubscriptions as notificationSubscriptionsTable,\n} from \"./notification.ts\";\nimport { projectGroupMappings as projectGroupMappingsTable } from \"./project-group-mapping.ts\";\nimport { projects as projectsTable } from \"./project.ts\";\nimport { schemaMeta as schemaMetaTable } from \"./schema-meta.ts\";\nimport { siteSettings as siteSettingsTable } from \"./site-setting.ts\";\nimport { snapshots as snapshotsTable } from \"./snapshot.ts\";\nimport { tokens as tokensTable } from \"./token.ts\";\nimport {\n buildPackageUsage as buildPackageUsageTable,\n projectLinks as projectLinksTable,\n} from \"./usage.ts\";\nimport { userInviteTokens as userInviteTokensTable } from \"./user-invite.ts\";\nimport { users as usersTable } from \"./user.ts\";\nimport { webhooks as webhooksTable } from \"./webhook.ts\";\n\nexport { builds } from \"./build.ts\";\nexport { captureAttempts, captureLogs } from \"./capture-attempt.ts\";\nexport { captureJobs } from \"./capture-job.ts\";\nexport { buildComponents } from \"./build-component.ts\";\nexport { buildReviews } from \"./build-review.ts\";\nexport { schemaMeta } from \"./schema-meta.ts\";\nexport { siteSettings } from \"./site-setting.ts\";\nexport { captureShards } from \"./capture-shard.ts\";\nexport { baselines } from \"./baseline.ts\";\nexport { comments } from \"./comment.ts\";\nexport { buildLabels, labelTypes } from \"./label.ts\";\nexport { projectMembers } from \"./member.ts\";\nexport { buildPackageUsage, projectLinks } from \"./usage.ts\";\nexport { userConnections } from \"./connection.ts\";\nexport { designCredentials, designLinks, designNodes } from \"./design.ts\";\nexport { projectGroupMappings } from \"./project-group-mapping.ts\";\nexport { projects } from \"./project.ts\";\nexport { snapshots } from \"./snapshot.ts\";\nexport { tokens } from \"./token.ts\";\nexport { userInviteTokens } from \"./user-invite.ts\";\nexport { users } from \"./user.ts\";\nexport { webhooks } from \"./webhook.ts\";\nexport { aiBudgetAlerts, aiUsage, insights } from \"./insight.ts\";\nexport { notificationChannels, notificationSubscriptions } from \"./notification.ts\";\nexport { contentUses } from \"./content-uses.ts\";\n\n/** A capture attempt and its log lines for a single build run. */\nexport type { CaptureAttempt, CaptureLog } from \"./capture-attempt.ts\";\n/** Build row as stored in the `builds` table. */\nexport type { Build } from \"./build.ts\";\n/** Review comment row as stored in the `comments` table. */\nexport type { Comment } from \"./comment.ts\";\n/** Build label and label type rows. */\nexport type { BuildLabel, LabelType } from \"./label.ts\";\n/** A user's OAuth connection to an external service. */\nexport type { UserConnection } from \"./connection.ts\";\n/** Design link, provider credential and cached design node rows. */\nexport type { DesignCredential, DesignLink, DesignNode } from \"./design.ts\";\n/** Project link and per-build package usage rows. */\nexport type { BuildPackageUsage, ProjectLink } from \"./usage.ts\";\n/** Project membership row linking a user to a project role. */\nexport type { ProjectMember } from \"./member.ts\";\n/** Identity-provider group to project-role mapping row. */\nexport type { ProjectGroupMapping } from \"./project-group-mapping.ts\";\n/** Project row and its embedded Storybook metadata. */\nexport type { Project, StorybookMeta } from \"./project.ts\";\n/** Per-project git provider status-check configuration row. */\n/** Snapshot row capturing a single story at one viewport. */\nexport type { Snapshot } from \"./snapshot.ts\";\n/** CI token row (stores only the hash). */\nexport type { Token } from \"./token.ts\";\n/** One-time invite token for local accounts. */\nexport type { UserInviteToken } from \"./user-invite.ts\";\n/** User row for authenticated identities. */\nexport type { User } from \"./user.ts\";\n/** Webhook subscription row. */\nexport type { Webhook } from \"./webhook.ts\";\n/** Insight, AI usage and budget-alert rows. */\nexport type { AiBudgetAlert, AiUsage, Insight } from \"./insight.ts\";\n/** Notification channel and subscription rows. */\nexport type { NotificationChannel, NotificationSubscription } from \"./notification.ts\";\n/** Baseline row. */\nexport type { Baseline } from \"./baseline.ts\";\n/** Content ref row for deduplicated assets. */\nexport type { ContentUse } from \"./content-uses.ts\";\n\n/** Full Drizzle schema object passed to the database client. */\nexport const schema: {\n projects: AnyMySqlTable;\n builds: AnyMySqlTable;\n captureAttempts: AnyMySqlTable;\n captureLogs: AnyMySqlTable;\n captureShards: AnyMySqlTable;\n captureJobs: AnyMySqlTable;\n buildComponents: AnyMySqlTable;\n buildReviews: AnyMySqlTable;\n siteSettings: AnyMySqlTable;\n schemaMeta: AnyMySqlTable;\n snapshots: AnyMySqlTable;\n baselines: AnyMySqlTable;\n comments: AnyMySqlTable;\n labelTypes: AnyMySqlTable;\n buildLabels: AnyMySqlTable;\n projectLinks: AnyMySqlTable;\n designLinks: AnyMySqlTable;\n designCredentials: AnyMySqlTable;\n userConnections: AnyMySqlTable;\n designNodes: AnyMySqlTable;\n buildPackageUsage: AnyMySqlTable;\n tokens: AnyMySqlTable;\n webhooks: AnyMySqlTable;\n insights: AnyMySqlTable;\n aiUsage: AnyMySqlTable;\n aiBudgetAlerts: AnyMySqlTable;\n notificationChannels: AnyMySqlTable;\n notificationSubscriptions: AnyMySqlTable;\n users: AnyMySqlTable;\n userInviteTokens: AnyMySqlTable;\n projectMembers: AnyMySqlTable;\n projectGroupMappings: AnyMySqlTable;\n contentUses: AnyMySqlTable;\n} = {\n projects: projectsTable,\n builds: buildsTable,\n captureAttempts: captureAttemptsTable,\n captureLogs: captureLogsTable,\n captureShards: captureShardsTable,\n captureJobs: captureJobsTable,\n buildComponents: buildComponentsTable,\n buildReviews: buildReviewsTable,\n siteSettings: siteSettingsTable,\n schemaMeta: schemaMetaTable,\n snapshots: snapshotsTable,\n baselines: baselinesTable,\n comments: commentsTable,\n labelTypes: labelTypesTable,\n buildLabels: buildLabelsTable,\n projectLinks: projectLinksTable,\n designLinks: designLinksTable,\n designCredentials: designCredentialsTable,\n userConnections: userConnectionsTable,\n designNodes: designNodesTable,\n buildPackageUsage: buildPackageUsageTable,\n tokens: tokensTable,\n webhooks: webhooksTable,\n insights: insightsTable,\n aiUsage: aiUsageTable,\n aiBudgetAlerts: aiBudgetAlertsTable,\n notificationChannels: notificationChannelsTable,\n notificationSubscriptions: notificationSubscriptionsTable,\n users: usersTable,\n userInviteTokens: userInviteTokensTable,\n projectMembers: projectMembersTable,\n projectGroupMappings: projectGroupMappingsTable,\n contentUses: contentUsesTable,\n};\n\n/** The full database schema type. */\nexport type Schema = typeof schema;\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAwHA,MAAa,SAkCT;CACQA;CACFC;CACSC;CACJC;CACEC;CACFC;CACIC;CACHC;CACAC;CACFC;CACDC;CACAC;CACDC;CACEC;CACCC;CACCC;CACDC;CACMC;CACFC;CACJC;CACMC;CACXC;CACEC;CACAC;CACDC;CACOC;CACMC;CACKC;CACpBC;CACWC;CACFC;CACMC;CACTC;AACf"}
1
+ {"version":3,"file":"schema.mjs","names":["projectsTable","buildsTable","captureAttemptsTable","captureLogsTable","captureShardsTable","captureJobsTable","buildComponentsTable","buildReviewsTable","siteSettingsTable","schemaMetaTable","snapshotsTable","baselinesTable","commentsTable","labelTypesTable","buildLabelsTable","projectLinksTable","designLinksTable","designCredentialsTable","userConnectionsTable","designNodesTable","buildPackageUsageTable","tokensTable","webhooksTable","insightsTable","aiUsageTable","aiBudgetAlertsTable","notificationChannelsTable","notificationSubscriptionsTable","usersTable","userInviteTokensTable","projectMembersTable","projectGroupMappingsTable","contentUsesTable","gitConnectionsTable","gitRepositoryLinksTable"],"sources":["../src/schema/index.ts"],"sourcesContent":["/**\n * Database schema: table handles, row types, and the schema object passed\n * to the database client.\n *\n * Table handles are available on the `schema` object with full type\n * inference (`schema.builds`, …); exact column types live on the narrow\n * per-entity definitions, and the row interfaces are pinned to them by\n * `schema-types.test.ts`.\n */\nimport type { AnyMySqlTable } from \"drizzle-orm/mysql-core\";\nimport { baselines as baselinesTable } from \"./baseline.ts\";\nimport { buildComponents as buildComponentsTable } from \"./build-component.ts\";\nimport { buildReviews as buildReviewsTable } from \"./build-review.ts\";\nimport { builds as buildsTable } from \"./build.ts\";\nimport {\n captureAttempts as captureAttemptsTable,\n captureLogs as captureLogsTable,\n} from \"./capture-attempt.ts\";\nimport { captureJobs as captureJobsTable } from \"./capture-job.ts\";\nimport { captureShards as captureShardsTable } from \"./capture-shard.ts\";\nimport { comments as commentsTable } from \"./comment.ts\";\nimport { userConnections as userConnectionsTable } from \"./connection.ts\";\nimport { contentUses as contentUsesTable } from \"./content-uses.ts\";\nimport {\n designLinks as designLinksTable,\n designCredentials as designCredentialsTable,\n designNodes as designNodesTable,\n} from \"./design.ts\";\nimport {\n gitConnections as gitConnectionsTable,\n gitRepositoryLinks as gitRepositoryLinksTable,\n} from \"./git-connection.ts\";\nimport {\n aiBudgetAlerts as aiBudgetAlertsTable,\n aiUsage as aiUsageTable,\n insights as insightsTable,\n} from \"./insight.ts\";\nimport { buildLabels as buildLabelsTable, labelTypes as labelTypesTable } from \"./label.ts\";\nimport { projectMembers as projectMembersTable } from \"./member.ts\";\nimport {\n notificationChannels as notificationChannelsTable,\n notificationSubscriptions as notificationSubscriptionsTable,\n} from \"./notification.ts\";\nimport { projectGroupMappings as projectGroupMappingsTable } from \"./project-group-mapping.ts\";\nimport { projects as projectsTable } from \"./project.ts\";\nimport { schemaMeta as schemaMetaTable } from \"./schema-meta.ts\";\nimport { siteSettings as siteSettingsTable } from \"./site-setting.ts\";\nimport { snapshots as snapshotsTable } from \"./snapshot.ts\";\nimport { tokens as tokensTable } from \"./token.ts\";\nimport {\n buildPackageUsage as buildPackageUsageTable,\n projectLinks as projectLinksTable,\n} from \"./usage.ts\";\nimport { userInviteTokens as userInviteTokensTable } from \"./user-invite.ts\";\nimport { users as usersTable } from \"./user.ts\";\nimport { webhooks as webhooksTable } from \"./webhook.ts\";\n\nexport { builds } from \"./build.ts\";\nexport { captureAttempts, captureLogs } from \"./capture-attempt.ts\";\nexport { captureJobs } from \"./capture-job.ts\";\nexport { buildComponents } from \"./build-component.ts\";\nexport { buildReviews } from \"./build-review.ts\";\nexport { schemaMeta } from \"./schema-meta.ts\";\nexport { siteSettings } from \"./site-setting.ts\";\nexport { captureShards } from \"./capture-shard.ts\";\nexport { baselines } from \"./baseline.ts\";\nexport { comments } from \"./comment.ts\";\nexport { buildLabels, labelTypes } from \"./label.ts\";\nexport { projectMembers } from \"./member.ts\";\nexport { buildPackageUsage, projectLinks } from \"./usage.ts\";\nexport { userConnections } from \"./connection.ts\";\nexport { designCredentials, designLinks, designNodes } from \"./design.ts\";\nexport { projectGroupMappings } from \"./project-group-mapping.ts\";\nexport { projects } from \"./project.ts\";\nexport { snapshots } from \"./snapshot.ts\";\nexport { tokens } from \"./token.ts\";\nexport { userInviteTokens } from \"./user-invite.ts\";\nexport { users } from \"./user.ts\";\nexport { webhooks } from \"./webhook.ts\";\nexport { aiBudgetAlerts, aiUsage, insights } from \"./insight.ts\";\nexport { notificationChannels, notificationSubscriptions } from \"./notification.ts\";\nexport { contentUses } from \"./content-uses.ts\";\nexport { gitConnections, gitRepositoryLinks } from \"./git-connection.ts\";\n\n/** A capture attempt and its log lines for a single build run. */\nexport type { CaptureAttempt, CaptureLog } from \"./capture-attempt.ts\";\n/** Build row as stored in the `builds` table. */\nexport type { Build } from \"./build.ts\";\n/** Review comment row as stored in the `comments` table. */\nexport type { Comment } from \"./comment.ts\";\n/** Build label and label type rows. */\nexport type { BuildLabel, LabelType } from \"./label.ts\";\n/** A user's OAuth connection to an external service. */\nexport type { UserConnection } from \"./connection.ts\";\n/** Design link, provider credential and cached design node rows. */\nexport type { DesignCredential, DesignLink, DesignNode } from \"./design.ts\";\n/** Project link and per-build package usage rows. */\nexport type { BuildPackageUsage, ProjectLink } from \"./usage.ts\";\n/** Project membership row linking a user to a project role. */\nexport type { ProjectMember } from \"./member.ts\";\n/** Identity-provider group to project-role mapping row. */\nexport type { ProjectGroupMapping } from \"./project-group-mapping.ts\";\n/** Project row and its embedded Storybook metadata. */\nexport type { Project, StorybookMeta } from \"./project.ts\";\n/** Per-project git provider status-check configuration row. */\n/** Snapshot row capturing a single story at one viewport. */\nexport type { Snapshot } from \"./snapshot.ts\";\n/** CI token row (stores only the hash). */\nexport type { Token } from \"./token.ts\";\n/** One-time invite token for local accounts. */\nexport type { UserInviteToken } from \"./user-invite.ts\";\n/** User row for authenticated identities. */\nexport type { User } from \"./user.ts\";\n/** Webhook subscription row. */\nexport type { Webhook } from \"./webhook.ts\";\n/** Insight, AI usage and budget-alert rows. */\nexport type { AiBudgetAlert, AiUsage, Insight } from \"./insight.ts\";\n/** Notification channel and subscription rows. */\nexport type { NotificationChannel, NotificationSubscription } from \"./notification.ts\";\n/** Baseline row. */\nexport type { Baseline } from \"./baseline.ts\";\n/** Content ref row for deduplicated assets. */\nexport type { ContentUse } from \"./content-uses.ts\";\n/** Git connection and repository link rows. */\nexport type { GitConnection, GitRepositoryLink } from \"./git-connection.ts\";\n\n/** Full Drizzle schema object passed to the database client. */\nexport const schema: {\n projects: AnyMySqlTable;\n builds: AnyMySqlTable;\n captureAttempts: AnyMySqlTable;\n captureLogs: AnyMySqlTable;\n captureShards: AnyMySqlTable;\n captureJobs: AnyMySqlTable;\n buildComponents: AnyMySqlTable;\n buildReviews: AnyMySqlTable;\n siteSettings: AnyMySqlTable;\n schemaMeta: AnyMySqlTable;\n snapshots: AnyMySqlTable;\n baselines: AnyMySqlTable;\n comments: AnyMySqlTable;\n labelTypes: AnyMySqlTable;\n buildLabels: AnyMySqlTable;\n projectLinks: AnyMySqlTable;\n designLinks: AnyMySqlTable;\n designCredentials: AnyMySqlTable;\n userConnections: AnyMySqlTable;\n designNodes: AnyMySqlTable;\n buildPackageUsage: AnyMySqlTable;\n tokens: AnyMySqlTable;\n webhooks: AnyMySqlTable;\n insights: AnyMySqlTable;\n aiUsage: AnyMySqlTable;\n aiBudgetAlerts: AnyMySqlTable;\n notificationChannels: AnyMySqlTable;\n notificationSubscriptions: AnyMySqlTable;\n users: AnyMySqlTable;\n userInviteTokens: AnyMySqlTable;\n projectMembers: AnyMySqlTable;\n projectGroupMappings: AnyMySqlTable;\n contentUses: AnyMySqlTable;\n gitConnections: AnyMySqlTable;\n gitRepositoryLinks: AnyMySqlTable;\n} = {\n projects: projectsTable,\n builds: buildsTable,\n captureAttempts: captureAttemptsTable,\n captureLogs: captureLogsTable,\n captureShards: captureShardsTable,\n captureJobs: captureJobsTable,\n buildComponents: buildComponentsTable,\n buildReviews: buildReviewsTable,\n siteSettings: siteSettingsTable,\n schemaMeta: schemaMetaTable,\n snapshots: snapshotsTable,\n baselines: baselinesTable,\n comments: commentsTable,\n labelTypes: labelTypesTable,\n buildLabels: buildLabelsTable,\n projectLinks: projectLinksTable,\n designLinks: designLinksTable,\n designCredentials: designCredentialsTable,\n userConnections: userConnectionsTable,\n designNodes: designNodesTable,\n buildPackageUsage: buildPackageUsageTable,\n tokens: tokensTable,\n webhooks: webhooksTable,\n insights: insightsTable,\n aiUsage: aiUsageTable,\n aiBudgetAlerts: aiBudgetAlertsTable,\n notificationChannels: notificationChannelsTable,\n notificationSubscriptions: notificationSubscriptionsTable,\n users: usersTable,\n userInviteTokens: userInviteTokensTable,\n projectMembers: projectMembersTable,\n projectGroupMappings: projectGroupMappingsTable,\n contentUses: contentUsesTable,\n gitConnections: gitConnectionsTable,\n gitRepositoryLinks: gitRepositoryLinksTable,\n};\n\n/** The full database schema type. */\nexport type Schema = typeof schema;\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA+HA,MAAa,SAoCT;CACQA;CACFC;CACSC;CACJC;CACEC;CACFC;CACIC;CACHC;CACAC;CACFC;CACDC;CACAC;CACDC;CACEC;CACCC;CACCC;CACDC;CACMC;CACFC;CACJC;CACMC;CACXC;CACEC;CACAC;CACDC;CACOC;CACMC;CACKC;CACpBC;CACWC;CACFC;CACMC;CACTC;CACGC;CACIC;AACtB"}
package/dist/tidb.mjs CHANGED
@@ -1,10 +1,10 @@
1
1
  import "node:path";
2
2
  import "node:url";
3
3
  import.meta.url;
4
- import { createMysqlDatabase } from "./index.mjs";
4
+ import { createMysqlAdapter } from "./index.mjs";
5
5
  // src/tidb.ts
6
6
  function createTidbDatabase(options) {
7
- return createMysqlDatabase(options);
7
+ return createMysqlAdapter(options, "the TiDB Serverless preset is not verified for build retention");
8
8
  }
9
9
  export { createTidbDatabase };
10
10
 
package/dist/tidb.mjs.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"tidb.mjs","names":[],"sources":["../src/tidb.ts"],"sourcesContent":["import type { DatabaseAdapter } from \"@storyshelf/core/adapter/database\";\nimport { createMysqlDatabase, type MysqlDatabaseOptions } from \"./index.ts\";\n\n/**\n * TiDB Serverless (MySQL wire, serverless) preset.\n * Alias over the mysql2 pool — TiDB's serverless driver\n * (`@tidbcloud/serverless` + `drizzle-orm/tidb-serverless`) is\n * wire-compatible and can be swapped when the optional peer is installed.\n */\nexport type TidbDatabaseOptions = MysqlDatabaseOptions;\n\nexport function createTidbDatabase(options: TidbDatabaseOptions): DatabaseAdapter {\n return createMysqlDatabase(options);\n}\n"],"mappings":";;;;;AAWA,SAAgB,mBAAmB,SAA+C;CAChF,OAAO,oBAAoB,OAAO;AACpC"}
1
+ {"version":3,"file":"tidb.mjs","names":[],"sources":["../src/tidb.ts"],"sourcesContent":["import type { DatabaseAdapter } from \"@storyshelf/core/adapter/database\";\nimport { createMysqlAdapter, type MysqlDatabaseOptions } from \"./index.ts\";\n\n/**\n * TiDB Serverless (MySQL wire, serverless) preset.\n * Alias over the mysql2 pool — TiDB's serverless driver\n * (`@tidbcloud/serverless` + `drizzle-orm/tidb-serverless`) is\n * wire-compatible and can be swapped when the optional peer is installed.\n */\nexport type TidbDatabaseOptions = MysqlDatabaseOptions;\n\nexport function createTidbDatabase(options: TidbDatabaseOptions): DatabaseAdapter {\n // Build retention (ADR 0039) was never proven on TiDB Serverless: it stays fail closed.\n return createMysqlAdapter(\n options,\n \"the TiDB Serverless preset is not verified for build retention\",\n );\n}\n"],"mappings":";;;;;AAWA,SAAgB,mBAAmB,SAA+C;CAEhF,OAAO,mBACL,SACA,gEACF;AACF"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@storyshelf/db-mysql",
3
- "version": "0.12.0",
3
+ "version": "0.14.0",
4
4
  "description": "MySQL/MariaDB database adapter for StoryShelf (mysql2 + Drizzle, PlanetScale/TiDB compatible).",
5
5
  "keywords": [
6
6
  "database",
@@ -72,7 +72,7 @@
72
72
  "prepublishOnly": "nub run build"
73
73
  },
74
74
  "dependencies": {
75
- "@storyshelf/core": "0.12.0",
75
+ "@storyshelf/core": "0.14.0",
76
76
  "drizzle-orm": "^0.45.4",
77
77
  "mysql2": "^3.9.0"
78
78
  },
@@ -81,6 +81,7 @@
81
81
  "@tidbcloud/serverless": "^0.1.0",
82
82
  "@types/node": "^26.0.0",
83
83
  "@vitest/coverage-v8": "^4.0.0",
84
+ "drizzle-kit": "0.31.11",
84
85
  "mysql2": "^3.9.0",
85
86
  "oxfmt": "^0.65.0",
86
87
  "oxlint": "^1.80.0",