Skip to content
Closed
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
6 changes: 5 additions & 1 deletion packages/cli/src/util/createServer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,11 @@ import { createLogger } from '@stoplight/prism-core';
import { IHttpConfig, IHttpRequest } from '@stoplight/prism-http';
import { createServer as createHttpServer } from '@stoplight/prism-http-server';
import * as chalk from 'chalk';
import cluster from 'node:cluster';
// `@types/node` models node:cluster's API as the module's default export, but at runtime (CJS,
// without esModuleInterop) the API lives on the module object itself. Import-equals gives the
// correct runtime object; `.default ?? clusterModule` reconciles the typings with runtime.
import clusterModule = require('node:cluster');
const cluster = (clusterModule as typeof clusterModule & { default?: typeof clusterModule }).default ?? clusterModule;
import * as E from 'fp-ts/Either';
import { pipe } from 'fp-ts/function';
import * as pino from 'pino';
Expand Down