<!-- Please make sure you have read the submission guidelines before posting an PR --> <!-- https://github.com/nrwl/nx/blob/master/CONTRIBUTING.md#-submitting-a-pr --> <!-- Please make sure that your commit message follows our format --> <!-- Example: `fix(nx): must begin with lowercase` --> <!-- If this is a particularly complex change or feature addition, you can request a dedicated Nx release for this pull request branch. Mention someone from the Nx team or the `@nrwl/nx-pipelines-reviewers` and they will confirm if the PR warrants its own release for testing purposes, and generate it for you if appropriate. --> ## Current Behavior <!-- This is the behavior we have today --> Currently, the default for remotes is to server them as development. Which means a separate node process for each remote that is inside the workspace. This does not scale well and can lead to out of memory exceptions. ## Expected Behavior <!-- This is the behavior we should expect with the changes in this PR --> Remotes will start as static by default, which allows for better scaling as the remotes increase. ## Related Issue(s) <!-- Please link the issue being fixed so it gets closed when this is merged. --> TODO - [ ] Migrations
20 lines
581 B
TypeScript
20 lines
581 B
TypeScript
import { workspaceRoot } from '@nx/devkit';
|
|
import type { Schema } from '../schema';
|
|
import { join } from 'path';
|
|
|
|
export function normalizeOptions(options: Schema): Schema {
|
|
const devServeRemotes = !options.devRemotes
|
|
? []
|
|
: Array.isArray(options.devRemotes)
|
|
? options.devRemotes
|
|
: [options.devRemotes];
|
|
|
|
return {
|
|
...options,
|
|
devRemotes: devServeRemotes,
|
|
ssl: options.ssl ?? false,
|
|
sslCert: options.sslCert ? join(workspaceRoot, options.sslCert) : undefined,
|
|
sslKey: options.sslKey ? join(workspaceRoot, options.sslKey) : undefined,
|
|
};
|
|
}
|