@nx/next 19.1.0-beta.0 → 19.1.0-beta.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nx/next",
3
- "version": "19.1.0-beta.0",
3
+ "version": "19.1.0-beta.2",
4
4
  "private": false,
5
5
  "description": "The Next.js plugin for Nx contains executors and generators for managing Next.js applications and libraries within an Nx workspace. It provides:\n\n\n- Scaffolding for creating, building, serving, linting, and testing Next.js applications.\n\n- Integration with building, serving, and exporting a Next.js application.\n\n- Integration with React libraries within the workspace. \n\nWhen using Next.js in Nx, you get the out-of-the-box support for TypeScript, Playwright, Cypress, and Jest. No need to configure anything: watch mode, source maps, and typings just work.",
6
6
  "repository": {
@@ -14,9 +14,10 @@
14
14
  "Next",
15
15
  "Jest",
16
16
  "Cypress",
17
- "CLI"
17
+ "CLI",
18
+ "Front-end"
18
19
  ],
19
- "main": "./index.js",
20
+ "main": "./index",
20
21
  "typings": "./index.d.ts",
21
22
  "author": "Victor Savkin",
22
23
  "license": "MIT",
@@ -34,7 +35,7 @@
34
35
  "next": ">=14.0.0"
35
36
  },
36
37
  "dependencies": {
37
- "@nx/devkit": "19.1.0-beta.0",
38
+ "@nx/devkit": "19.1.0-beta.2",
38
39
  "@babel/plugin-proposal-decorators": "^7.22.7",
39
40
  "@svgr/webpack": "^8.0.1",
40
41
  "chalk": "^4.1.0",
@@ -45,13 +46,13 @@
45
46
  "semver": "^7.5.3",
46
47
  "tslib": "^2.3.0",
47
48
  "webpack-merge": "^5.8.0",
48
- "@nx/js": "19.1.0-beta.0",
49
- "@nx/eslint": "19.1.0-beta.0",
50
- "@nx/react": "19.1.0-beta.0",
51
- "@nx/web": "19.1.0-beta.0",
52
- "@nx/webpack": "19.1.0-beta.0",
53
- "@nx/workspace": "19.1.0-beta.0",
54
- "@nrwl/next": "19.1.0-beta.0"
49
+ "@nx/js": "19.1.0-beta.2",
50
+ "@nx/eslint": "19.1.0-beta.2",
51
+ "@nx/react": "19.1.0-beta.2",
52
+ "@nx/web": "19.1.0-beta.2",
53
+ "@nx/webpack": "19.1.0-beta.2",
54
+ "@nx/workspace": "19.1.0-beta.2",
55
+ "@nrwl/next": "19.1.0-beta.2"
55
56
  },
56
57
  "publishConfig": {
57
58
  "access": "public"
@@ -57,6 +57,18 @@
57
57
  "type": "boolean",
58
58
  "description": "Enable HTTPS support for the Next.js development server."
59
59
  },
60
+ "experimentalHttpsKey": {
61
+ "type": "string",
62
+ "description": "Path to a HTTPS key file."
63
+ },
64
+ "experimentalHttpsCert": {
65
+ "type": "string",
66
+ "description": "Path to a HTTPS certificate file."
67
+ },
68
+ "experimentalHttpsCa": {
69
+ "type": "string",
70
+ "description": "Path to a HTTPS certificate authority file."
71
+ },
60
72
  "customServerHttps:": {
61
73
  "type": "boolean",
62
74
  "description": "Enable HTTPS support for the custom server."
@@ -32,10 +32,9 @@ async function* serveExecutor(options, context) {
32
32
  }
33
33
  const mode = options.dev ? 'dev' : 'start';
34
34
  const turbo = options.turbo && options.dev ? '--turbo' : '';
35
- const experimentalHttps = options.experimentalHttps && options.dev ? '--experimental-https' : '';
36
35
  const nextBin = require.resolve('next/dist/bin/next');
37
36
  yield* (0, async_iterable_1.createAsyncIterable)(async ({ done, next, error }) => {
38
- const server = (0, child_process_1.fork)(nextBin, [mode, ...args, turbo, experimentalHttps], {
37
+ const server = (0, child_process_1.fork)(nextBin, [mode, ...args, turbo, ...getExperimentalHttpsFlags(options)], {
39
38
  cwd: options.dev ? projectRoot : nextDir,
40
39
  stdio: 'inherit',
41
40
  });
@@ -64,3 +63,17 @@ async function* serveExecutor(options, context) {
64
63
  });
65
64
  }
66
65
  exports.default = serveExecutor;
66
+ function getExperimentalHttpsFlags(options) {
67
+ if (!options.dev)
68
+ return [];
69
+ const flags = [];
70
+ if (options.experimentalHttps)
71
+ flags.push('--experimental-https');
72
+ if (options.experimentalHttpsKey)
73
+ flags.push(`--experimental-https-key=${options.experimentalHttpsKey}`);
74
+ if (options.experimentalHttpsCert)
75
+ flags.push(`--experimental-https-cert=${options.experimentalHttpsCert}`);
76
+ if (options.experimentalHttpsCa)
77
+ flags.push(`--experimental-https-ca=${options.experimentalHttpsCa}`);
78
+ return flags;
79
+ }
@@ -45,6 +45,9 @@ export interface NextServeBuilderOptions {
45
45
  keepAliveTimeout?: number;
46
46
  turbo?: boolean;
47
47
  experimentalHttps?: boolean;
48
+ experimentalHttpsKey?: string;
49
+ experimentalHttpsCert?: string;
50
+ experimentalHttpsCa?: string;
48
51
  customServerHttps?: boolean;
49
52
  }
50
53
  export interface NextExportBuilderOptions {