Skip to content

Commit

Permalink
Merge branch 'master' into fix-alias-npm-pruning
Browse files Browse the repository at this point in the history
  • Loading branch information
meeroslav authored May 20, 2024
2 parents c62edc9 + 3523720 commit 65cb5d2
Show file tree
Hide file tree
Showing 11 changed files with 83 additions and 12 deletions.
12 changes: 12 additions & 0 deletions docs/generated/packages/next/executors/server.json
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,18 @@
"type": "boolean",
"description": "Enable HTTPS support for the Next.js development server."
},
"experimentalHttpsKey": {
"type": "string",
"description": "Path to a HTTPS key file."
},
"experimentalHttpsCert": {
"type": "string",
"description": "Path to a HTTPS certificate file."
},
"experimentalHttpsCa": {
"type": "string",
"description": "Path to a HTTPS certificate authority file."
},
"customServerHttps:": {
"type": "boolean",
"description": "Enable HTTPS support for the custom server."
Expand Down
4 changes: 2 additions & 2 deletions graph/ui-icons/src/lib/technologies/gradle.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@ import { FC, SVGProps } from 'react';
export const GradleIcon: FC<SVGProps<SVGSVGElement>> = (props) => (
<svg
role="img"
viewBox="0 0 512 512"
viewBox="0 0 24 24"
xmlns="http://www.w3.org/2000/svg"
fill="currentColor"
{...props}
>
<title>Gradle</title>
<path d="M427 132.7a61 61 0 00-85-1a6 6 0 000 9l7 8a6 6 0 008 1a35 35 0 0146 53c-48 48-113 -87 -259 -17a20 20 0 00-9 28l25 43a20 20 0 0027 7l1 0l0 0l11-6a257 257 0 0035-26a6 6 0 018 0v0a6 6 0 010 9a263 263 0 01-37 28h0l-11 6a31 31 0 01-15 4a32 32 0 01-28-16L126 219C81 259 53 314 68.13 392.26a6 6 0 006 4.74H100.6a6 6 0 005.93-5.3a40 40 0 0178.62 0a6 6 0 005.72 5.08h26.2a6 6 0 005.7-5.1a40 40 0 0178.6 0a6 6 0 005.7 5h26a6 6 0 005.8-5.72c1-37 10 -79 38.7 -100c98-73 72 -136 49.4 -158.3zm-100 110l-19-9v0a12 12 0 1119 9z" />
<path d="M22.695 4.297a3.807 3.807 0 0 0-5.29-.09.368.368 0 0 0 0 .533l.46.47a.363.363 0 0 0 .474.032 2.182 2.182 0 0 1 2.86 3.291c-3.023 3.02-7.056-5.447-16.211-1.083a1.24 1.24 0 0 0-.534 1.745l1.571 2.713a1.238 1.238 0 0 0 1.681.461l.037-.02-.029.02.688-.384a16.083 16.083 0 0 0 2.193-1.635.384.384 0 0 1 .499-.016.357.357 0 0 1 .016.534 16.435 16.435 0 0 1-2.316 1.741H8.77l-.696.39a1.958 1.958 0 0 1-.963.25 1.987 1.987 0 0 1-1.726-.989L3.9 9.696C1.06 11.72-.686 15.603.26 20.522a.363.363 0 0 0 .354.296h1.675a.363.363 0 0 0 .37-.331 2.478 2.478 0 0 1 4.915 0 .36.36 0 0 0 .357.317h1.638a.363.363 0 0 0 .357-.317 2.478 2.478 0 0 1 4.914 0 .363.363 0 0 0 .358.317h1.627a.363.363 0 0 0 .363-.357c.037-2.294.656-4.93 2.42-6.25 6.108-4.57 4.502-8.486 3.088-9.9zm-6.229 6.901l-1.165-.584a.73.73 0 1 1 1.165.587z" />
</svg>
);
2 changes: 1 addition & 1 deletion graph/ui-icons/src/lib/technologies/nextjs.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,6 @@ export const NextJSIcon: FC<SVGProps<SVGSVGElement>> = (props) => (
{...props}
>
<title>Next.js</title>
<path d="M11.5725 0c-.1763 0-.3098.0013-.3584.0067-.0516.0053-.2159.021-.3636.0328-3.4088.3073-6.6017 2.1463-8.624 4.9728C1.1004 6.584.3802 8.3666.1082 10.255c-.0962.659-.108.8537-.108 1.7474s.012 1.0884.108 1.7476c.652 4.506 3.8591 8.2919 8.2087 9.6945.7789.2511 1.6.4223 2.5337.5255.3636.04 1.9354.04 2.299 0 1.6117-.1783 2.9772-.577 4.3237-1.2643.2065-.1056.2464-.1337.2183-.1573-.0188-.0139-.8987-1.1938-1.9543-2.62l-1.919-2.592-2.4047-3.5583c-1.3231-1.9564-2.4117-3.556-2.4211-3.556-.0094-.0026-.0187 1.5787-.0235 3.509-.0067 3.3802-.0093 3.5162-.0516 3.596-.061.115-.108.1618-.2064.2134-.075.0374-.1408.0445-.495.0445h-.406l-.1078-.068a.4383.4383 0 01-.1572-.1712l-.0493-.1056.0053-4.703.0067-4.7054.0726-.0915c.0376-.0493.1174-.1125.1736-.143.0962-.047.1338-.0517.5396-.0517.4787 0 .5584.0187.6827.1547.0353.0377 1.3373 1.9987 2.895 4.3608a10760.433 10760.433 0 004.7344 7.1706l1.9002 2.8782.096-.0633c.8518-.5536 1.7525-1.3418 2.4657-2.1627 1.5179-1.7429 2.4963-3.868 2.8247-6.134.0961-.6591.1078-.854.1078-1.7475 0-.8937-.012-1.0884-.1078-1.7476-.6522-4.506-3.8592-8.2919-8.2087-9.6945-.7672-.2487-1.5836-.42-2.4985-.5232-.169-.0176-1.0835-.0366-1.6123-.037zm4.0685 7.217c.3473 0 .4082.0053.4857.047.1127.0562.204.1642.237.2767.0186.061.0234 1.3653.0186 4.3044l-.0067 4.2175-.7436-1.14-.7461-1.14v-3.066c0-1.982.0093-3.0963.0234-3.1502.0375-.1313.1196-.2346.2323-.2955.0961-.0494.1313-.054.4997-.054z" />
<path d="M18.665 21.978C16.758 23.255 14.465 24 12 24 5.377 24 0 18.623 0 12S5.377 0 12 0s12 5.377 12 12c0 3.583-1.574 6.801-4.067 9.001L9.219 7.2H7.2v9.596h1.615V9.251l9.85 12.727Zm-3.332-8.533 1.6 2.061V7.2h-1.6v6.245Z" />
</svg>
);
9 changes: 8 additions & 1 deletion nx-dev/nx-dev/public/images/icons/gradle.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
9 changes: 8 additions & 1 deletion nx-dev/nx-dev/public/images/icons/nextdotjs.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ export default defineConfig({
// See: https://vitejs.dev/guide/build.html#library-mode
build: {
outDir: '../dist/my-lib',
emptyOutDir: true,
reportCompressedSize: true,
commonjsOptions: {
transformMixedEsModules: true,
Expand Down
12 changes: 12 additions & 0 deletions packages/next/src/executors/server/schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,18 @@
"type": "boolean",
"description": "Enable HTTPS support for the Next.js development server."
},
"experimentalHttpsKey": {
"type": "string",
"description": "Path to a HTTPS key file."
},
"experimentalHttpsCert": {
"type": "string",
"description": "Path to a HTTPS certificate file."
},
"experimentalHttpsCa": {
"type": "string",
"description": "Path to a HTTPS certificate authority file."
},
"customServerHttps:": {
"type": "boolean",
"description": "Enable HTTPS support for the custom server."
Expand Down
29 changes: 22 additions & 7 deletions packages/next/src/executors/server/server.impl.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import {
parseTargetString,
readTargetOptions,
} from '@nx/devkit';
import { join, resolve } from 'path';
import { resolve } from 'path';

import {
NextBuildBuilderOptions,
Expand Down Expand Up @@ -54,16 +54,18 @@ export default async function* serveExecutor(

const mode = options.dev ? 'dev' : 'start';
const turbo = options.turbo && options.dev ? '--turbo' : '';
const experimentalHttps =
options.experimentalHttps && options.dev ? '--experimental-https' : '';
const nextBin = require.resolve('next/dist/bin/next');

yield* createAsyncIterable<{ success: boolean; baseUrl: string }>(
async ({ done, next, error }) => {
const server = fork(nextBin, [mode, ...args, turbo, experimentalHttps], {
cwd: options.dev ? projectRoot : nextDir,
stdio: 'inherit',
});
const server = fork(
nextBin,
[mode, ...args, turbo, ...getExperimentalHttpsFlags(options)],
{
cwd: options.dev ? projectRoot : nextDir,
stdio: 'inherit',
}
);

server.once('exit', (code) => {
if (code === 0) {
Expand Down Expand Up @@ -92,3 +94,16 @@ export default async function* serveExecutor(
}
);
}

function getExperimentalHttpsFlags(options: NextServeBuilderOptions): string[] {
if (!options.dev) return [];
const flags: string[] = [];
if (options.experimentalHttps) flags.push('--experimental-https');
if (options.experimentalHttpsKey)
flags.push(`--experimental-https-key=${options.experimentalHttpsKey}`);
if (options.experimentalHttpsCert)
flags.push(`--experimental-https-cert=${options.experimentalHttpsCert}`);
if (options.experimentalHttpsCa)
flags.push(`--experimental-https-ca=${options.experimentalHttpsCa}`);
return flags;
}
3 changes: 3 additions & 0 deletions packages/next/src/utils/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,9 @@ export interface NextServeBuilderOptions {
keepAliveTimeout?: number;
turbo?: boolean;
experimentalHttps?: boolean;
experimentalHttpsKey?: string;
experimentalHttpsCert?: string;
experimentalHttpsCa?: string;
customServerHttps?: boolean;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,7 @@ export default defineConfig({
build: {
outDir: './dist/proj',
emptyOutDir: true,
reportCompressedSize: true,
commonjsOptions: {
transformMixedEsModules: true,
Expand Down Expand Up @@ -186,6 +187,7 @@ export default defineConfig({
build: {
outDir: '../../dist/apps/proj',
emptyOutDir: true,
reportCompressedSize: true,
commonjsOptions: {
transformMixedEsModules: true,
Expand Down Expand Up @@ -239,6 +241,7 @@ export default defineConfig({
build: {
outDir: './dist/proj',
emptyOutDir: true,
reportCompressedSize: true,
commonjsOptions: {
transformMixedEsModules: true,
Expand Down
11 changes: 11 additions & 0 deletions project.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,17 @@
},
"populate-local-registry-storage": {
"cache": true,
"inputs": [
{
"input": "production",
"projects": [
"*",
"!nx-dev",
"!typedoc-theme",
"!tools-documentation-create-embeddings"
]
}
],
"command": "node ./scripts/local-registry/run-populate-storage.mjs",
"outputs": ["{workspaceRoot}/build/local-registry/storage"]
}
Expand Down

0 comments on commit 65cb5d2

Please sign in to comment.