@nx/react 22.7.0-beta.1 → 22.7.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 +16 -16
- package/plugins/jest.js +2 -1
- package/src/executors/module-federation-dev-server/module-federation-dev-server.impl.js +3 -2
- package/src/executors/module-federation-ssr-dev-server/module-federation-ssr-dev-server.impl.js +2 -1
- package/src/executors/module-federation-static-server/module-federation-static-server.impl.d.ts.map +1 -1
- package/src/executors/module-federation-static-server/module-federation-static-server.impl.js +2 -2
- package/src/generators/application/application.js +2 -1
- package/src/generators/application/lib/add-e2e.js +34 -1
- package/src/generators/application/lib/add-linting.d.ts.map +1 -1
- package/src/generators/application/lib/add-linting.js +36 -3
- package/src/generators/application/lib/bundlers/add-rsbuild.js +36 -3
- package/src/generators/application/lib/bundlers/add-rspack.js +2 -1
- package/src/generators/application/lib/bundlers/add-vite.js +34 -1
- package/src/generators/application/lib/bundlers/add-webpack.js +34 -1
- package/src/generators/application/lib/show-possible-warnings.js +2 -1
- package/src/generators/cypress-component-configuration/lib/add-files.js +35 -2
- package/src/generators/host/host.js +4 -3
- package/src/generators/library/lib/add-linting.d.ts.map +1 -1
- package/src/generators/library/lib/add-linting.js +1 -1
- package/src/generators/library/library.js +4 -3
- package/src/generators/redux/redux.js +2 -1
- package/src/generators/remote/remote.js +3 -2
- package/src/generators/stories/stories.js +4 -3
- package/src/migrations/update-22-0-0/add-svgr-to-webpack-config.js +2 -1
- package/src/utils/create-ts-config.js +2 -1
- package/src/utils/ct-utils.js +35 -2
- package/src/utils/has-rsbuild-plugin.js +34 -1
- package/src/utils/testing-generators.js +2 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nx/react",
|
|
3
|
-
"version": "22.7.0-beta.
|
|
3
|
+
"version": "22.7.0-beta.2",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "The React plugin for Nx contains executors and generators for managing React applications and libraries within an Nx workspace. It provides:\n\n\n- Integration with libraries such as Jest, Vitest, Playwright, Cypress, and Storybook.\n\n- Generators for applications, libraries, components, hooks, and more.\n\n- Library build support for publishing packages to npm or other registries.\n\n- Utilities for automatic workspace refactoring.",
|
|
6
6
|
"repository": {
|
|
@@ -37,28 +37,28 @@
|
|
|
37
37
|
"minimatch": "10.2.4",
|
|
38
38
|
"picocolors": "^1.1.0",
|
|
39
39
|
"tslib": "^2.3.0",
|
|
40
|
-
"@nx/devkit": "22.7.0-beta.
|
|
41
|
-
"@nx/js": "22.7.0-beta.
|
|
42
|
-
"@nx/eslint": "22.7.0-beta.
|
|
43
|
-
"@nx/web": "22.7.0-beta.
|
|
44
|
-
"@nx/module-federation": "22.7.0-beta.
|
|
45
|
-
"@nx/rollup": "22.7.0-beta.
|
|
40
|
+
"@nx/devkit": "22.7.0-beta.2",
|
|
41
|
+
"@nx/js": "22.7.0-beta.2",
|
|
42
|
+
"@nx/eslint": "22.7.0-beta.2",
|
|
43
|
+
"@nx/web": "22.7.0-beta.2",
|
|
44
|
+
"@nx/module-federation": "22.7.0-beta.2",
|
|
45
|
+
"@nx/rollup": "22.7.0-beta.2",
|
|
46
46
|
"express": "^4.21.2",
|
|
47
47
|
"http-proxy-middleware": "^3.0.5",
|
|
48
48
|
"semver": "^7.6.3"
|
|
49
49
|
},
|
|
50
50
|
"devDependencies": {
|
|
51
|
-
"@nx/cypress": "22.7.0-beta.
|
|
52
|
-
"@nx/playwright": "22.7.0-beta.
|
|
53
|
-
"@nx/rsbuild": "22.7.0-beta.
|
|
54
|
-
"@nx/vite": "22.7.0-beta.
|
|
55
|
-
"@nx/vitest": "22.7.0-beta.
|
|
56
|
-
"@nx/webpack": "22.7.0-beta.
|
|
57
|
-
"@nx/storybook": "22.7.0-beta.
|
|
58
|
-
"nx": "22.7.0-beta.
|
|
51
|
+
"@nx/cypress": "22.7.0-beta.2",
|
|
52
|
+
"@nx/playwright": "22.7.0-beta.2",
|
|
53
|
+
"@nx/rsbuild": "22.7.0-beta.2",
|
|
54
|
+
"@nx/vite": "22.7.0-beta.2",
|
|
55
|
+
"@nx/vitest": "22.7.0-beta.2",
|
|
56
|
+
"@nx/webpack": "22.7.0-beta.2",
|
|
57
|
+
"@nx/storybook": "22.7.0-beta.2",
|
|
58
|
+
"nx": "22.7.0-beta.2"
|
|
59
59
|
},
|
|
60
60
|
"optionalDependencies": {
|
|
61
|
-
"@nx/vite": "22.7.0-beta.
|
|
61
|
+
"@nx/vite": "22.7.0-beta.2"
|
|
62
62
|
},
|
|
63
63
|
"publishConfig": {
|
|
64
64
|
"access": "public"
|
package/plugins/jest.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const
|
|
3
|
+
const tslib_1 = require("tslib");
|
|
4
|
+
const path = tslib_1.__importStar(require("path"));
|
|
4
5
|
const devkit_1 = require("@nx/devkit");
|
|
5
6
|
const JS_SOURCE_EXTENSIONS = ['.ts', '.tsx', '.js', '.jsx', '.mjs', '.cjs'];
|
|
6
7
|
module.exports = {
|
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.default = moduleFederationDevServer;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
4
5
|
const devkit_1 = require("@nx/devkit");
|
|
5
6
|
const async_iterable_1 = require("@nx/devkit/src/utils/async-iterable");
|
|
6
7
|
const ts_solution_setup_1 = require("@nx/js/src/utils/typescript/ts-solution-setup");
|
|
7
8
|
const utils_1 = require("@nx/module-federation/src/executors/utils");
|
|
8
|
-
const file_server_impl_1 = require("@nx/web/src/executors/file-server/file-server.impl");
|
|
9
|
+
const file_server_impl_1 = tslib_1.__importDefault(require("@nx/web/src/executors/file-server/file-server.impl"));
|
|
9
10
|
const wait_for_port_open_1 = require("@nx/web/src/utils/wait-for-port-open");
|
|
10
|
-
const dev_server_impl_1 = require("@nx/webpack/src/executors/dev-server/dev-server.impl");
|
|
11
|
+
const dev_server_impl_1 = tslib_1.__importDefault(require("@nx/webpack/src/executors/dev-server/dev-server.impl"));
|
|
11
12
|
const fs_1 = require("fs");
|
|
12
13
|
const path_1 = require("path");
|
|
13
14
|
const lib_1 = require("./lib");
|
package/src/executors/module-federation-ssr-dev-server/module-federation-ssr-dev-server.impl.js
CHANGED
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.default = moduleFederationSsrDevServer;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
4
5
|
const devkit_1 = require("@nx/devkit");
|
|
5
6
|
const async_iterable_1 = require("@nx/devkit/src/utils/async-iterable");
|
|
6
7
|
const ts_solution_setup_1 = require("@nx/js/src/utils/typescript/ts-solution-setup");
|
|
7
8
|
const utils_1 = require("@nx/module-federation/src/executors/utils");
|
|
8
9
|
const wait_for_port_open_1 = require("@nx/web/src/utils/wait-for-port-open");
|
|
9
|
-
const ssr_dev_server_impl_1 = require("@nx/webpack/src/executors/ssr-dev-server/ssr-dev-server.impl");
|
|
10
|
+
const ssr_dev_server_impl_1 = tslib_1.__importDefault(require("@nx/webpack/src/executors/ssr-dev-server/ssr-dev-server.impl"));
|
|
10
11
|
const fs_1 = require("fs");
|
|
11
12
|
const path_1 = require("path");
|
|
12
13
|
const lib_1 = require("./lib");
|
package/src/executors/module-federation-static-server/module-federation-static-server.impl.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"module-federation-static-server.impl.d.ts","sourceRoot":"","sources":["../../../../../../packages/react/src/executors/module-federation-static-server/module-federation-static-server.impl.ts"],"names":[],"mappings":"AAaA,OAAO,EAIL,mBAAmB,EACpB,MAAM,iCAAiC,CAAC;
|
|
1
|
+
{"version":3,"file":"module-federation-static-server.impl.d.ts","sourceRoot":"","sources":["../../../../../../packages/react/src/executors/module-federation-static-server/module-federation-static-server.impl.ts"],"names":[],"mappings":"AAaA,OAAO,EAIL,mBAAmB,EACpB,MAAM,iCAAiC,CAAC;AAOzC,OAAO,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAC;AAEhE,OAAO,EAAE,gCAAgC,EAAE,MAAM,wCAAwC,CAAC;AAC1F,OAAO,EAAE,kCAAkC,EAAE,MAAM,UAAU,CAAC;AAgJ9D,wBAAgB,YAAY,CAC1B,mBAAmB,EAAE,mBAAmB,EACxC,gBAAgB,EAAE,gCAAgC,EAClD,oBAAoB,EAAE,MAAM,EAC5B,wBAAwB,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,EAChD,UAAU,CAAC,EAAE;IAAE,UAAU,EAAE,MAAM,CAAC;IAAC,SAAS,EAAE,MAAM,CAAA;CAAE,QAgEvD;AAED,wBAA+B,4BAA4B,CACzD,MAAM,EAAE,kCAAkC,EAC1C,OAAO,EAAE,eAAe;;;aAiJzB"}
|
package/src/executors/module-federation-static-server/module-federation-static-server.impl.js
CHANGED
|
@@ -2,16 +2,16 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.startProxies = startProxies;
|
|
4
4
|
exports.default = moduleFederationStaticServer;
|
|
5
|
+
const tslib_1 = require("tslib");
|
|
5
6
|
const devkit_1 = require("@nx/devkit");
|
|
6
7
|
const async_iterable_1 = require("@nx/devkit/src/utils/async-iterable");
|
|
7
8
|
const ts_solution_setup_1 = require("@nx/js/src/utils/typescript/ts-solution-setup");
|
|
8
9
|
const utils_1 = require("@nx/module-federation/src/executors/utils");
|
|
9
10
|
const utils_2 = require("@nx/module-federation/src/utils");
|
|
10
|
-
const file_server_impl_1 = require("@nx/web/src/executors/file-server/file-server.impl");
|
|
11
|
+
const file_server_impl_1 = tslib_1.__importDefault(require("@nx/web/src/executors/file-server/file-server.impl"));
|
|
11
12
|
const wait_for_port_open_1 = require("@nx/web/src/utils/wait-for-port-open");
|
|
12
13
|
const child_process_1 = require("child_process");
|
|
13
14
|
const fs_1 = require("fs");
|
|
14
|
-
const process = require("node:process");
|
|
15
15
|
const path_1 = require("path");
|
|
16
16
|
function getBuildAndServeOptionsFromServeTarget(serveTarget, context) {
|
|
17
17
|
const target = (0, devkit_1.parseTargetString)(serveTarget, context);
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.applicationGenerator = applicationGenerator;
|
|
4
4
|
exports.applicationGeneratorInternal = applicationGeneratorInternal;
|
|
5
|
+
const tslib_1 = require("tslib");
|
|
5
6
|
const devkit_1 = require("@nx/devkit");
|
|
6
7
|
const js_1 = require("@nx/js");
|
|
7
8
|
const log_show_project_command_1 = require("@nx/devkit/src/utils/log-show-project-command");
|
|
@@ -9,7 +10,7 @@ const ts_solution_setup_1 = require("@nx/js/src/utils/typescript/ts-solution-set
|
|
|
9
10
|
const create_ts_config_1 = require("../../utils/create-ts-config");
|
|
10
11
|
const add_styled_dependencies_1 = require("../../rules/add-styled-dependencies");
|
|
11
12
|
const setup_tailwind_1 = require("../setup-tailwind/setup-tailwind");
|
|
12
|
-
const init_1 = require("../init/init");
|
|
13
|
+
const init_1 = tslib_1.__importDefault(require("../init/init"));
|
|
13
14
|
const create_application_files_1 = require("./lib/create-application-files");
|
|
14
15
|
const update_jest_config_1 = require("./lib/update-jest-config");
|
|
15
16
|
const normalize_options_1 = require("./lib/normalize-options");
|
|
@@ -1,4 +1,37 @@
|
|
|
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
|
+
})();
|
|
2
35
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
36
|
exports.addE2e = addE2e;
|
|
4
37
|
const devkit_1 = require("@nx/devkit");
|
|
@@ -41,7 +74,7 @@ async function addE2e(tree, options) {
|
|
|
41
74
|
}
|
|
42
75
|
else if (options.bundler === 'rsbuild') {
|
|
43
76
|
(0, devkit_1.ensurePackage)('@nx/rsbuild', versions_1.nxVersion);
|
|
44
|
-
const { getRsbuildE2EWebServerInfo } = await Promise.resolve().then(() => require('@nx/rsbuild/config-utils'));
|
|
77
|
+
const { getRsbuildE2EWebServerInfo } = await Promise.resolve().then(() => __importStar(require('@nx/rsbuild/config-utils')));
|
|
45
78
|
e2eWebServerInfo = await getRsbuildE2EWebServerInfo(tree, options.projectName, (0, devkit_1.joinPathFragments)(options.appProjectRoot, `rsbuild.config.${options.js ? 'js' : 'ts'}`), options.addPlugin, options.devServerPort ?? 4200);
|
|
46
79
|
}
|
|
47
80
|
if (!hasNxBuildPlugin) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"add-linting.d.ts","sourceRoot":"","sources":["../../../../../../../packages/react/src/generators/application/lib/add-linting.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,IAAI,EACT,KAAK,iBAAiB,EAIvB,MAAM,YAAY,CAAC;AAYpB,OAAO,EAAE,gBAAgB,EAAE,MAAM,WAAW,CAAC;AAG7C,wBAAsB,UAAU,CAAC,IAAI,EAAE,IAAI,EAAE,OAAO,EAAE,gBAAgB,
|
|
1
|
+
{"version":3,"file":"add-linting.d.ts","sourceRoot":"","sources":["../../../../../../../packages/react/src/generators/application/lib/add-linting.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,IAAI,EACT,KAAK,iBAAiB,EAIvB,MAAM,YAAY,CAAC;AAYpB,OAAO,EAAE,gBAAgB,EAAE,MAAM,WAAW,CAAC;AAG7C,wBAAsB,UAAU,CAAC,IAAI,EAAE,IAAI,EAAE,OAAO,EAAE,gBAAgB,8BAsDrE;AAiCD,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,IAAI,GAAG,OAAO,CAYrD"}
|
|
@@ -1,4 +1,37 @@
|
|
|
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
|
+
})();
|
|
2
35
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
36
|
exports.addLinting = addLinting;
|
|
4
37
|
exports.isEslintInstalled = isEslintInstalled;
|
|
@@ -28,7 +61,7 @@ async function addLinting(host, options) {
|
|
|
28
61
|
tasks.push(lintTask);
|
|
29
62
|
if ((0, eslint_file_1.isEslintConfigSupported)(host)) {
|
|
30
63
|
if ((0, flat_config_1.useFlatConfig)(host)) {
|
|
31
|
-
(0, eslint_file_1.addPredefinedConfigToFlatLintConfig)(host, options.appProjectRoot, 'flat/react');
|
|
64
|
+
(0, eslint_file_1.addPredefinedConfigToFlatLintConfig)(host, options.appProjectRoot, 'flat/react', { checkBaseConfig: true });
|
|
32
65
|
// Add an empty rules object to users know how to add/override rules
|
|
33
66
|
(0, eslint_file_1.addOverrideToLintConfig)(host, options.appProjectRoot, {
|
|
34
67
|
files: ['*.ts', '*.tsx', '*.js', '*.jsx'],
|
|
@@ -56,11 +89,11 @@ async function ignoreReactRouterFilesInEslintConfig(tree, projectRoot) {
|
|
|
56
89
|
return;
|
|
57
90
|
}
|
|
58
91
|
(0, devkit_1.ensurePackage)('@nx/eslint', versions_1.nxVersion);
|
|
59
|
-
const { addIgnoresToLintConfig, isEslintConfigSupported } = await Promise.resolve().then(() => require('@nx/eslint/src/generators/utils/eslint-file'));
|
|
92
|
+
const { addIgnoresToLintConfig, isEslintConfigSupported } = await Promise.resolve().then(() => __importStar(require('@nx/eslint/src/generators/utils/eslint-file')));
|
|
60
93
|
if (!isEslintConfigSupported(tree)) {
|
|
61
94
|
return;
|
|
62
95
|
}
|
|
63
|
-
const { useFlatConfig } = await Promise.resolve().then(() => require('@nx/eslint/src/utils/flat-config'));
|
|
96
|
+
const { useFlatConfig } = await Promise.resolve().then(() => __importStar(require('@nx/eslint/src/utils/flat-config')));
|
|
64
97
|
const isUsingFlatConfig = useFlatConfig(tree);
|
|
65
98
|
if (!projectRoot && !isUsingFlatConfig) {
|
|
66
99
|
// root eslintrc files ignore all files and the root eslintrc files add
|
|
@@ -1,4 +1,37 @@
|
|
|
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
|
+
})();
|
|
2
35
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
36
|
exports.initRsbuild = initRsbuild;
|
|
4
37
|
exports.setupRsbuildConfiguration = setupRsbuildConfiguration;
|
|
@@ -7,7 +40,7 @@ const versions_1 = require("../../../../utils/versions");
|
|
|
7
40
|
const maybe_js_1 = require("../../../../utils/maybe-js");
|
|
8
41
|
async function initRsbuild(tree, options, tasks) {
|
|
9
42
|
(0, devkit_1.ensurePackage)('@nx/rsbuild', versions_1.nxVersion);
|
|
10
|
-
const { initGenerator } = await Promise.resolve().then(() => require('@nx/rsbuild/generators'));
|
|
43
|
+
const { initGenerator } = await Promise.resolve().then(() => __importStar(require('@nx/rsbuild/generators')));
|
|
11
44
|
const initTask = await initGenerator(tree, {
|
|
12
45
|
skipPackageJson: options.skipPackageJson,
|
|
13
46
|
addPlugin: true,
|
|
@@ -17,8 +50,8 @@ async function initRsbuild(tree, options, tasks) {
|
|
|
17
50
|
}
|
|
18
51
|
async function setupRsbuildConfiguration(tree, options, tasks) {
|
|
19
52
|
(0, devkit_1.ensurePackage)('@nx/rsbuild', versions_1.nxVersion);
|
|
20
|
-
const { configurationGenerator } = await Promise.resolve().then(() => require('@nx/rsbuild/generators'));
|
|
21
|
-
const { addBuildPlugin, addCopyAssets, addHtmlTemplatePath, addExperimentalSwcPlugin, addSourceDefine, versions, } = await Promise.resolve().then(() => require('@nx/rsbuild/config-utils'));
|
|
53
|
+
const { configurationGenerator } = await Promise.resolve().then(() => __importStar(require('@nx/rsbuild/generators')));
|
|
54
|
+
const { addBuildPlugin, addCopyAssets, addHtmlTemplatePath, addExperimentalSwcPlugin, addSourceDefine, versions, } = await Promise.resolve().then(() => __importStar(require('@nx/rsbuild/config-utils')));
|
|
22
55
|
const rsbuildTask = await configurationGenerator(tree, {
|
|
23
56
|
project: options.projectName,
|
|
24
57
|
entry: (0, maybe_js_1.maybeJs)({
|
|
@@ -2,8 +2,9 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.initRspack = initRspack;
|
|
4
4
|
exports.handleStyledJsxForRspack = handleStyledJsxForRspack;
|
|
5
|
+
const tslib_1 = require("tslib");
|
|
5
6
|
const devkit_1 = require("@nx/devkit");
|
|
6
|
-
const pc = require("picocolors");
|
|
7
|
+
const pc = tslib_1.__importStar(require("picocolors"));
|
|
7
8
|
const versions_1 = require("../../../../utils/versions");
|
|
8
9
|
async function initRspack(tree, options, tasks) {
|
|
9
10
|
const { rspackInitGenerator } = (0, devkit_1.ensurePackage)('@nx/rspack', versions_1.nxVersion);
|
|
@@ -1,4 +1,37 @@
|
|
|
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
|
+
})();
|
|
2
35
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
36
|
exports.setupViteConfiguration = setupViteConfiguration;
|
|
4
37
|
exports.setupVitestConfiguration = setupVitestConfiguration;
|
|
@@ -53,7 +86,7 @@ async function setupViteConfiguration(tree, options, tasks) {
|
|
|
53
86
|
async function setupVitestConfiguration(tree, options, tasks) {
|
|
54
87
|
const { createOrEditViteConfig } = (0, devkit_1.ensurePackage)('@nx/vite', versions_1.nxVersion);
|
|
55
88
|
(0, devkit_1.ensurePackage)('@nx/vitest', versions_1.nxVersion);
|
|
56
|
-
const { configurationGenerator } = await Promise.resolve().then(() => require('@nx/vitest/generators'));
|
|
89
|
+
const { configurationGenerator } = await Promise.resolve().then(() => __importStar(require('@nx/vitest/generators')));
|
|
57
90
|
const vitestTask = await configurationGenerator(tree, {
|
|
58
91
|
uiFramework: 'react',
|
|
59
92
|
coverageProvider: 'v8',
|
|
@@ -1,4 +1,37 @@
|
|
|
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
|
+
})();
|
|
2
35
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
36
|
exports.initWebpack = initWebpack;
|
|
4
37
|
const devkit_1 = require("@nx/devkit");
|
|
@@ -12,7 +45,7 @@ async function initWebpack(tree, options, tasks) {
|
|
|
12
45
|
});
|
|
13
46
|
tasks.push(webpackInitTask);
|
|
14
47
|
if (!options.skipPackageJson) {
|
|
15
|
-
const { ensureDependencies } = await Promise.resolve().then(() => require('@nx/webpack/src/utils/ensure-dependencies'));
|
|
48
|
+
const { ensureDependencies } = await Promise.resolve().then(() => __importStar(require('@nx/webpack/src/utils/ensure-dependencies')));
|
|
16
49
|
tasks.push(ensureDependencies(tree, { uiFramework: 'react' }));
|
|
17
50
|
}
|
|
18
51
|
}
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.showPossibleWarnings = showPossibleWarnings;
|
|
4
|
-
const
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const pc = tslib_1.__importStar(require("picocolors"));
|
|
5
6
|
const devkit_1 = require("@nx/devkit");
|
|
6
7
|
function showPossibleWarnings(tree, options) {
|
|
7
8
|
if (options.style === 'styled-jsx' && options.compiler === 'swc') {
|
|
@@ -1,4 +1,37 @@
|
|
|
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
|
+
})();
|
|
2
35
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
36
|
exports.addFiles = addFiles;
|
|
4
37
|
const devkit_1 = require("@nx/devkit");
|
|
@@ -9,8 +42,8 @@ const component_test_1 = require("../../component-test/component-test");
|
|
|
9
42
|
async function addFiles(tree, projectConfig, options, found) {
|
|
10
43
|
// must dynamicaly import to prevent packages not using cypress from erroring out
|
|
11
44
|
// when importing react
|
|
12
|
-
const { addMountDefinition } = await Promise.resolve().then(() => require('@nx/cypress/src/utils/config'));
|
|
13
|
-
const { getInstalledCypressMajorVersion } = await Promise.resolve().then(() => require('@nx/cypress/src/utils/versions'));
|
|
45
|
+
const { addMountDefinition } = await Promise.resolve().then(() => __importStar(require('@nx/cypress/src/utils/config')));
|
|
46
|
+
const { getInstalledCypressMajorVersion } = await Promise.resolve().then(() => __importStar(require('@nx/cypress/src/utils/versions')));
|
|
14
47
|
const installedCypressMajorVersion = getInstalledCypressMajorVersion(tree);
|
|
15
48
|
// Specifically undefined to allow Remix workaround of passing an empty string
|
|
16
49
|
const actualBundler = await (0, ct_utils_1.getActualBundler)(tree, options, found);
|
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.hostGenerator = hostGenerator;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
4
5
|
const devkit_1 = require("@nx/devkit");
|
|
5
6
|
const update_module_federation_project_1 = require("../../rules/update-module-federation-project");
|
|
6
|
-
const application_1 = require("../application/application");
|
|
7
|
+
const application_1 = tslib_1.__importDefault(require("../application/application"));
|
|
7
8
|
const normalize_options_1 = require("../application/lib/normalize-options");
|
|
8
|
-
const remote_1 = require("../remote/remote");
|
|
9
|
-
const setup_ssr_1 = require("../setup-ssr/setup-ssr");
|
|
9
|
+
const remote_1 = tslib_1.__importDefault(require("../remote/remote"));
|
|
10
|
+
const setup_ssr_1 = tslib_1.__importDefault(require("../setup-ssr/setup-ssr"));
|
|
10
11
|
const add_module_federation_files_1 = require("./lib/add-module-federation-files");
|
|
11
12
|
const normalize_remote_1 = require("../../utils/normalize-remote");
|
|
12
13
|
const setup_ssr_for_host_1 = require("./lib/setup-ssr-for-host");
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"add-linting.d.ts","sourceRoot":"","sources":["../../../../../../../packages/react/src/generators/library/lib/add-linting.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,wBAAwB,CAAC;AAG9C,OAAO,EAEL,iBAAiB,EAElB,MAAM,YAAY,CAAC;AAEpB,OAAO,EAAE,gBAAgB,EAAE,MAAM,WAAW,CAAC;AAW7C,wBAAsB,UAAU,CAAC,IAAI,EAAE,IAAI,EAAE,OAAO,EAAE,gBAAgB,
|
|
1
|
+
{"version":3,"file":"add-linting.d.ts","sourceRoot":"","sources":["../../../../../../../packages/react/src/generators/library/lib/add-linting.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,wBAAwB,CAAC;AAG9C,OAAO,EAEL,iBAAiB,EAElB,MAAM,YAAY,CAAC;AAEpB,OAAO,EAAE,gBAAgB,EAAE,MAAM,WAAW,CAAC;AAW7C,wBAAsB,UAAU,CAAC,IAAI,EAAE,IAAI,EAAE,OAAO,EAAE,gBAAgB,8BA8DrE"}
|
|
@@ -25,7 +25,7 @@ async function addLinting(host, options) {
|
|
|
25
25
|
tasks.push(lintTask);
|
|
26
26
|
if ((0, eslint_file_1.isEslintConfigSupported)(host)) {
|
|
27
27
|
if ((0, flat_config_1.useFlatConfig)(host)) {
|
|
28
|
-
(0, eslint_file_1.addPredefinedConfigToFlatLintConfig)(host, options.projectRoot, 'flat/react');
|
|
28
|
+
(0, eslint_file_1.addPredefinedConfigToFlatLintConfig)(host, options.projectRoot, 'flat/react', { checkBaseConfig: true });
|
|
29
29
|
// Add an empty rules object to users know how to add/override rules
|
|
30
30
|
(0, eslint_file_1.addOverrideToLintConfig)(host, options.projectRoot, {
|
|
31
31
|
files: ['*.ts', '*.tsx', '*.js', '*.jsx'],
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.libraryGenerator = libraryGenerator;
|
|
4
4
|
exports.libraryGeneratorInternal = libraryGeneratorInternal;
|
|
5
|
+
const tslib_1 = require("tslib");
|
|
5
6
|
const devkit_1 = require("@nx/devkit");
|
|
6
7
|
const artifact_name_and_directory_utils_1 = require("@nx/devkit/src/generators/artifact-name-and-directory-utils");
|
|
7
8
|
const log_show_project_command_1 = require("@nx/devkit/src/utils/log-show-project-command");
|
|
@@ -14,8 +15,8 @@ const create_ts_config_1 = require("../../utils/create-ts-config");
|
|
|
14
15
|
const jest_utils_1 = require("../../utils/jest-utils");
|
|
15
16
|
const maybe_js_1 = require("../../utils/maybe-js");
|
|
16
17
|
const versions_1 = require("../../utils/versions");
|
|
17
|
-
const component_1 = require("../component/component");
|
|
18
|
-
const init_1 = require("../init/init");
|
|
18
|
+
const component_1 = tslib_1.__importDefault(require("../component/component"));
|
|
19
|
+
const init_1 = tslib_1.__importDefault(require("../init/init"));
|
|
19
20
|
const add_linting_1 = require("./lib/add-linting");
|
|
20
21
|
const add_rollup_build_target_1 = require("./lib/add-rollup-build-target");
|
|
21
22
|
const create_files_1 = require("./lib/create-files");
|
|
@@ -151,7 +152,7 @@ async function libraryGeneratorInternal(host, schema) {
|
|
|
151
152
|
) {
|
|
152
153
|
const { createOrEditViteConfig } = (0, devkit_1.ensurePackage)('@nx/vite', versions_1.nxVersion);
|
|
153
154
|
(0, devkit_1.ensurePackage)('@nx/vitest', versions_1.nxVersion);
|
|
154
|
-
const { configurationGenerator } = await Promise.resolve().then(() => require('@nx/vitest/generators'));
|
|
155
|
+
const { configurationGenerator } = await Promise.resolve().then(() => tslib_1.__importStar(require('@nx/vitest/generators')));
|
|
155
156
|
const vitestTask = await configurationGenerator(host, {
|
|
156
157
|
uiFramework: 'react',
|
|
157
158
|
project: options.name,
|
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.reduxGenerator = reduxGenerator;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
4
5
|
const devkit_1 = require("@nx/devkit");
|
|
5
6
|
const artifact_name_and_directory_utils_1 = require("@nx/devkit/src/generators/artifact-name-and-directory-utils");
|
|
6
7
|
const js_1 = require("@nx/js");
|
|
7
8
|
const ensure_typescript_1 = require("@nx/js/src/utils/typescript/ensure-typescript");
|
|
8
9
|
const ts_solution_setup_1 = require("@nx/js/src/utils/typescript/ts-solution-setup");
|
|
9
|
-
const path = require("path");
|
|
10
|
+
const path = tslib_1.__importStar(require("path"));
|
|
10
11
|
const ast_utils_1 = require("../../utils/ast-utils");
|
|
11
12
|
const versions_1 = require("../../utils/versions");
|
|
12
13
|
let tsModule;
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.addModuleFederationFiles = addModuleFederationFiles;
|
|
4
4
|
exports.remoteGenerator = remoteGenerator;
|
|
5
|
+
const tslib_1 = require("tslib");
|
|
5
6
|
const devkit_1 = require("@nx/devkit");
|
|
6
7
|
const path_1 = require("path");
|
|
7
8
|
const project_name_and_root_utils_1 = require("@nx/devkit/src/generators/project-name-and-root-utils");
|
|
@@ -12,10 +13,10 @@ const add_mf_env_to_inputs_1 = require("../../utils/add-mf-env-to-inputs");
|
|
|
12
13
|
const normalize_remote_1 = require("../../utils/normalize-remote");
|
|
13
14
|
const maybe_js_1 = require("../../utils/maybe-js");
|
|
14
15
|
const versions_1 = require("../../utils/versions");
|
|
15
|
-
const application_1 = require("../application/application");
|
|
16
|
+
const application_1 = tslib_1.__importDefault(require("../application/application"));
|
|
16
17
|
const create_application_files_1 = require("../application/lib/create-application-files");
|
|
17
18
|
const normalize_options_1 = require("../application/lib/normalize-options");
|
|
18
|
-
const setup_ssr_1 = require("../setup-ssr/setup-ssr");
|
|
19
|
+
const setup_ssr_1 = tslib_1.__importDefault(require("../setup-ssr/setup-ssr"));
|
|
19
20
|
const add_remote_to_dynamic_host_1 = require("./lib/add-remote-to-dynamic-host");
|
|
20
21
|
const setup_package_json_exports_for_remote_1 = require("./lib/setup-package-json-exports-for-remote");
|
|
21
22
|
const setup_ssr_for_remote_1 = require("./lib/setup-ssr-for-remote");
|
|
@@ -4,6 +4,7 @@ exports.projectRootPath = projectRootPath;
|
|
|
4
4
|
exports.containsComponentDeclaration = containsComponentDeclaration;
|
|
5
5
|
exports.createAllStories = createAllStories;
|
|
6
6
|
exports.storiesGenerator = storiesGenerator;
|
|
7
|
+
const tslib_1 = require("tslib");
|
|
7
8
|
const devkit_1 = require("@nx/devkit");
|
|
8
9
|
const ensure_typescript_1 = require("@nx/js/src/utils/typescript/ensure-typescript");
|
|
9
10
|
const ts_solution_setup_1 = require("@nx/js/src/utils/typescript/ts-solution-setup");
|
|
@@ -11,7 +12,7 @@ const minimatch_1 = require("minimatch");
|
|
|
11
12
|
const path_1 = require("path");
|
|
12
13
|
const ast_utils_1 = require("../../utils/ast-utils");
|
|
13
14
|
const framework_1 = require("../../utils/framework");
|
|
14
|
-
const component_story_1 = require("../component-story/component-story");
|
|
15
|
+
const component_story_1 = tslib_1.__importDefault(require("../component-story/component-story"));
|
|
15
16
|
let tsModule;
|
|
16
17
|
async function projectRootPath(tree, config) {
|
|
17
18
|
let projectDir;
|
|
@@ -48,7 +49,7 @@ function containsComponentDeclaration(tree, componentPath) {
|
|
|
48
49
|
(0, ast_utils_1.findExportDeclarationsForJsx)(sourceFile)?.length);
|
|
49
50
|
}
|
|
50
51
|
async function createAllStories(tree, schema, projectConfiguration) {
|
|
51
|
-
const { isTheFileAStory } = await Promise.resolve().then(() => require('@nx/storybook/src/utils/utilities'));
|
|
52
|
+
const { isTheFileAStory } = await Promise.resolve().then(() => tslib_1.__importStar(require('@nx/storybook/src/utils/utilities')));
|
|
52
53
|
const sourceRoot = (0, ts_solution_setup_1.getProjectSourceRoot)(projectConfiguration, tree);
|
|
53
54
|
let componentPaths = [];
|
|
54
55
|
const projectPath = await projectRootPath(tree, projectConfiguration);
|
|
@@ -98,7 +99,7 @@ async function storiesGenerator(host, schema) {
|
|
|
98
99
|
}
|
|
99
100
|
}
|
|
100
101
|
async function isNextJsProject(tree, config) {
|
|
101
|
-
const { findStorybookAndBuildTargetsAndCompiler } = await Promise.resolve().then(() => require('@nx/storybook/src/utils/utilities'));
|
|
102
|
+
const { findStorybookAndBuildTargetsAndCompiler } = await Promise.resolve().then(() => tslib_1.__importStar(require('@nx/storybook/src/utils/utilities')));
|
|
102
103
|
const { nextBuildTarget } = findStorybookAndBuildTargetsAndCompiler(config.targets);
|
|
103
104
|
if (nextBuildTarget) {
|
|
104
105
|
return true;
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.default = addSvgrToWebpackConfig;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
4
5
|
const devkit_1 = require("@nx/devkit");
|
|
5
6
|
const executor_options_utils_1 = require("@nx/devkit/src/generators/executor-options-utils");
|
|
6
7
|
const tsquery_1 = require("@phenomnomnominal/tsquery");
|
|
7
|
-
const ts = require("typescript");
|
|
8
|
+
const ts = tslib_1.__importStar(require("typescript"));
|
|
8
9
|
const withSvgrFunctionForWithReact = `
|
|
9
10
|
|
|
10
11
|
// SVGR support function (migrated from svgr option in withReact/NxReactWebpackPlugin)
|
|
@@ -2,7 +2,8 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.createTsConfig = createTsConfig;
|
|
4
4
|
exports.extractTsConfigBase = extractTsConfigBase;
|
|
5
|
-
const
|
|
5
|
+
const tslib_1 = require("tslib");
|
|
6
|
+
const shared = tslib_1.__importStar(require("@nx/js/src/utils/typescript/create-ts-config"));
|
|
6
7
|
const json_1 = require("nx/src/generators/utils/json");
|
|
7
8
|
const ts_solution_setup_1 = require("@nx/js/src/utils/typescript/ts-solution-setup");
|
|
8
9
|
function createTsConfig(host, projectRoot, type, options, relativePathToRootTsConfig) {
|
package/src/utils/ct-utils.js
CHANGED
|
@@ -1,4 +1,37 @@
|
|
|
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
|
+
})();
|
|
2
35
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
36
|
exports.configureCypressCT = configureCypressCT;
|
|
4
37
|
exports.getBundlerFromTarget = getBundlerFromTarget;
|
|
@@ -15,7 +48,7 @@ async function configureCypressCT(tree, options) {
|
|
|
15
48
|
const projectConfig = (0, devkit_1.readProjectConfiguration)(tree, options.project);
|
|
16
49
|
// Specifically undefined as a workaround for Remix to pass an empty string as the buildTarget
|
|
17
50
|
if (options.buildTarget === undefined) {
|
|
18
|
-
const { findBuildConfig } = await Promise.resolve().then(() => require('@nx/cypress/src/utils/find-target-options'));
|
|
51
|
+
const { findBuildConfig } = await Promise.resolve().then(() => __importStar(require('@nx/cypress/src/utils/find-target-options')));
|
|
19
52
|
found = await findBuildConfig(tree, {
|
|
20
53
|
project: options.project,
|
|
21
54
|
buildTarget: options.buildTarget,
|
|
@@ -32,7 +65,7 @@ async function configureCypressCT(tree, options) {
|
|
|
32
65
|
throw new Error(`Cypress Component Testing is not currently supported for this project. Either 'executer' is not defined in '${target} target' of '${project} project.json' or executer present is not valid one. Valid ones are ${JSON.stringify([...options.validExecutorNames])}. Please check https://github.com/nrwl/nx/issues/21546 for more information.`);
|
|
33
66
|
}
|
|
34
67
|
}
|
|
35
|
-
const { addDefaultCTConfig, getProjectCypressConfigPath } = await Promise.resolve().then(() => require('@nx/cypress/src/utils/config'));
|
|
68
|
+
const { addDefaultCTConfig, getProjectCypressConfigPath } = await Promise.resolve().then(() => __importStar(require('@nx/cypress/src/utils/config')));
|
|
36
69
|
const ctConfigOptions = {
|
|
37
70
|
bundler: options.bundler ?? (await getActualBundler(tree, options, found)),
|
|
38
71
|
};
|
|
@@ -1,10 +1,43 @@
|
|
|
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
|
+
})();
|
|
2
35
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
36
|
exports.hasRsbuildPlugin = hasRsbuildPlugin;
|
|
4
37
|
const devkit_1 = require("@nx/devkit");
|
|
5
38
|
const versions_1 = require("./versions");
|
|
6
39
|
async function hasRsbuildPlugin(tree, projectPath) {
|
|
7
40
|
(0, devkit_1.ensurePackage)('@nx/rsbuild', versions_1.nxVersion);
|
|
8
|
-
const { hasRsbuildPlugin } = await Promise.resolve().then(() => require('@nx/rsbuild/config-utils'));
|
|
41
|
+
const { hasRsbuildPlugin } = await Promise.resolve().then(() => __importStar(require('@nx/rsbuild/config-utils')));
|
|
9
42
|
return hasRsbuildPlugin(tree, projectPath);
|
|
10
43
|
}
|
|
@@ -2,8 +2,9 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.createApp = createApp;
|
|
4
4
|
exports.createLib = createLib;
|
|
5
|
+
const tslib_1 = require("tslib");
|
|
5
6
|
const devkit_1 = require("@nx/devkit");
|
|
6
|
-
const application_1 = require("../generators/application/application");
|
|
7
|
+
const application_1 = tslib_1.__importDefault(require("../generators/application/application"));
|
|
7
8
|
async function createApp(tree, appName) {
|
|
8
9
|
await (0, application_1.default)(tree, {
|
|
9
10
|
e2eTestRunner: 'none',
|