2
0

💚 (docs) Fix api schema generation in CI

This commit is contained in:
Baptiste Arnaud
2022-11-22 20:58:22 +01:00
parent 00900657b2
commit 635e6887f3
7 changed files with 21 additions and 6 deletions

View File

@@ -5,6 +5,7 @@
"scripts": { "scripts": {
"dev": "ENVSH_ENV=.env.local bash ../../env.sh next dev -p 3000", "dev": "ENVSH_ENV=.env.local bash ../../env.sh next dev -p 3000",
"build": "next build", "build": "next build",
"build:env": "cd ../.. && ENVSH_ENV=./apps/builder/.env.docker ENVSH_OUTPUT=./apps/builder/public/__env.js bash env.sh",
"start": "next start", "start": "next start",
"lint": "next lint", "lint": "next lint",
"test": "pnpm playwright test", "test": "pnpm playwright test",

View File

@@ -90,7 +90,8 @@
"type": "string" "type": "string"
}, },
"value": { "value": {
"type": "string" "type": "string",
"nullable": true
} }
}, },
"required": [ "required": [

View File

@@ -13,7 +13,7 @@
"write-translations": "docusaurus write-translations", "write-translations": "docusaurus write-translations",
"write-heading-ids": "docusaurus write-heading-ids", "write-heading-ids": "docusaurus write-heading-ids",
"update-search": "docker run -it --rm --env-file=.env -e \"CONFIG=$(cat docsearch-scrapper-config.json | jq -r tostring)\" algolia/docsearch-scraper", "update-search": "docker run -it --rm --env-file=.env -e \"CONFIG=$(cat docsearch-scrapper-config.json | jq -r tostring)\" algolia/docsearch-scraper",
"builder:generate:openapi": "tsx --tsconfig ../builder/tsconfig.json ../builder/src/utils/server/generateOpenApi.ts" "api:generate": "tsx --tsconfig ../builder/tsconfig.json ../builder/src/utils/server/generateOpenApi.ts"
}, },
"dependencies": { "dependencies": {
"@docusaurus/core": "2.2.0", "@docusaurus/core": "2.2.0",

View File

@@ -5,6 +5,7 @@
"dev": "ENVSH_ENV=.env.local bash ../../env.sh next dev -p 3002", "dev": "ENVSH_ENV=.env.local bash ../../env.sh next dev -p 3002",
"start": "next start", "start": "next start",
"build": "next build", "build": "next build",
"build:env": "cd ../.. && ENVSH_ENV=./apps/landing-page/.env.docker ENVSH_OUTPUT=./apps/landing-page/public/__env.js bash env.sh",
"lint": "next lint", "lint": "next lint",
"analyze": "cross-env ANALYZE=true next build" "analyze": "cross-env ANALYZE=true next build"
}, },

View File

@@ -5,6 +5,7 @@
"scripts": { "scripts": {
"dev": "ENVSH_ENV=.env.local bash ../../env.sh next dev -p 3001", "dev": "ENVSH_ENV=.env.local bash ../../env.sh next dev -p 3001",
"build": "next build", "build": "next build",
"build:env": "cd ../.. && ENVSH_ENV=./apps/viewer/.env.docker ENVSH_OUTPUT=./apps/viewer/public/__env.js bash env.sh",
"start": "next start -p 3001", "start": "next start -p 3001",
"lint": "next lint", "lint": "next lint",
"test": "pnpm playwright test", "test": "pnpm playwright test",

View File

@@ -15,10 +15,9 @@
"dev": "pnpm docker:up && NEXT_PUBLIC_E2E_TEST=false turbo run dev --filter=builder... --filter=viewer... --parallel --no-cache", "dev": "pnpm docker:up && NEXT_PUBLIC_E2E_TEST=false turbo run dev --filter=builder... --filter=viewer... --parallel --no-cache",
"dev:mocking": "pnpm docker:up && NEXT_PUBLIC_E2E_TEST=true turbo run dev --filter=builder... --filter=viewer... --parallel --no-cache", "dev:mocking": "pnpm docker:up && NEXT_PUBLIC_E2E_TEST=true turbo run dev --filter=builder... --filter=viewer... --parallel --no-cache",
"build": "pnpm docker:up && turbo run build", "build": "pnpm docker:up && turbo run build",
"build:builder": "turbo run build --filter=builder... && ENVSH_ENV=./apps/builder/.env.docker ENVSH_OUTPUT=./apps/builder/public/__env.js bash env.sh", "build:builder": "turbo run build --filter=builder... && turbo run build:env --filter=builder...",
"build:viewer": "turbo run build --filter=viewer... && ENVSH_ENV=./apps/viewer/.env.docker ENVSH_OUTPUT=./apps/viewer/public/__env.js bash env.sh", "build:viewer": "turbo run build --filter=viewer... && turbo run build:env --filter=viewer...",
"build:landing-page": "turbo run build --filter=landing-page... && ENVSH_ENV=./apps/landing-page/.env.docker ENVSH_OUTPUT=./apps/landing-page/public/__env.js bash env.sh", "build:landing-page": "turbo run build --filter=landing-page... && turbo run build:env --filter=landing-page...",
"build:docs": "cd apps/docs && pnpm run builder:generate:openapi && cd ../.. && turbo run build --filter=docs...",
"db:migrate": "cd packages/db && pnpm run db:migrate", "db:migrate": "cd packages/db && pnpm run db:migrate",
"generate-change-log": "pnpx gitmoji-changelog" "generate-change-log": "pnpx gitmoji-changelog"
}, },

View File

@@ -13,6 +13,18 @@
"outputs": [".next/**", "dist/**", "build/**"], "outputs": [".next/**", "dist/**", "build/**"],
"outputMode": "new-only" "outputMode": "new-only"
}, },
"docs#build": {
"dependsOn": ["api:generate"],
"outputs": ["build/**"],
"outputMode": "new-only"
},
"build:env": {
"cache": false
},
"api:generate": {
"dependsOn": ["db#db:generate"],
"cache": false
},
"db:generate": { "db:generate": {
"cache": false "cache": false
}, },