@bettercms-ai/db 0.1.0 → 0.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +136 -0
- package/dist/index.js +29 -2
- package/dist/index.js.map +1 -1
- package/package.json +2 -5
package/dist/index.d.ts
CHANGED
|
@@ -1651,6 +1651,23 @@ declare const projects: drizzle_orm_pg_core.PgTableWithColumns<{
|
|
|
1651
1651
|
identity: undefined;
|
|
1652
1652
|
generated: undefined;
|
|
1653
1653
|
}, {}, {}>;
|
|
1654
|
+
componentValidationOverflow: drizzle_orm_pg_core.PgColumn<{
|
|
1655
|
+
name: "component_validation_overflow";
|
|
1656
|
+
tableName: "projects";
|
|
1657
|
+
dataType: "boolean";
|
|
1658
|
+
columnType: "PgBoolean";
|
|
1659
|
+
data: boolean;
|
|
1660
|
+
driverParam: boolean;
|
|
1661
|
+
notNull: true;
|
|
1662
|
+
hasDefault: true;
|
|
1663
|
+
isPrimaryKey: false;
|
|
1664
|
+
isAutoincrement: false;
|
|
1665
|
+
hasRuntimeDefault: false;
|
|
1666
|
+
enumValues: undefined;
|
|
1667
|
+
baseColumn: never;
|
|
1668
|
+
identity: undefined;
|
|
1669
|
+
generated: undefined;
|
|
1670
|
+
}, {}, {}>;
|
|
1654
1671
|
renderMode: drizzle_orm_pg_core.PgColumn<{
|
|
1655
1672
|
name: "render_mode";
|
|
1656
1673
|
tableName: "projects";
|
|
@@ -1923,6 +1940,23 @@ declare const projects: drizzle_orm_pg_core.PgTableWithColumns<{
|
|
|
1923
1940
|
}, {}, {
|
|
1924
1941
|
$type: PendingMainPublish | null;
|
|
1925
1942
|
}>;
|
|
1943
|
+
archivedAt: drizzle_orm_pg_core.PgColumn<{
|
|
1944
|
+
name: "archived_at";
|
|
1945
|
+
tableName: "projects";
|
|
1946
|
+
dataType: "date";
|
|
1947
|
+
columnType: "PgTimestamp";
|
|
1948
|
+
data: Date;
|
|
1949
|
+
driverParam: string;
|
|
1950
|
+
notNull: false;
|
|
1951
|
+
hasDefault: false;
|
|
1952
|
+
isPrimaryKey: false;
|
|
1953
|
+
isAutoincrement: false;
|
|
1954
|
+
hasRuntimeDefault: false;
|
|
1955
|
+
enumValues: undefined;
|
|
1956
|
+
baseColumn: never;
|
|
1957
|
+
identity: undefined;
|
|
1958
|
+
generated: undefined;
|
|
1959
|
+
}, {}, {}>;
|
|
1926
1960
|
};
|
|
1927
1961
|
dialect: "pg";
|
|
1928
1962
|
}>;
|
|
@@ -27924,6 +27958,108 @@ declare const componentPreviewBundles: drizzle_orm_pg_core.PgTableWithColumns<{
|
|
|
27924
27958
|
identity: undefined;
|
|
27925
27959
|
generated: undefined;
|
|
27926
27960
|
}, {}, {}>;
|
|
27961
|
+
runtimeVersion: drizzle_orm_pg_core.PgColumn<{
|
|
27962
|
+
name: "runtime_version";
|
|
27963
|
+
tableName: "component_preview_bundles";
|
|
27964
|
+
dataType: "string";
|
|
27965
|
+
columnType: "PgText";
|
|
27966
|
+
data: string;
|
|
27967
|
+
driverParam: string;
|
|
27968
|
+
notNull: false;
|
|
27969
|
+
hasDefault: false;
|
|
27970
|
+
isPrimaryKey: false;
|
|
27971
|
+
isAutoincrement: false;
|
|
27972
|
+
hasRuntimeDefault: false;
|
|
27973
|
+
enumValues: [string, ...string[]];
|
|
27974
|
+
baseColumn: never;
|
|
27975
|
+
identity: undefined;
|
|
27976
|
+
generated: undefined;
|
|
27977
|
+
}, {}, {}>;
|
|
27978
|
+
refreshId: drizzle_orm_pg_core.PgColumn<{
|
|
27979
|
+
name: "refresh_id";
|
|
27980
|
+
tableName: "component_preview_bundles";
|
|
27981
|
+
dataType: "string";
|
|
27982
|
+
columnType: "PgUUID";
|
|
27983
|
+
data: string;
|
|
27984
|
+
driverParam: string;
|
|
27985
|
+
notNull: false;
|
|
27986
|
+
hasDefault: false;
|
|
27987
|
+
isPrimaryKey: false;
|
|
27988
|
+
isAutoincrement: false;
|
|
27989
|
+
hasRuntimeDefault: false;
|
|
27990
|
+
enumValues: undefined;
|
|
27991
|
+
baseColumn: never;
|
|
27992
|
+
identity: undefined;
|
|
27993
|
+
generated: undefined;
|
|
27994
|
+
}, {}, {}>;
|
|
27995
|
+
refreshStatus: drizzle_orm_pg_core.PgColumn<{
|
|
27996
|
+
name: "refresh_status";
|
|
27997
|
+
tableName: "component_preview_bundles";
|
|
27998
|
+
dataType: "string";
|
|
27999
|
+
columnType: "PgText";
|
|
28000
|
+
data: string;
|
|
28001
|
+
driverParam: string;
|
|
28002
|
+
notNull: false;
|
|
28003
|
+
hasDefault: false;
|
|
28004
|
+
isPrimaryKey: false;
|
|
28005
|
+
isAutoincrement: false;
|
|
28006
|
+
hasRuntimeDefault: false;
|
|
28007
|
+
enumValues: [string, ...string[]];
|
|
28008
|
+
baseColumn: never;
|
|
28009
|
+
identity: undefined;
|
|
28010
|
+
generated: undefined;
|
|
28011
|
+
}, {}, {}>;
|
|
28012
|
+
refreshErrorCode: drizzle_orm_pg_core.PgColumn<{
|
|
28013
|
+
name: "refresh_error_code";
|
|
28014
|
+
tableName: "component_preview_bundles";
|
|
28015
|
+
dataType: "string";
|
|
28016
|
+
columnType: "PgText";
|
|
28017
|
+
data: string;
|
|
28018
|
+
driverParam: string;
|
|
28019
|
+
notNull: false;
|
|
28020
|
+
hasDefault: false;
|
|
28021
|
+
isPrimaryKey: false;
|
|
28022
|
+
isAutoincrement: false;
|
|
28023
|
+
hasRuntimeDefault: false;
|
|
28024
|
+
enumValues: [string, ...string[]];
|
|
28025
|
+
baseColumn: never;
|
|
28026
|
+
identity: undefined;
|
|
28027
|
+
generated: undefined;
|
|
28028
|
+
}, {}, {}>;
|
|
28029
|
+
refreshErrorMessage: drizzle_orm_pg_core.PgColumn<{
|
|
28030
|
+
name: "refresh_error_message";
|
|
28031
|
+
tableName: "component_preview_bundles";
|
|
28032
|
+
dataType: "string";
|
|
28033
|
+
columnType: "PgText";
|
|
28034
|
+
data: string;
|
|
28035
|
+
driverParam: string;
|
|
28036
|
+
notNull: false;
|
|
28037
|
+
hasDefault: false;
|
|
28038
|
+
isPrimaryKey: false;
|
|
28039
|
+
isAutoincrement: false;
|
|
28040
|
+
hasRuntimeDefault: false;
|
|
28041
|
+
enumValues: [string, ...string[]];
|
|
28042
|
+
baseColumn: never;
|
|
28043
|
+
identity: undefined;
|
|
28044
|
+
generated: undefined;
|
|
28045
|
+
}, {}, {}>;
|
|
28046
|
+
refreshDispatchedAt: drizzle_orm_pg_core.PgColumn<{
|
|
28047
|
+
name: "refresh_dispatched_at";
|
|
28048
|
+
tableName: "component_preview_bundles";
|
|
28049
|
+
dataType: "date";
|
|
28050
|
+
columnType: "PgTimestamp";
|
|
28051
|
+
data: Date;
|
|
28052
|
+
driverParam: string;
|
|
28053
|
+
notNull: false;
|
|
28054
|
+
hasDefault: false;
|
|
28055
|
+
isPrimaryKey: false;
|
|
28056
|
+
isAutoincrement: false;
|
|
28057
|
+
hasRuntimeDefault: false;
|
|
28058
|
+
enumValues: undefined;
|
|
28059
|
+
baseColumn: never;
|
|
28060
|
+
identity: undefined;
|
|
28061
|
+
generated: undefined;
|
|
28062
|
+
}, {}, {}>;
|
|
27927
28063
|
};
|
|
27928
28064
|
dialect: "pg";
|
|
27929
28065
|
}>;
|
package/dist/index.js
CHANGED
|
@@ -21534,6 +21534,8 @@ var projects = pgTable10(
|
|
|
21534
21534
|
// customer's own GitHub Actions minutes. `componentValidationDispatchedAt` debounces a release storm.
|
|
21535
21535
|
componentAutoValidate: boolean7("component_auto_validate").notNull().default(false),
|
|
21536
21536
|
componentValidationDispatchedAt: timestamp11("component_validation_dispatched_at", { withTimezone: true }),
|
|
21537
|
+
// The last automatic pass left components out (LIMIT_REACHED); its batch's last report starts the next pass (0331).
|
|
21538
|
+
componentValidationOverflow: boolean7("component_validation_overflow").notNull().default(false),
|
|
21537
21539
|
// How nginx resolves a page request for this project (FLO-947; migration 0211, widened
|
|
21538
21540
|
// to 'node' by 0225).
|
|
21539
21541
|
// 'static' = today's disk-first `try_files`; the CMS renderer only fills gaps.
|
|
@@ -21609,6 +21611,21 @@ var projects = pgTable10(
|
|
|
21609
21611
|
* bar until someone actually publishes. NULL = nothing waiting. Migration 0288.
|
|
21610
21612
|
*/
|
|
21611
21613
|
pendingMainPublish: jsonb8("pending_main_publish").$type(),
|
|
21614
|
+
/**
|
|
21615
|
+
* Archived: retired from the working set but NOT deleted. Three distinct axes, and
|
|
21616
|
+
* conflating any two of them is the bug this comment exists to prevent:
|
|
21617
|
+
*
|
|
21618
|
+
* deleted_at hard-delete tombstone. The row and its children are going away.
|
|
21619
|
+
* unpublished_at the site is off the internet. The project is still worked on.
|
|
21620
|
+
* archived_at the project is put away. It is ALSO off the internet, by rule.
|
|
21621
|
+
*
|
|
21622
|
+
* 🔴 An archived project must be neither live nor able to go live — the same rule
|
|
21623
|
+
* pages.archivedAt carries one level down. It is enforced in ONE place:
|
|
21624
|
+
* project_publishing_lock() (migration 0330) reports `source = 'archived'`, so both
|
|
21625
|
+
* publishing-lock seams refuse the publish and no route has to remember.
|
|
21626
|
+
* Archiving therefore unpublishes first, and refuses to archive if that fails.
|
|
21627
|
+
*/
|
|
21628
|
+
archivedAt: timestamp11("archived_at"),
|
|
21612
21629
|
...auditColumns,
|
|
21613
21630
|
...softDeleteColumn
|
|
21614
21631
|
},
|
|
@@ -21621,7 +21638,9 @@ var projects = pgTable10(
|
|
|
21621
21638
|
// 0051; the create handler's conflict check also excludes soft-deleted rows.
|
|
21622
21639
|
uniqueIndex3("projects_workspace_slug_idx").on(table.workspaceId, table.slug).where(sql5`${table.deletedAt} IS NULL`),
|
|
21623
21640
|
// Workspace filtering
|
|
21624
|
-
index10("projects_workspace_idx").on(table.workspaceId)
|
|
21641
|
+
index10("projects_workspace_idx").on(table.workspaceId),
|
|
21642
|
+
// Archive: every archive-aware list filters on this, so it earns an index like deletedAt.
|
|
21643
|
+
index10("projects_archived_at_idx").on(table.archivedAt)
|
|
21625
21644
|
]
|
|
21626
21645
|
);
|
|
21627
21646
|
var projectFolders = pgTable10("project_folders", {
|
|
@@ -24931,7 +24950,15 @@ var componentPreviewBundles = pgTable81(
|
|
|
24931
24950
|
artifactKey: text82("artifact_key").notNull(),
|
|
24932
24951
|
checksum: varchar61("checksum", { length: 80 }).notNull(),
|
|
24933
24952
|
sizeBytes: bigint4("size_bytes", { mode: "number" }).notNull(),
|
|
24934
|
-
createdAt: timestamp74("created_at", { withTimezone: true }).notNull().defaultNow()
|
|
24953
|
+
createdAt: timestamp74("created_at", { withTimezone: true }).notNull().defaultNow(),
|
|
24954
|
+
/** The preview-runtime version that built this bundle (0330); null from a runner before 0.5.0. */
|
|
24955
|
+
runtimeVersion: text82("runtime_version"),
|
|
24956
|
+
/** The latest runtime refresh of this commit: rebuilt with a newer runner without re-validating (0330). */
|
|
24957
|
+
refreshId: uuid2("refresh_id"),
|
|
24958
|
+
refreshStatus: text82("refresh_status"),
|
|
24959
|
+
refreshErrorCode: text82("refresh_error_code"),
|
|
24960
|
+
refreshErrorMessage: text82("refresh_error_message"),
|
|
24961
|
+
refreshDispatchedAt: timestamp74("refresh_dispatched_at", { withTimezone: true })
|
|
24935
24962
|
},
|
|
24936
24963
|
(table) => [
|
|
24937
24964
|
foreignKey5({
|