112 lines
2.9 KiB
JSON
112 lines
2.9 KiB
JSON
{
|
|
"name": "api",
|
|
"$schema": "../../node_modules/nx/schemas/project-schema.json",
|
|
"sourceRoot": "apps/api/src",
|
|
"projectType": "application",
|
|
"tags": [],
|
|
"targets": {
|
|
"build": {
|
|
"executor": "@nx/webpack:webpack",
|
|
"options": {
|
|
"outputPath": "dist/apps/api",
|
|
"deleteOutputPath": false,
|
|
"main": "apps/api/src/main.ts",
|
|
"tsConfig": "apps/api/tsconfig.app.json",
|
|
"generatePackageJson": true,
|
|
"target": "node",
|
|
"compiler": "tsc",
|
|
"sourceMap": true,
|
|
"webpackConfig": "apps/api/webpack.config.js",
|
|
"assets": [
|
|
{
|
|
"input": "apps/api/src/assets",
|
|
"glob": "**/*",
|
|
"output": "./assets/"
|
|
}
|
|
]
|
|
},
|
|
"configurations": {
|
|
"production": {
|
|
"optimization": true,
|
|
"extractLicenses": true,
|
|
"inspect": false
|
|
}
|
|
}
|
|
},
|
|
"openapi": {
|
|
"executor": "nx:run-commands",
|
|
"cache": true,
|
|
"inputs": [
|
|
"{projectRoot}/src/**/*.ts",
|
|
"!{projectRoot}/src/**/*.spec.ts",
|
|
"{projectRoot}/tsconfig.app.json",
|
|
{
|
|
"dependentTasksOutputFiles": "**/*",
|
|
"transitive": true
|
|
}
|
|
],
|
|
"outputs": ["{workspaceRoot}/dist/apps/api/openapi.json", "{workspaceRoot}/dist/apps/api/openapi.3.1.0.json"],
|
|
"options": {
|
|
"commands": [
|
|
"mkdir -p dist/apps/api",
|
|
"yarn ts-node apps/api/src/generate-openapi.ts -o dist/apps/api/openapi.json"
|
|
],
|
|
"parallel": false,
|
|
"env": {
|
|
"TS_NODE_PROJECT": "apps/api/tsconfig.app.json",
|
|
"NODE_OPTIONS": "--require tsconfig-paths/register",
|
|
"SKIP_CONNECTIONS": "true"
|
|
}
|
|
}
|
|
},
|
|
"serve": {
|
|
"executor": "@nx/js:node",
|
|
"defaultConfiguration": "development",
|
|
"dependsOn": ["build"],
|
|
"options": {
|
|
"buildTarget": "api:build",
|
|
"runBuildTargetDependencies": false,
|
|
"watch": true
|
|
},
|
|
"configurations": {
|
|
"development": {
|
|
"buildTarget": "api:build:development"
|
|
},
|
|
"production": {
|
|
"buildTarget": "api:build:production"
|
|
}
|
|
}
|
|
},
|
|
"format": {
|
|
"executor": "nx:run-commands",
|
|
"options": {
|
|
"command": "cd {projectRoot} && prettier --write \"**/*.{ts,json,mjs}\" --config ../../.prettierrc"
|
|
}
|
|
},
|
|
"test": {
|
|
"options": {
|
|
"passWithNoTests": true
|
|
}
|
|
},
|
|
"check-version-env": {},
|
|
"docker": {
|
|
"options": {
|
|
"target": "daytona"
|
|
},
|
|
"dependsOn": [
|
|
{
|
|
"target": "build-amd64",
|
|
"projects": "runner"
|
|
}
|
|
]
|
|
},
|
|
"push-manifest": {},
|
|
"lint": {
|
|
"executor": "nx:run-commands",
|
|
"options": {
|
|
"command": "bash apps/api/scripts/validate-migration-paths.sh $(find apps/api/src/migrations -name '*-migration.ts' -type f)"
|
|
}
|
|
}
|
|
}
|
|
}
|