@fecommunity/reactpress-server 4.0.0-beta.4 → 4.0.0-beta.6
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/bin/reactpress-server.js
CHANGED
|
@@ -186,9 +186,17 @@ function startWithNode() {
|
|
|
186
186
|
// Set environment variables
|
|
187
187
|
process.env.NODE_ENV = process.env.NODE_ENV || 'production';
|
|
188
188
|
|
|
189
|
-
// Import and run the server
|
|
189
|
+
// Import and run the server (require() alone does not invoke main — see dist/main.js)
|
|
190
190
|
try {
|
|
191
|
-
require(distPath);
|
|
191
|
+
const mainModule = require(distPath);
|
|
192
|
+
if (typeof mainModule.main !== 'function') {
|
|
193
|
+
console.error('[ReactPress Server] Server entry does not export main()');
|
|
194
|
+
process.exit(1);
|
|
195
|
+
}
|
|
196
|
+
mainModule.main().catch((error) => {
|
|
197
|
+
console.error('[ReactPress Server] Failed to start server:', error);
|
|
198
|
+
process.exit(1);
|
|
199
|
+
});
|
|
192
200
|
} catch (error) {
|
|
193
201
|
console.error('[ReactPress Server] Failed to start server:', error);
|
|
194
202
|
process.exit(1);
|
|
@@ -2,4 +2,4 @@ export { messages as i18n } from '@fecommunity/reactpress-toolkit/config';
|
|
|
2
2
|
export declare const settings: {
|
|
3
3
|
theme: import("@fecommunity/reactpress-toolkit/theme").SiteThemeState;
|
|
4
4
|
};
|
|
5
|
-
export declare const UNPROTECTED_KEYS: ("i18n" | "
|
|
5
|
+
export declare const UNPROTECTED_KEYS: ("i18n" | "systemUrl" | "adminSystemUrl" | "globalSetting" | "systemTitle" | "systemSubTitle" | "systemLogo" | "systemFavicon" | "systemNoticeInfo" | "seoKeyword" | "seoDesc" | "baiduAnalyticsId" | "googleAnalyticsId" | "systemFooterInfo" | "aboutUsGithubUrl" | "aboutUsCommentQr" | "aboutUsWechatQr")[];
|