import { dirname, extname, join } from 'node:path'
import { fileURLToPath } from 'node:url'
+import { exit } from 'node:process'
import Fastify from 'fastify'
import { fastifyPoolifier } from './fastify-poolifier.js'
await fastify.listen({ port })
} catch (err) {
fastify.log.error(err)
- process.exit(1)
+ exit(1)
}
-const isCIEnvironment = process.env.CI != null
+const { env } = require('node:process')
+
+const isCIEnvironment = env.CI != null
if (isCIEnvironment === false) {
require('husky').install()
}
import * as os from 'node:os'
+import { env } from 'node:process'
import { dts } from 'rollup-plugin-dts'
import terser from '@rollup/plugin-terser'
import typescript from '@rollup/plugin-typescript'
return availableParallelism
}
-const isDevelopmentBuild = process.env.BUILD === 'development'
-const isAnalyzeBuild = process.env.ANALYZE
-const isDocumentationBuild = process.env.DOCUMENTATION
+const isDevelopmentBuild = env.BUILD === 'development'
+const isAnalyzeBuild = env.ANALYZE
+const isDocumentationBuild = env.DOCUMENTATION
const maxWorkers = Math.floor(availableParallelism() / 2)