@nx/express 0.0.0-pr-27957-a99d5ea → 0.0.0-pr-28229-afe192c
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nx/express",
|
|
3
|
-
"version": "0.0.0-pr-
|
|
3
|
+
"version": "0.0.0-pr-28229-afe192c",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "The Nx Plugin for Express contains executors and generators for allowing your workspace to create powerful Express Node applications and APIs.",
|
|
6
6
|
"repository": {
|
|
@@ -31,10 +31,9 @@
|
|
|
31
31
|
"migrations": "./migrations.json"
|
|
32
32
|
},
|
|
33
33
|
"dependencies": {
|
|
34
|
-
"@nx/devkit": "0.0.0-pr-
|
|
35
|
-
"@nx/node": "0.0.0-pr-
|
|
36
|
-
"tslib": "^2.3.0"
|
|
37
|
-
"@nrwl/express": "0.0.0-pr-27957-a99d5ea"
|
|
34
|
+
"@nx/devkit": "0.0.0-pr-28229-afe192c",
|
|
35
|
+
"@nx/node": "0.0.0-pr-28229-afe192c",
|
|
36
|
+
"tslib": "^2.3.0"
|
|
38
37
|
},
|
|
39
38
|
"peerDependencies": {
|
|
40
39
|
"express": "^4.18.1"
|
|
@@ -49,4 +48,4 @@
|
|
|
49
48
|
},
|
|
50
49
|
"type": "commonjs",
|
|
51
50
|
"types": "./index.d.ts"
|
|
52
|
-
}
|
|
51
|
+
}
|
|
@@ -45,7 +45,6 @@ server.on('error', console.error);
|
|
|
45
45
|
async function applicationGenerator(tree, schema) {
|
|
46
46
|
return await applicationGeneratorInternal(tree, {
|
|
47
47
|
addPlugin: false,
|
|
48
|
-
projectNameAndRootFormat: 'derived',
|
|
49
48
|
...schema,
|
|
50
49
|
});
|
|
51
50
|
}
|
|
@@ -72,14 +71,12 @@ async function applicationGeneratorInternal(tree, schema) {
|
|
|
72
71
|
}
|
|
73
72
|
exports.default = applicationGenerator;
|
|
74
73
|
async function normalizeOptions(host, options) {
|
|
75
|
-
|
|
74
|
+
await (0, project_name_and_root_utils_1.ensureProjectName)(host, options, 'application');
|
|
75
|
+
const { projectName: appProjectName, projectRoot: appProjectRoot } = await (0, project_name_and_root_utils_1.determineProjectNameAndRootOptions)(host, {
|
|
76
76
|
name: options.name,
|
|
77
77
|
projectType: 'application',
|
|
78
78
|
directory: options.directory,
|
|
79
|
-
projectNameAndRootFormat: options.projectNameAndRootFormat,
|
|
80
|
-
callingGenerator: '@nx/express:application',
|
|
81
79
|
});
|
|
82
|
-
options.projectNameAndRootFormat = projectNameAndRootFormat;
|
|
83
80
|
const nxJson = (0, devkit_1.readNxJson)(host);
|
|
84
81
|
const addPlugin = process.env.NX_ADD_PLUGINS !== 'false' &&
|
|
85
82
|
nxJson.useInferencePlugins !== false;
|
|
@@ -1,13 +1,11 @@
|
|
|
1
|
-
import type { ProjectNameAndRootFormat } from '@nx/devkit/src/generators/project-name-and-root-utils';
|
|
2
1
|
import type { Linter, LinterType } from '@nx/eslint';
|
|
3
2
|
import type { UnitTestRunner } from '../../utils/test-runners';
|
|
4
3
|
|
|
5
4
|
export interface Schema {
|
|
6
|
-
|
|
5
|
+
directory: string;
|
|
6
|
+
name?: string;
|
|
7
7
|
skipFormat: boolean;
|
|
8
8
|
skipPackageJson: boolean;
|
|
9
|
-
directory?: string;
|
|
10
|
-
projectNameAndRootFormat?: ProjectNameAndRootFormat;
|
|
11
9
|
unitTestRunner: UnitTestRunner;
|
|
12
10
|
tags?: string;
|
|
13
11
|
linter: Linter | LinterType;
|
|
@@ -16,7 +14,6 @@ export interface Schema {
|
|
|
16
14
|
/** @deprecated use `swcJest` instead */
|
|
17
15
|
babelJest?: boolean;
|
|
18
16
|
js: boolean;
|
|
19
|
-
pascalCaseFiles: boolean;
|
|
20
17
|
standaloneConfig?: boolean;
|
|
21
18
|
setParserOptionsProject?: boolean;
|
|
22
19
|
addPlugin?: boolean;
|
|
@@ -6,25 +6,20 @@
|
|
|
6
6
|
"description": "Nx Application Options Schema.",
|
|
7
7
|
"type": "object",
|
|
8
8
|
"properties": {
|
|
9
|
-
"
|
|
10
|
-
"description": "The
|
|
9
|
+
"directory": {
|
|
10
|
+
"description": "The directory of the new application.",
|
|
11
11
|
"type": "string",
|
|
12
12
|
"$default": {
|
|
13
13
|
"$source": "argv",
|
|
14
14
|
"index": 0
|
|
15
15
|
},
|
|
16
|
-
"x-prompt": "
|
|
17
|
-
"pattern": "^[a-zA-Z][^:]*$"
|
|
16
|
+
"x-prompt": "Which directory do you want to create the application in?"
|
|
18
17
|
},
|
|
19
|
-
"
|
|
20
|
-
"description": "The
|
|
18
|
+
"name": {
|
|
19
|
+
"description": "The name of the application.",
|
|
20
|
+
"pattern": "^[a-zA-Z][^:]*$",
|
|
21
21
|
"type": "string"
|
|
22
22
|
},
|
|
23
|
-
"projectNameAndRootFormat": {
|
|
24
|
-
"description": "Whether to generate the project name and root directory as provided (`as-provided`) or generate them composing their values and taking the configured layout into account (`derived`).",
|
|
25
|
-
"type": "string",
|
|
26
|
-
"enum": ["as-provided", "derived"]
|
|
27
|
-
},
|
|
28
23
|
"skipFormat": {
|
|
29
24
|
"description": "Skip formatting files.",
|
|
30
25
|
"type": "boolean",
|
|
@@ -66,28 +61,16 @@
|
|
|
66
61
|
"default": false,
|
|
67
62
|
"x-deprecated": "Use --swcJest instead for faster compilation"
|
|
68
63
|
},
|
|
69
|
-
"pascalCaseFiles": {
|
|
70
|
-
"type": "boolean",
|
|
71
|
-
"description": "Use pascal case file names.",
|
|
72
|
-
"alias": "P",
|
|
73
|
-
"default": false
|
|
74
|
-
},
|
|
75
64
|
"js": {
|
|
76
65
|
"type": "boolean",
|
|
77
66
|
"description": "Generate JavaScript files rather than TypeScript files.",
|
|
78
67
|
"default": false
|
|
79
68
|
},
|
|
80
|
-
"standaloneConfig": {
|
|
81
|
-
"description": "Split the project configuration into `<projectRoot>/project.json` rather than including it inside `workspace.json`.",
|
|
82
|
-
"type": "boolean",
|
|
83
|
-
"default": true,
|
|
84
|
-
"x-deprecated": "Nx only supports standaloneConfig"
|
|
85
|
-
},
|
|
86
69
|
"setParserOptionsProject": {
|
|
87
70
|
"type": "boolean",
|
|
88
71
|
"description": "Whether or not to configure the ESLint `parserOptions.project` option. We do not do this by default for lint performance reasons.",
|
|
89
72
|
"default": false
|
|
90
73
|
}
|
|
91
74
|
},
|
|
92
|
-
"required": []
|
|
75
|
+
"required": ["directory"]
|
|
93
76
|
}
|