@rimelight/cms 0.0.5 → 0.0.7
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.mts +101 -101
- package/dist/integration.d.mts +3 -4
- package/dist/schema/index.d.mts +19 -20
- package/dist/schema/sqlite.d.mts +19 -20
- package/dist/storage/index.d.mts +12 -13
- package/package.json +8 -8
package/dist/index.d.mts
CHANGED
|
@@ -8,8 +8,8 @@ import { Toast, ToastInput, ToastItem, addToast, clearToasts, removeToast, showE
|
|
|
8
8
|
import { SidebarItem, SidebarScope } from "@rimelight/ui/components/sidebar/sidebar.ts";
|
|
9
9
|
import { BadgeProps } from "@rimelight/ui/components/badge/badge.ts";
|
|
10
10
|
//#region src/core/page-definitions.d.ts
|
|
11
|
-
type FieldType = "text" | "number" | "enum" | "text-array" | "page" | "page-array";
|
|
12
|
-
interface FieldDefinition {
|
|
11
|
+
export type FieldType = "text" | "number" | "enum" | "text-array" | "page" | "page-array";
|
|
12
|
+
export interface FieldDefinition {
|
|
13
13
|
type: FieldType;
|
|
14
14
|
label: {
|
|
15
15
|
en: string;
|
|
@@ -20,14 +20,14 @@ interface FieldDefinition {
|
|
|
20
20
|
}[];
|
|
21
21
|
allowedPageTypes?: string[];
|
|
22
22
|
}
|
|
23
|
-
interface PropertyGroup {
|
|
23
|
+
export interface PropertyGroup {
|
|
24
24
|
label: {
|
|
25
25
|
en: string;
|
|
26
26
|
};
|
|
27
27
|
defaultOpen: boolean;
|
|
28
28
|
fields: Record<string, FieldDefinition>;
|
|
29
29
|
}
|
|
30
|
-
interface PageDefinition {
|
|
30
|
+
export interface PageDefinition {
|
|
31
31
|
typeLabelKey: string;
|
|
32
32
|
properties: Record<string, PropertyGroup>;
|
|
33
33
|
/**
|
|
@@ -35,60 +35,60 @@ interface PageDefinition {
|
|
|
35
35
|
*/
|
|
36
36
|
initialBlocks?: () => BaseBlock[];
|
|
37
37
|
}
|
|
38
|
-
declare function definePageDefinition(def: PageDefinition): PageDefinition;
|
|
39
|
-
declare const DOCUMENT_DEFINITION: PageDefinition;
|
|
40
|
-
declare const BLOG_POST_DEFINITION: PageDefinition;
|
|
41
|
-
declare const PATCH_NOTE_DEFINITION: PageDefinition;
|
|
42
|
-
declare const LOCATION_DEFINITION: PageDefinition;
|
|
43
|
-
declare const SPECIES_DEFINITION: PageDefinition;
|
|
44
|
-
declare const CHARACTER_DEFINITION: PageDefinition;
|
|
45
|
-
declare const SKILL_DEFINITION: PageDefinition;
|
|
46
|
-
declare const ITEM_DEFINITION: PageDefinition;
|
|
47
|
-
declare const OBJECT_DEFINITION: PageDefinition;
|
|
48
|
-
declare const GROUP_DEFINITION: PageDefinition;
|
|
49
|
-
declare const HERO_DEFINITION: PageDefinition;
|
|
50
|
-
declare const CARD_DEFINITION: PageDefinition;
|
|
51
|
-
declare const SERIES_DEFINITION: PageDefinition;
|
|
52
|
-
declare const PAGE_MAP: Record<string, PageDefinition>;
|
|
53
|
-
declare function getPageDefinition(type: string): PageDefinition;
|
|
38
|
+
export declare function definePageDefinition(def: PageDefinition): PageDefinition;
|
|
39
|
+
export declare const DOCUMENT_DEFINITION: PageDefinition;
|
|
40
|
+
export declare const BLOG_POST_DEFINITION: PageDefinition;
|
|
41
|
+
export declare const PATCH_NOTE_DEFINITION: PageDefinition;
|
|
42
|
+
export declare const LOCATION_DEFINITION: PageDefinition;
|
|
43
|
+
export declare const SPECIES_DEFINITION: PageDefinition;
|
|
44
|
+
export declare const CHARACTER_DEFINITION: PageDefinition;
|
|
45
|
+
export declare const SKILL_DEFINITION: PageDefinition;
|
|
46
|
+
export declare const ITEM_DEFINITION: PageDefinition;
|
|
47
|
+
export declare const OBJECT_DEFINITION: PageDefinition;
|
|
48
|
+
export declare const GROUP_DEFINITION: PageDefinition;
|
|
49
|
+
export declare const HERO_DEFINITION: PageDefinition;
|
|
50
|
+
export declare const CARD_DEFINITION: PageDefinition;
|
|
51
|
+
export declare const SERIES_DEFINITION: PageDefinition;
|
|
52
|
+
export declare const PAGE_MAP: Record<string, PageDefinition>;
|
|
53
|
+
export declare function getPageDefinition(type: string): PageDefinition;
|
|
54
54
|
//#endregion
|
|
55
55
|
//#region src/markdown/serializer.d.ts
|
|
56
|
-
declare function inlinesToMarkdown(inlines: InlineNode[] | {
|
|
56
|
+
export declare function inlinesToMarkdown(inlines: InlineNode[] | {
|
|
57
57
|
en?: string;
|
|
58
58
|
} | string | undefined): string;
|
|
59
|
-
declare function blocksToMarkdown(blocks?: BaseBlock[], options?: {
|
|
59
|
+
export declare function blocksToMarkdown(blocks?: BaseBlock[], options?: {
|
|
60
60
|
sectionLevel?: number;
|
|
61
61
|
}): string;
|
|
62
62
|
//#endregion
|
|
63
63
|
//#region src/core/registry.d.ts
|
|
64
|
-
interface BlockDefinition {
|
|
64
|
+
export interface BlockDefinition {
|
|
65
65
|
type: string;
|
|
66
66
|
label: string;
|
|
67
67
|
description?: string;
|
|
68
68
|
defaultProps: Record<string, any>;
|
|
69
69
|
allowChildren?: boolean;
|
|
70
70
|
}
|
|
71
|
-
declare const BlockRegistry: {
|
|
71
|
+
export declare const BlockRegistry: {
|
|
72
72
|
register(def: BlockDefinition): void;
|
|
73
73
|
get(type: string): BlockDefinition | undefined;
|
|
74
74
|
getAll(): BlockDefinition[];
|
|
75
75
|
};
|
|
76
76
|
//#endregion
|
|
77
77
|
//#region src/core/validator.d.ts
|
|
78
|
-
declare function isValidUUID(uuid: string): boolean;
|
|
79
|
-
declare function validateBlockAST(blocks: BaseBlock[]): {
|
|
78
|
+
export declare function isValidUUID(uuid: string): boolean;
|
|
79
|
+
export declare function validateBlockAST(blocks: BaseBlock[]): {
|
|
80
80
|
valid: boolean;
|
|
81
81
|
errors: string[];
|
|
82
82
|
};
|
|
83
83
|
//#endregion
|
|
84
84
|
//#region src/auth/permissions.d.ts
|
|
85
|
-
declare const cmsStatements: {
|
|
85
|
+
export declare const cmsStatements: {
|
|
86
86
|
readonly page: readonly ["create", "read", "update", "delete", "publish", "approve"];
|
|
87
87
|
readonly template: readonly ["create", "read", "update", "delete", "instantiate"];
|
|
88
88
|
readonly draft: readonly ["checkout", "edit", "release", "force_unlock"];
|
|
89
89
|
readonly version: readonly ["create", "review", "approve", "publish"];
|
|
90
90
|
};
|
|
91
|
-
declare const cmsAc: {
|
|
91
|
+
export declare const cmsAc: {
|
|
92
92
|
readonly page: {
|
|
93
93
|
readonly read: readonly ["admin", "editor"];
|
|
94
94
|
readonly update: readonly ["admin", "editor"];
|
|
@@ -125,54 +125,54 @@ interface UserSessionContext$1 {
|
|
|
125
125
|
/**
|
|
126
126
|
* Pure immutable function for Astro SSR Reader. Returns new array; never mutates input AST
|
|
127
127
|
*/
|
|
128
|
-
declare function filterBlocksForReader(blocks: BaseBlock[], session?: UserSessionContext$1): BaseBlock[];
|
|
128
|
+
export declare function filterBlocksForReader(blocks: BaseBlock[], session?: UserSessionContext$1): BaseBlock[];
|
|
129
129
|
//#endregion
|
|
130
130
|
//#region src/auth/editor-guards.d.ts
|
|
131
131
|
/**
|
|
132
132
|
* Checks if a user has edit rights over a specific block
|
|
133
133
|
*/
|
|
134
|
-
declare function canUserEditBlock(block: BaseBlock, session?: UserSessionContext$1): boolean;
|
|
134
|
+
export declare function canUserEditBlock(block: BaseBlock, session?: UserSessionContext$1): boolean;
|
|
135
135
|
/**
|
|
136
136
|
* Recursively checks if a block or ANY of its descendants are locked or un-editable
|
|
137
137
|
*/
|
|
138
|
-
declare function hasLockedDescendants(block: BaseBlock, session?: UserSessionContext$1): boolean;
|
|
138
|
+
export declare function hasLockedDescendants(block: BaseBlock, session?: UserSessionContext$1): boolean;
|
|
139
139
|
/**
|
|
140
140
|
* Server-Side Guard: Validates that an incoming edited block tree obeys templated & authorization
|
|
141
141
|
* invariants
|
|
142
142
|
*/
|
|
143
|
-
declare function validateServerBlockPayload(existingTree: BaseBlock[], incomingTree: BaseBlock[], session?: UserSessionContext$1): {
|
|
143
|
+
export declare function validateServerBlockPayload(existingTree: BaseBlock[], incomingTree: BaseBlock[], session?: UserSessionContext$1): {
|
|
144
144
|
valid: boolean;
|
|
145
145
|
reason?: string;
|
|
146
146
|
};
|
|
147
147
|
//#endregion
|
|
148
148
|
//#region src/auth/filter-templates.d.ts
|
|
149
|
-
declare function canUserCreateFromTemplate(template: PageTemplate, session?: UserSessionContext$1): boolean;
|
|
150
|
-
declare function canUserEditFromTemplate(template: PageTemplate, session?: UserSessionContext$1): boolean;
|
|
151
|
-
declare function canUserReviewFromTemplate(template: PageTemplate, session?: UserSessionContext$1): boolean;
|
|
152
|
-
declare function canUserViewFromTemplate(template: PageTemplate, session?: UserSessionContext$1): boolean;
|
|
153
|
-
declare function canUserInstantiateTemplate(template: PageTemplate, session?: UserSessionContext$1): boolean;
|
|
154
|
-
declare function filterTemplatesForUser(templates: PageTemplate[], session?: UserSessionContext$1): PageTemplate[];
|
|
149
|
+
export declare function canUserCreateFromTemplate(template: PageTemplate, session?: UserSessionContext$1): boolean;
|
|
150
|
+
export declare function canUserEditFromTemplate(template: PageTemplate, session?: UserSessionContext$1): boolean;
|
|
151
|
+
export declare function canUserReviewFromTemplate(template: PageTemplate, session?: UserSessionContext$1): boolean;
|
|
152
|
+
export declare function canUserViewFromTemplate(template: PageTemplate, session?: UserSessionContext$1): boolean;
|
|
153
|
+
export declare function canUserInstantiateTemplate(template: PageTemplate, session?: UserSessionContext$1): boolean;
|
|
154
|
+
export declare function filterTemplatesForUser(templates: PageTemplate[], session?: UserSessionContext$1): PageTemplate[];
|
|
155
155
|
//#endregion
|
|
156
156
|
//#region src/cache/purge.d.ts
|
|
157
|
-
interface CachePurgeOptions {
|
|
157
|
+
export interface CachePurgeOptions {
|
|
158
158
|
slug: string;
|
|
159
159
|
locales: string[];
|
|
160
160
|
domain?: string;
|
|
161
161
|
basePath?: string;
|
|
162
162
|
isEnterpriseCloudflare?: boolean;
|
|
163
163
|
}
|
|
164
|
-
declare function invalidatePageCache(options: CachePurgeOptions): Promise<boolean>;
|
|
164
|
+
export declare function invalidatePageCache(options: CachePurgeOptions): Promise<boolean>;
|
|
165
165
|
//#endregion
|
|
166
166
|
//#region src/search/query.d.ts
|
|
167
|
-
declare const POSTGRES_SEARCH_CONFIGS: Record<string, string>;
|
|
168
|
-
declare function getPostgresSearchConfig(locale: string): string;
|
|
167
|
+
export declare const POSTGRES_SEARCH_CONFIGS: Record<string, string>;
|
|
168
|
+
export declare function getPostgresSearchConfig(locale: string): string;
|
|
169
169
|
//#endregion
|
|
170
170
|
//#region src/core/excerpt.d.ts
|
|
171
171
|
/**
|
|
172
172
|
* Recursively extracts plain text from an array of CMS blocks.
|
|
173
173
|
*/
|
|
174
|
-
declare function extractTextFromBlocks(blocks: BaseBlock[] | undefined | null, locale?: string): string;
|
|
175
|
-
interface ExcerptOptions {
|
|
174
|
+
export declare function extractTextFromBlocks(blocks: BaseBlock[] | undefined | null, locale?: string): string;
|
|
175
|
+
export interface ExcerptOptions {
|
|
176
176
|
maxLength?: number;
|
|
177
177
|
locale?: string;
|
|
178
178
|
fallback?: string;
|
|
@@ -180,26 +180,26 @@ interface ExcerptOptions {
|
|
|
180
180
|
/**
|
|
181
181
|
* Generates an SEO / RSS safe plain text excerpt from a CMS page or block payload.
|
|
182
182
|
*/
|
|
183
|
-
declare function createPageExcerpt(page: {
|
|
183
|
+
export declare function createPageExcerpt(page: {
|
|
184
184
|
description?: unknown;
|
|
185
185
|
content?: unknown;
|
|
186
186
|
title?: unknown;
|
|
187
187
|
} | null | undefined, options?: ExcerptOptions): string;
|
|
188
188
|
//#endregion
|
|
189
189
|
//#region src/services/site-settings.d.ts
|
|
190
|
-
declare const DEFAULT_SITE_SETTINGS: InsertSiteSettings;
|
|
190
|
+
export declare const DEFAULT_SITE_SETTINGS: InsertSiteSettings;
|
|
191
191
|
/**
|
|
192
192
|
* Retrieves the dynamic site settings from the database. If no settings are found, seeds the
|
|
193
193
|
* default record and returns it.
|
|
194
194
|
*/
|
|
195
|
-
declare function getSiteSettings(db: any, fallbackDefaults?: Partial<InsertSiteSettings>): Promise<SiteSettings>;
|
|
195
|
+
export declare function getSiteSettings(db: any, fallbackDefaults?: Partial<InsertSiteSettings>): Promise<SiteSettings>;
|
|
196
196
|
/**
|
|
197
197
|
* Updates dynamic site settings in the database.
|
|
198
198
|
*/
|
|
199
|
-
declare function updateSiteSettings(db: any, updates: Partial<InsertSiteSettings>, id?: string): Promise<SiteSettings>;
|
|
199
|
+
export declare function updateSiteSettings(db: any, updates: Partial<InsertSiteSettings>, id?: string): Promise<SiteSettings>;
|
|
200
200
|
//#endregion
|
|
201
201
|
//#region src/loader/live.d.ts
|
|
202
|
-
interface CmsLoaderOptions {
|
|
202
|
+
export interface CmsLoaderOptions {
|
|
203
203
|
type?: PageType | undefined;
|
|
204
204
|
db?: any;
|
|
205
205
|
locale?: string | undefined;
|
|
@@ -211,7 +211,7 @@ interface CmsLoaderOptions {
|
|
|
211
211
|
[key: string]: string | undefined;
|
|
212
212
|
} | undefined;
|
|
213
213
|
}
|
|
214
|
-
interface CmsPageData {
|
|
214
|
+
export interface CmsPageData {
|
|
215
215
|
id: string;
|
|
216
216
|
slug: string;
|
|
217
217
|
type: PageType;
|
|
@@ -229,11 +229,11 @@ interface CmsPageData {
|
|
|
229
229
|
createdAt: Date;
|
|
230
230
|
updatedAt: Date | null;
|
|
231
231
|
}
|
|
232
|
-
interface CmsEntry {
|
|
232
|
+
export interface CmsEntry {
|
|
233
233
|
id: string;
|
|
234
234
|
data: CmsPageData;
|
|
235
235
|
}
|
|
236
|
-
interface CacheHint {
|
|
236
|
+
export interface CacheHint {
|
|
237
237
|
tags?: string[];
|
|
238
238
|
lastModified?: Date;
|
|
239
239
|
maxAge?: number;
|
|
@@ -241,7 +241,7 @@ interface CacheHint {
|
|
|
241
241
|
/**
|
|
242
242
|
* Direct querying helper for CMS collections.
|
|
243
243
|
*/
|
|
244
|
-
declare function getCmsCollection(db: any, options?: CmsLoaderOptions & {
|
|
244
|
+
export declare function getCmsCollection(db: any, options?: CmsLoaderOptions & {
|
|
245
245
|
limit?: number | undefined;
|
|
246
246
|
offset?: number | undefined;
|
|
247
247
|
where?: SQL | undefined;
|
|
@@ -252,7 +252,7 @@ declare function getCmsCollection(db: any, options?: CmsLoaderOptions & {
|
|
|
252
252
|
/**
|
|
253
253
|
* Direct querying helper for a single CMS entry by slug or id.
|
|
254
254
|
*/
|
|
255
|
-
declare function getCmsEntry(db: any, slugOrId: string, options?: CmsLoaderOptions): Promise<{
|
|
255
|
+
export declare function getCmsEntry(db: any, slugOrId: string, options?: CmsLoaderOptions): Promise<{
|
|
256
256
|
entry: CmsEntry | null;
|
|
257
257
|
cacheHint: CacheHint;
|
|
258
258
|
}>;
|
|
@@ -260,7 +260,7 @@ declare function getCmsEntry(db: any, slugOrId: string, options?: CmsLoaderOptio
|
|
|
260
260
|
* Astro Live Loader for CMS collections. Use inside src/live.config.ts with defineLiveCollection({
|
|
261
261
|
* loader: rimelightCmsLoader({ type: 'blog' }) })
|
|
262
262
|
*/
|
|
263
|
-
declare function rimelightCmsLoader(loaderOptions?: CmsLoaderOptions): {
|
|
263
|
+
export declare function rimelightCmsLoader(loaderOptions?: CmsLoaderOptions): {
|
|
264
264
|
name: string;
|
|
265
265
|
loadCollection: (context: {
|
|
266
266
|
filter?: {
|
|
@@ -285,7 +285,7 @@ declare function rimelightCmsLoader(loaderOptions?: CmsLoaderOptions): {
|
|
|
285
285
|
};
|
|
286
286
|
//#endregion
|
|
287
287
|
//#region src/cron/scheduled.d.ts
|
|
288
|
-
interface CmsCronResult {
|
|
288
|
+
export interface CmsCronResult {
|
|
289
289
|
expiredLocksCleaned: number;
|
|
290
290
|
scheduledPagesActive: number;
|
|
291
291
|
timestamp: string;
|
|
@@ -296,10 +296,10 @@ interface CmsCronResult {
|
|
|
296
296
|
* - Cleans up expired page draft locks
|
|
297
297
|
* - Checks for active scheduled pages
|
|
298
298
|
*/
|
|
299
|
-
declare function handleCmsCron(_event: any, _env: any, _ctx: any, db: any): Promise<CmsCronResult>;
|
|
299
|
+
export declare function handleCmsCron(_event: any, _env: any, _ctx: any, db: any): Promise<CmsCronResult>;
|
|
300
300
|
//#endregion
|
|
301
301
|
//#region src/mcp/index.d.ts
|
|
302
|
-
declare const CMS_MCP_TOOLS: ({
|
|
302
|
+
export declare const CMS_MCP_TOOLS: ({
|
|
303
303
|
name: string;
|
|
304
304
|
description: string;
|
|
305
305
|
inputSchema: {
|
|
@@ -454,7 +454,7 @@ declare const CMS_MCP_TOOLS: ({
|
|
|
454
454
|
/**
|
|
455
455
|
* Handles Model Context Protocol (MCP) JSON-RPC requests for CMS tools.
|
|
456
456
|
*/
|
|
457
|
-
declare function handleCmsMcpRequest(body: {
|
|
457
|
+
export declare function handleCmsMcpRequest(body: {
|
|
458
458
|
jsonrpc?: string;
|
|
459
459
|
id?: string | number;
|
|
460
460
|
method: string;
|
|
@@ -465,23 +465,23 @@ declare function handleCmsMcpRequest(body: {
|
|
|
465
465
|
/**
|
|
466
466
|
* Returns all active (non-deleted) bylines.
|
|
467
467
|
*/
|
|
468
|
-
declare function getBylines(db: any): Promise<Byline[]>;
|
|
468
|
+
export declare function getBylines(db: any): Promise<Byline[]>;
|
|
469
469
|
/**
|
|
470
470
|
* Retrieves a single byline by ID or slug.
|
|
471
471
|
*/
|
|
472
|
-
declare function getByline(db: any, idOrSlug: string): Promise<Byline | null>;
|
|
472
|
+
export declare function getByline(db: any, idOrSlug: string): Promise<Byline | null>;
|
|
473
473
|
/**
|
|
474
474
|
* Creates a new byline.
|
|
475
475
|
*/
|
|
476
|
-
declare function createByline(db: any, data: NewByline): Promise<Byline>;
|
|
476
|
+
export declare function createByline(db: any, data: NewByline): Promise<Byline>;
|
|
477
477
|
/**
|
|
478
478
|
* Updates an existing byline.
|
|
479
479
|
*/
|
|
480
|
-
declare function updateByline(db: any, id: string, data: Partial<NewByline>): Promise<Byline | null>;
|
|
480
|
+
export declare function updateByline(db: any, id: string, data: Partial<NewByline>): Promise<Byline | null>;
|
|
481
481
|
/**
|
|
482
482
|
* Soft deletes a byline.
|
|
483
483
|
*/
|
|
484
|
-
declare function deleteByline(db: any, id: string): Promise<boolean>;
|
|
484
|
+
export declare function deleteByline(db: any, id: string): Promise<boolean>;
|
|
485
485
|
//#endregion
|
|
486
486
|
//#region src/core/preview.d.ts
|
|
487
487
|
/**
|
|
@@ -490,18 +490,18 @@ declare function deleteByline(db: any, id: string): Promise<boolean>;
|
|
|
490
490
|
/**
|
|
491
491
|
* Generates a signed token for a page ID valid for ttlSeconds (default 24h).
|
|
492
492
|
*/
|
|
493
|
-
declare function generatePreviewToken(pageId: string, secret: string, ttlSeconds?: number): Promise<{
|
|
493
|
+
export declare function generatePreviewToken(pageId: string, secret: string, ttlSeconds?: number): Promise<{
|
|
494
494
|
token: string;
|
|
495
495
|
expiresAt: number;
|
|
496
496
|
}>;
|
|
497
497
|
/**
|
|
498
498
|
* Verifies a signed preview token against a pageId and secret.
|
|
499
499
|
*/
|
|
500
|
-
declare function verifyPreviewToken(pageId: string, token: string, secret: string): Promise<boolean>;
|
|
500
|
+
export declare function verifyPreviewToken(pageId: string, token: string, secret: string): Promise<boolean>;
|
|
501
501
|
//#endregion
|
|
502
502
|
//#region src/core/diff.d.ts
|
|
503
|
-
type DiffChangeType = "added" | "removed" | "modified" | "unchanged";
|
|
504
|
-
interface BlockDiff {
|
|
503
|
+
export type DiffChangeType = "added" | "removed" | "modified" | "unchanged";
|
|
504
|
+
export interface BlockDiff {
|
|
505
505
|
blockId: string;
|
|
506
506
|
type: string;
|
|
507
507
|
status: DiffChangeType;
|
|
@@ -513,7 +513,7 @@ interface BlockDiff {
|
|
|
513
513
|
newValue: any;
|
|
514
514
|
}[];
|
|
515
515
|
}
|
|
516
|
-
interface PageVersionDiff {
|
|
516
|
+
export interface PageVersionDiff {
|
|
517
517
|
blocks: BlockDiff[];
|
|
518
518
|
metaChanges: {
|
|
519
519
|
field: string;
|
|
@@ -530,21 +530,21 @@ interface PageVersionDiff {
|
|
|
530
530
|
/**
|
|
531
531
|
* Calculates a detailed diff between an old list of blocks and a new list of blocks.
|
|
532
532
|
*/
|
|
533
|
-
declare function diffBlocks(oldBlocks?: BaseBlock[], newBlocks?: BaseBlock[]): BlockDiff[];
|
|
533
|
+
export declare function diffBlocks(oldBlocks?: BaseBlock[], newBlocks?: BaseBlock[]): BlockDiff[];
|
|
534
534
|
/**
|
|
535
535
|
* Compares two page snapshots (metadata + content blocks).
|
|
536
536
|
*/
|
|
537
|
-
declare function diffPageSnapshots(oldSnapshot: any, newSnapshot: any): PageVersionDiff;
|
|
537
|
+
export declare function diffPageSnapshots(oldSnapshot: any, newSnapshot: any): PageVersionDiff;
|
|
538
538
|
//#endregion
|
|
539
539
|
//#region src/services/search-indexer.d.ts
|
|
540
|
-
declare function indexPageForSearch(db: any, page: {
|
|
540
|
+
export declare function indexPageForSearch(db: any, page: {
|
|
541
541
|
id: string;
|
|
542
542
|
title: any;
|
|
543
543
|
content: any;
|
|
544
544
|
}, locales?: string[]): Promise<void>;
|
|
545
545
|
//#endregion
|
|
546
546
|
//#region src/core/types/taxonomies.d.ts
|
|
547
|
-
interface TaxonomyTerm {
|
|
547
|
+
export interface TaxonomyTerm {
|
|
548
548
|
id: string;
|
|
549
549
|
taxonomy: string;
|
|
550
550
|
slug: string;
|
|
@@ -557,7 +557,7 @@ interface TaxonomyTerm {
|
|
|
557
557
|
createdAt?: Date;
|
|
558
558
|
updatedAt?: Date;
|
|
559
559
|
}
|
|
560
|
-
interface TaxonomyQueryOptions {
|
|
560
|
+
export interface TaxonomyQueryOptions {
|
|
561
561
|
includeCounts?: boolean;
|
|
562
562
|
locale?: string;
|
|
563
563
|
}
|
|
@@ -567,19 +567,19 @@ interface TaxonomyQueryOptions {
|
|
|
567
567
|
* Retrieves all terms for a given taxonomy. If hierarchical, returns a tree structure with
|
|
568
568
|
* `children: TaxonomyTerm[]`.
|
|
569
569
|
*/
|
|
570
|
-
declare function getTaxonomyTerms(db: any, taxonomy: string, options?: TaxonomyQueryOptions): Promise<TaxonomyTerm[]>;
|
|
570
|
+
export declare function getTaxonomyTerms(db: any, taxonomy: string, options?: TaxonomyQueryOptions): Promise<TaxonomyTerm[]>;
|
|
571
571
|
/**
|
|
572
572
|
* Retrieves a single term by taxonomy and slug.
|
|
573
573
|
*/
|
|
574
|
-
declare function getTerm(db: any, taxonomy: string, slug: string): Promise<TaxonomyTerm | null>;
|
|
574
|
+
export declare function getTerm(db: any, taxonomy: string, slug: string): Promise<TaxonomyTerm | null>;
|
|
575
575
|
/**
|
|
576
576
|
* Retrieves all terms assigned to a specific page entry.
|
|
577
577
|
*/
|
|
578
|
-
declare function getEntryTerms(db: any, pageId: string, taxonomy?: string): Promise<TaxonomyTerm[]>;
|
|
578
|
+
export declare function getEntryTerms(db: any, pageId: string, taxonomy?: string): Promise<TaxonomyTerm[]>;
|
|
579
579
|
/**
|
|
580
580
|
* Retrieves pages tagged with a given taxonomy term.
|
|
581
581
|
*/
|
|
582
|
-
declare function getEntriesByTerm(db: any, taxonomy: string, slug: string, options?: {
|
|
582
|
+
export declare function getEntriesByTerm(db: any, taxonomy: string, slug: string, options?: {
|
|
583
583
|
limit?: number;
|
|
584
584
|
offset?: number;
|
|
585
585
|
type?: string;
|
|
@@ -595,11 +595,11 @@ declare function getEntriesByTerm(db: any, taxonomy: string, slug: string, optio
|
|
|
595
595
|
/**
|
|
596
596
|
* Sets/syncs the assigned terms for a page within a specific taxonomy.
|
|
597
597
|
*/
|
|
598
|
-
declare function assignEntryTerms(db: any, pageId: string, taxonomy: string, termIds: string[]): Promise<void>;
|
|
598
|
+
export declare function assignEntryTerms(db: any, pageId: string, taxonomy: string, termIds: string[]): Promise<void>;
|
|
599
599
|
/**
|
|
600
600
|
* Creates a new taxonomy term.
|
|
601
601
|
*/
|
|
602
|
-
declare function createTerm(db: any, data: {
|
|
602
|
+
export declare function createTerm(db: any, data: {
|
|
603
603
|
taxonomy: string;
|
|
604
604
|
slug: string;
|
|
605
605
|
label: any;
|
|
@@ -610,7 +610,7 @@ declare function createTerm(db: any, data: {
|
|
|
610
610
|
/**
|
|
611
611
|
* Updates an existing taxonomy term.
|
|
612
612
|
*/
|
|
613
|
-
declare function updateTerm(db: any, id: string, updates: Partial<{
|
|
613
|
+
export declare function updateTerm(db: any, id: string, updates: Partial<{
|
|
614
614
|
slug: string;
|
|
615
615
|
label: any;
|
|
616
616
|
description: any;
|
|
@@ -620,19 +620,19 @@ declare function updateTerm(db: any, id: string, updates: Partial<{
|
|
|
620
620
|
/**
|
|
621
621
|
* Deletes a taxonomy term.
|
|
622
622
|
*/
|
|
623
|
-
declare function deleteTerm(db: any, id: string): Promise<{
|
|
623
|
+
export declare function deleteTerm(db: any, id: string): Promise<{
|
|
624
624
|
success: boolean;
|
|
625
625
|
}>;
|
|
626
626
|
//#endregion
|
|
627
627
|
//#region src/docs/config.d.ts
|
|
628
|
-
interface EditLinkConfig {
|
|
628
|
+
export interface EditLinkConfig {
|
|
629
629
|
baseUrl: string;
|
|
630
630
|
}
|
|
631
|
-
interface TableOfContentsConfig {
|
|
631
|
+
export interface TableOfContentsConfig {
|
|
632
632
|
minHeadingLevel?: number;
|
|
633
633
|
maxHeadingLevel?: number;
|
|
634
634
|
}
|
|
635
|
-
interface DocsConfig {
|
|
635
|
+
export interface DocsConfig {
|
|
636
636
|
basePath?: string;
|
|
637
637
|
sidebar: (SidebarItem | SidebarScope)[] | {
|
|
638
638
|
scopes: SidebarScope[];
|
|
@@ -640,10 +640,10 @@ interface DocsConfig {
|
|
|
640
640
|
editLink?: EditLinkConfig;
|
|
641
641
|
tableOfContents?: false | TableOfContentsConfig;
|
|
642
642
|
}
|
|
643
|
-
declare const defineDocsConfig: <const T extends DocsConfig>(config: T) => T;
|
|
643
|
+
export declare const defineDocsConfig: <const T extends DocsConfig>(config: T) => T;
|
|
644
644
|
//#endregion
|
|
645
645
|
//#region src/docs/sidebar.d.ts
|
|
646
|
-
interface ResolvedSidebarItem {
|
|
646
|
+
export interface ResolvedSidebarItem {
|
|
647
647
|
label: string;
|
|
648
648
|
href?: string | undefined;
|
|
649
649
|
icon?: string | undefined;
|
|
@@ -652,19 +652,19 @@ interface ResolvedSidebarItem {
|
|
|
652
652
|
children?: ResolvedSidebarItem[] | undefined;
|
|
653
653
|
collapsed?: boolean | undefined;
|
|
654
654
|
}
|
|
655
|
-
interface ResolvedScope {
|
|
655
|
+
export interface ResolvedScope {
|
|
656
656
|
id: string;
|
|
657
657
|
label: string;
|
|
658
658
|
href: string;
|
|
659
659
|
icon?: string | undefined;
|
|
660
660
|
active?: boolean | undefined;
|
|
661
661
|
}
|
|
662
|
-
declare function getDocsSidebar(config: DocsConfig, locale: string, currentPath: string, activeVersion?: string, includeVersionInUrl?: boolean): Promise<{
|
|
662
|
+
export declare function getDocsSidebar(config: DocsConfig, locale: string, currentPath: string, activeVersion?: string, includeVersionInUrl?: boolean): Promise<{
|
|
663
663
|
items: ResolvedSidebarItem[];
|
|
664
664
|
scopes: ResolvedScope[];
|
|
665
665
|
activeScope?: ResolvedScope | undefined;
|
|
666
666
|
}>;
|
|
667
|
-
declare function getSurroundItems(sidebar: ResolvedSidebarItem[], currentPath: string): {
|
|
667
|
+
export declare function getSurroundItems(sidebar: ResolvedSidebarItem[], currentPath: string): {
|
|
668
668
|
prev: {
|
|
669
669
|
label: string;
|
|
670
670
|
href: string;
|
|
@@ -676,32 +676,32 @@ declare function getSurroundItems(sidebar: ResolvedSidebarItem[], currentPath: s
|
|
|
676
676
|
};
|
|
677
677
|
//#endregion
|
|
678
678
|
//#region src/docs/routing.d.ts
|
|
679
|
-
interface DocEntry {
|
|
679
|
+
export interface DocEntry {
|
|
680
680
|
id?: string;
|
|
681
681
|
slug?: string;
|
|
682
682
|
version?: string;
|
|
683
683
|
properties?: Record<string, any>;
|
|
684
684
|
[key: string]: any;
|
|
685
685
|
}
|
|
686
|
-
declare function getDocsVersions(entries: (DocEntry | string)[], locale?: string): string[];
|
|
687
|
-
declare function parseDocsSlug(slug: string | undefined, versions: string[]): {
|
|
686
|
+
export declare function getDocsVersions(entries: (DocEntry | string)[], locale?: string): string[];
|
|
687
|
+
export declare function parseDocsSlug(slug: string | undefined, versions: string[]): {
|
|
688
688
|
activeVersion: string | undefined;
|
|
689
689
|
contentPath: string;
|
|
690
690
|
includeVersionInUrl: boolean;
|
|
691
691
|
};
|
|
692
|
-
declare function formatDocsUrl(href: string, locale: string, activeVersion?: string, includeVersionInUrl?: boolean): string;
|
|
692
|
+
export declare function formatDocsUrl(href: string, locale: string, activeVersion?: string, includeVersionInUrl?: boolean): string;
|
|
693
693
|
//#endregion
|
|
694
694
|
//#region src/docs/toc.d.ts
|
|
695
|
-
interface TableOfContentsHeading {
|
|
695
|
+
export interface TableOfContentsHeading {
|
|
696
696
|
depth: number;
|
|
697
697
|
slug: string;
|
|
698
698
|
text: string;
|
|
699
699
|
}
|
|
700
|
-
declare function slugifyHeading(text: string): string;
|
|
701
|
-
declare function extractHeadingsFromBlocks(blocks?: any[], currentDepth?: number): TableOfContentsHeading[];
|
|
700
|
+
export declare function slugifyHeading(text: string): string;
|
|
701
|
+
export declare function extractHeadingsFromBlocks(blocks?: any[], currentDepth?: number): TableOfContentsHeading[];
|
|
702
702
|
//#endregion
|
|
703
703
|
//#region src/docs/agent.d.ts
|
|
704
|
-
interface AgentMarkdownOptions {
|
|
704
|
+
export interface AgentMarkdownOptions {
|
|
705
705
|
siteUrl?: string;
|
|
706
706
|
llmsUrl?: string;
|
|
707
707
|
sourceUrl?: string;
|
|
@@ -709,11 +709,11 @@ interface AgentMarkdownOptions {
|
|
|
709
709
|
/**
|
|
710
710
|
* Renders a CMS page record into clean, agent-ready Markdown with YAML frontmatter.
|
|
711
711
|
*/
|
|
712
|
-
declare function renderPageAsMarkdown(page: any, locale?: string, options?: AgentMarkdownOptions): string;
|
|
712
|
+
export declare function renderPageAsMarkdown(page: any, locale?: string, options?: AgentMarkdownOptions): string;
|
|
713
713
|
/**
|
|
714
714
|
* Collate all published pages of a given type into a single corpus markdown document.
|
|
715
715
|
*/
|
|
716
|
-
declare function renderCorpusMarkdown(db: any, options?: {
|
|
716
|
+
export declare function renderCorpusMarkdown(db: any, options?: {
|
|
717
717
|
type?: string;
|
|
718
718
|
locale?: string;
|
|
719
719
|
siteUrl?: string;
|
|
@@ -721,4 +721,4 @@ declare function renderCorpusMarkdown(db: any, options?: {
|
|
|
721
721
|
description?: string;
|
|
722
722
|
}): Promise<string>;
|
|
723
723
|
//#endregion
|
|
724
|
-
export { ALLOWED_CHILDREN_MAP,
|
|
724
|
+
export { ALLOWED_CHILDREN_MAP, ApiDocumentationBlock, ApiDocumentationBlockProps, type AuthAdapter, type BadgeProps, BaseBlock, BlockType, Byline, BylineCredit, BylineRole, CalloutBlock, CalloutBlockProps, CalloutVariant, CardBlock, CardBlockProps, CardsBlock, CardsBlockProps, type CmsAuthAdapter, CodeBlock, CodeBlockProps, ComponentShowcaseBlock, ComponentShowcaseBlockProps, DialogueBlock, DialogueBlockProps, FileTreeBlock, FileTreeBlockProps, FileTreeNode, HeadingLevel, ImageBlock, ImageBlockProps, InlineNode, InlineNodeType, InsertSiteSettings, LinkInlineNode, LivePreviewBlock, LivePreviewBlockProps, Localized, MAX_SECTION_DEPTH, MAX_SECTION_HEADING_LEVEL, MIN_SECTION_HEADING_LEVEL, MediaValue, NewByline, PageContent, PageMentionNode, PageMetadata, PageTemplate, PageType, PageVersion, PageVersionApproval, PageVersionComment, PageVersionStatus, ParagraphBlock, ParagraphBlockProps, R2StorageOptions, RegisterPageTypes, type RimelightCmsOptions, SceneBlock, SceneBlockProps, ScriptBlock, ScriptBlockProps, SectionBlock, SectionBlockProps, Setting, type SidebarItem, type SidebarScope, SiteSettings, SiteSettingsBranding, SiteSettingsSeo, StepItemBlock, StepItemBlockProps, StepsBlock, StepsBlockProps, StorageConfig, StorageFile, StorageListOptions, StorageListResult, StorageUploadOptions, TabItemBlock, TabItemBlockProps, TableBlock, TableBlockProps, TableColumnDef, TabsBlock, TabsBlockProps, TemplateApprovalRules, TemplateRolePermissions, TextInlineNode, TimeOfDay, type Toast, type ToastInput, type ToastItem, Transition, TypedBlock, TypedSceneBlockProps, TypedScriptBlockProps, UserSessionContext, type UserType, addToast, auth0Auth, bylines, calculateHeadingLevel, cfAccessAuth, clearToasts, contentSearchIndex, deleteR2File, evaluateAccess, getR2Bucket, hasPermission, hasRole, listR2Files, mockAuth, pageDraftLocks, pageDrafts, pageTaxonomyTerms, pageTemplates, pageVersionApprovals, pageVersionComments, pageVersions, pages, r2, removeToast, rimelightCms, showErrorToast, showSuccessToast, siteSettings, taxonomyTerms, toast, toasts, uploadR2File };
|
package/dist/integration.d.mts
CHANGED
|
@@ -2,7 +2,7 @@ import { StorageConfig } from "./storage/index.mjs";
|
|
|
2
2
|
import { AuthAdapter } from "@rimelight/auth";
|
|
3
3
|
import { AstroIntegration } from "astro";
|
|
4
4
|
//#region src/integration.d.ts
|
|
5
|
-
interface RimelightCmsOptions {
|
|
5
|
+
export interface RimelightCmsOptions {
|
|
6
6
|
/**
|
|
7
7
|
* Route prefix for CMS admin pages. Defaults to "/[locale]/cms" (or "/cms" if no locale routing).
|
|
8
8
|
*/
|
|
@@ -28,6 +28,5 @@ interface RimelightCmsOptions {
|
|
|
28
28
|
*/
|
|
29
29
|
auth?: AuthAdapter | string | undefined;
|
|
30
30
|
}
|
|
31
|
-
declare function rimelightCms(options?: RimelightCmsOptions): AstroIntegration;
|
|
32
|
-
//#endregion
|
|
33
|
-
export { RimelightCmsOptions, rimelightCms };
|
|
31
|
+
export declare function rimelightCms(options?: RimelightCmsOptions): AstroIntegration;
|
|
32
|
+
//#endregion
|
package/dist/schema/index.d.mts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { c as TemplateApprovalRules, l as TemplateRolePermissions, o as PageVersionStatus, p as PageType, t as BylineCredit, u as Localized, v as BaseBlock } from "../bylines-Csggkl-g.mjs";
|
|
2
2
|
//#region src/schema/pages.d.ts
|
|
3
|
-
declare const pages: import("drizzle-orm/pg-core").PgTableWithColumns<{
|
|
3
|
+
export declare const pages: import("drizzle-orm/pg-core").PgTableWithColumns<{
|
|
4
4
|
name: "pages";
|
|
5
5
|
schema: undefined;
|
|
6
6
|
columns: {
|
|
@@ -301,7 +301,7 @@ declare const pages: import("drizzle-orm/pg-core").PgTableWithColumns<{
|
|
|
301
301
|
}>;
|
|
302
302
|
//#endregion
|
|
303
303
|
//#region src/schema/page_drafts.d.ts
|
|
304
|
-
declare const pageDrafts: import("drizzle-orm/pg-core").PgTableWithColumns<{
|
|
304
|
+
export declare const pageDrafts: import("drizzle-orm/pg-core").PgTableWithColumns<{
|
|
305
305
|
name: "page_drafts";
|
|
306
306
|
schema: undefined;
|
|
307
307
|
columns: {
|
|
@@ -386,7 +386,7 @@ declare const pageDrafts: import("drizzle-orm/pg-core").PgTableWithColumns<{
|
|
|
386
386
|
}>;
|
|
387
387
|
//#endregion
|
|
388
388
|
//#region src/schema/page_draft_locks.d.ts
|
|
389
|
-
declare const pageDraftLocks: import("drizzle-orm/pg-core").PgTableWithColumns<{
|
|
389
|
+
export declare const pageDraftLocks: import("drizzle-orm/pg-core").PgTableWithColumns<{
|
|
390
390
|
name: "page_draft_locks";
|
|
391
391
|
schema: undefined;
|
|
392
392
|
columns: {
|
|
@@ -480,7 +480,7 @@ declare const pageDraftLocks: import("drizzle-orm/pg-core").PgTableWithColumns<{
|
|
|
480
480
|
}>;
|
|
481
481
|
//#endregion
|
|
482
482
|
//#region src/schema/page_versions.d.ts
|
|
483
|
-
declare const pageVersions: import("drizzle-orm/pg-core").PgTableWithColumns<{
|
|
483
|
+
export declare const pageVersions: import("drizzle-orm/pg-core").PgTableWithColumns<{
|
|
484
484
|
name: "page_versions";
|
|
485
485
|
schema: undefined;
|
|
486
486
|
columns: {
|
|
@@ -802,7 +802,7 @@ declare const pageVersions: import("drizzle-orm/pg-core").PgTableWithColumns<{
|
|
|
802
802
|
}>;
|
|
803
803
|
//#endregion
|
|
804
804
|
//#region src/schema/page_version_comments.d.ts
|
|
805
|
-
declare const pageVersionComments: import("drizzle-orm/pg-core").PgTableWithColumns<{
|
|
805
|
+
export declare const pageVersionComments: import("drizzle-orm/pg-core").PgTableWithColumns<{
|
|
806
806
|
name: "page_version_comments";
|
|
807
807
|
schema: undefined;
|
|
808
808
|
columns: {
|
|
@@ -930,7 +930,7 @@ declare const pageVersionComments: import("drizzle-orm/pg-core").PgTableWithColu
|
|
|
930
930
|
}>;
|
|
931
931
|
//#endregion
|
|
932
932
|
//#region src/schema/page_version_approvals.d.ts
|
|
933
|
-
declare const pageVersionApprovals: import("drizzle-orm/pg-core").PgTableWithColumns<{
|
|
933
|
+
export declare const pageVersionApprovals: import("drizzle-orm/pg-core").PgTableWithColumns<{
|
|
934
934
|
name: "page_version_approvals";
|
|
935
935
|
schema: undefined;
|
|
936
936
|
columns: {
|
|
@@ -1024,7 +1024,7 @@ declare const pageVersionApprovals: import("drizzle-orm/pg-core").PgTableWithCol
|
|
|
1024
1024
|
}>;
|
|
1025
1025
|
//#endregion
|
|
1026
1026
|
//#region src/schema/page_templates.d.ts
|
|
1027
|
-
declare const pageTemplates: import("drizzle-orm/pg-core").PgTableWithColumns<{
|
|
1027
|
+
export declare const pageTemplates: import("drizzle-orm/pg-core").PgTableWithColumns<{
|
|
1028
1028
|
name: "page_templates";
|
|
1029
1029
|
schema: undefined;
|
|
1030
1030
|
columns: {
|
|
@@ -1285,7 +1285,7 @@ declare const pageTemplates: import("drizzle-orm/pg-core").PgTableWithColumns<{
|
|
|
1285
1285
|
}>;
|
|
1286
1286
|
//#endregion
|
|
1287
1287
|
//#region src/schema/search.d.ts
|
|
1288
|
-
declare const contentSearchIndex: import("drizzle-orm/pg-core").PgTableWithColumns<{
|
|
1288
|
+
export declare const contentSearchIndex: import("drizzle-orm/pg-core").PgTableWithColumns<{
|
|
1289
1289
|
name: "content_search_index";
|
|
1290
1290
|
schema: undefined;
|
|
1291
1291
|
columns: {
|
|
@@ -1398,7 +1398,7 @@ declare const contentSearchIndex: import("drizzle-orm/pg-core").PgTableWithColum
|
|
|
1398
1398
|
}>;
|
|
1399
1399
|
//#endregion
|
|
1400
1400
|
//#region src/schema/site_settings.d.ts
|
|
1401
|
-
interface SiteSettingsBranding {
|
|
1401
|
+
export interface SiteSettingsBranding {
|
|
1402
1402
|
logo: {
|
|
1403
1403
|
alt: string;
|
|
1404
1404
|
};
|
|
@@ -1410,13 +1410,13 @@ interface SiteSettingsBranding {
|
|
|
1410
1410
|
backgroundColor: string;
|
|
1411
1411
|
};
|
|
1412
1412
|
}
|
|
1413
|
-
interface SiteSettingsSeo {
|
|
1413
|
+
export interface SiteSettingsSeo {
|
|
1414
1414
|
titleTemplate: string;
|
|
1415
1415
|
ogImageFallback: string;
|
|
1416
1416
|
maxDescriptionLength: number;
|
|
1417
1417
|
authorHandle?: string;
|
|
1418
1418
|
}
|
|
1419
|
-
declare const siteSettings: import("drizzle-orm/pg-core").PgTableWithColumns<{
|
|
1419
|
+
export declare const siteSettings: import("drizzle-orm/pg-core").PgTableWithColumns<{
|
|
1420
1420
|
name: "site_settings";
|
|
1421
1421
|
schema: undefined;
|
|
1422
1422
|
columns: {
|
|
@@ -1614,11 +1614,11 @@ declare const siteSettings: import("drizzle-orm/pg-core").PgTableWithColumns<{
|
|
|
1614
1614
|
};
|
|
1615
1615
|
dialect: "pg";
|
|
1616
1616
|
}>;
|
|
1617
|
-
type SiteSettings = typeof siteSettings.$inferSelect;
|
|
1618
|
-
type InsertSiteSettings = typeof siteSettings.$inferInsert;
|
|
1617
|
+
export type SiteSettings = typeof siteSettings.$inferSelect;
|
|
1618
|
+
export type InsertSiteSettings = typeof siteSettings.$inferInsert;
|
|
1619
1619
|
//#endregion
|
|
1620
1620
|
//#region src/schema/taxonomies.d.ts
|
|
1621
|
-
declare const taxonomyTerms: import("drizzle-orm/pg-core").PgTableWithColumns<{
|
|
1621
|
+
export declare const taxonomyTerms: import("drizzle-orm/pg-core").PgTableWithColumns<{
|
|
1622
1622
|
name: "taxonomy_terms";
|
|
1623
1623
|
schema: undefined;
|
|
1624
1624
|
columns: {
|
|
@@ -1782,7 +1782,7 @@ declare const taxonomyTerms: import("drizzle-orm/pg-core").PgTableWithColumns<{
|
|
|
1782
1782
|
};
|
|
1783
1783
|
dialect: "pg";
|
|
1784
1784
|
}>;
|
|
1785
|
-
declare const pageTaxonomyTerms: import("drizzle-orm/pg-core").PgTableWithColumns<{
|
|
1785
|
+
export declare const pageTaxonomyTerms: import("drizzle-orm/pg-core").PgTableWithColumns<{
|
|
1786
1786
|
name: "page_taxonomy_terms";
|
|
1787
1787
|
schema: undefined;
|
|
1788
1788
|
columns: {
|
|
@@ -1842,7 +1842,7 @@ declare const pageTaxonomyTerms: import("drizzle-orm/pg-core").PgTableWithColumn
|
|
|
1842
1842
|
}>;
|
|
1843
1843
|
//#endregion
|
|
1844
1844
|
//#region src/schema/bylines.d.ts
|
|
1845
|
-
declare const bylines: import("drizzle-orm/pg-core").PgTableWithColumns<{
|
|
1845
|
+
export declare const bylines: import("drizzle-orm/pg-core").PgTableWithColumns<{
|
|
1846
1846
|
name: "bylines";
|
|
1847
1847
|
schema: undefined;
|
|
1848
1848
|
columns: {
|
|
@@ -2057,7 +2057,6 @@ declare const bylines: import("drizzle-orm/pg-core").PgTableWithColumns<{
|
|
|
2057
2057
|
};
|
|
2058
2058
|
dialect: "pg";
|
|
2059
2059
|
}>;
|
|
2060
|
-
type Byline = typeof bylines.$inferSelect;
|
|
2061
|
-
type NewByline = typeof bylines.$inferInsert;
|
|
2062
|
-
//#endregion
|
|
2063
|
-
export { Byline, InsertSiteSettings, NewByline, SiteSettings, SiteSettingsBranding, SiteSettingsSeo, bylines, contentSearchIndex, pageDraftLocks, pageDrafts, pageTaxonomyTerms, pageTemplates, pageVersionApprovals, pageVersionComments, pageVersions, pages, siteSettings, taxonomyTerms };
|
|
2060
|
+
export type Byline = typeof bylines.$inferSelect;
|
|
2061
|
+
export type NewByline = typeof bylines.$inferInsert;
|
|
2062
|
+
//#endregion
|
package/dist/schema/sqlite.d.mts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { c as TemplateApprovalRules, l as TemplateRolePermissions, o as PageVersionStatus, p as PageType, t as BylineCredit, u as Localized, v as BaseBlock } from "../bylines-Csggkl-g.mjs";
|
|
2
2
|
//#region src/schema/sqlite.d.ts
|
|
3
|
-
interface SiteSettingsBranding {
|
|
3
|
+
export interface SiteSettingsBranding {
|
|
4
4
|
logo: {
|
|
5
5
|
alt: string;
|
|
6
6
|
};
|
|
@@ -12,13 +12,13 @@ interface SiteSettingsBranding {
|
|
|
12
12
|
backgroundColor: string;
|
|
13
13
|
};
|
|
14
14
|
}
|
|
15
|
-
interface SiteSettingsSeo {
|
|
15
|
+
export interface SiteSettingsSeo {
|
|
16
16
|
titleTemplate: string;
|
|
17
17
|
ogImageFallback: string;
|
|
18
18
|
maxDescriptionLength: number;
|
|
19
19
|
authorHandle?: string;
|
|
20
20
|
}
|
|
21
|
-
declare const pageTemplates: import("drizzle-orm/sqlite-core").SQLiteTableWithColumns<{
|
|
21
|
+
export declare const pageTemplates: import("drizzle-orm/sqlite-core").SQLiteTableWithColumns<{
|
|
22
22
|
name: "page_templates";
|
|
23
23
|
schema: undefined;
|
|
24
24
|
columns: {
|
|
@@ -284,7 +284,7 @@ declare const pageTemplates: import("drizzle-orm/sqlite-core").SQLiteTableWithCo
|
|
|
284
284
|
};
|
|
285
285
|
dialect: "sqlite";
|
|
286
286
|
}>;
|
|
287
|
-
declare const pageVersions: import("drizzle-orm/sqlite-core").SQLiteTableWithColumns<{
|
|
287
|
+
export declare const pageVersions: import("drizzle-orm/sqlite-core").SQLiteTableWithColumns<{
|
|
288
288
|
name: "page_versions";
|
|
289
289
|
schema: undefined;
|
|
290
290
|
columns: {
|
|
@@ -616,7 +616,7 @@ declare const pageVersions: import("drizzle-orm/sqlite-core").SQLiteTableWithCol
|
|
|
616
616
|
};
|
|
617
617
|
dialect: "sqlite";
|
|
618
618
|
}>;
|
|
619
|
-
declare const pages: import("drizzle-orm/sqlite-core").SQLiteTableWithColumns<{
|
|
619
|
+
export declare const pages: import("drizzle-orm/sqlite-core").SQLiteTableWithColumns<{
|
|
620
620
|
name: "pages";
|
|
621
621
|
schema: undefined;
|
|
622
622
|
columns: {
|
|
@@ -924,7 +924,7 @@ declare const pages: import("drizzle-orm/sqlite-core").SQLiteTableWithColumns<{
|
|
|
924
924
|
};
|
|
925
925
|
dialect: "sqlite";
|
|
926
926
|
}>;
|
|
927
|
-
declare const pageDrafts: import("drizzle-orm/sqlite-core").SQLiteTableWithColumns<{
|
|
927
|
+
export declare const pageDrafts: import("drizzle-orm/sqlite-core").SQLiteTableWithColumns<{
|
|
928
928
|
name: "page_drafts";
|
|
929
929
|
schema: undefined;
|
|
930
930
|
columns: {
|
|
@@ -1011,7 +1011,7 @@ declare const pageDrafts: import("drizzle-orm/sqlite-core").SQLiteTableWithColum
|
|
|
1011
1011
|
};
|
|
1012
1012
|
dialect: "sqlite";
|
|
1013
1013
|
}>;
|
|
1014
|
-
declare const pageDraftLocks: import("drizzle-orm/sqlite-core").SQLiteTableWithColumns<{
|
|
1014
|
+
export declare const pageDraftLocks: import("drizzle-orm/sqlite-core").SQLiteTableWithColumns<{
|
|
1015
1015
|
name: "page_draft_locks";
|
|
1016
1016
|
schema: undefined;
|
|
1017
1017
|
columns: {
|
|
@@ -1109,7 +1109,7 @@ declare const pageDraftLocks: import("drizzle-orm/sqlite-core").SQLiteTableWithC
|
|
|
1109
1109
|
};
|
|
1110
1110
|
dialect: "sqlite";
|
|
1111
1111
|
}>;
|
|
1112
|
-
declare const pageVersionApprovals: import("drizzle-orm/sqlite-core").SQLiteTableWithColumns<{
|
|
1112
|
+
export declare const pageVersionApprovals: import("drizzle-orm/sqlite-core").SQLiteTableWithColumns<{
|
|
1113
1113
|
name: "page_version_approvals";
|
|
1114
1114
|
schema: undefined;
|
|
1115
1115
|
columns: {
|
|
@@ -1209,7 +1209,7 @@ declare const pageVersionApprovals: import("drizzle-orm/sqlite-core").SQLiteTabl
|
|
|
1209
1209
|
};
|
|
1210
1210
|
dialect: "sqlite";
|
|
1211
1211
|
}>;
|
|
1212
|
-
declare const pageVersionComments: import("drizzle-orm/sqlite-core").SQLiteTableWithColumns<{
|
|
1212
|
+
export declare const pageVersionComments: import("drizzle-orm/sqlite-core").SQLiteTableWithColumns<{
|
|
1213
1213
|
name: "page_version_comments";
|
|
1214
1214
|
schema: undefined;
|
|
1215
1215
|
columns: {
|
|
@@ -1347,7 +1347,7 @@ declare const pageVersionComments: import("drizzle-orm/sqlite-core").SQLiteTable
|
|
|
1347
1347
|
};
|
|
1348
1348
|
dialect: "sqlite";
|
|
1349
1349
|
}>;
|
|
1350
|
-
declare const contentSearchIndex: import("drizzle-orm/sqlite-core").SQLiteTableWithColumns<{
|
|
1350
|
+
export declare const contentSearchIndex: import("drizzle-orm/sqlite-core").SQLiteTableWithColumns<{
|
|
1351
1351
|
name: "content_search_index";
|
|
1352
1352
|
schema: undefined;
|
|
1353
1353
|
columns: {
|
|
@@ -1449,7 +1449,7 @@ declare const contentSearchIndex: import("drizzle-orm/sqlite-core").SQLiteTableW
|
|
|
1449
1449
|
};
|
|
1450
1450
|
dialect: "sqlite";
|
|
1451
1451
|
}>;
|
|
1452
|
-
declare const siteSettings: import("drizzle-orm/sqlite-core").SQLiteTableWithColumns<{
|
|
1452
|
+
export declare const siteSettings: import("drizzle-orm/sqlite-core").SQLiteTableWithColumns<{
|
|
1453
1453
|
name: "site_settings";
|
|
1454
1454
|
schema: undefined;
|
|
1455
1455
|
columns: {
|
|
@@ -1661,7 +1661,7 @@ declare const siteSettings: import("drizzle-orm/sqlite-core").SQLiteTableWithCol
|
|
|
1661
1661
|
};
|
|
1662
1662
|
dialect: "sqlite";
|
|
1663
1663
|
}>;
|
|
1664
|
-
declare const taxonomyTerms: import("drizzle-orm/sqlite-core").SQLiteTableWithColumns<{
|
|
1664
|
+
export declare const taxonomyTerms: import("drizzle-orm/sqlite-core").SQLiteTableWithColumns<{
|
|
1665
1665
|
name: "taxonomy_terms";
|
|
1666
1666
|
schema: undefined;
|
|
1667
1667
|
columns: {
|
|
@@ -1833,7 +1833,7 @@ declare const taxonomyTerms: import("drizzle-orm/sqlite-core").SQLiteTableWithCo
|
|
|
1833
1833
|
};
|
|
1834
1834
|
dialect: "sqlite";
|
|
1835
1835
|
}>;
|
|
1836
|
-
declare const pageTaxonomyTerms: import("drizzle-orm/sqlite-core").SQLiteTableWithColumns<{
|
|
1836
|
+
export declare const pageTaxonomyTerms: import("drizzle-orm/sqlite-core").SQLiteTableWithColumns<{
|
|
1837
1837
|
name: "page_taxonomy_terms";
|
|
1838
1838
|
schema: undefined;
|
|
1839
1839
|
columns: {
|
|
@@ -1895,7 +1895,7 @@ declare const pageTaxonomyTerms: import("drizzle-orm/sqlite-core").SQLiteTableWi
|
|
|
1895
1895
|
};
|
|
1896
1896
|
dialect: "sqlite";
|
|
1897
1897
|
}>;
|
|
1898
|
-
declare const bylines: import("drizzle-orm/sqlite-core").SQLiteTableWithColumns<{
|
|
1898
|
+
export declare const bylines: import("drizzle-orm/sqlite-core").SQLiteTableWithColumns<{
|
|
1899
1899
|
name: "bylines";
|
|
1900
1900
|
schema: undefined;
|
|
1901
1901
|
columns: {
|
|
@@ -2124,9 +2124,8 @@ declare const bylines: import("drizzle-orm/sqlite-core").SQLiteTableWithColumns<
|
|
|
2124
2124
|
};
|
|
2125
2125
|
dialect: "sqlite";
|
|
2126
2126
|
}>;
|
|
2127
|
-
type Byline = typeof bylines.$inferSelect;
|
|
2128
|
-
type NewByline = typeof bylines.$inferInsert;
|
|
2129
|
-
type SiteSettings = typeof siteSettings.$inferSelect;
|
|
2130
|
-
type InsertSiteSettings = typeof siteSettings.$inferInsert;
|
|
2131
|
-
//#endregion
|
|
2132
|
-
export { Byline, InsertSiteSettings, NewByline, SiteSettings, SiteSettingsBranding, SiteSettingsSeo, bylines, contentSearchIndex, pageDraftLocks, pageDrafts, pageTaxonomyTerms, pageTemplates, pageVersionApprovals, pageVersionComments, pageVersions, pages, siteSettings, taxonomyTerms };
|
|
2127
|
+
export type Byline = typeof bylines.$inferSelect;
|
|
2128
|
+
export type NewByline = typeof bylines.$inferInsert;
|
|
2129
|
+
export type SiteSettings = typeof siteSettings.$inferSelect;
|
|
2130
|
+
export type InsertSiteSettings = typeof siteSettings.$inferInsert;
|
|
2131
|
+
//#endregion
|
package/dist/storage/index.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
//#region src/storage/index.d.ts
|
|
2
|
-
interface StorageFile {
|
|
2
|
+
export interface StorageFile {
|
|
3
3
|
key: string;
|
|
4
4
|
name: string;
|
|
5
5
|
size: number;
|
|
@@ -9,51 +9,50 @@ interface StorageFile {
|
|
|
9
9
|
etag?: string;
|
|
10
10
|
customMetadata?: Record<string, string>;
|
|
11
11
|
}
|
|
12
|
-
interface StorageListResult {
|
|
12
|
+
export interface StorageListResult {
|
|
13
13
|
files: StorageFile[];
|
|
14
14
|
truncated: boolean;
|
|
15
15
|
cursor?: string;
|
|
16
16
|
}
|
|
17
|
-
interface R2StorageOptions {
|
|
17
|
+
export interface R2StorageOptions {
|
|
18
18
|
binding?: string | undefined;
|
|
19
19
|
publicUrl?: string | undefined;
|
|
20
20
|
prefix?: string | undefined;
|
|
21
21
|
}
|
|
22
|
-
interface StorageConfig {
|
|
22
|
+
export interface StorageConfig {
|
|
23
23
|
provider: "r2" | "local" | "s3";
|
|
24
24
|
binding?: string | undefined;
|
|
25
25
|
publicUrl?: string | undefined;
|
|
26
26
|
prefix?: string | undefined;
|
|
27
27
|
}
|
|
28
|
-
interface StorageListOptions {
|
|
28
|
+
export interface StorageListOptions {
|
|
29
29
|
prefix?: string | undefined;
|
|
30
30
|
cursor?: string | undefined;
|
|
31
31
|
limit?: number | undefined;
|
|
32
32
|
publicUrl?: string | undefined;
|
|
33
33
|
apiBasePath?: string | undefined;
|
|
34
34
|
}
|
|
35
|
-
interface StorageUploadOptions {
|
|
35
|
+
export interface StorageUploadOptions {
|
|
36
36
|
key?: string | undefined;
|
|
37
37
|
prefix?: string | undefined;
|
|
38
38
|
publicUrl?: string | undefined;
|
|
39
39
|
apiBasePath?: string | undefined;
|
|
40
40
|
}
|
|
41
|
-
declare function r2(options?: R2StorageOptions): StorageConfig;
|
|
41
|
+
export declare function r2(options?: R2StorageOptions): StorageConfig;
|
|
42
42
|
/**
|
|
43
43
|
* Resolves Cloudflare R2 bucket instance from Cloudflare env or Astro locals.
|
|
44
44
|
*/
|
|
45
|
-
declare function getR2Bucket(locals?: any, bindingName?: string): Promise<any>;
|
|
45
|
+
export declare function getR2Bucket(locals?: any, bindingName?: string): Promise<any>;
|
|
46
46
|
/**
|
|
47
47
|
* Lists files from R2 Bucket under configured prefix.
|
|
48
48
|
*/
|
|
49
|
-
declare function listR2Files(bucket: any, options?: StorageListOptions): Promise<StorageListResult>;
|
|
49
|
+
export declare function listR2Files(bucket: any, options?: StorageListOptions): Promise<StorageListResult>;
|
|
50
50
|
/**
|
|
51
51
|
* Uploads a file buffer/stream into R2 Bucket.
|
|
52
52
|
*/
|
|
53
|
-
declare function uploadR2File(bucket: any, file: File, options?: StorageUploadOptions): Promise<StorageFile>;
|
|
53
|
+
export declare function uploadR2File(bucket: any, file: File, options?: StorageUploadOptions): Promise<StorageFile>;
|
|
54
54
|
/**
|
|
55
55
|
* Deletes a file from R2 Bucket by key.
|
|
56
56
|
*/
|
|
57
|
-
declare function deleteR2File(bucket: any, key: string): Promise<boolean>;
|
|
58
|
-
//#endregion
|
|
59
|
-
export { R2StorageOptions, StorageConfig, StorageFile, StorageListOptions, StorageListResult, StorageUploadOptions, deleteR2File, getR2Bucket, listR2Files, r2, uploadR2File };
|
|
57
|
+
export declare function deleteR2File(bucket: any, key: string): Promise<boolean>;
|
|
58
|
+
//#endregion
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rimelight/cms",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.7",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "Rimelight Entertainment's Content Management System Package",
|
|
6
6
|
"homepage": "https://rimelight.com/docs",
|
|
@@ -64,26 +64,26 @@
|
|
|
64
64
|
"access": "public"
|
|
65
65
|
},
|
|
66
66
|
"dependencies": {
|
|
67
|
-
"@rimelight/auth": "0.0.
|
|
68
|
-
"@rimelight/i18n": "0.0.
|
|
69
|
-
"@rimelight/ui": "0.0.
|
|
67
|
+
"@rimelight/auth": "0.0.4",
|
|
68
|
+
"@rimelight/i18n": "0.0.10",
|
|
69
|
+
"@rimelight/ui": "0.0.49",
|
|
70
70
|
"drizzle-orm": "0.45.2",
|
|
71
71
|
"solid-js": "1.9.15",
|
|
72
72
|
"sortablejs": "1.15.7"
|
|
73
73
|
},
|
|
74
74
|
"devDependencies": {
|
|
75
75
|
"@astrojs/check": "0.9.10",
|
|
76
|
-
"@rimelight/config": "0.0.
|
|
76
|
+
"@rimelight/config": "0.0.7",
|
|
77
77
|
"@types/sortablejs": "1.15.9",
|
|
78
|
-
"astro": "7.3.
|
|
78
|
+
"astro": "7.3.2",
|
|
79
79
|
"typescript": "6.0.3",
|
|
80
|
-
"unocss": "66.10.
|
|
80
|
+
"unocss": "66.10.2"
|
|
81
81
|
},
|
|
82
82
|
"peerDependencies": {
|
|
83
83
|
"astro": ">=7.0.0"
|
|
84
84
|
},
|
|
85
85
|
"engines": {
|
|
86
|
-
"node": ">=26.
|
|
86
|
+
"node": ">=26.8.2"
|
|
87
87
|
},
|
|
88
88
|
"scripts": {
|
|
89
89
|
"build": "vp pack",
|