@paroicms/public-server-lib 0.12.3 → 0.13.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.13.0",
|
|
4
4
|
"description": "Common utilitaries for paroicms plugins (backend side).",
|
|
5
5
|
"author": "Paroi Team",
|
|
6
6
|
"repository": {
|
|
@@ -21,8 +21,8 @@
|
|
|
21
21
|
},
|
|
22
22
|
"dependencies": {
|
|
23
23
|
"@paroi/data-formatters-lib": "~0.4.0",
|
|
24
|
-
"@paroicms/internal-anywhere-lib": "1.18.
|
|
25
|
-
"@paroicms/public-anywhere-lib": "0.
|
|
24
|
+
"@paroicms/internal-anywhere-lib": "1.18.5",
|
|
25
|
+
"@paroicms/public-anywhere-lib": "0.7.0",
|
|
26
26
|
"@types/express": "*"
|
|
27
27
|
},
|
|
28
28
|
"devDependencies": {
|
|
@@ -5,10 +5,15 @@ import type { AppLog, PluginSiteContext } from "./plugin-site-context-types";
|
|
|
5
5
|
|
|
6
6
|
export interface ParoiCmsPlugin {
|
|
7
7
|
version: string;
|
|
8
|
-
|
|
8
|
+
/**
|
|
9
|
+
* The slug of the plugin. It must be unique among all plugins. When it is not provided, then it
|
|
10
|
+
* is generated from the plugin name.
|
|
11
|
+
*/
|
|
12
|
+
slug?: string;
|
|
13
|
+
siteInit?: (service: BackendPluginService) => void | Promise<void>;
|
|
9
14
|
}
|
|
10
15
|
|
|
11
|
-
export interface
|
|
16
|
+
export interface BackendPluginService {
|
|
12
17
|
siteLog: AppLog;
|
|
13
18
|
setPublicAssetsDirectory(directory: string): void;
|
|
14
19
|
setBoAssetsDirectory(directory: string): void;
|
|
@@ -23,6 +28,7 @@ export interface PluginInitApi {
|
|
|
23
28
|
setPublicApiHandler(handler: PublicApiHandler): void;
|
|
24
29
|
addHeadTag(...htmlTags: string[]): void;
|
|
25
30
|
pluginConf: PluginConf;
|
|
31
|
+
pluginAssetsUrl: string;
|
|
26
32
|
}
|
|
27
33
|
|
|
28
34
|
export type PublicApiHandler = (
|