@bettercms-ai/db 0.4.2 → 0.4.4
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 +89 -0
- package/dist/index.js +16 -1
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -668,6 +668,8 @@ declare const EMPTY_CUSTOM_SCRIPTS: CustomScripts;
|
|
|
668
668
|
*/
|
|
669
669
|
type ProjectFormDefaults = {
|
|
670
670
|
notifyEmails?: string[];
|
|
671
|
+
/** Site-wide default for forms that do not set `notification.enabled`. Absent = true. */
|
|
672
|
+
notifyEnabled?: boolean;
|
|
671
673
|
senderName?: string;
|
|
672
674
|
replyTo?: string;
|
|
673
675
|
subject?: string;
|
|
@@ -1772,6 +1774,23 @@ declare const projects: drizzle_orm_pg_core.PgTableWithColumns<{
|
|
|
1772
1774
|
identity: undefined;
|
|
1773
1775
|
generated: undefined;
|
|
1774
1776
|
}, {}, {}>;
|
|
1777
|
+
promoteAfterSetup: drizzle_orm_pg_core.PgColumn<{
|
|
1778
|
+
name: "promote_after_setup";
|
|
1779
|
+
tableName: "projects";
|
|
1780
|
+
dataType: "boolean";
|
|
1781
|
+
columnType: "PgBoolean";
|
|
1782
|
+
data: boolean;
|
|
1783
|
+
driverParam: boolean;
|
|
1784
|
+
notNull: true;
|
|
1785
|
+
hasDefault: true;
|
|
1786
|
+
isPrimaryKey: false;
|
|
1787
|
+
isAutoincrement: false;
|
|
1788
|
+
hasRuntimeDefault: false;
|
|
1789
|
+
enumValues: undefined;
|
|
1790
|
+
baseColumn: never;
|
|
1791
|
+
identity: undefined;
|
|
1792
|
+
generated: undefined;
|
|
1793
|
+
}, {}, {}>;
|
|
1775
1794
|
canvasEnabled: drizzle_orm_pg_core.PgColumn<{
|
|
1776
1795
|
name: "canvas_enabled";
|
|
1777
1796
|
tableName: "projects";
|
|
@@ -6680,7 +6699,39 @@ declare const pages: drizzle_orm_pg_core.PgTableWithColumns<{
|
|
|
6680
6699
|
repeaters?: boolean;
|
|
6681
6700
|
families?: true;
|
|
6682
6701
|
collection?: true;
|
|
6702
|
+
/**
|
|
6703
|
+
* Which PROSE grammar this page was derived in. `"document"` means its article body is
|
|
6704
|
+
* one Portable Text field; absent means a field per paragraph, which every page
|
|
6705
|
+
* derived before prose mode holds. @see DeriveOptions.prose
|
|
6706
|
+
*/
|
|
6707
|
+
prose?: "document";
|
|
6683
6708
|
styles?: Record<string, unknown>;
|
|
6709
|
+
/**
|
|
6710
|
+
* field path → the id of the Button component that path's CTA looks like, written by
|
|
6711
|
+
* the button-recipes lane so componentize can reference it. A slot on an existing
|
|
6712
|
+
* jsonb column, not a new one: it is per-page derive metadata like everything else here.
|
|
6713
|
+
*/
|
|
6714
|
+
buttons?: Record<string, string>;
|
|
6715
|
+
/**
|
|
6716
|
+
* Elements an editor pinned from the canvas ("Make editable"), replayed on every later
|
|
6717
|
+
* derive so the field they minted survives a re-derive and a rebuild.
|
|
6718
|
+
*
|
|
6719
|
+
* Structural, not `DerivedLocator` imported: this package is the schema and must not
|
|
6720
|
+
* depend on the content lane. @see packages/types/src/locator.ts
|
|
6721
|
+
*/
|
|
6722
|
+
pins?: {
|
|
6723
|
+
region: string | null;
|
|
6724
|
+
ancestors: string[];
|
|
6725
|
+
siblingIndex: number;
|
|
6726
|
+
tag: string;
|
|
6727
|
+
/**
|
|
6728
|
+
* COLLECTIONS ONLY: the model field this pin fills, and what it holds. A singleton
|
|
6729
|
+
* re-derives its key from the element's own text; a collection's entries each say
|
|
6730
|
+
* something different, so one key has to ride with the pin. @see PinnedField
|
|
6731
|
+
*/
|
|
6732
|
+
key?: string;
|
|
6733
|
+
type?: "text" | "image";
|
|
6734
|
+
}[];
|
|
6684
6735
|
skipped?: unknown[];
|
|
6685
6736
|
skippedTotal?: number;
|
|
6686
6737
|
} | null;
|
|
@@ -6699,7 +6750,39 @@ declare const pages: drizzle_orm_pg_core.PgTableWithColumns<{
|
|
|
6699
6750
|
repeaters?: boolean;
|
|
6700
6751
|
families?: true;
|
|
6701
6752
|
collection?: true;
|
|
6753
|
+
/**
|
|
6754
|
+
* Which PROSE grammar this page was derived in. `"document"` means its article body is
|
|
6755
|
+
* one Portable Text field; absent means a field per paragraph, which every page
|
|
6756
|
+
* derived before prose mode holds. @see DeriveOptions.prose
|
|
6757
|
+
*/
|
|
6758
|
+
prose?: "document";
|
|
6702
6759
|
styles?: Record<string, unknown>;
|
|
6760
|
+
/**
|
|
6761
|
+
* field path → the id of the Button component that path's CTA looks like, written by
|
|
6762
|
+
* the button-recipes lane so componentize can reference it. A slot on an existing
|
|
6763
|
+
* jsonb column, not a new one: it is per-page derive metadata like everything else here.
|
|
6764
|
+
*/
|
|
6765
|
+
buttons?: Record<string, string>;
|
|
6766
|
+
/**
|
|
6767
|
+
* Elements an editor pinned from the canvas ("Make editable"), replayed on every later
|
|
6768
|
+
* derive so the field they minted survives a re-derive and a rebuild.
|
|
6769
|
+
*
|
|
6770
|
+
* Structural, not `DerivedLocator` imported: this package is the schema and must not
|
|
6771
|
+
* depend on the content lane. @see packages/types/src/locator.ts
|
|
6772
|
+
*/
|
|
6773
|
+
pins?: {
|
|
6774
|
+
region: string | null;
|
|
6775
|
+
ancestors: string[];
|
|
6776
|
+
siblingIndex: number;
|
|
6777
|
+
tag: string;
|
|
6778
|
+
/**
|
|
6779
|
+
* COLLECTIONS ONLY: the model field this pin fills, and what it holds. A singleton
|
|
6780
|
+
* re-derives its key from the element's own text; a collection's entries each say
|
|
6781
|
+
* something different, so one key has to ride with the pin. @see PinnedField
|
|
6782
|
+
*/
|
|
6783
|
+
key?: string;
|
|
6784
|
+
type?: "text" | "image";
|
|
6785
|
+
}[];
|
|
6703
6786
|
skipped?: unknown[];
|
|
6704
6787
|
skippedTotal?: number;
|
|
6705
6788
|
} | null;
|
|
@@ -9937,6 +10020,12 @@ type FormNotification = {
|
|
|
9937
10020
|
replyTo?: string;
|
|
9938
10021
|
subject?: string;
|
|
9939
10022
|
body?: string;
|
|
10023
|
+
/**
|
|
10024
|
+
* `false` mutes the built-in admin email (notifyEmails → project defaults → owners) — for a
|
|
10025
|
+
* newsletter signup nobody wants one mail per subscriber. Email-integration rows are separate
|
|
10026
|
+
* and keep sending. Absent = inherit `ProjectFormDefaults.notifyEnabled`, then `true`.
|
|
10027
|
+
*/
|
|
10028
|
+
enabled?: boolean;
|
|
9940
10029
|
};
|
|
9941
10030
|
type FormSelect = InferSelectModel<typeof forms>;
|
|
9942
10031
|
type FormInsert = InferInsertModel<typeof forms>;
|
package/dist/index.js
CHANGED
|
@@ -23470,6 +23470,19 @@ var projects = pgTable10(
|
|
|
23470
23470
|
// production `current` on an explicit promote (POST /projects/:id/promote). false =
|
|
23471
23471
|
// legacy Vercel-style auto-deploy straight to production. See list_deployable_releases().
|
|
23472
23472
|
requirePromote: boolean7("require_promote").notNull().default(false),
|
|
23473
|
+
/**
|
|
23474
|
+
* WHO will press promote — set alongside `require_promote` when a repo is imported, so a
|
|
23475
|
+
* fresh import's first build is staged while its eleven setup lanes run and the public
|
|
23476
|
+
* site only appears once they have (migration 0369).
|
|
23477
|
+
*
|
|
23478
|
+
* The sibling of `require_promote`, not a second copy of it: that column answers "does this
|
|
23479
|
+
* build stage?" and every slot rule reads it (TS `deployableSlot`, SQL
|
|
23480
|
+
* `list_deployable_releases`, the binding-report slot). This one answers "and is the
|
|
23481
|
+
* platform going to promote it itself?" — true means the release chain promotes on its own
|
|
23482
|
+
* once the lanes finish, and both flags clear so every later build auto-deploys as before.
|
|
23483
|
+
* A project whose owner turned the toggle on keeps this false and waits for a human.
|
|
23484
|
+
*/
|
|
23485
|
+
promoteAfterSetup: boolean7("promote_after_setup").notNull().default(false),
|
|
23473
23486
|
// Cross-origin canvas opt-in (#235 lane). When true the editor may frame this project's
|
|
23474
23487
|
// site at `canvas-<projectId>.bettercms.site` — the guest that infra/nginx/canvas.conf
|
|
23475
23488
|
// injects talks postMessage instead of the same-origin DOM access the editor uses today.
|
|
@@ -25151,7 +25164,9 @@ var rebuildQueue = pgTable47("rebuild_queue", {
|
|
|
25151
25164
|
// FK to projects.id
|
|
25152
25165
|
workspaceId: text48("workspace_id").notNull(),
|
|
25153
25166
|
// FK to workspaces.id
|
|
25154
|
-
// queued | building | idle | failed
|
|
25167
|
+
// queued | building | categorizing | idle | failed
|
|
25168
|
+
// 'categorizing': the bytes are live and the release's lane chain (derive/annotate/structure)
|
|
25169
|
+
// is still running — publishing is not finished, so this is NOT idle.
|
|
25155
25170
|
state: varchar31("state", { length: 20 }).notNull().default("queued"),
|
|
25156
25171
|
debounceUntil: timestamp45("debounce_until").notNull(),
|
|
25157
25172
|
inFlightSha: varchar31("in_flight_sha", { length: 64 }),
|