@solidstarters/create-solid-app 1.2.28 → 1.2.30
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 +1 -1
- package/templates/nest-template/package-lock.json +717 -174
- package/templates/nest-template/package.json +1 -2
- package/templates/nest-template/src/app-default-database.module.ts +4 -4
- package/templates/nest-template/src/main.ts +17 -10
- package/templates/next-template/package-lock.json +4 -4
- package/templates/next-template/package.json +1 -1
- package/templates/next-template/public/themes/solid-dark-purple/theme.css +6203 -0
- package/templates/next-template/public/themes/solid-light-purple/solid-login-light.png +0 -0
- package/templates/next-template/public/themes/solid-light-purple/theme.css +6256 -0
- package/upgrade-dependencies.js +109 -0
|
@@ -23,7 +23,6 @@
|
|
|
23
23
|
"test:debug": "node --inspect-brk -r tsconfig-paths/register -r ts-node/register node_modules/.bin/jest --runInBand",
|
|
24
24
|
"test:e2e": "jest --config ./test/jest-e2e.json",
|
|
25
25
|
"solidx:dev": "nodemon"
|
|
26
|
-
|
|
27
26
|
},
|
|
28
27
|
"dependencies": {
|
|
29
28
|
"@angular-devkit/core": "^18.0.3",
|
|
@@ -44,7 +43,7 @@
|
|
|
44
43
|
"@nestjs/serve-static": "^4.0.2",
|
|
45
44
|
"@nestjs/swagger": "^7.2.0",
|
|
46
45
|
"@nestjs/typeorm": "^10.0.1",
|
|
47
|
-
"@solidstarters/solid-core": "^1.2.
|
|
46
|
+
"@solidstarters/solid-core": "^1.2.155",
|
|
48
47
|
"@types/luxon": "^3.4.2",
|
|
49
48
|
"amqplib": "^0.10.4",
|
|
50
49
|
"axios": "^1.7.0",
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Module } from '@nestjs/common';
|
|
2
2
|
import { TypeOrmModule } from '@nestjs/typeorm';
|
|
3
3
|
import * as SolidCoreModuleExports from '@solidstarters/solid-core';
|
|
4
|
-
import { DatasourceType, getDynamicModuleNames, ISolidDatabaseModule, SolidDatabaseModule } from '@solidstarters/solid-core';
|
|
4
|
+
import { DatasourceType, getDynamicModuleNames, ISolidDatabaseModule, parseBooleanEnv, SolidDatabaseModule } from '@solidstarters/solid-core';
|
|
5
5
|
import { WINSTON_MODULE_PROVIDER } from 'nest-winston';
|
|
6
6
|
import { join } from 'path';
|
|
7
7
|
import { getMetadataArgsStorage } from 'typeorm';
|
|
@@ -70,9 +70,9 @@ const coreEntities = getEntitiesFromExports(SolidCoreModuleExports);
|
|
|
70
70
|
// autoLoadEntities: true,
|
|
71
71
|
entities: entities,
|
|
72
72
|
// your entities will be synced with the database (recommended: disable in prod)
|
|
73
|
-
synchronize:
|
|
74
|
-
logging:
|
|
75
|
-
logger: new WinstonTypeORMLogger(logger), // Pass in the custom WinstonLogger
|
|
73
|
+
synchronize: parseBooleanEnv('DEFAULT_DATABASE_SYNCHRONIZE'),
|
|
74
|
+
logging: parseBooleanEnv('DEFAULT_DATABASE_LOGGING'),
|
|
75
|
+
logger: parseBooleanEnv('DEFAULT_DATABASE_LOGGING') ? new WinstonTypeORMLogger(logger) : undefined, // Pass in the custom WinstonLogger
|
|
76
76
|
namingStrategy: new SnakeNamingStrategy(),
|
|
77
77
|
// subscribers: subscribers
|
|
78
78
|
}
|
|
@@ -10,10 +10,12 @@ import { ValidationPipe } from '@nestjs/common';
|
|
|
10
10
|
import { ConfigService } from '@nestjs/config';
|
|
11
11
|
import { NestFactory } from '@nestjs/core';
|
|
12
12
|
import { DocumentBuilder, SwaggerModule } from '@nestjs/swagger';
|
|
13
|
-
import {
|
|
13
|
+
import { buildDefaultCorsOptions, buildDefaultSecurityHeaderOptions, WrapResponseInterceptor, buildPermissionsPolicyHeader } from '@solidstarters/solid-core';
|
|
14
14
|
import { NextFunction, Request, Response } from 'express';
|
|
15
15
|
import { WINSTON_MODULE_NEST_PROVIDER } from 'nest-winston';
|
|
16
16
|
import { AppModule } from './app.module';
|
|
17
|
+
import helmet from 'helmet';
|
|
18
|
+
|
|
17
19
|
|
|
18
20
|
import qs from 'qs';
|
|
19
21
|
|
|
@@ -29,6 +31,19 @@ async function bootstrap() {
|
|
|
29
31
|
const appModule = await AppModule.forRoot();
|
|
30
32
|
const app = await NestFactory.create(appModule);
|
|
31
33
|
|
|
34
|
+
// Enable Helmet middleware for security
|
|
35
|
+
app.use(helmet(buildDefaultSecurityHeaderOptions()));
|
|
36
|
+
|
|
37
|
+
// Enable Permission policy header
|
|
38
|
+
app.use((req: Request, _res: Response, next: NextFunction) => {
|
|
39
|
+
_res.setHeader('Permissions-Policy', buildPermissionsPolicyHeader({
|
|
40
|
+
// Example overrides:
|
|
41
|
+
// "autoplay": ['self', 'https://player.example.com'],
|
|
42
|
+
// "camera": 'none',
|
|
43
|
+
}));
|
|
44
|
+
next();
|
|
45
|
+
});
|
|
46
|
+
|
|
32
47
|
// setup winston as the default logger.
|
|
33
48
|
// const app = await NestFactory.create(AppModule);
|
|
34
49
|
app.useLogger(app.get(WINSTON_MODULE_NEST_PROVIDER));
|
|
@@ -94,15 +109,7 @@ async function bootstrap() {
|
|
|
94
109
|
new WrapResponseInterceptor(),
|
|
95
110
|
);
|
|
96
111
|
|
|
97
|
-
|
|
98
|
-
app.enableCors({
|
|
99
|
-
// Explicitly allow PATCH and other methods
|
|
100
|
-
methods: ['GET', 'POST', 'PUT', 'PATCH', 'DELETE', 'OPTIONS'],
|
|
101
|
-
// Add any custom headers you use
|
|
102
|
-
allowedHeaders: ['Content-Type', 'Authorization'],
|
|
103
|
-
// If you need to send cookies or authentication headers
|
|
104
|
-
credentials: true,
|
|
105
|
-
});
|
|
112
|
+
app.enableCors(buildDefaultCorsOptions(configService));
|
|
106
113
|
|
|
107
114
|
// https://github.com/typeorm/typeorm/issues/8583
|
|
108
115
|
const types = require('pg').types;
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
"@codemirror/theme-one-dark": "^6.1.2",
|
|
14
14
|
"@hello-pangea/dnd": "^17.0.0",
|
|
15
15
|
"@reduxjs/toolkit": "^1.9.5",
|
|
16
|
-
"@solidstarters/solid-core-ui": "^1.1.
|
|
16
|
+
"@solidstarters/solid-core-ui": "^1.1.179",
|
|
17
17
|
"@uiw/react-codemirror": "^4.23.3",
|
|
18
18
|
"axios": "^1.7.2",
|
|
19
19
|
"bcryptjs": "^2.4.3",
|
|
@@ -1001,9 +1001,9 @@
|
|
|
1001
1001
|
}
|
|
1002
1002
|
},
|
|
1003
1003
|
"node_modules/@solidstarters/solid-core-ui": {
|
|
1004
|
-
"version": "1.1.
|
|
1005
|
-
"resolved": "https://registry.npmjs.org/@solidstarters/solid-core-ui/-/solid-core-ui-1.1.
|
|
1006
|
-
"integrity": "sha512-
|
|
1004
|
+
"version": "1.1.179",
|
|
1005
|
+
"resolved": "https://registry.npmjs.org/@solidstarters/solid-core-ui/-/solid-core-ui-1.1.179.tgz",
|
|
1006
|
+
"integrity": "sha512-FYAt7Kt0qy7FnjLtGYtoo+1V63MDv0BRt7RytBoGVXNRYfhUcfNSJmY3D4KSRogHehW2TwGoNmbieaxBKlMsRw==",
|
|
1007
1007
|
"license": "ISC",
|
|
1008
1008
|
"dependencies": {
|
|
1009
1009
|
"@faker-js/faker": "^9.9.0",
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
"@codemirror/theme-one-dark": "^6.1.2",
|
|
16
16
|
"@hello-pangea/dnd": "^17.0.0",
|
|
17
17
|
"@reduxjs/toolkit": "^1.9.5",
|
|
18
|
-
"@solidstarters/solid-core-ui": "^1.1.
|
|
18
|
+
"@solidstarters/solid-core-ui": "^1.1.179",
|
|
19
19
|
"@uiw/react-codemirror": "^4.23.3",
|
|
20
20
|
"axios": "^1.7.2",
|
|
21
21
|
"bcryptjs": "^2.4.3",
|