@fecommunity/reactpress-server 1.0.0-beta.12 → 1.0.0-beta.15
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 +49 -8
- package/dist/tsconfig.build.tsbuildinfo +27 -27
- package/package.json +3 -3
package/bin/reactpress-server.js
CHANGED
|
@@ -58,9 +58,7 @@ async function runInstallationWizard() {
|
|
|
58
58
|
port: parseInt(port),
|
|
59
59
|
user: user.trim(),
|
|
60
60
|
password: password,
|
|
61
|
-
connectTimeout: 5000
|
|
62
|
-
acquireTimeout: 5000,
|
|
63
|
-
timeout: 5000
|
|
61
|
+
connectTimeout: 5000
|
|
64
62
|
});
|
|
65
63
|
|
|
66
64
|
try {
|
|
@@ -193,11 +191,54 @@ function startServer() {
|
|
|
193
191
|
|
|
194
192
|
// Start the NestJS server
|
|
195
193
|
const serverDir = path.dirname(__dirname); // server directory
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
194
|
+
|
|
195
|
+
// Check if we're in development or installed package
|
|
196
|
+
const isDevMode = fs.existsSync(path.join(serverDir, 'src'));
|
|
197
|
+
|
|
198
|
+
let server;
|
|
199
|
+
if (isDevMode) {
|
|
200
|
+
// Development mode - try different nest commands
|
|
201
|
+
const nestCommands = [
|
|
202
|
+
['npx', ['nest', 'start', '--watch']],
|
|
203
|
+
['npm', ['run', 'dev']],
|
|
204
|
+
['node', ['node_modules/.bin/nest', 'start', '--watch']]
|
|
205
|
+
];
|
|
206
|
+
|
|
207
|
+
let commandFound = false;
|
|
208
|
+
for (const [cmd, args] of nestCommands) {
|
|
209
|
+
try {
|
|
210
|
+
server = spawn(cmd, args, {
|
|
211
|
+
cwd: serverDir,
|
|
212
|
+
stdio: 'inherit',
|
|
213
|
+
env: { ...process.env, NODE_ENV: 'development' }
|
|
214
|
+
});
|
|
215
|
+
commandFound = true;
|
|
216
|
+
break;
|
|
217
|
+
} catch (error) {
|
|
218
|
+
console.log(chalk.yellow(`⚠️ ${cmd} not available, trying next option...`));
|
|
219
|
+
continue;
|
|
220
|
+
}
|
|
221
|
+
}
|
|
222
|
+
|
|
223
|
+
if (!commandFound) {
|
|
224
|
+
console.log(chalk.red('❌ Could not start development server. Please install @nestjs/cli globally:'));
|
|
225
|
+
console.log(chalk.cyan('npm install -g @nestjs/cli'));
|
|
226
|
+
return;
|
|
227
|
+
}
|
|
228
|
+
} else {
|
|
229
|
+
// Production mode - use built files
|
|
230
|
+
const mainPath = path.join(serverDir, 'dist', 'main.js');
|
|
231
|
+
if (fs.existsSync(mainPath)) {
|
|
232
|
+
server = spawn('node', [mainPath], {
|
|
233
|
+
cwd: serverDir,
|
|
234
|
+
stdio: 'inherit',
|
|
235
|
+
env: { ...process.env, NODE_ENV: 'production' }
|
|
236
|
+
});
|
|
237
|
+
} else {
|
|
238
|
+
console.log(chalk.red('❌ Server files not found. Please ensure the package is properly installed.'));
|
|
239
|
+
return;
|
|
240
|
+
}
|
|
241
|
+
}
|
|
201
242
|
|
|
202
243
|
server.on('error', (error) => {
|
|
203
244
|
console.log(chalk.red('❌ Failed to start server:'), error.message);
|
|
@@ -161,22 +161,22 @@
|
|
|
161
161
|
"signature": "d2f31f19e1ba6ed59be9259d660a239d9a3fcbbc8e038c6b2009bde34b175fed",
|
|
162
162
|
"affectsGlobalScope": false
|
|
163
163
|
},
|
|
164
|
-
"../../node_modules/.pnpm/@fecommunity+reactpress-config@1.0.0-beta.
|
|
164
|
+
"../../node_modules/.pnpm/@fecommunity+reactpress-config@1.0.0-beta.8/node_modules/@fecommunity/reactpress-config/lib/env.d.ts": {
|
|
165
165
|
"version": "88a06cd512bc833482a6876d6066c214c01f1695d9204b4ec4c801220fdd96b2",
|
|
166
166
|
"signature": "88a06cd512bc833482a6876d6066c214c01f1695d9204b4ec4c801220fdd96b2",
|
|
167
167
|
"affectsGlobalScope": false
|
|
168
168
|
},
|
|
169
|
-
"../../node_modules/.pnpm/@fecommunity+reactpress-config@1.0.0-beta.
|
|
169
|
+
"../../node_modules/.pnpm/@fecommunity+reactpress-config@1.0.0-beta.8/node_modules/@fecommunity/reactpress-config/lib/i18n.d.ts": {
|
|
170
170
|
"version": "902633438878a605dfd324c80a5e07346c564ad797958d7893ec19b67244d2ce",
|
|
171
171
|
"signature": "902633438878a605dfd324c80a5e07346c564ad797958d7893ec19b67244d2ce",
|
|
172
172
|
"affectsGlobalScope": false
|
|
173
173
|
},
|
|
174
|
-
"../../node_modules/.pnpm/@fecommunity+reactpress-config@1.0.0-beta.
|
|
174
|
+
"../../node_modules/.pnpm/@fecommunity+reactpress-config@1.0.0-beta.8/node_modules/@fecommunity/reactpress-config/lib/global.d.ts": {
|
|
175
175
|
"version": "5b8d87f4a55456128450ec046b3d94a8a676942e10ddbc99f3b0619af4887c41",
|
|
176
176
|
"signature": "5b8d87f4a55456128450ec046b3d94a8a676942e10ddbc99f3b0619af4887c41",
|
|
177
177
|
"affectsGlobalScope": false
|
|
178
178
|
},
|
|
179
|
-
"../../node_modules/.pnpm/@fecommunity+reactpress-config@1.0.0-beta.
|
|
179
|
+
"../../node_modules/.pnpm/@fecommunity+reactpress-config@1.0.0-beta.8/node_modules/@fecommunity/reactpress-config/lib/index.d.ts": {
|
|
180
180
|
"version": "1ec1e6cb5a653e5d63f7281b3fb3c5f812430ad6c514b5b19d978aa5a3f8e8bc",
|
|
181
181
|
"signature": "1ec1e6cb5a653e5d63f7281b3fb3c5f812430ad6c514b5b19d978aa5a3f8e8bc",
|
|
182
182
|
"affectsGlobalScope": false
|
|
@@ -4831,9 +4831,9 @@
|
|
|
4831
4831
|
"signature": "24bd01a91f187b22456c7171c07dbf44f3ad57ebd50735aab5c13fa23d7114b4",
|
|
4832
4832
|
"affectsGlobalScope": false
|
|
4833
4833
|
},
|
|
4834
|
-
"../../node_modules/.pnpm/buffer@
|
|
4835
|
-
"version": "
|
|
4836
|
-
"signature": "
|
|
4834
|
+
"../../node_modules/.pnpm/buffer@6.0.3/node_modules/buffer/index.d.ts": {
|
|
4835
|
+
"version": "4967529644e391115ca5592184d4b63980569adf60ee685f968fd59ab1557188",
|
|
4836
|
+
"signature": "4967529644e391115ca5592184d4b63980569adf60ee685f968fd59ab1557188",
|
|
4837
4837
|
"affectsGlobalScope": false
|
|
4838
4838
|
},
|
|
4839
4839
|
"../../node_modules/.pnpm/@types+superagent@8.1.9/node_modules/@types/superagent/lib/request-base.d.ts": {
|
|
@@ -4882,19 +4882,19 @@
|
|
|
4882
4882
|
"configFilePath": "../tsconfig.build.json"
|
|
4883
4883
|
},
|
|
4884
4884
|
"referencedMap": {
|
|
4885
|
-
"../../node_modules/.pnpm/@fecommunity+reactpress-config@1.0.0-beta.
|
|
4885
|
+
"../../node_modules/.pnpm/@fecommunity+reactpress-config@1.0.0-beta.8/node_modules/@fecommunity/reactpress-config/lib/env.d.ts": [
|
|
4886
4886
|
"../../node_modules/.pnpm/date-fns@2.30.0/node_modules/date-fns/typings.d.ts"
|
|
4887
4887
|
],
|
|
4888
|
-
"../../node_modules/.pnpm/@fecommunity+reactpress-config@1.0.0-beta.
|
|
4888
|
+
"../../node_modules/.pnpm/@fecommunity+reactpress-config@1.0.0-beta.8/node_modules/@fecommunity/reactpress-config/lib/global.d.ts": [
|
|
4889
4889
|
"../../node_modules/.pnpm/date-fns@2.30.0/node_modules/date-fns/typings.d.ts"
|
|
4890
4890
|
],
|
|
4891
|
-
"../../node_modules/.pnpm/@fecommunity+reactpress-config@1.0.0-beta.
|
|
4891
|
+
"../../node_modules/.pnpm/@fecommunity+reactpress-config@1.0.0-beta.8/node_modules/@fecommunity/reactpress-config/lib/i18n.d.ts": [
|
|
4892
4892
|
"../../node_modules/.pnpm/date-fns@2.30.0/node_modules/date-fns/typings.d.ts"
|
|
4893
4893
|
],
|
|
4894
|
-
"../../node_modules/.pnpm/@fecommunity+reactpress-config@1.0.0-beta.
|
|
4895
|
-
"../../node_modules/.pnpm/@fecommunity+reactpress-config@1.0.0-beta.
|
|
4896
|
-
"../../node_modules/.pnpm/@fecommunity+reactpress-config@1.0.0-beta.
|
|
4897
|
-
"../../node_modules/.pnpm/@fecommunity+reactpress-config@1.0.0-beta.
|
|
4894
|
+
"../../node_modules/.pnpm/@fecommunity+reactpress-config@1.0.0-beta.8/node_modules/@fecommunity/reactpress-config/lib/index.d.ts": [
|
|
4895
|
+
"../../node_modules/.pnpm/@fecommunity+reactpress-config@1.0.0-beta.8/node_modules/@fecommunity/reactpress-config/lib/env.d.ts",
|
|
4896
|
+
"../../node_modules/.pnpm/@fecommunity+reactpress-config@1.0.0-beta.8/node_modules/@fecommunity/reactpress-config/lib/global.d.ts",
|
|
4897
|
+
"../../node_modules/.pnpm/@fecommunity+reactpress-config@1.0.0-beta.8/node_modules/@fecommunity/reactpress-config/lib/i18n.d.ts",
|
|
4898
4898
|
"../../node_modules/.pnpm/date-fns@2.30.0/node_modules/date-fns/typings.d.ts"
|
|
4899
4899
|
],
|
|
4900
4900
|
"../../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": [
|
|
@@ -6535,7 +6535,7 @@
|
|
|
6535
6535
|
"../../node_modules/.pnpm/axios@0.23.0/node_modules/axios/index.d.ts": [
|
|
6536
6536
|
"../../node_modules/.pnpm/date-fns@2.30.0/node_modules/date-fns/typings.d.ts"
|
|
6537
6537
|
],
|
|
6538
|
-
"../../node_modules/.pnpm/buffer@
|
|
6538
|
+
"../../node_modules/.pnpm/buffer@6.0.3/node_modules/buffer/index.d.ts": [
|
|
6539
6539
|
"../../node_modules/.pnpm/date-fns@2.30.0/node_modules/date-fns/typings.d.ts"
|
|
6540
6540
|
],
|
|
6541
6541
|
"../../node_modules/.pnpm/class-transformer@0.2.3/node_modules/class-transformer/classtransformer.d.ts": [
|
|
@@ -9705,7 +9705,7 @@
|
|
|
9705
9705
|
"../../node_modules/.pnpm/date-fns@2.30.0/node_modules/date-fns/typings.d.ts"
|
|
9706
9706
|
],
|
|
9707
9707
|
"../src/app.module.ts": [
|
|
9708
|
-
"../../node_modules/.pnpm/@fecommunity+reactpress-config@1.0.0-beta.
|
|
9708
|
+
"../../node_modules/.pnpm/@fecommunity+reactpress-config@1.0.0-beta.8/node_modules/@fecommunity/reactpress-config/lib/index.d.ts",
|
|
9709
9709
|
"../../node_modules/.pnpm/@nestjs+common@6.11.11_reflect-metadata@0.1.14_rxjs@6.6.7/node_modules/@nestjs/common/index.d.ts",
|
|
9710
9710
|
"../../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",
|
|
9711
9711
|
"../../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",
|
|
@@ -10093,7 +10093,7 @@
|
|
|
10093
10093
|
"../src/modules/search/search.entity.ts"
|
|
10094
10094
|
],
|
|
10095
10095
|
"../src/modules/setting/setting.constant.ts": [
|
|
10096
|
-
"../../node_modules/.pnpm/@fecommunity+reactpress-config@1.0.0-beta.
|
|
10096
|
+
"../../node_modules/.pnpm/@fecommunity+reactpress-config@1.0.0-beta.8/node_modules/@fecommunity/reactpress-config/lib/index.d.ts",
|
|
10097
10097
|
"../../node_modules/.pnpm/date-fns@2.30.0/node_modules/date-fns/typings.d.ts"
|
|
10098
10098
|
],
|
|
10099
10099
|
"../src/modules/setting/setting.controller.ts": [
|
|
@@ -10307,19 +10307,19 @@
|
|
|
10307
10307
|
]
|
|
10308
10308
|
},
|
|
10309
10309
|
"exportedModulesMap": {
|
|
10310
|
-
"../../node_modules/.pnpm/@fecommunity+reactpress-config@1.0.0-beta.
|
|
10310
|
+
"../../node_modules/.pnpm/@fecommunity+reactpress-config@1.0.0-beta.8/node_modules/@fecommunity/reactpress-config/lib/env.d.ts": [
|
|
10311
10311
|
"../../node_modules/.pnpm/date-fns@2.30.0/node_modules/date-fns/typings.d.ts"
|
|
10312
10312
|
],
|
|
10313
|
-
"../../node_modules/.pnpm/@fecommunity+reactpress-config@1.0.0-beta.
|
|
10313
|
+
"../../node_modules/.pnpm/@fecommunity+reactpress-config@1.0.0-beta.8/node_modules/@fecommunity/reactpress-config/lib/global.d.ts": [
|
|
10314
10314
|
"../../node_modules/.pnpm/date-fns@2.30.0/node_modules/date-fns/typings.d.ts"
|
|
10315
10315
|
],
|
|
10316
|
-
"../../node_modules/.pnpm/@fecommunity+reactpress-config@1.0.0-beta.
|
|
10316
|
+
"../../node_modules/.pnpm/@fecommunity+reactpress-config@1.0.0-beta.8/node_modules/@fecommunity/reactpress-config/lib/i18n.d.ts": [
|
|
10317
10317
|
"../../node_modules/.pnpm/date-fns@2.30.0/node_modules/date-fns/typings.d.ts"
|
|
10318
10318
|
],
|
|
10319
|
-
"../../node_modules/.pnpm/@fecommunity+reactpress-config@1.0.0-beta.
|
|
10320
|
-
"../../node_modules/.pnpm/@fecommunity+reactpress-config@1.0.0-beta.
|
|
10321
|
-
"../../node_modules/.pnpm/@fecommunity+reactpress-config@1.0.0-beta.
|
|
10322
|
-
"../../node_modules/.pnpm/@fecommunity+reactpress-config@1.0.0-beta.
|
|
10319
|
+
"../../node_modules/.pnpm/@fecommunity+reactpress-config@1.0.0-beta.8/node_modules/@fecommunity/reactpress-config/lib/index.d.ts": [
|
|
10320
|
+
"../../node_modules/.pnpm/@fecommunity+reactpress-config@1.0.0-beta.8/node_modules/@fecommunity/reactpress-config/lib/env.d.ts",
|
|
10321
|
+
"../../node_modules/.pnpm/@fecommunity+reactpress-config@1.0.0-beta.8/node_modules/@fecommunity/reactpress-config/lib/global.d.ts",
|
|
10322
|
+
"../../node_modules/.pnpm/@fecommunity+reactpress-config@1.0.0-beta.8/node_modules/@fecommunity/reactpress-config/lib/i18n.d.ts",
|
|
10323
10323
|
"../../node_modules/.pnpm/date-fns@2.30.0/node_modules/date-fns/typings.d.ts"
|
|
10324
10324
|
],
|
|
10325
10325
|
"../../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": [
|
|
@@ -11960,7 +11960,7 @@
|
|
|
11960
11960
|
"../../node_modules/.pnpm/axios@0.23.0/node_modules/axios/index.d.ts": [
|
|
11961
11961
|
"../../node_modules/.pnpm/date-fns@2.30.0/node_modules/date-fns/typings.d.ts"
|
|
11962
11962
|
],
|
|
11963
|
-
"../../node_modules/.pnpm/buffer@
|
|
11963
|
+
"../../node_modules/.pnpm/buffer@6.0.3/node_modules/buffer/index.d.ts": [
|
|
11964
11964
|
"../../node_modules/.pnpm/date-fns@2.30.0/node_modules/date-fns/typings.d.ts"
|
|
11965
11965
|
],
|
|
11966
11966
|
"../../node_modules/.pnpm/class-transformer@0.2.3/node_modules/class-transformer/classtransformer.d.ts": [
|
|
@@ -15247,8 +15247,8 @@
|
|
|
15247
15247
|
"../src/modules/search/search.entity.ts"
|
|
15248
15248
|
],
|
|
15249
15249
|
"../src/modules/setting/setting.constant.ts": [
|
|
15250
|
-
"../../node_modules/.pnpm/@fecommunity+reactpress-config@1.0.0-beta.
|
|
15251
|
-
"../../node_modules/.pnpm/@fecommunity+reactpress-config@1.0.0-beta.
|
|
15250
|
+
"../../node_modules/.pnpm/@fecommunity+reactpress-config@1.0.0-beta.8/node_modules/@fecommunity/reactpress-config/lib/global.d.ts",
|
|
15251
|
+
"../../node_modules/.pnpm/@fecommunity+reactpress-config@1.0.0-beta.8/node_modules/@fecommunity/reactpress-config/lib/index.d.ts"
|
|
15252
15252
|
],
|
|
15253
15253
|
"../src/modules/setting/setting.controller.ts": [
|
|
15254
15254
|
"../../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.15",
|
|
4
4
|
"description": "ReactPress Server - NestJS-based backend API for ReactPress CMS",
|
|
5
5
|
"author": "fecommunity",
|
|
6
6
|
"license": "MIT",
|
|
@@ -98,10 +98,10 @@
|
|
|
98
98
|
"typeorm": "^0.2.22",
|
|
99
99
|
"ua-parser-js": "^0.7.28",
|
|
100
100
|
"open": "^8.2.1",
|
|
101
|
-
"express": "^4.18.2"
|
|
101
|
+
"express": "^4.18.2",
|
|
102
|
+
"@nestjs/cli": "^6.9.0"
|
|
102
103
|
},
|
|
103
104
|
"devDependencies": {
|
|
104
|
-
"@nestjs/cli": "^6.9.0",
|
|
105
105
|
"@nestjs/schematics": "^6.7.0",
|
|
106
106
|
"@nestjs/testing": "^6.7.1",
|
|
107
107
|
"@types/express": "4.17.18",
|