Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 2 additions & 14 deletions compiler/run-validations.js
Original file line number Diff line number Diff line change
Expand Up @@ -127,18 +127,6 @@ async function run () {
await $`npm install --prefix ${tsValidationPath}`
}

const isCompilerBuilt = await $`[[ -d ${path.join(compilerPath, 'lib')} ]]`.exitCode === 0
if (noCache || isStale || !isCompilerBuilt) {
spinner.text = 'Optimizing the compiler'
await $`npm run build --prefix ${compilerPath}`
}

const isTsGeneratorBuilt = await $`[[ -d ${path.join(tsGeneratorPath, 'lib')} ]]`.exitCode === 0
if (noCache || isStale || !isTsGeneratorBuilt) {
spinner.text = 'Optimizing the ts generator'
await $`npm run build --prefix ${tsGeneratorPath}`
}

{
spinner.text = 'Compiling specification'
const Process = await nothrow($`npm run compile:specification --prefix ${compilerPath}`)
Expand All @@ -150,7 +138,7 @@ async function run () {

{
spinner.text = 'Generating schema'
const Process = await nothrow($`node ${path.join(compilerPath, 'lib', 'index.js')} --spec ${specPath} --output ${outputPath}`)
const Process = await nothrow($`npm run generate-schema --prefix ${compilerPath} -- --spec ${specPath} --output ${outputPath}`)
if (Process.exitCode !== 0) {
spinner.fail(removeHeader(Process.stdout))
console.log(Process.stderr)
Expand All @@ -160,7 +148,7 @@ async function run () {

{
spinner.text = 'Generating typescript view'
const Process = await nothrow($`node ${path.join(tsGeneratorPath, 'lib', 'index.js')}`)
const Process = await nothrow($`npm run start --prefix ${tsGeneratorPath}`)
if (Process.exitCode !== 0) {
spinner.fail(removeHeader(Process.toString()))
process.exit(1)
Expand Down