@sonicjs-cms/core 3.0.0-beta.23 → 3.0.0-beta.24
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/{chunk-IS54FPB7.cjs → chunk-37V3RET3.cjs} +18 -34
- package/dist/chunk-37V3RET3.cjs.map +1 -0
- package/dist/{chunk-VGHEKIJL.cjs → chunk-A2SN3RVL.cjs} +2 -2
- package/dist/{chunk-VGHEKIJL.cjs.map → chunk-A2SN3RVL.cjs.map} +1 -1
- package/dist/{chunk-4WMZGHIC.cjs → chunk-BP52BFIV.cjs} +4 -4
- package/dist/{chunk-4WMZGHIC.cjs.map → chunk-BP52BFIV.cjs.map} +1 -1
- package/dist/{chunk-DIBCKCUE.js → chunk-FHPEM77Y.js} +8 -24
- package/dist/chunk-FHPEM77Y.js.map +1 -0
- package/dist/{chunk-CTYLCWMO.cjs → chunk-I767LVN7.cjs} +252 -217
- package/dist/chunk-I767LVN7.cjs.map +1 -0
- package/dist/{chunk-C3ZQP5NW.cjs → chunk-KKNEYIZJ.cjs} +3 -3
- package/dist/{chunk-C3ZQP5NW.cjs.map → chunk-KKNEYIZJ.cjs.map} +1 -1
- package/dist/{chunk-DPLJYTHE.js → chunk-LNI3FYSI.js} +3 -3
- package/dist/{chunk-DPLJYTHE.js.map → chunk-LNI3FYSI.js.map} +1 -1
- package/dist/{chunk-AT4ZQGEZ.cjs → chunk-QCJHCSOK.cjs} +21 -2
- package/dist/chunk-QCJHCSOK.cjs.map +1 -0
- package/dist/{chunk-RFBW5RRH.cjs → chunk-QJUJNTIU.cjs} +11 -11
- package/dist/{chunk-RFBW5RRH.cjs.map → chunk-QJUJNTIU.cjs.map} +1 -1
- package/dist/{chunk-KS24NPPL.js → chunk-RJ2O5IIE.js} +21 -2
- package/dist/chunk-RJ2O5IIE.js.map +1 -0
- package/dist/{chunk-A46IRC5A.js → chunk-UIHIXTIS.js} +2 -2
- package/dist/{chunk-A46IRC5A.js.map → chunk-UIHIXTIS.js.map} +1 -1
- package/dist/{chunk-SK5CHFJP.js → chunk-VC5XVPLM.js} +52 -20
- package/dist/chunk-VC5XVPLM.js.map +1 -0
- package/dist/{chunk-2MIYYAO4.js → chunk-VGEZNFWH.js} +3 -3
- package/dist/{chunk-2MIYYAO4.js.map → chunk-VGEZNFWH.js.map} +1 -1
- package/dist/{chunk-XXRR54AB.js → chunk-VYQVDL2M.js} +4 -4
- package/dist/{chunk-XXRR54AB.js.map → chunk-VYQVDL2M.js.map} +1 -1
- package/dist/index.cjs +1093 -264
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +28 -1
- package/dist/index.d.ts +28 -1
- package/dist/index.js +841 -14
- package/dist/index.js.map +1 -1
- package/dist/middleware.cjs +33 -33
- package/dist/middleware.js +4 -4
- package/dist/migrations-FGXZPKDC.cjs +13 -0
- package/dist/{migrations-ZD7Y5NUC.cjs.map → migrations-FGXZPKDC.cjs.map} +1 -1
- package/dist/migrations-Z6D27NAW.js +4 -0
- package/dist/{migrations-XQ6EX6HX.js.map → migrations-Z6D27NAW.js.map} +1 -1
- package/dist/plugins.cjs +40 -40
- package/dist/plugins.js +3 -3
- package/dist/routes.cjs +26 -26
- package/dist/routes.js +6 -6
- package/dist/services.cjs +18 -18
- package/dist/services.js +2 -2
- package/dist/utils.cjs +3 -3
- package/dist/utils.js +1 -1
- package/package.json +1 -1
- package/dist/chunk-AT4ZQGEZ.cjs.map +0 -1
- package/dist/chunk-CTYLCWMO.cjs.map +0 -1
- package/dist/chunk-DIBCKCUE.js.map +0 -1
- package/dist/chunk-IS54FPB7.cjs.map +0 -1
- package/dist/chunk-KS24NPPL.js.map +0 -1
- package/dist/chunk-SK5CHFJP.js.map +0 -1
- package/dist/migrations-XQ6EX6HX.js +0 -4
- package/dist/migrations-ZD7Y5NUC.cjs +0 -13
package/dist/index.d.cts
CHANGED
|
@@ -352,6 +352,7 @@ declare class DocumentRepository {
|
|
|
352
352
|
getById(id: string): Promise<Document | null>;
|
|
353
353
|
getCurrentDraft(rootId: string): Promise<Document | null>;
|
|
354
354
|
getPublished(rootId: string): Promise<Document | null>;
|
|
355
|
+
getBySlug(typeId: string, slug: string): Promise<Document | null>;
|
|
355
356
|
list(opts?: ListDocumentsOptions): Promise<Document[]>;
|
|
356
357
|
listPublished(opts?: ListDocumentsOptions): Promise<Document[]>;
|
|
357
358
|
listDrafts(opts?: ListDocumentsOptions): Promise<Document[]>;
|
|
@@ -709,6 +710,32 @@ declare function getUserProfileConfig(): UserProfileConfig | null;
|
|
|
709
710
|
declare const userProfilesPlugin: DefinedPlugin;
|
|
710
711
|
declare function createUserProfilesPlugin(): DefinedPlugin;
|
|
711
712
|
|
|
713
|
+
/**
|
|
714
|
+
* MCP plugin configuration.
|
|
715
|
+
*
|
|
716
|
+
* Config is supplied in code when the operator adds `mcpPlugin({...})` to the app's
|
|
717
|
+
* plugin register array — captured in a closure and resolved against the live
|
|
718
|
+
* CollectionRegistry on each request (so newly registered collections appear
|
|
719
|
+
* without a restart). All fields are optional with safe defaults.
|
|
720
|
+
*/
|
|
721
|
+
|
|
722
|
+
declare const mcpConfigSchema: z.ZodObject<{
|
|
723
|
+
expose: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
724
|
+
types: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
725
|
+
read: z.ZodDefault<z.ZodBoolean>;
|
|
726
|
+
write: z.ZodDefault<z.ZodBoolean>;
|
|
727
|
+
}, z.core.$strip>>>;
|
|
728
|
+
redactFields: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
729
|
+
listLimit: z.ZodDefault<z.ZodNumber>;
|
|
730
|
+
}, z.core.$strip>;
|
|
731
|
+
type McpConfigInput = z.input<typeof mcpConfigSchema>;
|
|
732
|
+
type McpConfig = z.infer<typeof mcpConfigSchema>;
|
|
733
|
+
|
|
734
|
+
/** Build an MCP plugin instance bound to the given config. */
|
|
735
|
+
declare function mcpPlugin(options?: McpConfigInput): DefinedPlugin;
|
|
736
|
+
/** Alias matching the repo's `createXPlugin` convention. */
|
|
737
|
+
declare function createMcpPlugin(options?: McpConfigInput): DefinedPlugin;
|
|
738
|
+
|
|
712
739
|
/**
|
|
713
740
|
* @sonicjs/core - Main Entry Point
|
|
714
741
|
*
|
|
@@ -729,4 +756,4 @@ declare function createUserProfilesPlugin(): DefinedPlugin;
|
|
|
729
756
|
|
|
730
757
|
declare const VERSION: string;
|
|
731
758
|
|
|
732
|
-
export { BUILT_IN_PROVIDERS, type CFSendEmailBinding, CloudflareEmailProvider, type CloudflareEmailProviderOptions, DocumentRepository, DocumentsService, FieldType, OAuthService, PluginDependencyCycleError, type ProfileFieldDefinition, RbacService, type SortablePlugin, type TopoSortOptions, type UserProfileConfig, VERSION, bootstrapDocumentTypes, createDb, createHelloWorldPlugin, createOAuthProvidersPlugin, createRedirectPlugin, createUserProfilesPlugin, defineUserProfile, emailReconciliationPlugin, generateTriggersComment, getUserProfileConfig, helloWorldPlugin, oauthProvidersPlugin, parseCronTriggers, redirectPlugin, _default as siteSettingsCollection, topoSort, updateWranglerTriggers, userProfilesPlugin };
|
|
759
|
+
export { BUILT_IN_PROVIDERS, type CFSendEmailBinding, CloudflareEmailProvider, type CloudflareEmailProviderOptions, DocumentRepository, DocumentsService, FieldType, type McpConfig, type McpConfigInput, OAuthService, PluginDependencyCycleError, type ProfileFieldDefinition, RbacService, type SortablePlugin, type TopoSortOptions, type UserProfileConfig, VERSION, bootstrapDocumentTypes, createDb, createHelloWorldPlugin, createMcpPlugin, createOAuthProvidersPlugin, createRedirectPlugin, createUserProfilesPlugin, defineUserProfile, emailReconciliationPlugin, generateTriggersComment, getUserProfileConfig, helloWorldPlugin, mcpPlugin, oauthProvidersPlugin, parseCronTriggers, redirectPlugin, _default as siteSettingsCollection, topoSort, updateWranglerTriggers, userProfilesPlugin };
|
package/dist/index.d.ts
CHANGED
|
@@ -352,6 +352,7 @@ declare class DocumentRepository {
|
|
|
352
352
|
getById(id: string): Promise<Document | null>;
|
|
353
353
|
getCurrentDraft(rootId: string): Promise<Document | null>;
|
|
354
354
|
getPublished(rootId: string): Promise<Document | null>;
|
|
355
|
+
getBySlug(typeId: string, slug: string): Promise<Document | null>;
|
|
355
356
|
list(opts?: ListDocumentsOptions): Promise<Document[]>;
|
|
356
357
|
listPublished(opts?: ListDocumentsOptions): Promise<Document[]>;
|
|
357
358
|
listDrafts(opts?: ListDocumentsOptions): Promise<Document[]>;
|
|
@@ -709,6 +710,32 @@ declare function getUserProfileConfig(): UserProfileConfig | null;
|
|
|
709
710
|
declare const userProfilesPlugin: DefinedPlugin;
|
|
710
711
|
declare function createUserProfilesPlugin(): DefinedPlugin;
|
|
711
712
|
|
|
713
|
+
/**
|
|
714
|
+
* MCP plugin configuration.
|
|
715
|
+
*
|
|
716
|
+
* Config is supplied in code when the operator adds `mcpPlugin({...})` to the app's
|
|
717
|
+
* plugin register array — captured in a closure and resolved against the live
|
|
718
|
+
* CollectionRegistry on each request (so newly registered collections appear
|
|
719
|
+
* without a restart). All fields are optional with safe defaults.
|
|
720
|
+
*/
|
|
721
|
+
|
|
722
|
+
declare const mcpConfigSchema: z.ZodObject<{
|
|
723
|
+
expose: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
724
|
+
types: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
725
|
+
read: z.ZodDefault<z.ZodBoolean>;
|
|
726
|
+
write: z.ZodDefault<z.ZodBoolean>;
|
|
727
|
+
}, z.core.$strip>>>;
|
|
728
|
+
redactFields: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
729
|
+
listLimit: z.ZodDefault<z.ZodNumber>;
|
|
730
|
+
}, z.core.$strip>;
|
|
731
|
+
type McpConfigInput = z.input<typeof mcpConfigSchema>;
|
|
732
|
+
type McpConfig = z.infer<typeof mcpConfigSchema>;
|
|
733
|
+
|
|
734
|
+
/** Build an MCP plugin instance bound to the given config. */
|
|
735
|
+
declare function mcpPlugin(options?: McpConfigInput): DefinedPlugin;
|
|
736
|
+
/** Alias matching the repo's `createXPlugin` convention. */
|
|
737
|
+
declare function createMcpPlugin(options?: McpConfigInput): DefinedPlugin;
|
|
738
|
+
|
|
712
739
|
/**
|
|
713
740
|
* @sonicjs/core - Main Entry Point
|
|
714
741
|
*
|
|
@@ -729,4 +756,4 @@ declare function createUserProfilesPlugin(): DefinedPlugin;
|
|
|
729
756
|
|
|
730
757
|
declare const VERSION: string;
|
|
731
758
|
|
|
732
|
-
export { BUILT_IN_PROVIDERS, type CFSendEmailBinding, CloudflareEmailProvider, type CloudflareEmailProviderOptions, DocumentRepository, DocumentsService, FieldType, OAuthService, PluginDependencyCycleError, type ProfileFieldDefinition, RbacService, type SortablePlugin, type TopoSortOptions, type UserProfileConfig, VERSION, bootstrapDocumentTypes, createDb, createHelloWorldPlugin, createOAuthProvidersPlugin, createRedirectPlugin, createUserProfilesPlugin, defineUserProfile, emailReconciliationPlugin, generateTriggersComment, getUserProfileConfig, helloWorldPlugin, oauthProvidersPlugin, parseCronTriggers, redirectPlugin, _default as siteSettingsCollection, topoSort, updateWranglerTriggers, userProfilesPlugin };
|
|
759
|
+
export { BUILT_IN_PROVIDERS, type CFSendEmailBinding, CloudflareEmailProvider, type CloudflareEmailProviderOptions, DocumentRepository, DocumentsService, FieldType, type McpConfig, type McpConfigInput, OAuthService, PluginDependencyCycleError, type ProfileFieldDefinition, RbacService, type SortablePlugin, type TopoSortOptions, type UserProfileConfig, VERSION, bootstrapDocumentTypes, createDb, createHelloWorldPlugin, createMcpPlugin, createOAuthProvidersPlugin, createRedirectPlugin, createUserProfilesPlugin, defineUserProfile, emailReconciliationPlugin, generateTriggersComment, getUserProfileConfig, helloWorldPlugin, mcpPlugin, oauthProvidersPlugin, parseCronTriggers, redirectPlugin, _default as siteSettingsCollection, topoSort, updateWranglerTriggers, userProfilesPlugin };
|