@nx/next 23.0.0-beta.24 → 23.0.0-beta.25
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/dist/babel.d.ts +1 -0
- package/{babel.js → dist/babel.js} +2 -0
- package/{index.d.ts → dist/index.d.ts} +0 -1
- package/{plugin.d.ts → dist/plugin.d.ts} +0 -1
- package/{plugins → dist/plugins}/component-testing.d.ts +0 -1
- package/{plugins → dist/plugins}/component-testing.js +3 -3
- package/{plugins → dist/plugins}/with-less.d.ts +0 -1
- package/{plugins → dist/plugins}/with-nx.d.ts +0 -1
- package/{plugins → dist/plugins}/with-nx.js +1 -34
- package/{src → dist/src}/executors/build/build.impl.d.ts +0 -1
- package/{src → dist/src}/executors/build/lib/check-project.d.ts +0 -1
- package/{src → dist/src}/executors/build/lib/create-next-config-file.d.ts +0 -1
- package/{src → dist/src}/executors/build/lib/update-package-json.d.ts +0 -1
- package/{src → dist/src}/executors/server/custom-server.impl.d.ts +0 -1
- package/{src → dist/src}/executors/server/server.impl.d.ts +0 -1
- package/{src → dist/src}/generators/application/application.d.ts +0 -1
- package/{src → dist/src}/generators/application/application.js +12 -12
- package/{src → dist/src}/generators/application/lib/add-e2e.d.ts +0 -1
- package/{src → dist/src}/generators/application/lib/add-jest.d.ts +0 -1
- package/{src → dist/src}/generators/application/lib/add-linting.d.ts +0 -1
- package/{src → dist/src}/generators/application/lib/add-linting.js +3 -3
- package/{src → dist/src}/generators/application/lib/add-plugin.d.ts +0 -1
- package/{src → dist/src}/generators/application/lib/add-project.d.ts +0 -1
- package/{src → dist/src}/generators/application/lib/create-application-files.d.ts +0 -1
- package/{src → dist/src}/generators/application/lib/create-application-files.helpers.d.ts +0 -1
- package/{src → dist/src}/generators/application/lib/normalize-options.d.ts +0 -1
- package/{src → dist/src}/generators/application/lib/normalize-options.js +2 -2
- package/{src → dist/src}/generators/application/lib/set-defaults.d.ts +0 -1
- package/{src → dist/src}/generators/application/lib/update-cypress-tsconfig.d.ts +0 -1
- package/{src → dist/src}/generators/component/component.d.ts +0 -1
- package/{src → dist/src}/generators/convert-to-inferred/convert-to-inferred.d.ts +0 -1
- package/{src → dist/src}/generators/convert-to-inferred/lib/build-post-target-transformer.d.ts +0 -1
- package/{src → dist/src}/generators/convert-to-inferred/lib/serve-post-target-tranformer.d.ts +0 -1
- package/{src → dist/src}/generators/convert-to-inferred/lib/update-next-config.d.ts +0 -1
- package/{src → dist/src}/generators/convert-to-inferred/lib/utils.d.ts +0 -1
- package/{src → dist/src}/generators/custom-server/custom-server.d.ts +0 -1
- package/{src → dist/src}/generators/cypress-component-configuration/cypress-component-configuration.d.ts +0 -1
- package/{src → dist/src}/generators/cypress-component-configuration/cypress-component-configuration.js +5 -38
- package/{src → dist/src}/generators/init/init.d.ts +0 -1
- package/{src → dist/src}/generators/init/init.js +5 -38
- package/{src → dist/src}/generators/library/lib/normalize-options.d.ts +0 -1
- package/{src → dist/src}/generators/library/lib/update-vite-config.d.ts +0 -1
- package/{src → dist/src}/generators/library/library.d.ts +0 -1
- package/{src → dist/src}/generators/library/library.js +16 -16
- package/{src → dist/src}/generators/page/page.d.ts +0 -1
- package/{src → dist/src}/migrations/update-22-0-0/add-svgr-to-next-config.d.ts +0 -1
- package/{src → dist/src}/migrations/update-23-0-0/migrate-create-nodes-v2-to-create-nodes.d.ts +0 -1
- package/{src → dist/src}/plugins/plugin.d.ts +0 -1
- package/{src → dist/src}/utils/add-gitignore-entry.d.ts +0 -1
- package/{src → dist/src}/utils/add-swc-to-custom-server.d.ts +0 -1
- package/{src → dist/src}/utils/assert-supported-next-version.d.ts +0 -1
- package/{src → dist/src}/utils/compose-plugins.d.ts +0 -1
- package/dist/src/utils/config-invalid-function.fixture.d.ts +1 -0
- package/dist/src/utils/config-invalid-function.fixture.js +3 -0
- package/dist/src/utils/config-not-a-function.fixture.d.ts +1 -0
- package/dist/src/utils/config-not-a-function.fixture.js +3 -0
- package/{src → dist/src}/utils/config.d.ts +0 -1
- package/{src → dist/src}/utils/constants.d.ts +0 -1
- package/{src → dist/src}/utils/create-cli-options.d.ts +0 -1
- package/{src → dist/src}/utils/create-copy-plugin.d.ts +0 -1
- package/{src → dist/src}/utils/deprecation.d.ts +0 -1
- package/{src → dist/src}/utils/jest-config-util.d.ts +0 -1
- package/{src → dist/src}/utils/runtime-version-utils.d.ts +0 -1
- package/{src → dist/src}/utils/styles.d.ts +0 -1
- package/{src → dist/src}/utils/types.d.ts +0 -1
- package/{src → dist/src}/utils/version-utils.d.ts +0 -1
- package/{src → dist/src}/utils/versions.d.ts +0 -1
- package/{src → dist/src}/utils/versions.js +2 -1
- package/{tailwind.d.ts → dist/tailwind.d.ts} +0 -1
- package/dist/typings/image.d.ts +12 -0
- package/executors.json +4 -4
- package/generators.json +16 -16
- package/migrations.json +4 -40
- package/package.json +94 -14
- package/babel.d.ts +0 -1
- package/babel.d.ts.map +0 -1
- package/index.d.ts.map +0 -1
- package/plugin.d.ts.map +0 -1
- package/plugins/component-testing.d.ts.map +0 -1
- package/plugins/with-less.d.ts.map +0 -1
- package/plugins/with-nx.d.ts.map +0 -1
- package/src/executors/build/build.impl.d.ts.map +0 -1
- package/src/executors/build/lib/check-project.d.ts.map +0 -1
- package/src/executors/build/lib/create-next-config-file.d.ts.map +0 -1
- package/src/executors/build/lib/update-package-json.d.ts.map +0 -1
- package/src/executors/server/custom-server.impl.d.ts.map +0 -1
- package/src/executors/server/server.impl.d.ts.map +0 -1
- package/src/generators/application/application.d.ts.map +0 -1
- package/src/generators/application/lib/add-e2e.d.ts.map +0 -1
- package/src/generators/application/lib/add-jest.d.ts.map +0 -1
- package/src/generators/application/lib/add-linting.d.ts.map +0 -1
- package/src/generators/application/lib/add-plugin.d.ts.map +0 -1
- package/src/generators/application/lib/add-project.d.ts.map +0 -1
- package/src/generators/application/lib/create-application-files.d.ts.map +0 -1
- package/src/generators/application/lib/create-application-files.helpers.d.ts.map +0 -1
- package/src/generators/application/lib/normalize-options.d.ts.map +0 -1
- package/src/generators/application/lib/set-defaults.d.ts.map +0 -1
- package/src/generators/application/lib/update-cypress-tsconfig.d.ts.map +0 -1
- package/src/generators/component/component.d.ts.map +0 -1
- package/src/generators/convert-to-inferred/convert-to-inferred.d.ts.map +0 -1
- package/src/generators/convert-to-inferred/lib/build-post-target-transformer.d.ts.map +0 -1
- package/src/generators/convert-to-inferred/lib/serve-post-target-tranformer.d.ts.map +0 -1
- package/src/generators/convert-to-inferred/lib/update-next-config.d.ts.map +0 -1
- package/src/generators/convert-to-inferred/lib/utils.d.ts.map +0 -1
- package/src/generators/custom-server/custom-server.d.ts.map +0 -1
- package/src/generators/cypress-component-configuration/cypress-component-configuration.d.ts.map +0 -1
- package/src/generators/init/init.d.ts.map +0 -1
- package/src/generators/library/lib/normalize-options.d.ts.map +0 -1
- package/src/generators/library/lib/update-vite-config.d.ts.map +0 -1
- package/src/generators/library/library.d.ts.map +0 -1
- package/src/generators/page/page.d.ts.map +0 -1
- package/src/migrations/update-22-0-0/add-svgr-to-next-config.d.ts.map +0 -1
- package/src/migrations/update-23-0-0/migrate-create-nodes-v2-to-create-nodes.d.ts.map +0 -1
- package/src/plugins/plugin.d.ts.map +0 -1
- package/src/utils/add-gitignore-entry.d.ts.map +0 -1
- package/src/utils/add-swc-to-custom-server.d.ts.map +0 -1
- package/src/utils/assert-supported-next-version.d.ts.map +0 -1
- package/src/utils/compose-plugins.d.ts.map +0 -1
- package/src/utils/config-invalid-function.fixture.d.ts +0 -1
- package/src/utils/config-invalid-function.fixture.d.ts.map +0 -1
- package/src/utils/config-invalid-function.fixture.js +0 -1
- package/src/utils/config-not-a-function.fixture.d.ts +0 -1
- package/src/utils/config-not-a-function.fixture.d.ts.map +0 -1
- package/src/utils/config-not-a-function.fixture.js +0 -1
- package/src/utils/config.d.ts.map +0 -1
- package/src/utils/constants.d.ts.map +0 -1
- package/src/utils/create-cli-options.d.ts.map +0 -1
- package/src/utils/create-copy-plugin.d.ts.map +0 -1
- package/src/utils/deprecation.d.ts.map +0 -1
- package/src/utils/jest-config-util.d.ts.map +0 -1
- package/src/utils/runtime-version-utils.d.ts.map +0 -1
- package/src/utils/styles.d.ts.map +0 -1
- package/src/utils/types.d.ts.map +0 -1
- package/src/utils/version-utils.d.ts.map +0 -1
- package/src/utils/versions.d.ts.map +0 -1
- package/tailwind.d.ts.map +0 -1
- /package/{LICENSE → dist/LICENSE} +0 -0
- /package/{index.js → dist/index.js} +0 -0
- /package/{plugin.js → dist/plugin.js} +0 -0
- /package/{plugins → dist/plugins}/with-less.js +0 -0
- /package/{src → dist/src}/executors/build/build.impl.js +0 -0
- /package/{src → dist/src}/executors/build/lib/check-project.js +0 -0
- /package/{src → dist/src}/executors/build/lib/create-next-config-file.js +0 -0
- /package/{src → dist/src}/executors/build/lib/update-package-json.js +0 -0
- /package/{src → dist/src}/executors/build/schema.json +0 -0
- /package/{src → dist/src}/executors/server/custom-server.impl.js +0 -0
- /package/{src → dist/src}/executors/server/schema.json +0 -0
- /package/{src → dist/src}/executors/server/server.impl.js +0 -0
- /package/{src → dist/src}/generators/application/files/app/api/hello/route.ts__tmpl__ +0 -0
- /package/{src → dist/src}/generators/application/files/app/global.__stylesExt____tmpl__ +0 -0
- /package/{src → dist/src}/generators/application/files/app/page.module.__style__ +0 -0
- /package/{src → dist/src}/generators/application/files/app/page.tsx__tmpl__ +0 -0
- /package/{src → dist/src}/generators/application/files/app-default-layout/layout.tsx__tmpl__ +0 -0
- /package/{src → dist/src}/generators/application/files/common/__dot__babelrc +0 -0
- /package/{src → dist/src}/generators/application/files/common/index.d.ts__tmpl__ +0 -0
- /package/{src → dist/src}/generators/application/files/common/next-env.d.ts__tmpl__ +0 -0
- /package/{src → dist/src}/generators/application/files/common/next.config.js__tmpl__ +0 -0
- /package/{src → dist/src}/generators/application/files/common/public/.gitkeep +0 -0
- /package/{src → dist/src}/generators/application/files/common/public/favicon.ico +0 -0
- /package/{src → dist/src}/generators/application/files/common/specs/__fileName__.spec.tsx__tmpl__ +0 -0
- /package/{src → dist/src}/generators/application/files/common/tsconfig.json__tmpl__ +0 -0
- /package/{src → dist/src}/generators/application/files/pages/__fileName__.module.__style__ +0 -0
- /package/{src → dist/src}/generators/application/files/pages/__fileName__.tsx__tmpl__ +0 -0
- /package/{src → dist/src}/generators/application/files/pages/_app.tsx__tmpl__ +0 -0
- /package/{src → dist/src}/generators/application/files/pages/styles.__stylesExt____tmpl__ +0 -0
- /package/{src → dist/src}/generators/application/lib/add-e2e.js +0 -0
- /package/{src → dist/src}/generators/application/lib/add-jest.js +0 -0
- /package/{src → dist/src}/generators/application/lib/add-plugin.js +0 -0
- /package/{src → dist/src}/generators/application/lib/add-project.js +0 -0
- /package/{src → dist/src}/generators/application/lib/create-application-files.helpers.js +0 -0
- /package/{src → dist/src}/generators/application/lib/create-application-files.js +0 -0
- /package/{src → dist/src}/generators/application/lib/set-defaults.js +0 -0
- /package/{src → dist/src}/generators/application/lib/update-cypress-tsconfig.js +0 -0
- /package/{src → dist/src}/generators/application/schema.d.ts +0 -0
- /package/{src → dist/src}/generators/application/schema.json +0 -0
- /package/{src → dist/src}/generators/component/component.js +0 -0
- /package/{src → dist/src}/generators/component/schema.json +0 -0
- /package/{src → dist/src}/generators/convert-to-inferred/convert-to-inferred.js +0 -0
- /package/{src → dist/src}/generators/convert-to-inferred/lib/build-post-target-transformer.js +0 -0
- /package/{src → dist/src}/generators/convert-to-inferred/lib/serve-post-target-tranformer.js +0 -0
- /package/{src → dist/src}/generators/convert-to-inferred/lib/update-next-config.js +0 -0
- /package/{src → dist/src}/generators/convert-to-inferred/lib/utils.js +0 -0
- /package/{src → dist/src}/generators/convert-to-inferred/schema.json +0 -0
- /package/{src → dist/src}/generators/custom-server/custom-server.js +0 -0
- /package/{src → dist/src}/generators/custom-server/files/server/main.ts__tmpl__ +0 -0
- /package/{src → dist/src}/generators/custom-server/files/tsconfig.server.json__tmpl__ +0 -0
- /package/{src → dist/src}/generators/custom-server/schema.d.ts +0 -0
- /package/{src → dist/src}/generators/custom-server/schema.json +0 -0
- /package/{src → dist/src}/generators/cypress-component-configuration/schema.d.ts +0 -0
- /package/{src → dist/src}/generators/cypress-component-configuration/schema.json +0 -0
- /package/{src → dist/src}/generators/init/schema.d.ts +0 -0
- /package/{src → dist/src}/generators/init/schema.json +0 -0
- /package/{src → dist/src}/generators/library/lib/normalize-options.js +0 -0
- /package/{src → dist/src}/generators/library/lib/update-vite-config.js +0 -0
- /package/{src → dist/src}/generators/library/schema.d.ts +0 -0
- /package/{src → dist/src}/generators/library/schema.json +0 -0
- /package/{src → dist/src}/generators/page/page.js +0 -0
- /package/{src → dist/src}/generators/page/schema.d.ts +0 -0
- /package/{src → dist/src}/generators/page/schema.json +0 -0
- /package/{src → dist/src}/migrations/update-22-0-0/add-svgr-to-next-config.js +0 -0
- /package/{src → dist/src}/migrations/update-22-2-0/ai-instructions-for-next-16.md +0 -0
- /package/{src → dist/src}/migrations/update-23-0-0/migrate-create-nodes-v2-to-create-nodes.js +0 -0
- /package/{src → dist/src}/migrations/update-23-0-0/migrate-create-nodes-v2-to-create-nodes.md +0 -0
- /package/{src → dist/src}/plugins/plugin.js +0 -0
- /package/{src → dist/src}/utils/add-gitignore-entry.js +0 -0
- /package/{src → dist/src}/utils/add-swc-to-custom-server.js +0 -0
- /package/{src → dist/src}/utils/assert-supported-next-version.js +0 -0
- /package/{src → dist/src}/utils/compose-plugins.js +0 -0
- /package/{src → dist/src}/utils/config.js +0 -0
- /package/{src → dist/src}/utils/constants.js +0 -0
- /package/{src → dist/src}/utils/create-cli-options.js +0 -0
- /package/{src → dist/src}/utils/create-copy-plugin.js +0 -0
- /package/{src → dist/src}/utils/deprecation.js +0 -0
- /package/{src → dist/src}/utils/jest-config-util.js +0 -0
- /package/{src → dist/src}/utils/runtime-version-utils.js +0 -0
- /package/{src → dist/src}/utils/styles.js +0 -0
- /package/{src → dist/src}/utils/types.js +0 -0
- /package/{src → dist/src}/utils/version-utils.js +0 -0
- /package/{tailwind.js → dist/tailwind.js} +0 -0
package/dist/babel.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -5,4 +5,3 @@ export { libraryGenerator } from './src/generators/library/library';
|
|
|
5
5
|
export { pageGenerator } from './src/generators/page/page';
|
|
6
6
|
export { withNx } from './plugins/with-nx';
|
|
7
7
|
export { composePlugins } from './src/utils/compose-plugins';
|
|
8
|
-
//# sourceMappingURL=index.d.ts.map
|
|
@@ -6,9 +6,9 @@ const internal_1 = require("@nx/cypress/internal");
|
|
|
6
6
|
const devkit_1 = require("@nx/devkit");
|
|
7
7
|
const internal_2 = require("@nx/js/internal");
|
|
8
8
|
const react_1 = require("@nx/react");
|
|
9
|
-
const
|
|
9
|
+
const internal_3 = require("@nx/react/internal");
|
|
10
10
|
const webpack_1 = require("@nx/webpack");
|
|
11
|
-
const
|
|
11
|
+
const internal_4 = require("@nx/webpack/internal");
|
|
12
12
|
const configuration_1 = require("nx/src/config/configuration");
|
|
13
13
|
const path_1 = require("path");
|
|
14
14
|
function nxComponentTestingPreset(pathToConfig, options) {
|
|
@@ -83,7 +83,7 @@ Able to find CT project, ${!!ctProjectConfig}.`);
|
|
|
83
83
|
};
|
|
84
84
|
// Nx composes these helpers internally for the Cypress CT preset; suppress
|
|
85
85
|
// their deprecation warning so it fires only for user-authored configs.
|
|
86
|
-
const webpackConfig = (0,
|
|
86
|
+
const webpackConfig = (0, internal_4.suppressWebpackComposeHelperWarnings)(() => (0, internal_3.suppressReactComposeHelperWarnings)(() => {
|
|
87
87
|
const configure = (0, webpack_1.composePluginsSync)((0, webpack_1.withNx)({
|
|
88
88
|
target: 'web',
|
|
89
89
|
styles: [],
|
|
@@ -28,4 +28,3 @@ export declare function getNextConfig(nextConfig?: WithNxOptions, context?: With
|
|
|
28
28
|
export declare function getAliasForProject(node: ProjectGraphProjectNode, paths: Record<string, string[]>): null | string;
|
|
29
29
|
export declare function forNextVersion(range: string, fn: () => void): void;
|
|
30
30
|
export { withNx };
|
|
31
|
-
//# sourceMappingURL=with-nx.d.ts.map
|
|
@@ -1,37 +1,4 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
-
}) : function(o, v) {
|
|
16
|
-
o["default"] = v;
|
|
17
|
-
});
|
|
18
|
-
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
-
var ownKeys = function(o) {
|
|
20
|
-
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
-
var ar = [];
|
|
22
|
-
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
-
return ar;
|
|
24
|
-
};
|
|
25
|
-
return ownKeys(o);
|
|
26
|
-
};
|
|
27
|
-
return function (mod) {
|
|
28
|
-
if (mod && mod.__esModule) return mod;
|
|
29
|
-
var result = {};
|
|
30
|
-
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
-
__setModuleDefault(result, mod);
|
|
32
|
-
return result;
|
|
33
|
-
};
|
|
34
|
-
})();
|
|
35
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
3
|
exports.getNextConfig = getNextConfig;
|
|
37
4
|
exports.getAliasForProject = getAliasForProject;
|
|
@@ -95,7 +62,7 @@ function getNxContext(graph, target) {
|
|
|
95
62
|
*/
|
|
96
63
|
function withNx(_nextConfig = {}, context = getWithNxContext()) {
|
|
97
64
|
return async (phase) => {
|
|
98
|
-
const { PHASE_PRODUCTION_SERVER, PHASE_DEVELOPMENT_SERVER } =
|
|
65
|
+
const { PHASE_PRODUCTION_SERVER, PHASE_DEVELOPMENT_SERVER, } = require('next/constants');
|
|
99
66
|
// Three scenarios where we want to skip graph creation:
|
|
100
67
|
// 1. Running production server means the build is already done so we just need to start the Next.js server.
|
|
101
68
|
// 2. During graph creation (i.e. create nodes), we won't have a graph to read, and it is not needed anyway since it's a build-time concern.
|
|
@@ -2,4 +2,3 @@ import { GeneratorCallback, Tree } from '@nx/devkit';
|
|
|
2
2
|
import { Schema } from './schema';
|
|
3
3
|
export declare function applicationGenerator(host: Tree, schema: Schema): Promise<GeneratorCallback>;
|
|
4
4
|
export declare function applicationGeneratorInternal(host: Tree, schema: Schema): Promise<GeneratorCallback>;
|
|
5
|
-
//# sourceMappingURL=application.d.ts.map
|
|
@@ -6,8 +6,8 @@ const internal_1 = require("@nx/devkit/internal");
|
|
|
6
6
|
const devkit_1 = require("@nx/devkit");
|
|
7
7
|
const assert_supported_next_version_1 = require("../../utils/assert-supported-next-version");
|
|
8
8
|
const js_1 = require("@nx/js");
|
|
9
|
-
const
|
|
10
|
-
const
|
|
9
|
+
const internal_2 = require("@nx/react/internal");
|
|
10
|
+
const internal_3 = require("@nx/react/internal");
|
|
11
11
|
const normalize_options_1 = require("./lib/normalize-options");
|
|
12
12
|
const add_e2e_1 = require("./lib/add-e2e");
|
|
13
13
|
const add_jest_1 = require("./lib/add-jest");
|
|
@@ -19,8 +19,8 @@ const styles_1 = require("../../utils/styles");
|
|
|
19
19
|
const add_linting_1 = require("./lib/add-linting");
|
|
20
20
|
const custom_server_1 = require("../custom-server/custom-server");
|
|
21
21
|
const update_cypress_tsconfig_1 = require("./lib/update-cypress-tsconfig");
|
|
22
|
-
const
|
|
23
|
-
const
|
|
22
|
+
const versions_1 = require("../../utils/versions");
|
|
23
|
+
const internal_4 = require("@nx/js/internal");
|
|
24
24
|
const add_swc_to_custom_server_1 = require("../../utils/add-swc-to-custom-server");
|
|
25
25
|
const jest_config_util_1 = require("../../utils/jest-config-util");
|
|
26
26
|
async function applicationGenerator(host, schema) {
|
|
@@ -33,7 +33,7 @@ async function applicationGenerator(host, schema) {
|
|
|
33
33
|
async function applicationGeneratorInternal(host, schema) {
|
|
34
34
|
(0, assert_supported_next_version_1.assertSupportedNextVersion)(host);
|
|
35
35
|
const tasks = [];
|
|
36
|
-
const addTsPlugin = (0,
|
|
36
|
+
const addTsPlugin = (0, internal_4.shouldConfigureTsSolutionSetup)(host, schema.addPlugin, schema.useTsSolution);
|
|
37
37
|
const jsInitTask = await (0, js_1.initGenerator)(host, {
|
|
38
38
|
js: schema.js,
|
|
39
39
|
skipPackageJson: schema.skipPackageJson,
|
|
@@ -54,7 +54,7 @@ async function applicationGeneratorInternal(host, schema) {
|
|
|
54
54
|
// If we are using the new TS solution
|
|
55
55
|
// We need to update the workspace file (package.json or pnpm-workspaces.yaml) to include the new project
|
|
56
56
|
if (options.isTsSolutionSetup) {
|
|
57
|
-
await (0,
|
|
57
|
+
await (0, internal_4.addProjectToTsSolutionWorkspace)(host, options.appProjectRoot);
|
|
58
58
|
}
|
|
59
59
|
const lintTask = await (0, add_linting_1.addLinting)(host, options);
|
|
60
60
|
tasks.push(lintTask);
|
|
@@ -81,25 +81,25 @@ async function applicationGeneratorInternal(host, schema) {
|
|
|
81
81
|
});
|
|
82
82
|
}
|
|
83
83
|
if (!options.skipPackageJson) {
|
|
84
|
-
const reactVersions = await (0,
|
|
84
|
+
const reactVersions = await (0, internal_3.getReactDependenciesVersionsToInstall)(host);
|
|
85
85
|
const devDependencies = {
|
|
86
86
|
'@types/react': reactVersions['@types/react'],
|
|
87
87
|
'@types/react-dom': reactVersions['@types/react-dom'],
|
|
88
88
|
};
|
|
89
89
|
if (options.unitTestRunner && options.unitTestRunner !== 'none') {
|
|
90
|
-
devDependencies['@testing-library/react'] =
|
|
91
|
-
devDependencies['@testing-library/dom'] =
|
|
90
|
+
devDependencies['@testing-library/react'] = internal_2.testingLibraryReactVersion;
|
|
91
|
+
devDependencies['@testing-library/dom'] = internal_2.testingLibraryDomVersion;
|
|
92
92
|
}
|
|
93
|
-
tasks.push((0, devkit_1.addDependenciesToPackageJson)(host, { tslib:
|
|
93
|
+
tasks.push((0, devkit_1.addDependenciesToPackageJson)(host, { tslib: versions_1.tsLibVersion }, devDependencies, undefined, true));
|
|
94
94
|
}
|
|
95
|
-
(0,
|
|
95
|
+
(0, internal_4.updateTsconfigFiles)(host, options.appProjectRoot, 'tsconfig.json', {
|
|
96
96
|
jsx: 'preserve',
|
|
97
97
|
module: 'esnext',
|
|
98
98
|
moduleResolution: 'bundler',
|
|
99
99
|
}, options.linter === 'eslint'
|
|
100
100
|
? ['.next', 'eslint.config.js', 'eslint.config.cjs', 'eslint.config.mjs']
|
|
101
101
|
: ['.next'], options.src ? 'src' : '.');
|
|
102
|
-
(0,
|
|
102
|
+
(0, internal_4.sortPackageJsonFields)(host, options.appProjectRoot);
|
|
103
103
|
if (!options.skipFormat) {
|
|
104
104
|
await (0, devkit_1.formatFiles)(host);
|
|
105
105
|
}
|
|
@@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.addLinting = addLinting;
|
|
4
4
|
const eslint_1 = require("@nx/eslint");
|
|
5
5
|
const devkit_1 = require("@nx/devkit");
|
|
6
|
-
const
|
|
6
|
+
const react_1 = require("@nx/react");
|
|
7
7
|
const internal_1 = require("@nx/eslint/internal");
|
|
8
8
|
const version_utils_1 = require("../../../utils/version-utils");
|
|
9
9
|
async function addLinting(host, options) {
|
|
@@ -69,8 +69,8 @@ async function addLinting(host, options) {
|
|
|
69
69
|
}
|
|
70
70
|
if (!options.skipPackageJson) {
|
|
71
71
|
const eslintConfigNextVersion = await (0, version_utils_1.getEslintConfigNextDependenciesVersionsToInstall)(host);
|
|
72
|
-
tasks.push((0, devkit_1.addDependenciesToPackageJson)(host,
|
|
73
|
-
...
|
|
72
|
+
tasks.push((0, devkit_1.addDependenciesToPackageJson)(host, react_1.extraEslintDependencies.dependencies, {
|
|
73
|
+
...react_1.extraEslintDependencies.devDependencies,
|
|
74
74
|
'eslint-config-next': eslintConfigNextVersion,
|
|
75
75
|
'@next/eslint-plugin-next': eslintConfigNextVersion,
|
|
76
76
|
}, undefined, true));
|
|
@@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.normalizeOptions = normalizeOptions;
|
|
4
4
|
const devkit_1 = require("@nx/devkit");
|
|
5
5
|
const internal_1 = require("@nx/devkit/internal");
|
|
6
|
-
const
|
|
6
|
+
const react_1 = require("@nx/react");
|
|
7
7
|
const internal_2 = require("@nx/js/internal");
|
|
8
8
|
async function normalizeOptions(host, options) {
|
|
9
9
|
await (0, internal_1.ensureRootProjectName)(options, 'application');
|
|
@@ -29,7 +29,7 @@ async function normalizeOptions(host, options) {
|
|
|
29
29
|
const fileName = 'index';
|
|
30
30
|
const appDir = options.appDir ?? true;
|
|
31
31
|
const src = options.src ?? true;
|
|
32
|
-
(0,
|
|
32
|
+
(0, react_1.assertValidStyle)(options.style);
|
|
33
33
|
return {
|
|
34
34
|
...options,
|
|
35
35
|
appDir,
|
package/{src → dist/src}/generators/convert-to-inferred/lib/build-post-target-transformer.d.ts
RENAMED
|
@@ -5,4 +5,3 @@ export declare function buildPostTargetTransformer(migrationLogs: AggregatedLog)
|
|
|
5
5
|
projectName: string;
|
|
6
6
|
root: string;
|
|
7
7
|
}, inferredTargetConfiguration: TargetConfiguration) => TargetConfiguration<NextBuildBuilderOptions>;
|
|
8
|
-
//# sourceMappingURL=build-post-target-transformer.d.ts.map
|
package/{src → dist/src}/generators/convert-to-inferred/lib/serve-post-target-tranformer.d.ts
RENAMED
|
@@ -5,4 +5,3 @@ export declare function servePosTargetTransformer(migrationLogs: AggregatedLog):
|
|
|
5
5
|
projectName: string;
|
|
6
6
|
root: string;
|
|
7
7
|
}, inferredTargetConfiguration: InferredTargetConfiguration) => TargetConfiguration<NextServeBuilderOptions>;
|
|
8
|
-
//# sourceMappingURL=serve-post-target-tranformer.d.ts.map
|
|
@@ -3,4 +3,3 @@ import { CypressComponentConfigurationGeneratorSchema } from './schema';
|
|
|
3
3
|
export declare function cypressComponentConfiguration(tree: Tree, options: CypressComponentConfigurationGeneratorSchema): Promise<GeneratorCallback>;
|
|
4
4
|
export declare function cypressComponentConfigurationInternal(tree: Tree, options: CypressComponentConfigurationGeneratorSchema): Promise<GeneratorCallback>;
|
|
5
5
|
export default cypressComponentConfiguration;
|
|
6
|
-
//# sourceMappingURL=cypress-component-configuration.d.ts.map
|
|
@@ -1,44 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
-
}) : function(o, v) {
|
|
16
|
-
o["default"] = v;
|
|
17
|
-
});
|
|
18
|
-
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
-
var ownKeys = function(o) {
|
|
20
|
-
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
-
var ar = [];
|
|
22
|
-
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
-
return ar;
|
|
24
|
-
};
|
|
25
|
-
return ownKeys(o);
|
|
26
|
-
};
|
|
27
|
-
return function (mod) {
|
|
28
|
-
if (mod && mod.__esModule) return mod;
|
|
29
|
-
var result = {};
|
|
30
|
-
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
-
__setModuleDefault(result, mod);
|
|
32
|
-
return result;
|
|
33
|
-
};
|
|
34
|
-
})();
|
|
35
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
3
|
exports.cypressComponentConfiguration = cypressComponentConfiguration;
|
|
37
4
|
exports.cypressComponentConfigurationInternal = cypressComponentConfigurationInternal;
|
|
38
5
|
const devkit_1 = require("@nx/devkit");
|
|
39
6
|
const internal_1 = require("@nx/js/internal");
|
|
40
7
|
const react_1 = require("@nx/react");
|
|
41
|
-
const
|
|
8
|
+
const internal_2 = require("@nx/react/internal");
|
|
42
9
|
const path_1 = require("path");
|
|
43
10
|
const versions_1 = require("../../utils/versions");
|
|
44
11
|
const assert_supported_next_version_1 = require("../../utils/assert-supported-next-version");
|
|
@@ -64,7 +31,7 @@ async function cypressComponentConfigurationInternal(tree, options) {
|
|
|
64
31
|
skipFormat: true,
|
|
65
32
|
addPlugin: options.addPlugin,
|
|
66
33
|
}));
|
|
67
|
-
const { ensureDependencies } =
|
|
34
|
+
const { ensureDependencies, } = require('@nx/webpack/internal');
|
|
68
35
|
tasks.push(ensureDependencies(tree, { compiler: 'swc', uiFramework: 'react' }));
|
|
69
36
|
const projectConfig = (0, devkit_1.readProjectConfiguration)(tree, options.project);
|
|
70
37
|
if (projectConfig.targets?.['component-test']?.executor ===
|
|
@@ -82,8 +49,8 @@ async function cypressComponentConfigurationInternal(tree, options) {
|
|
|
82
49
|
return (0, devkit_1.runTasksInSerial)(...tasks);
|
|
83
50
|
}
|
|
84
51
|
async function addFiles(tree, projectConfig, opts) {
|
|
85
|
-
const { addMountDefinition, addDefaultCTConfig } = await
|
|
86
|
-
const { getInstalledCypressMajorVersion } = await
|
|
52
|
+
const { addMountDefinition, addDefaultCTConfig } = await import('@nx/cypress/internal');
|
|
53
|
+
const { getInstalledCypressMajorVersion } = await import('@nx/cypress/internal');
|
|
87
54
|
const installedCypressMajorVersion = getInstalledCypressMajorVersion(tree);
|
|
88
55
|
const ctFile = (0, devkit_1.joinPathFragments)(projectConfig.root, 'cypress', 'support', 'component.ts');
|
|
89
56
|
const updatedCommandFile = await addMountDefinition(tree.read(ctFile, 'utf-8'));
|
|
@@ -111,7 +78,7 @@ ${isUsingTailwind
|
|
|
111
78
|
fromProjectRootPath.includes('app')) {
|
|
112
79
|
return;
|
|
113
80
|
}
|
|
114
|
-
if ((0,
|
|
81
|
+
if ((0, internal_2.isComponent)(tree, filePath)) {
|
|
115
82
|
filePaths.push(filePath);
|
|
116
83
|
}
|
|
117
84
|
});
|
|
@@ -3,4 +3,3 @@ import type { InitSchema } from './schema';
|
|
|
3
3
|
export declare function nextInitGenerator(tree: Tree, schema: InitSchema): Promise<GeneratorCallback>;
|
|
4
4
|
export declare function nextInitGeneratorInternal(host: Tree, schema: InitSchema): Promise<GeneratorCallback>;
|
|
5
5
|
export default nextInitGenerator;
|
|
6
|
-
//# sourceMappingURL=init.d.ts.map
|
|
@@ -1,52 +1,19 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
-
}) : function(o, v) {
|
|
16
|
-
o["default"] = v;
|
|
17
|
-
});
|
|
18
|
-
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
-
var ownKeys = function(o) {
|
|
20
|
-
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
-
var ar = [];
|
|
22
|
-
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
-
return ar;
|
|
24
|
-
};
|
|
25
|
-
return ownKeys(o);
|
|
26
|
-
};
|
|
27
|
-
return function (mod) {
|
|
28
|
-
if (mod && mod.__esModule) return mod;
|
|
29
|
-
var result = {};
|
|
30
|
-
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
-
__setModuleDefault(result, mod);
|
|
32
|
-
return result;
|
|
33
|
-
};
|
|
34
|
-
})();
|
|
35
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
3
|
exports.nextInitGenerator = nextInitGenerator;
|
|
37
4
|
exports.nextInitGeneratorInternal = nextInitGeneratorInternal;
|
|
38
5
|
const internal_1 = require("@nx/devkit/internal");
|
|
39
6
|
const devkit_1 = require("@nx/devkit");
|
|
40
|
-
const
|
|
7
|
+
const internal_2 = require("@nx/react/internal");
|
|
41
8
|
const add_gitignore_entry_1 = require("../../utils/add-gitignore-entry");
|
|
42
9
|
const versions_1 = require("../../utils/versions");
|
|
43
|
-
const
|
|
10
|
+
const version_utils_1 = require("../../utils/version-utils");
|
|
44
11
|
const assert_supported_next_version_1 = require("../../utils/assert-supported-next-version");
|
|
45
12
|
async function updateDependencies(host, schema) {
|
|
46
13
|
const tasks = [];
|
|
47
14
|
tasks.push((0, devkit_1.removeDependenciesFromPackageJson)(host, ['@nx/next'], []));
|
|
48
|
-
const versions = await (0,
|
|
49
|
-
const reactVersions = await (0,
|
|
15
|
+
const versions = await (0, version_utils_1.getNextDependenciesVersionsToInstall)(host, await (0, internal_2.isReact18)(host));
|
|
16
|
+
const reactVersions = await (0, internal_2.getReactDependenciesVersionsToInstall)(host);
|
|
50
17
|
tasks.push((0, devkit_1.addDependenciesToPackageJson)(host, {
|
|
51
18
|
next: versions.next,
|
|
52
19
|
react: reactVersions.react,
|
|
@@ -66,7 +33,7 @@ async function nextInitGeneratorInternal(host, schema) {
|
|
|
66
33
|
nxJson.useInferencePlugins !== false;
|
|
67
34
|
schema.addPlugin ??= addPluginDefault;
|
|
68
35
|
if (schema.addPlugin) {
|
|
69
|
-
const { createNodesV2 } =
|
|
36
|
+
const { createNodesV2, } = require('../../plugins/plugin');
|
|
70
37
|
await (0, internal_1.addPlugin)(host, await (0, devkit_1.createProjectGraphAsync)(), '@nx/next/plugin', createNodesV2, {
|
|
71
38
|
startTargetName: ['start', 'next:start', 'next-start'],
|
|
72
39
|
buildTargetName: ['build', 'next:build', 'next-build'],
|
|
@@ -3,4 +3,3 @@ import { Schema } from './schema';
|
|
|
3
3
|
export declare function libraryGenerator(host: Tree, rawOptions: Schema): Promise<GeneratorCallback>;
|
|
4
4
|
export declare function libraryGeneratorInternal(host: Tree, rawOptions: Schema): Promise<GeneratorCallback>;
|
|
5
5
|
export default libraryGenerator;
|
|
6
|
-
//# sourceMappingURL=library.d.ts.map
|