mirror of
https://github.com/immich-app/immich
synced 2025-10-17 18:19:27 +00:00
feat: experimental swc support
This commit is contained in:
parent
845b0f2073
commit
0167ec1668
3 changed files with 10 additions and 4 deletions
|
|
@ -5,6 +5,12 @@
|
||||||
"compilerOptions": {
|
"compilerOptions": {
|
||||||
"deleteOutDir": true,
|
"deleteOutDir": true,
|
||||||
"webpack": false,
|
"webpack": false,
|
||||||
|
"builder": {
|
||||||
|
"type": "swc",
|
||||||
|
"options": {
|
||||||
|
"extensions": [".js", ".ts", ".jsx", ".tsx"]
|
||||||
|
}
|
||||||
|
},
|
||||||
"plugins": [
|
"plugins": [
|
||||||
{
|
{
|
||||||
"name": "@nestjs/swagger",
|
"name": "@nestjs/swagger",
|
||||||
|
|
|
||||||
|
|
@ -29,7 +29,7 @@
|
||||||
"migrations:run": "node ./dist/bin/migrations.js run",
|
"migrations:run": "node ./dist/bin/migrations.js run",
|
||||||
"schema:drop": "node ./dist/bin/migrations.js query 'DROP schema public cascade; CREATE schema public;'",
|
"schema:drop": "node ./dist/bin/migrations.js query 'DROP schema public cascade; CREATE schema public;'",
|
||||||
"schema:reset": "npm run schema:drop && npm run migrations:run",
|
"schema:reset": "npm run schema:drop && npm run migrations:run",
|
||||||
"sync:open-api": "node ./dist/bin/sync-open-api.js",
|
"sync:open-api": "nest build -b tsc && node ./dist/bin/sync-open-api.js",
|
||||||
"sync:sql": "node ./dist/bin/sync-sql.js",
|
"sync:sql": "node ./dist/bin/sync-sql.js",
|
||||||
"email:dev": "email dev -p 3050 --dir src/emails"
|
"email:dev": "email dev -p 3050 --dir src/emails"
|
||||||
},
|
},
|
||||||
|
|
@ -119,7 +119,8 @@
|
||||||
"@nestjs/cli": "^11.0.2",
|
"@nestjs/cli": "^11.0.2",
|
||||||
"@nestjs/schematics": "^11.0.0",
|
"@nestjs/schematics": "^11.0.0",
|
||||||
"@nestjs/testing": "^11.0.4",
|
"@nestjs/testing": "^11.0.4",
|
||||||
"@swc/core": "^1.4.14",
|
"@swc/cli": "^0.7.8",
|
||||||
|
"@swc/core": "^1.13.0",
|
||||||
"@testcontainers/postgresql": "^11.0.0",
|
"@testcontainers/postgresql": "^11.0.0",
|
||||||
"@testcontainers/redis": "^11.0.0",
|
"@testcontainers/redis": "^11.0.0",
|
||||||
"@types/archiver": "^6.0.0",
|
"@types/archiver": "^6.0.0",
|
||||||
|
|
|
||||||
|
|
@ -12,7 +12,7 @@ import { ConfigRepository } from 'src/repositories/config.repository';
|
||||||
import { LoggingRepository } from 'src/repositories/logging.repository';
|
import { LoggingRepository } from 'src/repositories/logging.repository';
|
||||||
import { bootstrapTelemetry } from 'src/repositories/telemetry.repository';
|
import { bootstrapTelemetry } from 'src/repositories/telemetry.repository';
|
||||||
import { ApiService } from 'src/services/api.service';
|
import { ApiService } from 'src/services/api.service';
|
||||||
import { isStartUpError, useSwagger } from 'src/utils/misc';
|
import { isStartUpError } from 'src/utils/misc';
|
||||||
async function bootstrap() {
|
async function bootstrap() {
|
||||||
process.title = 'immich-api';
|
process.title = 'immich-api';
|
||||||
|
|
||||||
|
|
@ -37,7 +37,6 @@ async function bootstrap() {
|
||||||
app.enableCors();
|
app.enableCors();
|
||||||
}
|
}
|
||||||
app.useWebSocketAdapter(new WebSocketAdapter(app));
|
app.useWebSocketAdapter(new WebSocketAdapter(app));
|
||||||
useSwagger(app, { write: configRepository.isDev() });
|
|
||||||
|
|
||||||
app.setGlobalPrefix('api', { exclude: excludePaths });
|
app.setGlobalPrefix('api', { exclude: excludePaths });
|
||||||
if (existsSync(resourcePaths.web.root)) {
|
if (existsSync(resourcePaths.web.root)) {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue