@solidstarters/create-solid-app 1.2.37 → 1.2.38
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,11 +1,9 @@
|
|
|
1
1
|
import * as Joi from '@hapi/joi';
|
|
2
|
-
import { CacheModule } from '@nestjs/cache-manager';
|
|
3
2
|
import { DynamicModule, Module } from '@nestjs/common';
|
|
4
3
|
import { ConfigModule } from '@nestjs/config';
|
|
5
4
|
import { SolidCoreModule } from '@solidstarters/solid-core';
|
|
6
5
|
import appConfig from './app.config';
|
|
7
6
|
import { AppService } from './app.service';
|
|
8
|
-
import { RedisOptions } from '@solidstarters/solid-core';
|
|
9
7
|
import { EventEmitterModule } from '@nestjs/event-emitter';
|
|
10
8
|
import { DefaultDBModule } from './app-default-database.module';
|
|
11
9
|
import { WinstonModule } from 'nest-winston';
|
|
@@ -36,8 +34,6 @@ import { ClsModule } from 'nestjs-cls';
|
|
|
36
34
|
load: [appConfig],
|
|
37
35
|
}),
|
|
38
36
|
|
|
39
|
-
CacheModule.registerAsync(RedisOptions),
|
|
40
|
-
|
|
41
37
|
DefaultDBModule,
|
|
42
38
|
|
|
43
39
|
|
|
@@ -8,6 +8,15 @@ import { AppModule } from "./app.module";
|
|
|
8
8
|
|
|
9
9
|
const logger = new Logger("Bootstrap");
|
|
10
10
|
|
|
11
|
+
// Suppress punycode deprecation warning from dependencies
|
|
12
|
+
process.removeAllListeners('warning');
|
|
13
|
+
process.on('warning', (warning) => {
|
|
14
|
+
if (warning.name === 'DeprecationWarning' && warning.message.includes('punycode')) {
|
|
15
|
+
return; // Ignore known punycode deprecation from dependencies
|
|
16
|
+
}
|
|
17
|
+
console.warn(warning); // Still show other warnings
|
|
18
|
+
});
|
|
19
|
+
|
|
11
20
|
// ---- Global safety nets (must be first) ----
|
|
12
21
|
process.on('unhandledRejection', (reason, promise) => {
|
|
13
22
|
console.error('Unhandled Rejection at:', promise, 'reason:', reason);
|
|
@@ -17,12 +26,17 @@ process.on('uncaughtException', (err) => {
|
|
|
17
26
|
});
|
|
18
27
|
|
|
19
28
|
async function bootstrap() {
|
|
20
|
-
|
|
29
|
+
// setup log levels...
|
|
30
|
+
const showLogs = process.argv.includes('--verbose') || process.argv.includes('-v');
|
|
31
|
+
// strip before nest-commander runs...
|
|
32
|
+
stripArg('--verbose');
|
|
33
|
+
stripArg('-v');
|
|
34
|
+
|
|
21
35
|
// validate project existence
|
|
22
36
|
validateProjectRootPath();
|
|
23
|
-
|
|
37
|
+
|
|
24
38
|
// Define log levels based on the flag
|
|
25
|
-
const logLevels = showLogs ? ['debug', 'error', 'fatal', 'log', 'verbose', 'warn'] : ['
|
|
39
|
+
const logLevels = showLogs ? ['debug', 'error', 'fatal', 'log', 'verbose', 'warn'] : ['error', 'fatal'];
|
|
26
40
|
|
|
27
41
|
const appModule = await AppModule.forRoot();
|
|
28
42
|
// const app = await NestFactory.create(appModule);
|
|
@@ -60,4 +74,10 @@ function validateProjectRootPath() {
|
|
|
60
74
|
logger.log("Does not seem to be a valid solid-api project.");
|
|
61
75
|
process.exit(1);
|
|
62
76
|
}
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
// Utility function to strip a specific argument from process.argv
|
|
80
|
+
function stripArg(flag: string) {
|
|
81
|
+
const idx = process.argv.indexOf(flag);
|
|
82
|
+
if (idx !== -1) process.argv.splice(idx, 1);
|
|
63
83
|
}
|
|
@@ -8,7 +8,8 @@
|
|
|
8
8
|
"build": "next build",
|
|
9
9
|
"start": "next start",
|
|
10
10
|
"lint": "next lint",
|
|
11
|
-
"seeder": "tsc seeder/seeder.ts --outDir .temp && node .temp/seeder/seeder.js && rm -rf .temp"
|
|
11
|
+
"seeder": "tsc seeder/seeder.ts --outDir .temp && node .temp/seeder/seeder.js && rm -rf .temp",
|
|
12
|
+
"solidx:dev": "sudo rm -rf .next && npm run dev"
|
|
12
13
|
},
|
|
13
14
|
"dependencies": {
|
|
14
15
|
"@codemirror/lang-javascript": "^6.2.2",
|