@paroicms/public-server-lib 0.10.0 → 0.12.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.
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@paroicms/public-server-lib",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.12.0",
|
|
4
4
|
"description": "Common utilitaries for paroicms plugins (backend side).",
|
|
5
5
|
"author": "Paroi Team",
|
|
6
6
|
"repository": {
|
|
@@ -22,8 +22,8 @@
|
|
|
22
22
|
},
|
|
23
23
|
"dependencies": {
|
|
24
24
|
"@paroi/data-formatters-lib": "~0.4.0",
|
|
25
|
-
"@paroicms/internal-anywhere-lib": "1.18.
|
|
26
|
-
"@paroicms/public-anywhere-lib": "0.
|
|
25
|
+
"@paroicms/internal-anywhere-lib": "1.18.2",
|
|
26
|
+
"@paroicms/public-anywhere-lib": "0.5.0",
|
|
27
27
|
"@types/express": "*"
|
|
28
28
|
},
|
|
29
29
|
"devDependencies": {
|
|
@@ -9,9 +9,9 @@ export interface ParoiCmsPlugin {
|
|
|
9
9
|
|
|
10
10
|
export interface PluginInitApi {
|
|
11
11
|
siteLog: AppLog;
|
|
12
|
-
registerSiteSchemaLibrary(directory: string): void;
|
|
13
12
|
setPublicAssetsDirectory(directory: string): void;
|
|
14
13
|
setBoAssetsDirectory(directory: string): void;
|
|
14
|
+
registerSiteSchemaLibrary(directory: string): void;
|
|
15
15
|
registerLiquidRootDirectory(directory: string): void;
|
|
16
16
|
registerLiquidFilter(
|
|
17
17
|
filterName: string,
|
|
@@ -21,6 +21,7 @@ export interface PluginInitApi {
|
|
|
21
21
|
registerFieldPreprocessor(dataType: string, handler: FieldPreprocessor): void;
|
|
22
22
|
setPublicApiHandler(handler: PublicApiHandler): void;
|
|
23
23
|
addHeadTag(...htmlTags: string[]): void;
|
|
24
|
+
pluginConf: unknown;
|
|
24
25
|
}
|
|
25
26
|
|
|
26
27
|
export type PublicApiHandler = (
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { ScSiteSchema, ThemeConf } from "@paroicms/public-anywhere-lib";
|
|
2
|
-
|
|
1
|
+
import type { ParsedSectionId, ScSiteSchema, ThemeConf } from "@paroicms/public-anywhere-lib";
|
|
2
|
+
import type { Request, Response } from "express";
|
|
3
3
|
export interface PluginSiteContext {
|
|
4
4
|
fqdn: string;
|
|
5
5
|
siteUrl: string;
|
|
@@ -19,6 +19,22 @@ export interface PluginSiteContext {
|
|
|
19
19
|
appLog: AppLog;
|
|
20
20
|
},
|
|
21
21
|
) => Promise<void>;
|
|
22
|
+
renderChildPartials(options: {
|
|
23
|
+
req: Request;
|
|
24
|
+
res: Response;
|
|
25
|
+
params: PartialsParamsInput;
|
|
26
|
+
parentDocumentId: ParsedSectionId;
|
|
27
|
+
labeledByTermId?: string;
|
|
28
|
+
}): Promise<void>;
|
|
29
|
+
renderSearchPartials(options: {
|
|
30
|
+
req: Request;
|
|
31
|
+
res: Response;
|
|
32
|
+
language: string;
|
|
33
|
+
words: string[];
|
|
34
|
+
limit: number;
|
|
35
|
+
start: number;
|
|
36
|
+
templateName: string;
|
|
37
|
+
}): Promise<void>;
|
|
22
38
|
}
|
|
23
39
|
|
|
24
40
|
export interface MailData {
|
|
@@ -39,3 +55,10 @@ export interface AppLog {
|
|
|
39
55
|
info(...messages: any[]): void;
|
|
40
56
|
debug(...messages: any[]): void;
|
|
41
57
|
}
|
|
58
|
+
|
|
59
|
+
export interface PartialsParamsInput {
|
|
60
|
+
templateName: string;
|
|
61
|
+
documentId: string;
|
|
62
|
+
offset: string;
|
|
63
|
+
limit: string;
|
|
64
|
+
}
|