@fecommunity/reactpress-server 1.0.0-beta.21 → 1.0.0-beta.23
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/README.md
CHANGED
|
@@ -7,7 +7,11 @@ ReactPress Server - NestJS-based backend API for ReactPress CMS with WordPress-s
|
|
|
7
7
|
### Installation & Setup
|
|
8
8
|
|
|
9
9
|
```bash
|
|
10
|
+
# Regular startup
|
|
10
11
|
npx @fecommunity/reactpress-server
|
|
12
|
+
|
|
13
|
+
# PM2 startup
|
|
14
|
+
npx @fecommunity/reactpress-server --pm2
|
|
11
15
|
```
|
|
12
16
|
|
|
13
17
|
That's it! The command will automatically:
|
|
@@ -25,6 +29,7 @@ That's it! The command will automatically:
|
|
|
25
29
|
- 🔌 **Database auto-setup** - Creates MySQL database if it doesn't exist
|
|
26
30
|
- 🎯 **Seamless flow** - From installation to running server in minutes
|
|
27
31
|
- 📖 **Auto-documentation** - Swagger API docs available immediately
|
|
32
|
+
- ⚡ **PM2 support** - Optional PM2 process management for production
|
|
28
33
|
|
|
29
34
|
### Requirements
|
|
30
35
|
|
|
@@ -50,6 +55,21 @@ npx @fecommunity/reactpress-server
|
|
|
50
55
|
npx @fecommunity/reactpress-client
|
|
51
56
|
```
|
|
52
57
|
|
|
58
|
+
### PM2 Support
|
|
59
|
+
|
|
60
|
+
ReactPress server supports PM2 process management for production deployments:
|
|
61
|
+
|
|
62
|
+
```bash
|
|
63
|
+
# Start with PM2
|
|
64
|
+
npx @fecommunity/reactpress-server --pm2
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
PM2 features:
|
|
68
|
+
- Automatic process restart on crash
|
|
69
|
+
- Memory monitoring
|
|
70
|
+
- Log management
|
|
71
|
+
- Cluster mode support
|
|
72
|
+
|
|
53
73
|
### Configuration
|
|
54
74
|
|
|
55
75
|
The installation wizard will create a `.env` file with:
|
|
@@ -84,6 +104,9 @@ npm install
|
|
|
84
104
|
|
|
85
105
|
# Start development server
|
|
86
106
|
npm run dev
|
|
107
|
+
|
|
108
|
+
# Start with PM2 (development)
|
|
109
|
+
npm run pm2:start
|
|
87
110
|
```
|
|
88
111
|
|
|
89
112
|
### Docker Support
|
package/bin/reactpress-server.js
CHANGED
|
@@ -3,43 +3,188 @@
|
|
|
3
3
|
/**
|
|
4
4
|
* ReactPress Server CLI Entry Point
|
|
5
5
|
* This script allows starting the ReactPress server via npx
|
|
6
|
+
* Supports both regular and PM2 startup modes
|
|
6
7
|
*/
|
|
7
8
|
|
|
8
9
|
const path = require('path');
|
|
9
10
|
const fs = require('fs');
|
|
11
|
+
const { spawn, spawnSync } = require('child_process');
|
|
12
|
+
|
|
13
|
+
// Get command line arguments
|
|
14
|
+
const args = process.argv.slice(2);
|
|
15
|
+
const usePM2 = args.includes('--pm2');
|
|
16
|
+
const showHelp = args.includes('--help') || args.includes('-h');
|
|
17
|
+
|
|
18
|
+
// Show help if requested
|
|
19
|
+
if (showHelp) {
|
|
20
|
+
console.log(`
|
|
21
|
+
ReactPress Server - NestJS-based backend API for ReactPress CMS
|
|
22
|
+
|
|
23
|
+
Usage:
|
|
24
|
+
npx @fecommunity/reactpress-server [options]
|
|
25
|
+
|
|
26
|
+
Options:
|
|
27
|
+
--pm2 Start server with PM2 process manager
|
|
28
|
+
--help, -h Show this help message
|
|
29
|
+
|
|
30
|
+
Examples:
|
|
31
|
+
npx @fecommunity/reactpress-server # Start server normally
|
|
32
|
+
npx @fecommunity/reactpress-server --pm2 # Start server with PM2
|
|
33
|
+
npx @fecommunity/reactpress-server --help # Show this help message
|
|
34
|
+
`);
|
|
35
|
+
process.exit(0);
|
|
36
|
+
}
|
|
10
37
|
|
|
11
38
|
// Get the directory where this script is located
|
|
12
39
|
const binDir = __dirname;
|
|
13
40
|
const serverDir = path.join(binDir, '..');
|
|
14
41
|
const distPath = path.join(serverDir, 'dist', 'main.js');
|
|
42
|
+
const ecosystemPath = path.join(serverDir, 'ecosystem.config.js');
|
|
15
43
|
|
|
16
|
-
//
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
44
|
+
// Function to check if PM2 is installed
|
|
45
|
+
function isPM2Installed() {
|
|
46
|
+
try {
|
|
47
|
+
require.resolve('pm2');
|
|
48
|
+
return true;
|
|
49
|
+
} catch (e) {
|
|
50
|
+
// Check if PM2 is installed globally
|
|
51
|
+
try {
|
|
52
|
+
spawnSync('pm2', ['--version'], { stdio: 'ignore' });
|
|
53
|
+
return true;
|
|
54
|
+
} catch (e) {
|
|
55
|
+
return false;
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
// Function to install PM2
|
|
61
|
+
function installPM2() {
|
|
62
|
+
console.log('[ReactPress Server] Installing PM2...');
|
|
63
|
+
const installResult = spawnSync('npm', ['install', 'pm2', '--no-save'], {
|
|
23
64
|
stdio: 'inherit',
|
|
24
65
|
cwd: serverDir
|
|
25
66
|
});
|
|
26
67
|
|
|
27
|
-
if (
|
|
28
|
-
console.error('[ReactPress Server] Failed to
|
|
29
|
-
|
|
68
|
+
if (installResult.status !== 0) {
|
|
69
|
+
console.error('[ReactPress Server] Failed to install PM2');
|
|
70
|
+
return false;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
return true;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
// Function to start with PM2
|
|
77
|
+
function startWithPM2() {
|
|
78
|
+
// Check if PM2 is installed
|
|
79
|
+
if (!isPM2Installed()) {
|
|
80
|
+
// Try to install PM2
|
|
81
|
+
if (!installPM2()) {
|
|
82
|
+
console.error('[ReactPress Server] Cannot start with PM2');
|
|
83
|
+
process.exit(1);
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
// Check if the server is built
|
|
88
|
+
if (!fs.existsSync(distPath)) {
|
|
89
|
+
console.log('[ReactPress Server] Server not built yet. Building...');
|
|
90
|
+
|
|
91
|
+
// Try to build the server
|
|
92
|
+
const buildResult = spawnSync('npm', ['run', 'build'], {
|
|
93
|
+
stdio: 'inherit',
|
|
94
|
+
cwd: serverDir
|
|
95
|
+
});
|
|
96
|
+
|
|
97
|
+
if (buildResult.status !== 0) {
|
|
98
|
+
console.error('[ReactPress Server] Failed to build server');
|
|
99
|
+
process.exit(1);
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
console.log('[ReactPress Server] Starting with PM2...');
|
|
104
|
+
|
|
105
|
+
// Use ecosystem.config.js if it exists, otherwise use direct command
|
|
106
|
+
let pm2Command = 'pm2';
|
|
107
|
+
try {
|
|
108
|
+
// Try to resolve PM2 path
|
|
109
|
+
pm2Command = path.join(serverDir, 'node_modules', '.bin', 'pm2');
|
|
110
|
+
if (!fs.existsSync(pm2Command)) {
|
|
111
|
+
pm2Command = 'pm2';
|
|
112
|
+
}
|
|
113
|
+
} catch (e) {
|
|
114
|
+
pm2Command = 'pm2';
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
// Check if ecosystem.config.js exists
|
|
118
|
+
if (fs.existsSync(ecosystemPath)) {
|
|
119
|
+
const pm2 = spawn(pm2Command, ['start', ecosystemPath], {
|
|
120
|
+
stdio: 'inherit',
|
|
121
|
+
cwd: serverDir
|
|
122
|
+
});
|
|
123
|
+
|
|
124
|
+
pm2.on('close', (code) => {
|
|
125
|
+
console.log(`[ReactPress Server] PM2 process exited with code ${code}`);
|
|
126
|
+
process.exit(code);
|
|
127
|
+
});
|
|
128
|
+
|
|
129
|
+
pm2.on('error', (error) => {
|
|
130
|
+
console.error('[ReactPress Server] Failed to start with PM2:', error);
|
|
131
|
+
process.exit(1);
|
|
132
|
+
});
|
|
133
|
+
} else {
|
|
134
|
+
// Fallback to direct start
|
|
135
|
+
const pm2 = spawn(pm2Command, ['start', distPath, '--name', 'reactpress-server'], {
|
|
136
|
+
stdio: 'inherit',
|
|
137
|
+
cwd: serverDir
|
|
138
|
+
});
|
|
139
|
+
|
|
140
|
+
pm2.on('close', (code) => {
|
|
141
|
+
console.log(`[ReactPress Server] PM2 process exited with code ${code}`);
|
|
142
|
+
process.exit(code);
|
|
143
|
+
});
|
|
144
|
+
|
|
145
|
+
pm2.on('error', (error) => {
|
|
146
|
+
console.error('[ReactPress Server] Failed to start with PM2:', error);
|
|
147
|
+
process.exit(1);
|
|
148
|
+
});
|
|
30
149
|
}
|
|
31
150
|
}
|
|
32
151
|
|
|
33
|
-
//
|
|
34
|
-
|
|
152
|
+
// Function to start with regular Node.js
|
|
153
|
+
function startWithNode() {
|
|
154
|
+
// Check if the server is built
|
|
155
|
+
if (!fs.existsSync(distPath)) {
|
|
156
|
+
console.log('[ReactPress Server] Server not built yet. Building...');
|
|
157
|
+
|
|
158
|
+
// Try to build the server
|
|
159
|
+
const buildResult = spawnSync('npm', ['run', 'build'], {
|
|
160
|
+
stdio: 'inherit',
|
|
161
|
+
cwd: serverDir
|
|
162
|
+
});
|
|
163
|
+
|
|
164
|
+
if (buildResult.status !== 0) {
|
|
165
|
+
console.error('[ReactPress Server] Failed to build server');
|
|
166
|
+
process.exit(1);
|
|
167
|
+
}
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
// Change to the server directory
|
|
171
|
+
process.chdir(serverDir);
|
|
172
|
+
|
|
173
|
+
// Set environment variables
|
|
174
|
+
process.env.NODE_ENV = process.env.NODE_ENV || 'production';
|
|
35
175
|
|
|
36
|
-
//
|
|
37
|
-
|
|
176
|
+
// Import and run the server
|
|
177
|
+
try {
|
|
178
|
+
require(distPath);
|
|
179
|
+
} catch (error) {
|
|
180
|
+
console.error('[ReactPress Server] Failed to start server:', error);
|
|
181
|
+
process.exit(1);
|
|
182
|
+
}
|
|
183
|
+
}
|
|
38
184
|
|
|
39
|
-
//
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
process.exit(1);
|
|
185
|
+
// Main execution
|
|
186
|
+
if (usePM2) {
|
|
187
|
+
startWithPM2();
|
|
188
|
+
} else {
|
|
189
|
+
startWithNode();
|
|
45
190
|
}
|
|
@@ -26,30 +26,54 @@ let SettingService = class SettingService {
|
|
|
26
26
|
this.initGlobalConfig();
|
|
27
27
|
}
|
|
28
28
|
async initI18n() {
|
|
29
|
-
const items = await this.settingRepository.find();
|
|
30
|
-
const target = (items && items[0]) || {};
|
|
31
|
-
let data = {};
|
|
32
29
|
try {
|
|
33
|
-
|
|
30
|
+
console.log('[SettingService] i18n constant keys:', Object.keys(setting_constant_1.i18n));
|
|
31
|
+
const items = await this.settingRepository.find();
|
|
32
|
+
const target = (items && items[0]) || {};
|
|
33
|
+
let data = {};
|
|
34
|
+
try {
|
|
35
|
+
if (target.i18n) {
|
|
36
|
+
data = JSON.parse(target.i18n);
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
catch (e) {
|
|
40
|
+
console.warn('[SettingService] Error parsing i18n from DB:', e);
|
|
41
|
+
data = {};
|
|
42
|
+
}
|
|
43
|
+
const mergedI18n = merge({}, setting_constant_1.i18n, data);
|
|
44
|
+
const mergedI18nString = JSON.stringify(mergedI18n);
|
|
45
|
+
if (!target.i18n || target.i18n !== mergedI18nString) {
|
|
46
|
+
target.i18n = mergedI18nString;
|
|
47
|
+
await this.settingRepository.save(target);
|
|
48
|
+
console.log('[SettingService] i18n updated in database');
|
|
49
|
+
}
|
|
50
|
+
else {
|
|
51
|
+
console.log('[SettingService] i18n already up to date');
|
|
52
|
+
}
|
|
34
53
|
}
|
|
35
|
-
catch (
|
|
36
|
-
|
|
54
|
+
catch (error) {
|
|
55
|
+
console.error('[SettingService] Error in initI18n:', error);
|
|
56
|
+
throw error;
|
|
37
57
|
}
|
|
38
|
-
target.i18n = JSON.stringify(merge({}, setting_constant_1.i18n, data));
|
|
39
|
-
await this.settingRepository.save(target);
|
|
40
58
|
}
|
|
41
59
|
async initGlobalConfig() {
|
|
42
60
|
const items = await this.settingRepository.find();
|
|
43
61
|
const target = (items && items[0]) || {};
|
|
44
62
|
let data = {};
|
|
45
63
|
try {
|
|
46
|
-
|
|
64
|
+
if (target.globalSetting) {
|
|
65
|
+
data = JSON.parse(target.globalSetting);
|
|
66
|
+
}
|
|
47
67
|
}
|
|
48
68
|
catch (e) {
|
|
49
69
|
data = {};
|
|
50
70
|
}
|
|
51
|
-
|
|
52
|
-
|
|
71
|
+
const mergedSettings = merge({}, setting_constant_1.settings, data);
|
|
72
|
+
const mergedSettingsString = JSON.stringify(mergedSettings);
|
|
73
|
+
if (!target.globalSetting || target.globalSetting !== mergedSettingsString) {
|
|
74
|
+
target.globalSetting = mergedSettingsString;
|
|
75
|
+
await this.settingRepository.save(target);
|
|
76
|
+
}
|
|
53
77
|
}
|
|
54
78
|
async findAll(innerInvoke = false, isAdmin = false) {
|
|
55
79
|
const data = await this.settingRepository.find();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"setting.service.js","sourceRoot":"","sources":["../../../src/modules/setting/setting.service.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,2CAA4C;AAC5C,6CAAmD;AACnD,mCAAmC;AACnC,qCAAqC;AAErC,yDAAsE;AACtE,qDAA2C;AAG3C,IAAa,cAAc,GAA3B,MAAa,cAAc;IACzB,YAEmB,iBAAsC;QAAtC,sBAAiB,GAAjB,iBAAiB,CAAqB;QAEvD,IAAI,CAAC,QAAQ,EAAE,CAAC;QAChB,IAAI,CAAC,gBAAgB,EAAE,CAAC;IAC1B,CAAC;IAKD,KAAK,CAAC,QAAQ;QACZ,MAAM,KAAK,GAAG,MAAM,IAAI,CAAC,iBAAiB,CAAC,IAAI,EAAE,CAAC;
|
|
1
|
+
{"version":3,"file":"setting.service.js","sourceRoot":"","sources":["../../../src/modules/setting/setting.service.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,2CAA4C;AAC5C,6CAAmD;AACnD,mCAAmC;AACnC,qCAAqC;AAErC,yDAAsE;AACtE,qDAA2C;AAG3C,IAAa,cAAc,GAA3B,MAAa,cAAc;IACzB,Y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B,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE;YACjD,CAAC,CAAC,CAAC,CAAC,GAAG,GAAG,CAAC,CAAC,CAAC,CAAC;YACd,OAAO,CAAC,CAAC;QACX,CAAC,EAAE,EAAE,CAAY,CAAC;QAElB,OAAO,SAAS,CAAC;IACnB,CAAC;IAOD,KAAK,CAAC,MAAM,CAAC,OAAyB;QACpC,MAAM,GAAG,GAAG,MAAM,IAAI,CAAC,iBAAiB,CAAC,IAAI,EAAE,CAAC;QAEhD,MAAM,UAAU,GACd,GAAG,IAAI,GAAG,CAAC,CAAC,CAAC;YACX,CAAC,CAAC,MAAM,IAAI,CAAC,iBAAiB,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,OAAO,CAAC;YACrD,CAAC,CAAC,MAAM,IAAI,CAAC,iBAAiB,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC;QACnD,OAAO,IAAI,CAAC,iBAAiB,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;IACjD,CAAC;CACF,CAAA;AA5GY,cAAc;IAD1B,mBAAU,EAAE;IAGR,WAAA,0BAAgB,CAAC,wBAAO,CAAC,CAAA;qCACU,oBAAU;GAHrC,cAAc,CA4G1B;AA5GY,wCAAc"}
|
|
@@ -161,22 +161,22 @@
|
|
|
161
161
|
"signature": "d2f31f19e1ba6ed59be9259d660a239d9a3fcbbc8e038c6b2009bde34b175fed",
|
|
162
162
|
"affectsGlobalScope": false
|
|
163
163
|
},
|
|
164
|
-
"../../
|
|
164
|
+
"../../config/lib/env.d.ts": {
|
|
165
165
|
"version": "88a06cd512bc833482a6876d6066c214c01f1695d9204b4ec4c801220fdd96b2",
|
|
166
166
|
"signature": "88a06cd512bc833482a6876d6066c214c01f1695d9204b4ec4c801220fdd96b2",
|
|
167
167
|
"affectsGlobalScope": false
|
|
168
168
|
},
|
|
169
|
-
"../../
|
|
169
|
+
"../../config/lib/i18n.d.ts": {
|
|
170
170
|
"version": "902633438878a605dfd324c80a5e07346c564ad797958d7893ec19b67244d2ce",
|
|
171
171
|
"signature": "902633438878a605dfd324c80a5e07346c564ad797958d7893ec19b67244d2ce",
|
|
172
172
|
"affectsGlobalScope": false
|
|
173
173
|
},
|
|
174
|
-
"../../
|
|
174
|
+
"../../config/lib/global.d.ts": {
|
|
175
175
|
"version": "5b8d87f4a55456128450ec046b3d94a8a676942e10ddbc99f3b0619af4887c41",
|
|
176
176
|
"signature": "5b8d87f4a55456128450ec046b3d94a8a676942e10ddbc99f3b0619af4887c41",
|
|
177
177
|
"affectsGlobalScope": false
|
|
178
178
|
},
|
|
179
|
-
"../../
|
|
179
|
+
"../../config/lib/index.d.ts": {
|
|
180
180
|
"version": "1ec1e6cb5a653e5d63f7281b3fb3c5f812430ad6c514b5b19d978aa5a3f8e8bc",
|
|
181
181
|
"signature": "1ec1e6cb5a653e5d63f7281b3fb3c5f812430ad6c514b5b19d978aa5a3f8e8bc",
|
|
182
182
|
"affectsGlobalScope": false
|
|
@@ -3792,7 +3792,7 @@
|
|
|
3792
3792
|
"affectsGlobalScope": false
|
|
3793
3793
|
},
|
|
3794
3794
|
"../src/modules/setting/setting.service.ts": {
|
|
3795
|
-
"version": "
|
|
3795
|
+
"version": "852d5c5517f0cd9841bda297d223fca800c4a5778b3d974aa48106fcd8cbfba3",
|
|
3796
3796
|
"signature": "cc63adffef524f8617baf980bc9d996a811a19ba0633c9a41e901de2dec72aad",
|
|
3797
3797
|
"affectsGlobalScope": false
|
|
3798
3798
|
},
|
|
@@ -5047,19 +5047,19 @@
|
|
|
5047
5047
|
"configFilePath": "../tsconfig.build.json"
|
|
5048
5048
|
},
|
|
5049
5049
|
"referencedMap": {
|
|
5050
|
-
"../../
|
|
5050
|
+
"../../config/lib/env.d.ts": [
|
|
5051
5051
|
"../../node_modules/.pnpm/date-fns@2.30.0/node_modules/date-fns/typings.d.ts"
|
|
5052
5052
|
],
|
|
5053
|
-
"../../
|
|
5053
|
+
"../../config/lib/global.d.ts": [
|
|
5054
5054
|
"../../node_modules/.pnpm/date-fns@2.30.0/node_modules/date-fns/typings.d.ts"
|
|
5055
5055
|
],
|
|
5056
|
-
"../../
|
|
5056
|
+
"../../config/lib/i18n.d.ts": [
|
|
5057
5057
|
"../../node_modules/.pnpm/date-fns@2.30.0/node_modules/date-fns/typings.d.ts"
|
|
5058
5058
|
],
|
|
5059
|
-
"../../
|
|
5060
|
-
"../../
|
|
5061
|
-
"../../
|
|
5062
|
-
"../../
|
|
5059
|
+
"../../config/lib/index.d.ts": [
|
|
5060
|
+
"../../config/lib/env.d.ts",
|
|
5061
|
+
"../../config/lib/global.d.ts",
|
|
5062
|
+
"../../config/lib/i18n.d.ts",
|
|
5063
5063
|
"../../node_modules/.pnpm/date-fns@2.30.0/node_modules/date-fns/typings.d.ts"
|
|
5064
5064
|
],
|
|
5065
5065
|
"../../node_modules/.pnpm/@nestjs+common@6.11.11_reflect-metadata@0.1.14_rxjs@6.6.7/node_modules/@nestjs/common/cache/cache.constants.d.ts": [
|
|
@@ -10044,7 +10044,7 @@
|
|
|
10044
10044
|
"../../node_modules/.pnpm/date-fns@2.30.0/node_modules/date-fns/typings.d.ts"
|
|
10045
10045
|
],
|
|
10046
10046
|
"../src/app.module.ts": [
|
|
10047
|
-
"../../
|
|
10047
|
+
"../../config/lib/index.d.ts",
|
|
10048
10048
|
"../../node_modules/.pnpm/@nestjs+common@6.11.11_reflect-metadata@0.1.14_rxjs@6.6.7/node_modules/@nestjs/common/index.d.ts",
|
|
10049
10049
|
"../../node_modules/.pnpm/@nestjs+config@0.6.3_@nestjs+common@6.11.11_reflect-metadata@0.1.14_rxjs@6.6.7__reflect-metadata@0.1.14_rxjs@6.6.7/node_modules/@nestjs/config/index.d.ts",
|
|
10050
10050
|
"../../node_modules/.pnpm/@nestjs+typeorm@6.3.4_@nestjs+common@6.11.11_reflect-metadata@0.1.14_rxjs@6.6.7__@nestj_d653714ff2384d9f9869c554302af1a8/node_modules/@nestjs/typeorm/index.d.ts",
|
|
@@ -10431,7 +10431,7 @@
|
|
|
10431
10431
|
"../src/modules/search/search.entity.ts"
|
|
10432
10432
|
],
|
|
10433
10433
|
"../src/modules/setting/setting.constant.ts": [
|
|
10434
|
-
"../../
|
|
10434
|
+
"../../config/lib/index.d.ts",
|
|
10435
10435
|
"../../node_modules/.pnpm/date-fns@2.30.0/node_modules/date-fns/typings.d.ts"
|
|
10436
10436
|
],
|
|
10437
10437
|
"../src/modules/setting/setting.controller.ts": [
|
|
@@ -10656,19 +10656,19 @@
|
|
|
10656
10656
|
]
|
|
10657
10657
|
},
|
|
10658
10658
|
"exportedModulesMap": {
|
|
10659
|
-
"../../
|
|
10659
|
+
"../../config/lib/env.d.ts": [
|
|
10660
10660
|
"../../node_modules/.pnpm/date-fns@2.30.0/node_modules/date-fns/typings.d.ts"
|
|
10661
10661
|
],
|
|
10662
|
-
"../../
|
|
10662
|
+
"../../config/lib/global.d.ts": [
|
|
10663
10663
|
"../../node_modules/.pnpm/date-fns@2.30.0/node_modules/date-fns/typings.d.ts"
|
|
10664
10664
|
],
|
|
10665
|
-
"../../
|
|
10665
|
+
"../../config/lib/i18n.d.ts": [
|
|
10666
10666
|
"../../node_modules/.pnpm/date-fns@2.30.0/node_modules/date-fns/typings.d.ts"
|
|
10667
10667
|
],
|
|
10668
|
-
"../../
|
|
10669
|
-
"../../
|
|
10670
|
-
"../../
|
|
10671
|
-
"../../
|
|
10668
|
+
"../../config/lib/index.d.ts": [
|
|
10669
|
+
"../../config/lib/env.d.ts",
|
|
10670
|
+
"../../config/lib/global.d.ts",
|
|
10671
|
+
"../../config/lib/i18n.d.ts",
|
|
10672
10672
|
"../../node_modules/.pnpm/date-fns@2.30.0/node_modules/date-fns/typings.d.ts"
|
|
10673
10673
|
],
|
|
10674
10674
|
"../../node_modules/.pnpm/@nestjs+common@6.11.11_reflect-metadata@0.1.14_rxjs@6.6.7/node_modules/@nestjs/common/cache/cache.constants.d.ts": [
|
|
@@ -15770,8 +15770,8 @@
|
|
|
15770
15770
|
"../src/modules/search/search.entity.ts"
|
|
15771
15771
|
],
|
|
15772
15772
|
"../src/modules/setting/setting.constant.ts": [
|
|
15773
|
-
"../../
|
|
15774
|
-
"../../
|
|
15773
|
+
"../../config/lib/global.d.ts",
|
|
15774
|
+
"../../config/lib/index.d.ts"
|
|
15775
15775
|
],
|
|
15776
15776
|
"../src/modules/setting/setting.controller.ts": [
|
|
15777
15777
|
"../../node_modules/.pnpm/@nestjs+jwt@6.1.2_@nestjs+common@6.11.11_reflect-metadata@0.1.14_rxjs@6.6.7_/node_modules/@nestjs/jwt/index.d.ts",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fecommunity/reactpress-server",
|
|
3
|
-
"version": "1.0.0-beta.
|
|
3
|
+
"version": "1.0.0-beta.23",
|
|
4
4
|
"description": "ReactPress Server - NestJS-based backend API for ReactPress CMS",
|
|
5
5
|
"author": "fecommunity",
|
|
6
6
|
"license": "MIT",
|
|
@@ -44,17 +44,23 @@
|
|
|
44
44
|
"dev": "nest start --watch",
|
|
45
45
|
"debug": "nest start --debug --watch",
|
|
46
46
|
"start": "cross-env NODE_ENV=production node dist/main",
|
|
47
|
-
"pm2": "pm2 start npm --name @reactpress
|
|
47
|
+
"pm2": "pm2 start npm --name @fecommunity/reactpress-server -- start",
|
|
48
48
|
"lint": "tslint -p tsconfig.json -c tslint.json",
|
|
49
49
|
"test": "jest",
|
|
50
50
|
"test:watch": "jest --watch",
|
|
51
51
|
"test:cov": "jest --coverage",
|
|
52
52
|
"test:debug": "node --inspect-brk -r tsconfig-paths/register -r ts-node/register node_modules/.bin/jest --runInBand",
|
|
53
53
|
"test:e2e": "jest --config ./test/jest-e2e.json",
|
|
54
|
-
"prepublishOnly": "npm run build"
|
|
54
|
+
"prepublishOnly": "npm run build",
|
|
55
|
+
"pm2:start": "pm2 start dist/main.js --name reactpress-server",
|
|
56
|
+
"pm2:stop": "pm2 stop reactpress-server",
|
|
57
|
+
"pm2:restart": "pm2 restart reactpress-server",
|
|
58
|
+
"pm2:delete": "pm2 delete reactpress-server",
|
|
59
|
+
"pm2:logs": "pm2 logs reactpress-server",
|
|
60
|
+
"pm2:status": "pm2 status reactpress-server"
|
|
55
61
|
},
|
|
56
62
|
"dependencies": {
|
|
57
|
-
"@fecommunity/reactpress-config": "
|
|
63
|
+
"@fecommunity/reactpress-config": "workspace:*",
|
|
58
64
|
"commander": "^9.4.1",
|
|
59
65
|
"chalk": "^4.1.2",
|
|
60
66
|
"inquirer": "^8.2.4",
|
|
@@ -99,7 +105,8 @@
|
|
|
99
105
|
"ua-parser-js": "^0.7.28",
|
|
100
106
|
"open": "^8.2.1",
|
|
101
107
|
"express": "^4.18.2",
|
|
102
|
-
"@nestjs/cli": "^6.9.0"
|
|
108
|
+
"@nestjs/cli": "^6.9.0",
|
|
109
|
+
"pm2": "^5.2.0"
|
|
103
110
|
},
|
|
104
111
|
"devDependencies": {
|
|
105
112
|
"@nestjs/schematics": "^6.7.0",
|