@nx/plugin 21.4.0-beta.1 → 21.4.0-beta.11
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 +6 -6
- package/src/generators/create-package/utils/normalize-schema.d.ts.map +1 -1
- package/src/generators/create-package/utils/normalize-schema.js +6 -1
- package/src/generators/plugin/utils/normalize-schema.d.ts.map +1 -1
- package/src/generators/plugin/utils/normalize-schema.js +5 -1
- package/src/generators/preset/generator.d.ts.map +1 -1
- package/src/generators/preset/generator.js +2 -11
- package/src/generators/preset/schema.d.ts +0 -2
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nx/plugin",
|
|
3
|
-
"version": "21.4.0-beta.
|
|
3
|
+
"version": "21.4.0-beta.11",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "This plugin is used to create Nx plugins! It contains generators for generating common plugin features like generators, executors, migrations and more.",
|
|
6
6
|
"repository": {
|
|
@@ -28,13 +28,13 @@
|
|
|
28
28
|
},
|
|
29
29
|
"dependencies": {
|
|
30
30
|
"tslib": "^2.3.0",
|
|
31
|
-
"@nx/devkit": "21.4.0-beta.
|
|
32
|
-
"@nx/jest": "21.4.0-beta.
|
|
33
|
-
"@nx/js": "21.4.0-beta.
|
|
34
|
-
"@nx/eslint": "21.4.0-beta.
|
|
31
|
+
"@nx/devkit": "21.4.0-beta.11",
|
|
32
|
+
"@nx/jest": "21.4.0-beta.11",
|
|
33
|
+
"@nx/js": "21.4.0-beta.11",
|
|
34
|
+
"@nx/eslint": "21.4.0-beta.11"
|
|
35
35
|
},
|
|
36
36
|
"devDependencies": {
|
|
37
|
-
"nx": "21.4.0-beta.
|
|
37
|
+
"nx": "21.4.0-beta.11"
|
|
38
38
|
},
|
|
39
39
|
"publishConfig": {
|
|
40
40
|
"access": "public"
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"normalize-schema.d.ts","sourceRoot":"","sources":["../../../../../../../packages/plugin/src/generators/create-package/utils/normalize-schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAc,IAAI,EAAE,MAAM,YAAY,CAAC;AAE9C,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;
|
|
1
|
+
{"version":3,"file":"normalize-schema.d.ts","sourceRoot":"","sources":["../../../../../../../packages/plugin/src/generators/create-package/utils/normalize-schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAc,IAAI,EAAE,MAAM,YAAY,CAAC;AAE9C,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AAS7C,OAAO,EAAE,mBAAmB,EAAE,MAAM,WAAW,CAAC;AAEhD,MAAM,WAAW,gBAAiB,SAAQ,mBAAmB;IAC3D,OAAO,EAAE,KAAK,GAAG,KAAK,CAAC;IACvB,WAAW,EAAE,MAAM,CAAC;IACpB,WAAW,EAAE,MAAM,CAAC;IACpB,cAAc,EAAE,MAAM,GAAG,QAAQ,GAAG,MAAM,CAAC;IAC3C,MAAM,EAAE,UAAU,CAAC;IACnB,cAAc,EAAE,OAAO,CAAC;IACxB,SAAS,EAAE,OAAO,CAAC;IACnB,iBAAiB,EAAE,OAAO,CAAC;CAC5B;AAED,wBAAsB,eAAe,CACnC,IAAI,EAAE,IAAI,EACV,MAAM,EAAE,mBAAmB,GAC1B,OAAO,CAAC,gBAAgB,CAAC,CAkD3B"}
|
|
@@ -16,7 +16,12 @@ async function normalizeSchema(host, schema) {
|
|
|
16
16
|
projectType: 'library',
|
|
17
17
|
directory: schema.directory,
|
|
18
18
|
});
|
|
19
|
-
|
|
19
|
+
// this helper is called before the other generators that end up calling the
|
|
20
|
+
// jsLibraryGenerator, so, if the TS solution setup is not configured, we
|
|
21
|
+
// additionally check if the TS solution setup will be configured by the
|
|
22
|
+
// jsLibraryGenerator
|
|
23
|
+
const isTsSolutionSetup = (0, ts_solution_setup_1.isUsingTsSolutionSetup)(host) ||
|
|
24
|
+
(0, ts_solution_setup_1.shouldConfigureTsSolutionSetup)(host, schema.addPlugin);
|
|
20
25
|
const nxJson = (0, devkit_1.readNxJson)(host);
|
|
21
26
|
const addPlugin = schema.addPlugin ??
|
|
22
27
|
(isTsSolutionSetup &&
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"normalize-schema.d.ts","sourceRoot":"","sources":["../../../../../../../packages/plugin/src/generators/plugin/utils/normalize-schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAc,KAAK,IAAI,EAAE,MAAM,YAAY,CAAC;AAKnD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;
|
|
1
|
+
{"version":3,"file":"normalize-schema.d.ts","sourceRoot":"","sources":["../../../../../../../packages/plugin/src/generators/plugin/utils/normalize-schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAc,KAAK,IAAI,EAAE,MAAM,YAAY,CAAC;AAKnD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AAS7C,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,WAAW,CAAC;AAExC,MAAM,WAAW,gBAAiB,SAAQ,MAAM;IAC9C,WAAW,EAAE,MAAM,CAAC;IACpB,QAAQ,EAAE,MAAM,CAAC;IACjB,WAAW,EAAE,MAAM,CAAC;IACpB,gBAAgB,EAAE,MAAM,CAAC;IACzB,UAAU,EAAE,MAAM,EAAE,CAAC;IACrB,UAAU,EAAE,MAAM,CAAC;IACnB,OAAO,EAAE,KAAK,GAAG,KAAK,CAAC;IACvB,WAAW,EAAE,OAAO,CAAC;IACrB,cAAc,EAAE,MAAM,GAAG,QAAQ,GAAG,MAAM,CAAC;IAC3C,MAAM,EAAE,UAAU,CAAC;IACnB,cAAc,EAAE,OAAO,CAAC;IACxB,SAAS,EAAE,OAAO,CAAC;IACnB,iBAAiB,EAAE,OAAO,CAAC;CAC5B;AAED,wBAAsB,gBAAgB,CACpC,IAAI,EAAE,IAAI,EACV,OAAO,EAAE,MAAM,GACd,OAAO,CAAC,gBAAgB,CAAC,CAuD3B"}
|
|
@@ -8,7 +8,11 @@ const ts_solution_setup_1 = require("@nx/js/src/utils/typescript/ts-solution-set
|
|
|
8
8
|
async function normalizeOptions(host, options) {
|
|
9
9
|
const linter = await (0, generator_prompts_1.normalizeLinterOption)(host, options.linter);
|
|
10
10
|
const unitTestRunner = await (0, generator_prompts_1.normalizeUnitTestRunnerOption)(host, options.unitTestRunner, ['jest', 'vitest']);
|
|
11
|
-
|
|
11
|
+
// this helper is called before the jsLibraryGenerator is called, so, if the
|
|
12
|
+
// TS solution setup is not configured, we additionally check if the TS
|
|
13
|
+
// solution setup will be configured by the jsLibraryGenerator
|
|
14
|
+
const isTsSolutionSetup = (0, ts_solution_setup_1.isUsingTsSolutionSetup)(host) ||
|
|
15
|
+
(0, ts_solution_setup_1.shouldConfigureTsSolutionSetup)(host, options.addPlugin);
|
|
12
16
|
const nxJson = (0, devkit_1.readNxJson)(host);
|
|
13
17
|
const addPlugin = options.addPlugin ??
|
|
14
18
|
(isTsSolutionSetup &&
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"generator.d.ts","sourceRoot":"","sources":["../../../../../../packages/plugin/src/generators/preset/generator.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"generator.d.ts","sourceRoot":"","sources":["../../../../../../packages/plugin/src/generators/preset/generator.ts"],"names":[],"mappings":"AAAA,OAAO,EAKL,KAAK,iBAAiB,EACtB,KAAK,IAAI,EACV,MAAM,YAAY,CAAC;AAIpB,OAAO,KAAK,EAEV,qBAAqB,EACtB,MAAM,UAAU,CAAC;AAElB,wBAAsB,eAAe,CACnC,IAAI,EAAE,IAAI,EACV,UAAU,EAAE,qBAAqB,8BAOlC;AAED,wBAAsB,uBAAuB,CAC3C,IAAI,EAAE,IAAI,EACV,UAAU,EAAE,qBAAqB,8BA8ClC;AA8BD,eAAe,eAAe,CAAC"}
|
|
@@ -3,7 +3,6 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.presetGenerator = presetGenerator;
|
|
4
4
|
exports.presetGeneratorInternal = presetGeneratorInternal;
|
|
5
5
|
const devkit_1 = require("@nx/devkit");
|
|
6
|
-
const ts_solution_setup_1 = require("@nx/js/src/utils/typescript/ts-solution-setup");
|
|
7
6
|
const create_package_1 = require("../create-package/create-package");
|
|
8
7
|
const plugin_1 = require("../plugin/plugin");
|
|
9
8
|
async function presetGenerator(tree, rawOptions) {
|
|
@@ -15,7 +14,7 @@ async function presetGenerator(tree, rawOptions) {
|
|
|
15
14
|
}
|
|
16
15
|
async function presetGeneratorInternal(tree, rawOptions) {
|
|
17
16
|
const tasks = [];
|
|
18
|
-
const options = normalizeOptions(
|
|
17
|
+
const options = normalizeOptions(rawOptions);
|
|
19
18
|
const pluginTask = await (0, plugin_1.pluginGenerator)(tree, {
|
|
20
19
|
compiler: 'tsc',
|
|
21
20
|
linter: 'eslint',
|
|
@@ -63,13 +62,7 @@ function moveNxPluginToDevDeps(tree) {
|
|
|
63
62
|
return json;
|
|
64
63
|
});
|
|
65
64
|
}
|
|
66
|
-
function normalizeOptions(
|
|
67
|
-
const isTsSolutionSetup = (0, ts_solution_setup_1.isUsingTsSolutionSetup)(tree);
|
|
68
|
-
const nxJson = (0, devkit_1.readNxJson)(tree);
|
|
69
|
-
const addPlugin = options.addPlugin ??
|
|
70
|
-
(isTsSolutionSetup &&
|
|
71
|
-
process.env.NX_ADD_PLUGINS !== 'false' &&
|
|
72
|
-
nxJson.useInferencePlugins !== false);
|
|
65
|
+
function normalizeOptions(options) {
|
|
73
66
|
return {
|
|
74
67
|
...options,
|
|
75
68
|
pluginName: (0, devkit_1.names)(options.pluginName.includes('/')
|
|
@@ -78,8 +71,6 @@ function normalizeOptions(tree, options) {
|
|
|
78
71
|
createPackageName: options.createPackageName === 'false' // for command line in e2e, it is passed as a string
|
|
79
72
|
? undefined
|
|
80
73
|
: options.createPackageName,
|
|
81
|
-
addPlugin,
|
|
82
|
-
useProjectJson: options.useProjectJson ?? !isTsSolutionSetup,
|
|
83
74
|
};
|
|
84
75
|
}
|
|
85
76
|
exports.default = presetGenerator;
|