nextjs-cms 0.5.69 → 0.5.70
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.
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"blank.d.ts","sourceRoot":"","sources":["../../src/plugins/blank.tsx"],"names":[],"mappings":"AAAA;;;GAGG;AACH,wBAAsB,KAAK,kBAE1B"}
|
package/dist/plugins/loader.d.ts
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import type { PluginConfigEntry } from '../core/config/config-loader.js';
|
|
2
|
-
import type { ReactNode } from 'react';
|
|
3
2
|
export interface CMSPlugin {
|
|
4
3
|
/**
|
|
5
4
|
* The human facing title of the plugin.
|
|
@@ -12,6 +11,7 @@ export interface CMSPlugin {
|
|
|
12
11
|
* @example 'plugin_cpanel_emails'
|
|
13
12
|
*/
|
|
14
13
|
name: string;
|
|
14
|
+
registryName: string;
|
|
15
15
|
version?: string;
|
|
16
16
|
router?: any;
|
|
17
17
|
routes?: PluginRoute[];
|
|
@@ -46,6 +46,7 @@ export type PluginRouteWithComponent = PluginRoute & {
|
|
|
46
46
|
export interface LoadedPluginRoute extends PluginRoute {
|
|
47
47
|
pluginId: string;
|
|
48
48
|
pluginName: string;
|
|
49
|
+
pluginRegistryName: string;
|
|
49
50
|
pluginTitle: string;
|
|
50
51
|
}
|
|
51
52
|
type CMSPluginBase = Omit<CMSPlugin, 'routes'>;
|
|
@@ -61,11 +62,5 @@ export declare const loadPluginModule: (pluginPackage: string) => Promise<unknow
|
|
|
61
62
|
export declare function loadPlugins(): Promise<LoadedPlugin[]>;
|
|
62
63
|
export declare function getPluginRoutes(): Promise<LoadedPluginRoute[]>;
|
|
63
64
|
export declare function findPluginRouteByPath(path: string): Promise<LoadedPluginRoute | null>;
|
|
64
|
-
type PluginServerComponent = (props?: Record<string, unknown>) => ReactNode | Promise<ReactNode>;
|
|
65
|
-
type PluginServerModule = {
|
|
66
|
-
default?: PluginServerComponent;
|
|
67
|
-
[key: string]: unknown;
|
|
68
|
-
};
|
|
69
|
-
export declare const pluginServerLoaders: Record<string, () => Promise<PluginServerModule>>;
|
|
70
65
|
export {};
|
|
71
66
|
//# sourceMappingURL=loader.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"loader.d.ts","sourceRoot":"","sources":["../../src/plugins/loader.ts"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,iCAAiC,CAAA;
|
|
1
|
+
{"version":3,"file":"loader.d.ts","sourceRoot":"","sources":["../../src/plugins/loader.ts"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,iCAAiC,CAAA;AAIxE,MAAM,WAAW,SAAS;IACtB;;;OAGG;IACH,KAAK,EAAE,MAAM,CAAA;IACb;;;;OAIG;IACH,IAAI,EAAE,MAAM,CAAA;IACZ,YAAY,EAAE,MAAM,CAAA;IACpB,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,MAAM,CAAC,EAAE,GAAG,CAAA;IACZ,MAAM,CAAC,EAAE,WAAW,EAAE,CAAA;IACtB,IAAI,CAAC,EAAE,CAAC,GAAG,EAAE,iBAAiB,KAAK,OAAO,CAAC,IAAI,CAAC,GAAG,IAAI,CAAA;CAC1D;AAED,MAAM,WAAW,iBAAiB;IAC9B,MAAM,EAAE,iBAAiB,CAAA;CAC5B;AAED,MAAM,WAAW,YAAY;IACzB,MAAM,EAAE,iBAAiB,CAAA;IACzB,MAAM,EAAE,SAAS,CAAA;IACjB,UAAU,EAAE,MAAM,CAAA;IAClB,SAAS,EAAE,MAAM,CAAA;CACpB;AAED,MAAM,WAAW,YAAY;IACzB,YAAY,CAAC,EAAE,CAAC,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,KAAK,SAAS,CAAA;IAC/D,MAAM,CAAC,EAAE,SAAS,CAAA;IAClB,OAAO,CAAC,EAAE,SAAS,G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AAC,iBAAiB,EAAE,CAAC,CA8BpE;AAED,wBAAsB,qBAAqB,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,iBAAiB,GAAG,IAAI,CAAC,CAI3F"}
|
package/dist/plugins/loader.js
CHANGED
|
@@ -80,6 +80,7 @@ function resolvePluginInstance(registration, mod) {
|
|
|
80
80
|
return {
|
|
81
81
|
title: candidate.title,
|
|
82
82
|
name: candidate.name,
|
|
83
|
+
registryName: candidate.registryName,
|
|
83
84
|
version: candidate.version,
|
|
84
85
|
router: candidate.router,
|
|
85
86
|
routes: candidate.routes ?? [],
|
|
@@ -166,6 +167,7 @@ export async function getPluginRoutes() {
|
|
|
166
167
|
...route,
|
|
167
168
|
pluginId: entry.config.package,
|
|
168
169
|
pluginName: entry.plugin.name,
|
|
170
|
+
pluginRegistryName: entry.plugin.registryName,
|
|
169
171
|
pluginTitle: entry.plugin.title,
|
|
170
172
|
};
|
|
171
173
|
});
|
|
@@ -176,12 +178,3 @@ export async function findPluginRouteByPath(path) {
|
|
|
176
178
|
const routes = await getPluginRoutes();
|
|
177
179
|
return routes.find((route) => route.path === normalized) ?? null;
|
|
178
180
|
}
|
|
179
|
-
// Keep this list in sync with cms.config.ts and apps/cms/package.json.
|
|
180
|
-
export const pluginServerLoaders = {
|
|
181
|
-
// @ts-ignore - The package should be in dependencies if you want to use it
|
|
182
|
-
'@nextjs-cms-plugins/cpanel-dashboard': () => import('@nextjs-cms-plugins/cpanel-dashboard/server'),
|
|
183
|
-
// @ts-ignore - The package should be in dependencies if you want to use it
|
|
184
|
-
'@nextjs-cms-plugins/cpanel-emails': () => import('@nextjs-cms-plugins/cpanel-emails/server'),
|
|
185
|
-
// @ts-ignore - The package should be in dependencies if you want to use it
|
|
186
|
-
'@nextjs-cms-plugins/google-analytics': () => import('@nextjs-cms-plugins/google-analytics/server'),
|
|
187
|
-
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "nextjs-cms",
|
|
3
|
-
"version": "0.5.
|
|
3
|
+
"version": "0.5.70",
|
|
4
4
|
"main": "./dist/index.js",
|
|
5
5
|
"types": "./dist/index.d.ts",
|
|
6
6
|
"type": "module",
|
|
@@ -117,6 +117,10 @@
|
|
|
117
117
|
"./plugins/server": {
|
|
118
118
|
"types": "./dist/plugins/server.d.ts",
|
|
119
119
|
"default": "./dist/plugins/server.js"
|
|
120
|
+
},
|
|
121
|
+
"./plugins/blank-component": {
|
|
122
|
+
"types": "./dist/plugins/blank.d.ts",
|
|
123
|
+
"default": "./dist/plugins/blank.js"
|
|
120
124
|
}
|
|
121
125
|
},
|
|
122
126
|
"files": [
|
|
@@ -166,9 +170,9 @@
|
|
|
166
170
|
"prettier": "^3.3.3",
|
|
167
171
|
"tsx": "^4.20.6",
|
|
168
172
|
"typescript": "^5.9.2",
|
|
173
|
+
"@lzcms/eslint-config": "0.3.0",
|
|
169
174
|
"@lzcms/prettier-config": "0.1.0",
|
|
170
|
-
"@lzcms/tsconfig": "0.1.0"
|
|
171
|
-
"@lzcms/eslint-config": "0.3.0"
|
|
175
|
+
"@lzcms/tsconfig": "0.1.0"
|
|
172
176
|
},
|
|
173
177
|
"license": "MIT",
|
|
174
178
|
"keywords": [
|