@nx/express 16.8.0-beta.4 → 16.8.0-beta.5
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": "16.8.0-beta.
|
|
3
|
+
"version": "16.8.0-beta.5",
|
|
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": {
|
|
@@ -30,9 +30,9 @@
|
|
|
30
30
|
"migrations": "./migrations.json"
|
|
31
31
|
},
|
|
32
32
|
"dependencies": {
|
|
33
|
-
"@nrwl/express": "16.8.0-beta.
|
|
34
|
-
"@nx/devkit": "16.8.0-beta.
|
|
35
|
-
"@nx/node": "16.8.0-beta.
|
|
33
|
+
"@nrwl/express": "16.8.0-beta.5",
|
|
34
|
+
"@nx/devkit": "16.8.0-beta.5",
|
|
35
|
+
"@nx/node": "16.8.0-beta.5",
|
|
36
36
|
"tslib": "^2.3.0"
|
|
37
37
|
},
|
|
38
38
|
"peerDependencies": {
|
|
@@ -47,5 +47,5 @@
|
|
|
47
47
|
"access": "public"
|
|
48
48
|
},
|
|
49
49
|
"type": "commonjs",
|
|
50
|
-
"gitHead": "
|
|
50
|
+
"gitHead": "ad2d1e8a55b2d1b358bb5e7483343d9757ff2c53"
|
|
51
51
|
}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.applicationSchematic = exports.applicationGeneratorInternal = exports.applicationGenerator = void 0;
|
|
4
|
-
const tslib_1 = require("tslib");
|
|
5
4
|
const devkit_1 = require("@nx/devkit");
|
|
6
5
|
const project_name_and_root_utils_1 = require("@nx/devkit/src/generators/project-name-and-root-utils");
|
|
7
6
|
const node_1 = require("@nx/node");
|
|
@@ -40,42 +39,46 @@ server.on('error', console.error);
|
|
|
40
39
|
(0, devkit_1.toJS)(tree);
|
|
41
40
|
}
|
|
42
41
|
}
|
|
43
|
-
function applicationGenerator(tree, schema) {
|
|
44
|
-
return
|
|
45
|
-
|
|
42
|
+
async function applicationGenerator(tree, schema) {
|
|
43
|
+
return await applicationGeneratorInternal(tree, {
|
|
44
|
+
projectNameAndRootFormat: 'derived',
|
|
45
|
+
...schema,
|
|
46
46
|
});
|
|
47
47
|
}
|
|
48
48
|
exports.applicationGenerator = applicationGenerator;
|
|
49
|
-
function applicationGeneratorInternal(tree, schema) {
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
if (!options.skipFormat) {
|
|
57
|
-
yield (0, devkit_1.formatFiles)(tree);
|
|
58
|
-
}
|
|
59
|
-
return () => tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
60
|
-
yield initTask();
|
|
61
|
-
yield applicationTask();
|
|
62
|
-
});
|
|
49
|
+
async function applicationGeneratorInternal(tree, schema) {
|
|
50
|
+
const options = await normalizeOptions(tree, schema);
|
|
51
|
+
const initTask = await (0, init_1.initGenerator)(tree, { ...options, skipFormat: true });
|
|
52
|
+
const applicationTask = await (0, node_1.applicationGenerator)(tree, {
|
|
53
|
+
...schema,
|
|
54
|
+
bundler: 'webpack',
|
|
55
|
+
skipFormat: true,
|
|
63
56
|
});
|
|
57
|
+
addMainFile(tree, options);
|
|
58
|
+
addTypes(tree, options);
|
|
59
|
+
if (!options.skipFormat) {
|
|
60
|
+
await (0, devkit_1.formatFiles)(tree);
|
|
61
|
+
}
|
|
62
|
+
return async () => {
|
|
63
|
+
await initTask();
|
|
64
|
+
await applicationTask();
|
|
65
|
+
};
|
|
64
66
|
}
|
|
65
67
|
exports.applicationGeneratorInternal = applicationGeneratorInternal;
|
|
66
68
|
exports.default = applicationGenerator;
|
|
67
69
|
exports.applicationSchematic = (0, devkit_1.convertNxGenerator)(applicationGenerator);
|
|
68
|
-
function normalizeOptions(host, options) {
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
callingGenerator: '@nx/express:application',
|
|
76
|
-
});
|
|
77
|
-
options.projectNameAndRootFormat = projectNameAndRootFormat;
|
|
78
|
-
return Object.assign(Object.assign({}, options), { appProjectName,
|
|
79
|
-
appProjectRoot });
|
|
70
|
+
async function normalizeOptions(host, options) {
|
|
71
|
+
const { projectName: appProjectName, projectRoot: appProjectRoot, projectNameAndRootFormat, } = await (0, project_name_and_root_utils_1.determineProjectNameAndRootOptions)(host, {
|
|
72
|
+
name: options.name,
|
|
73
|
+
projectType: 'application',
|
|
74
|
+
directory: options.directory,
|
|
75
|
+
projectNameAndRootFormat: options.projectNameAndRootFormat,
|
|
76
|
+
callingGenerator: '@nx/express:application',
|
|
80
77
|
});
|
|
78
|
+
options.projectNameAndRootFormat = projectNameAndRootFormat;
|
|
79
|
+
return {
|
|
80
|
+
...options,
|
|
81
|
+
appProjectName,
|
|
82
|
+
appProjectRoot,
|
|
83
|
+
};
|
|
81
84
|
}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.initSchematic = exports.initGenerator = void 0;
|
|
4
|
-
const tslib_1 = require("tslib");
|
|
5
4
|
const devkit_1 = require("@nx/devkit");
|
|
6
5
|
const node_1 = require("@nx/node");
|
|
7
6
|
const versions_1 = require("@nx/node/src/utils/versions");
|
|
@@ -16,18 +15,19 @@ function updateDependencies(tree) {
|
|
|
16
15
|
'@nx/express': versions_2.nxVersion,
|
|
17
16
|
});
|
|
18
17
|
}
|
|
19
|
-
function initGenerator(tree, schema) {
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
if (!schema.skipFormat) {
|
|
24
|
-
yield (0, devkit_1.formatFiles)(tree);
|
|
25
|
-
}
|
|
26
|
-
return () => tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
27
|
-
yield initTask();
|
|
28
|
-
yield installTask();
|
|
29
|
-
});
|
|
18
|
+
async function initGenerator(tree, schema) {
|
|
19
|
+
const initTask = await (0, node_1.initGenerator)(tree, {
|
|
20
|
+
...schema,
|
|
21
|
+
skipFormat: true,
|
|
30
22
|
});
|
|
23
|
+
const installTask = updateDependencies(tree);
|
|
24
|
+
if (!schema.skipFormat) {
|
|
25
|
+
await (0, devkit_1.formatFiles)(tree);
|
|
26
|
+
}
|
|
27
|
+
return async () => {
|
|
28
|
+
await initTask();
|
|
29
|
+
await installTask();
|
|
30
|
+
};
|
|
31
31
|
}
|
|
32
32
|
exports.initGenerator = initGenerator;
|
|
33
33
|
exports.default = initGenerator;
|
|
@@ -1,12 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const tslib_1 = require("tslib");
|
|
4
3
|
const devkit_1 = require("@nx/devkit");
|
|
5
4
|
const replace_package_1 = require("@nx/devkit/src/utils/replace-package");
|
|
6
|
-
function replacePackage(tree) {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
yield (0, devkit_1.formatFiles)(tree);
|
|
10
|
-
});
|
|
5
|
+
async function replacePackage(tree) {
|
|
6
|
+
await (0, replace_package_1.replaceNrwlPackageWithNxPackage)(tree, '@nrwl/express', '@nx/express');
|
|
7
|
+
await (0, devkit_1.formatFiles)(tree);
|
|
11
8
|
}
|
|
12
9
|
exports.default = replacePackage;
|