nx 14.5.5-beta.0 → 14.5.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/CHANGELOG.md +1 -1
- package/package.json +4 -4
- package/src/adapter/compat.js +15 -2
- package/src/adapter/compat.js.map +1 -1
- package/src/command-line/generate.d.ts +1 -1
- package/src/command-line/generate.js +39 -18
- package/src/command-line/generate.js.map +1 -1
- package/src/command-line/list.js +5 -0
- package/src/command-line/list.js.map +1 -1
- package/src/command-line/report.d.ts +1 -1
- package/src/command-line/report.js +38 -20
- package/src/command-line/report.js.map +1 -1
- package/src/core/dep-graph/styles.css +1 -1
- package/src/generators/testing-utils/create-tree-with-empty-workspace.d.ts +2 -1
- package/src/generators/testing-utils/create-tree-with-empty-workspace.js +13 -4
- package/src/generators/testing-utils/create-tree-with-empty-workspace.js.map +1 -1
- package/src/hasher/hash-task.d.ts +6 -0
- package/src/hasher/hash-task.js +30 -0
- package/src/hasher/hash-task.js.map +1 -0
- package/src/hasher/hasher.d.ts +3 -1
- package/src/hasher/hasher.js +95 -64
- package/src/hasher/hasher.js.map +1 -1
- package/src/tasks-runner/default-tasks-runner.js +1 -3
- package/src/tasks-runner/default-tasks-runner.js.map +1 -1
- package/src/tasks-runner/life-cycles/formatting-utils.js +12 -1
- package/src/tasks-runner/life-cycles/formatting-utils.js.map +1 -1
- package/src/tasks-runner/run-command.js +17 -0
- package/src/tasks-runner/run-command.js.map +1 -1
- package/src/tasks-runner/tasks-runner.d.ts +2 -0
- package/src/tasks-runner/tasks-schedule.d.ts +0 -1
- package/src/tasks-runner/tasks-schedule.js +4 -17
- package/src/tasks-runner/tasks-schedule.js.map +1 -1
- package/src/utils/nx-plugin.js +1 -1
- package/src/utils/nx-plugin.js.map +1 -1
- package/src/utils/package-json.d.ts +18 -0
- package/src/utils/package-json.js +28 -5
- package/src/utils/package-json.js.map +1 -1
- package/src/utils/package-manager.d.ts +0 -1
- package/src/utils/package-manager.js +16 -13
- package/src/utils/package-manager.js.map +1 -1
- package/src/utils/plugins/local-plugins.d.ts +4 -0
- package/src/utils/plugins/local-plugins.js +59 -0
- package/src/utils/plugins/local-plugins.js.map +1 -0
- package/src/utils/plugins/plugin-capabilities.js +2 -2
- package/src/utils/plugins/plugin-capabilities.js.map +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,6 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
-
## [14.5.5
|
|
6
|
+
## [14.5.5](https://github.com/nrwl/nx/compare/14.5.4...14.5.5) (2022-08-12)
|
|
7
7
|
|
|
8
8
|
**Note:** Version bump only for package nx
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "nx",
|
|
3
|
-
"version": "14.5.5
|
|
3
|
+
"version": "14.5.5",
|
|
4
4
|
"description": "Smart, Fast and Extensible Build System",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -31,8 +31,8 @@
|
|
|
31
31
|
},
|
|
32
32
|
"homepage": "https://nx.dev",
|
|
33
33
|
"dependencies": {
|
|
34
|
-
"@nrwl/cli": "14.5.5
|
|
35
|
-
"@nrwl/tao": "14.5.5
|
|
34
|
+
"@nrwl/cli": "14.5.5",
|
|
35
|
+
"@nrwl/tao": "14.5.5",
|
|
36
36
|
"@parcel/watcher": "2.0.4",
|
|
37
37
|
"chalk": "4.1.0",
|
|
38
38
|
"chokidar": "^3.5.1",
|
|
@@ -106,5 +106,5 @@
|
|
|
106
106
|
"executors": "./executors.json",
|
|
107
107
|
"main": "./bin/nx.js",
|
|
108
108
|
"typings": "./bin/nx.d.ts",
|
|
109
|
-
"gitHead": "
|
|
109
|
+
"gitHead": "d9ebe0870de2bd309af1d790d57a2f66583c5839"
|
|
110
110
|
}
|
package/src/adapter/compat.js
CHANGED
|
@@ -18,6 +18,17 @@ const allowedProjectExtensions = [
|
|
|
18
18
|
'$schema',
|
|
19
19
|
'generators',
|
|
20
20
|
];
|
|
21
|
+
const allowedWorkspaceExtensions = [
|
|
22
|
+
'implicitDependencies',
|
|
23
|
+
'affected',
|
|
24
|
+
'npmScope',
|
|
25
|
+
'tasksRunnerOptions',
|
|
26
|
+
'workspaceLayout',
|
|
27
|
+
'plugins',
|
|
28
|
+
'targetDefaults',
|
|
29
|
+
'files',
|
|
30
|
+
'generators',
|
|
31
|
+
];
|
|
21
32
|
if (!patched) {
|
|
22
33
|
Module.prototype.require = function () {
|
|
23
34
|
const result = originalRequire.apply(this, arguments);
|
|
@@ -82,9 +93,11 @@ function mockWriteWorkspace(ngCoreWorkspace) {
|
|
|
82
93
|
*/
|
|
83
94
|
function mockReadJsonWorkspace(readJsonUtils) {
|
|
84
95
|
mockMember(readJsonUtils, 'readJsonWorkspace', (originalReadJsonWorkspace) => (path, host, options) => tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
96
|
+
const modifiedOptions = Object.assign(Object.assign({}, options), { allowedProjectExtensions,
|
|
97
|
+
allowedWorkspaceExtensions });
|
|
85
98
|
try {
|
|
86
99
|
// Attempt angular CLI default behaviour
|
|
87
|
-
return yield originalReadJsonWorkspace(path, host,
|
|
100
|
+
return yield originalReadJsonWorkspace(path, host, modifiedOptions);
|
|
88
101
|
}
|
|
89
102
|
catch (_a) {
|
|
90
103
|
// This failed. Its most likely due to a lack of a workspace definition file,
|
|
@@ -104,7 +117,7 @@ function mockReadJsonWorkspace(readJsonUtils) {
|
|
|
104
117
|
// second arg is a host, only method used is readFile
|
|
105
118
|
readFile: () => JSON.stringify(workspaceConfiguration),
|
|
106
119
|
},
|
|
107
|
-
|
|
120
|
+
modifiedOptions,
|
|
108
121
|
]);
|
|
109
122
|
}
|
|
110
123
|
}));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"compat.js","sourceRoot":"","sources":["../../../../../packages/nx/src/adapter/compat.ts"],"names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S,qBAAqB,CAC5B,aAA8E;IAE9E,UAAU,CACR,aAAa,EACb,mBAAmB,EACnB,CAAC,yBAAyB,EAAE,EAAE,CAAC,CAAO,IAAI,EAAE,IAAI,EAAE,OAAO,EAAE,EAAE;QAC3D,IAAI;YACF,wCAAwC;YACxC,OAAO,MAAM,yBAAyB,CAAC,IAAI,EAAE,IAAI,
|
|
1
|
+
{"version":3,"file":"compat.js","sourceRoot":"","sources":["../../../../../packages/nx/src/adapter/compat.ts"],"names":[],"mappings":";;;AAAA,4CAAyC;AACzC,qDAG8B;AAC9B,4DAAwD;AACxD,kEAGwC;AAExC,2DAAqD;AAGrD,oBAAoB;AACpB,MAAM,MAAM,GAAG,OAAO,CAAC,QAAQ,CAAC,CAAC;AACjC,MAAM,eAAe,GAAgB,MAAM,CAAC,SAAS,CAAC,OAAO,CAAC;AAE9D,IAAI,OAAO,GAAG,KAAK,CAAC;AACpB,IAAI,2BAA2B,GAAG,KAAK,CAAC;AAExC,MAAM,wBAAwB,GAAG;IAC/B,MAAM;IACN,sBAAsB;IACtB,gBAAgB;IAChB,SAAS;IACT,YAAY;CACb,CAAC;AAEF,MAAM,0BAA0B,GAAG;IACjC,sBAAsB;IACtB,UAAU;IACV,UAAU;IACV,oBAAoB;IACpB,iBAAiB;IACjB,SAAS;IACT,gBAAgB;IAChB,OAAO;IACP,YAAY;CACb,CAAC;AAEF,IAAI,CAAC,OAAO,EAAE;IACZ,MAAM,CAAC,SAAS,CAAC,OAAO,GAAG;QACzB,MAAM,MAAM,GAAG,eAAe,CAAC,KAAK,CAAC,IAAI,EAAE,SAAS,CAAC,CAAC;QACtD,IAAI,SAAS,CAAC,CAAC,CAAC,CAAC,UAAU,CAAC,sBAAsB,CAAC,EAAE;YACnD,mEAAmE;YACnE,MAAM,eAAe,GAAG,eAAe,CAAC,KAAK,CAAC,IAAI,EAAE;gBAClD,yCAAyC;aAC1C,CAAC,CAAC;YACH,eAAe,CAAC,sBAAsB,CACpC,gBAAgB,EAChB,e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E;gBAC3C,gBAAgB;gBAChB;oBACE,qDAAqD;oBACrD,QAAQ,EAAE,GAAG,EAAE,CAAC,IAAI,CAAC,SAAS,CAAC,sBAAsB,CAAC;iBACvD;gBACD,eAAe;aAChB,CAAC,CAAC;SACJ;IACH,CAAC,CAAA,CACF,CAAC;AACJ,CAAC;AAED,SAAS,UAAU,CACjB,GAAM,EACN,MAAU,EACV,OAAwC;IAExC,GAAG,CAAC,MAAM,CAAC,GAAG,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC,CAAC;AACrC,CAAC"}
|
|
@@ -2,17 +2,18 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.generate = exports.newWorkspace = exports.printGenHelp = exports.printChanges = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
|
-
const params_1 = require("../utils/params");
|
|
6
|
-
const workspaces_1 = require("../config/workspaces");
|
|
7
|
-
const tree_1 = require("../generators/tree");
|
|
8
|
-
const logger_1 = require("../utils/logger");
|
|
9
5
|
const chalk = require("chalk");
|
|
10
|
-
const workspace_root_1 = require("../utils/workspace-root");
|
|
11
|
-
const print_help_1 = require("../utils/print-help");
|
|
12
6
|
const enquirer_1 = require("enquirer");
|
|
13
7
|
const fileutils_1 = require("nx/src/utils/fileutils");
|
|
14
|
-
const project_graph_1 = require("../project-graph/project-graph");
|
|
15
8
|
const configuration_1 = require("../config/configuration");
|
|
9
|
+
const workspaces_1 = require("../config/workspaces");
|
|
10
|
+
const tree_1 = require("../generators/tree");
|
|
11
|
+
const project_graph_1 = require("../project-graph/project-graph");
|
|
12
|
+
const logger_1 = require("../utils/logger");
|
|
13
|
+
const params_1 = require("../utils/params");
|
|
14
|
+
const local_plugins_1 = require("../utils/plugins/local-plugins");
|
|
15
|
+
const print_help_1 = require("../utils/print-help");
|
|
16
|
+
const workspace_root_1 = require("../utils/workspace-root");
|
|
16
17
|
function printChanges(fileChanges) {
|
|
17
18
|
fileChanges.forEach((f) => {
|
|
18
19
|
if (f.type === 'CREATE') {
|
|
@@ -27,37 +28,57 @@ function printChanges(fileChanges) {
|
|
|
27
28
|
});
|
|
28
29
|
}
|
|
29
30
|
exports.printChanges = printChanges;
|
|
30
|
-
function promptForCollection(generatorName, ws, interactive) {
|
|
31
|
+
function promptForCollection(generatorName, ws, interactive, projectsConfiguration) {
|
|
31
32
|
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
32
33
|
const packageJson = (0, fileutils_1.readJsonFile)(`${workspace_root_1.workspaceRoot}/package.json`);
|
|
33
|
-
const
|
|
34
|
+
const localPlugins = (0, local_plugins_1.getLocalWorkspacePlugins)(projectsConfiguration);
|
|
35
|
+
const installedCollections = Array.from(new Set([
|
|
34
36
|
...Object.keys(packageJson.dependencies || {}),
|
|
35
37
|
...Object.keys(packageJson.devDependencies || {}),
|
|
36
38
|
]));
|
|
37
39
|
const choicesMap = new Set();
|
|
38
|
-
for (const collectionName of
|
|
40
|
+
for (const collectionName of installedCollections) {
|
|
39
41
|
try {
|
|
40
42
|
const { resolvedCollectionName, normalizedGeneratorName } = ws.readGenerator(collectionName, generatorName);
|
|
41
43
|
choicesMap.add(`${resolvedCollectionName}:${normalizedGeneratorName}`);
|
|
42
44
|
}
|
|
43
45
|
catch (_a) { }
|
|
44
46
|
}
|
|
45
|
-
const
|
|
47
|
+
const choicesFromLocalPlugins = [];
|
|
48
|
+
for (const [name] of localPlugins) {
|
|
49
|
+
try {
|
|
50
|
+
const { resolvedCollectionName, normalizedGeneratorName } = ws.readGenerator(name, generatorName);
|
|
51
|
+
const value = `${resolvedCollectionName}:${normalizedGeneratorName}`;
|
|
52
|
+
if (!choicesMap.has(value)) {
|
|
53
|
+
choicesFromLocalPlugins.push({
|
|
54
|
+
name: value,
|
|
55
|
+
message: chalk.bold(value),
|
|
56
|
+
value,
|
|
57
|
+
});
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
catch (_b) { }
|
|
61
|
+
}
|
|
62
|
+
if (choicesFromLocalPlugins.length) {
|
|
63
|
+
choicesFromLocalPlugins[choicesFromLocalPlugins.length - 1].message += '\n';
|
|
64
|
+
}
|
|
65
|
+
const choices = choicesFromLocalPlugins.concat(...choicesMap);
|
|
46
66
|
if (choices.length === 1) {
|
|
47
|
-
return choices[0];
|
|
67
|
+
return typeof choices[0] === 'string' ? choices[0] : choices[0].value;
|
|
48
68
|
}
|
|
49
69
|
else if (!interactive && choices.length > 1) {
|
|
50
|
-
throwInvalidInvocation(
|
|
70
|
+
throwInvalidInvocation(Array.from(choicesMap));
|
|
51
71
|
}
|
|
52
72
|
else if (interactive && choices.length > 1) {
|
|
53
|
-
const noneOfTheAbove =
|
|
73
|
+
const noneOfTheAbove = `\nNone of the above`;
|
|
54
74
|
choices.push(noneOfTheAbove);
|
|
55
75
|
let { generator, customCollection } = yield (0, enquirer_1.prompt)([
|
|
56
76
|
{
|
|
57
77
|
name: 'generator',
|
|
58
78
|
message: `Which generator would you like to use?`,
|
|
59
79
|
type: 'autocomplete',
|
|
60
|
-
|
|
80
|
+
// enquirer's typings are incorrect here... It supports (string | Choice)[], but is typed as (string[] | Choice[])
|
|
81
|
+
choices: choices,
|
|
61
82
|
},
|
|
62
83
|
{
|
|
63
84
|
name: 'customCollection',
|
|
@@ -105,7 +126,7 @@ function parseGeneratorString(value) {
|
|
|
105
126
|
};
|
|
106
127
|
}
|
|
107
128
|
}
|
|
108
|
-
function convertToGenerateOptions(generatorOptions, ws, defaultCollectionName, mode) {
|
|
129
|
+
function convertToGenerateOptions(generatorOptions, ws, defaultCollectionName, mode, projectsConfiguration) {
|
|
109
130
|
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
110
131
|
let collectionName = null;
|
|
111
132
|
let generatorName = null;
|
|
@@ -118,7 +139,7 @@ function convertToGenerateOptions(generatorOptions, ws, defaultCollectionName, m
|
|
|
118
139
|
generatorName = generator;
|
|
119
140
|
}
|
|
120
141
|
else if (!defaultCollectionName) {
|
|
121
|
-
const generatorString = yield promptForCollection(generatorDescriptor, ws, interactive);
|
|
142
|
+
const generatorString = yield promptForCollection(generatorDescriptor, ws, interactive, projectsConfiguration);
|
|
122
143
|
const parsedGeneratorString = parseGeneratorString(generatorString);
|
|
123
144
|
collectionName = parsedGeneratorString.collection;
|
|
124
145
|
generatorName = parsedGeneratorString.generator;
|
|
@@ -213,7 +234,7 @@ function generate(cwd, args) {
|
|
|
213
234
|
const workspaceConfiguration = Object.assign(Object.assign({}, nxJson), projectsConfiguration);
|
|
214
235
|
const isVerbose = args['verbose'];
|
|
215
236
|
return (0, params_1.handleErrors)(isVerbose, () => tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
216
|
-
const opts = yield convertToGenerateOptions(args, ws, readDefaultCollection(nxJson), 'generate');
|
|
237
|
+
const opts = yield convertToGenerateOptions(args, ws, readDefaultCollection(nxJson), 'generate', projectsConfiguration);
|
|
217
238
|
const { normalizedGeneratorName, schema, implementationFactory, aliases } = ws.readGenerator(opts.collectionName, opts.generatorName);
|
|
218
239
|
logger_1.logger.info(`NX Generating ${opts.collectionName}:${normalizedGeneratorName}`);
|
|
219
240
|
if (opts.help) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"generate.js","sourceRoot":"","sources":["../../../../../packages/nx/src/command-line/generate.ts"],"names":[],"mappings":";;;;AAAA,
|
|
1
|
+
{"version":3,"file":"generate.js","sourceRoot":"","sources":["../../../../../packages/nx/src/command-line/generate.ts"],"names":[],"mappings":";;;;AAAA,+BAA+B;AAC/B,uCAAkC;AAClC,sDAAsD;AAEtD,2DAAqD;AAGrD,qDAAkD;AAClD,6CAAsE;AACtE,kEAGwC;AACxC,4CAAyC;AACzC,4CAKyB;AACzB,kEAA0E;AAC1E,oDAAgD;AAChD,4DAAwD;AAYxD,SAAgB,YAAY,CAAC,WAAyB;IACpD,WAAW,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,EAAE;QACxB,IAAI,CAAC,CAAC,IAAI,KAAK,QAAQ,EAA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|
package/src/command-line/list.js
CHANGED
|
@@ -5,6 +5,8 @@ const tslib_1 = require("tslib");
|
|
|
5
5
|
const workspace_root_1 = require("../utils/workspace-root");
|
|
6
6
|
const output_1 = require("../utils/output");
|
|
7
7
|
const plugins_1 = require("../utils/plugins");
|
|
8
|
+
const local_plugins_1 = require("../utils/plugins/local-plugins");
|
|
9
|
+
const project_graph_1 = require("../project-graph/project-graph");
|
|
8
10
|
/**
|
|
9
11
|
* List available plugins or capabilities within a specific plugin
|
|
10
12
|
*
|
|
@@ -27,7 +29,10 @@ function listHandler(args) {
|
|
|
27
29
|
});
|
|
28
30
|
return [];
|
|
29
31
|
});
|
|
32
|
+
const projectGraph = yield (0, project_graph_1.createProjectGraphAsync)();
|
|
33
|
+
const localPlugins = (0, local_plugins_1.getLocalWorkspacePlugins)((0, project_graph_1.readProjectsConfigurationFromProjectGraph)(projectGraph));
|
|
30
34
|
const installedPlugins = (0, plugins_1.getInstalledPluginsFromPackageJson)(workspace_root_1.workspaceRoot, corePlugins, communityPlugins);
|
|
35
|
+
(0, local_plugins_1.listLocalWorkspacePlugins)(localPlugins);
|
|
31
36
|
(0, plugins_1.listInstalledPlugins)(installedPlugins);
|
|
32
37
|
(0, plugins_1.listCorePlugins)(installedPlugins, corePlugins);
|
|
33
38
|
(0, plugins_1.listCommunityPlugins)(installedPlugins, communityPlugins);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"list.js","sourceRoot":"","sources":["../../../../../packages/nx/src/command-line/list.ts"],"names":[],"mappings":";;;;AAAA,4DAAwD;AACxD,4CAAyC;AACzC,8CAQ0B;
|
|
1
|
+
{"version":3,"file":"list.js","sourceRoot":"","sources":["../../../../../packages/nx/src/command-line/list.ts"],"names":[],"mappings":";;;;AAAA,4DAAwD;AACxD,4CAAyC;AACzC,8CAQ0B;AAC1B,kEAGwC;AACxC,kEAGwC;AAOxC;;;;;;;GAOG;AACH,SAAsB,WAAW,CAAC,IAAc;;QAC9C,IAAI,IAAI,CAAC,MAAM,EAAE;YACf,IAAA,gCAAsB,EAAC,IAAI,CAAC,MAAM,CAAC,CAAC;SACrC;aAAM;YACL,MAAM,WAAW,GAAG,IAAA,0BAAgB,GAAE,CAAC;YACvC,MAAM,gBAAgB,GAAG,MAAM,IAAA,+BAAqB,GAAE,CAAC,KAAK,CAAC,GAAG,EAAE;gBAChE,eAAM,CAAC,IAAI,CAAC;oBACV,KAAK,EAAE,oBAAoB;oBAC3B,SAAS,EAAE,CAAC,yBAAyB,CAAC;iBACvC,CAAC,CAAC;gBAEH,OAAO,EAAE,CAAC;YACZ,CAAC,CAAC,CAAC;YACH,MAAM,YAAY,GAAG,MAAM,IAAA,uCAAuB,GAAE,CAAC;YAErD,MAAM,YAAY,GAAG,IAAA,wCAAwB,EAC3C,IAAA,yDAAyC,EAAC,YAAY,CAAC,CACxD,CAAC;YACF,MAAM,gBAAgB,GAAG,IAAA,4CAAkC,EACzD,8BAAa,EACb,WAAW,EACX,gBAAgB,CACjB,CAAC;YAEF,IAAA,yCAAyB,EAAC,YAAY,CAAC,CAAC;YACxC,IAAA,8BAAoB,EAAC,gBAAgB,CAAC,CAAC;YACvC,IAAA,yBAAe,EAAC,gBAAgB,EAAE,WAAW,CAAC,CAAC;YAC/C,IAAA,8BAAoB,EAAC,gBAAgB,EAAE,gBAAgB,CAAC,CAAC;YAEzD,eAAM,CAAC,IAAI,CAAC;gBACV,KAAK,EAAE,yCAAyC;aACjD,CAAC,CAAC;SACJ;IACH,CAAC;CAAA;AAjCD,kCAiCC"}
|
|
@@ -9,7 +9,7 @@ export declare const patternsWeIgnoreInCommunityReport: Array<string | RegExp>;
|
|
|
9
9
|
* Must be run within an Nx workspace
|
|
10
10
|
*
|
|
11
11
|
*/
|
|
12
|
-
export declare function reportHandler(): void
|
|
12
|
+
export declare function reportHandler(): Promise<void>;
|
|
13
13
|
export declare function readPackageJson(p: string): PackageJson | null;
|
|
14
14
|
export declare function readPackageVersion(p: string): string;
|
|
15
15
|
export declare function findInstalledCommunityPlugins(): {
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.findInstalledCommunityPlugins = exports.readPackageVersion = exports.readPackageJson = exports.reportHandler = exports.patternsWeIgnoreInCommunityReport = exports.packagesWeCareAbout = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
4
5
|
const chalk = require("chalk");
|
|
5
6
|
const workspace_root_1 = require("../utils/workspace-root");
|
|
6
7
|
const output_1 = require("../utils/output");
|
|
@@ -8,6 +9,8 @@ const path_1 = require("path");
|
|
|
8
9
|
const package_manager_1 = require("../utils/package-manager");
|
|
9
10
|
const fileutils_1 = require("../utils/fileutils");
|
|
10
11
|
const package_json_1 = require("../utils/package-json");
|
|
12
|
+
const local_plugins_1 = require("../utils/plugins/local-plugins");
|
|
13
|
+
const project_graph_1 = require("../project-graph/project-graph");
|
|
11
14
|
exports.packagesWeCareAbout = [
|
|
12
15
|
'nx',
|
|
13
16
|
'@nrwl/angular',
|
|
@@ -47,26 +50,41 @@ exports.patternsWeIgnoreInCommunityReport = [
|
|
|
47
50
|
*
|
|
48
51
|
*/
|
|
49
52
|
function reportHandler() {
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
53
|
+
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
54
|
+
const pm = (0, package_manager_1.detectPackageManager)();
|
|
55
|
+
const pmVersion = (0, package_manager_1.getPackageManagerVersion)(pm);
|
|
56
|
+
const bodyLines = [
|
|
57
|
+
`Node : ${process.versions.node}`,
|
|
58
|
+
`OS : ${process.platform} ${process.arch}`,
|
|
59
|
+
`${pm.padEnd(5)}: ${pmVersion}`,
|
|
60
|
+
``,
|
|
61
|
+
];
|
|
62
|
+
exports.packagesWeCareAbout.forEach((p) => {
|
|
63
|
+
bodyLines.push(`${chalk.green(p)} : ${chalk.bold(readPackageVersion(p))}`);
|
|
64
|
+
});
|
|
65
|
+
bodyLines.push('---------------------------------------');
|
|
66
|
+
try {
|
|
67
|
+
const projectGraph = yield (0, project_graph_1.createProjectGraphAsync)();
|
|
68
|
+
bodyLines.push('Local workspace plugins:');
|
|
69
|
+
const plugins = (0, local_plugins_1.getLocalWorkspacePlugins)((0, project_graph_1.readProjectsConfigurationFromProjectGraph)(projectGraph)).keys();
|
|
70
|
+
for (const plugin of plugins) {
|
|
71
|
+
bodyLines.push(`\t ${chalk.green(plugin)}`);
|
|
72
|
+
}
|
|
73
|
+
bodyLines.push(...plugins);
|
|
74
|
+
}
|
|
75
|
+
catch (_a) {
|
|
76
|
+
bodyLines.push('Unable to construct project graph');
|
|
77
|
+
}
|
|
78
|
+
bodyLines.push('---------------------------------------');
|
|
79
|
+
const communityPlugins = findInstalledCommunityPlugins();
|
|
80
|
+
bodyLines.push('Community plugins:');
|
|
81
|
+
communityPlugins.forEach((p) => {
|
|
82
|
+
bodyLines.push(`\t ${chalk.green(p.package)}: ${chalk.bold(p.version)}`);
|
|
83
|
+
});
|
|
84
|
+
output_1.output.log({
|
|
85
|
+
title: 'Report complete - copy this into the issue template',
|
|
86
|
+
bodyLines,
|
|
87
|
+
});
|
|
70
88
|
});
|
|
71
89
|
}
|
|
72
90
|
exports.reportHandler = reportHandler;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"report.js","sourceRoot":"","sources":["../../../../../packages/nx/src/command-line/report.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"report.js","sourceRoot":"","sources":["../../../../../packages/nx/src/command-line/report.ts"],"names":[],"mappings":";;;;AAAA,+BAA+B;AAC/B,4DAAwD;AACxD,4CAAyC;A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
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
.tippy-box[data-animation=fade][data-state=hidden]{opacity:0}[data-tippy-root]{max-width:calc(100vw - 10px)}.tippy-box{background-color:#333;border-radius:4px;color:#fff;font-size:14px;line-height:1.4;outline:0;position:relative;transition-property:transform,visibility,opacity;white-space:normal}.tippy-box[data-placement^=top]>.tippy-arrow{bottom:0}.tippy-box[data-placement^=top]>.tippy-arrow:before{border-top-color:initial;border-width:8px 8px 0;bottom:-7px;left:0;transform-origin:center top}.tippy-box[data-placement^=bottom]>.tippy-arrow{top:0}.tippy-box[data-placement^=bottom]>.tippy-arrow:before{border-bottom-color:initial;border-width:0 8px 8px;left:0;top:-7px;transform-origin:center bottom}.tippy-box[data-placement^=left]>.tippy-arrow{right:0}.tippy-box[data-placement^=left]>.tippy-arrow:before{border-left-color:initial;border-width:8px 0 8px 8px;right:-7px;transform-origin:center left}.tippy-box[data-placement^=right]>.tippy-arrow{left:0}.tippy-box[data-placement^=right]>.tippy-arrow:before{border-right-color:initial;border-width:8px 8px 8px 0;left:-7px;transform-origin:center right}.tippy-box[data-inertia][data-state=visible]{transition-timing-function:cubic-bezier(.54,1.5,.38,1.11)}.tippy-arrow{color:#333;height:16px;width:16px}.tippy-arrow:before{border-color:transparent;border-style:solid;content:"";position:absolute}.tippy-content{padding:5px 9px;position:relative;z-index:1}.container{width:100%}.\!container{width:100%!important}@media (min-width:640px){.container{max-width:640px}.\!container{max-width:640px!important}}@media (min-width:768px){.container{max-width:768px}.\!container{max-width:768px!important}}@media (min-width:1024px){.container{max-width:1024px}.\!container{max-width:1024px!important}}@media (min-width:1280px){.container{max-width:1280px}.\!container{max-width:1280px!important}}@media (min-width:1536px){.container{max-width:1536px}.\!container{max-width:1536px!important}}/*
|
|
2
|
-
! tailwindcss v3.1.
|
|
2
|
+
! tailwindcss v3.1.8 | MIT License | https://tailwindcss.com
|
|
3
3
|
*/*,:after,:before{border:0 solid #e5e7eb;box-sizing:border-box}:after,:before{--tw-content:""}html{-webkit-text-size-adjust:100%;font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;line-height:1.5;tab-size:4}body{line-height:inherit;margin:0}hr{border-top-width:1px;color:inherit;height:0}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,pre,samp{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{border-collapse:collapse;border-color:inherit;text-indent:0}button,input,optgroup,select,textarea{color:inherit;font-family:inherit;font-size:100%;font-weight:inherit;line-height:inherit;margin:0;padding:0}button,select{text-transform:none}[type=button],[type=reset],[type=submit],button{-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dd,dl,figure,h1,h2,h3,h4,h5,h6,hr,p,pre{margin:0}fieldset{margin:0}fieldset,legend{padding:0}menu,ol,ul{list-style:none;margin:0;padding:0}textarea{resize:vertical}input::placeholder,textarea::placeholder{color:#9ca3af;opacity:1}[role=button],button{cursor:pointer}:disabled{cursor:default}audio,canvas,embed,iframe,img,object,svg,video{display:block;vertical-align:middle}img,video{height:auto;max-width:100%}*,:after,:before{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness:proximity;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: }::-webkit-backdrop{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness:proximity;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: }::backdrop{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness:proximity;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: }.sr-only{clip:rect(0,0,0,0);border-width:0;height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;white-space:nowrap;width:1px}.visible{visibility:visible}.static{position:static}.fixed{position:fixed}.absolute{position:absolute}.relative{position:relative}.inset-y-0{bottom:0;top:0}.bottom-4{bottom:1rem}.right-4{right:1rem}.top-1\/2{top:50%}.left-1\/2{left:50%}.right-2{right:.5rem}.right-0{right:0}.top-5{top:1.25rem}.left-5{left:1.25rem}.top-1{top:.25rem}.right-1{right:.25rem}.top-2{top:.5rem}.z-50{z-index:50}.z-0{z-index:0}.mx-4{margin-left:1rem;margin-right:1rem}.my-5{margin-bottom:1.25rem;margin-top:1.25rem}.mr-4{margin-right:1rem}.mb-3{margin-bottom:.75rem}.mr-2{margin-right:.5rem}.-mt-3{margin-top:-.75rem}.-ml-3{margin-left:-.75rem}.ml-3{margin-left:.75rem}.mt-10{margin-top:2.5rem}.-mt-1{margin-top:-.25rem}.mr-1{margin-right:.25rem}.mt-8{margin-top:2rem}.ml-2{margin-left:.5rem}.mt-4{margin-top:1rem}.mt-2{margin-top:.5rem}.mt-3{margin-top:.75rem}.-ml-1{margin-left:-.25rem}.ml-4{margin-left:1rem}.block{display:block}.inline-block{display:inline-block}.inline{display:inline}.flex{display:flex}.inline-flex{display:inline-flex}.h-5{height:1.25rem}.h-6{height:1.5rem}.h-16{height:4rem}.h-4{height:1rem}.h-full{height:100%}.h-12{height:3rem}.max-h-\[300px\]{max-height:300px}.w-auto{width:auto}.w-5{width:1.25rem}.w-6{width:1.5rem}.w-16{width:4rem}.w-4{width:1rem}.w-full{width:100%}.w-72{width:18rem}.w-36{width:9rem}.flex-1{flex:1 1 0%}.flex-grow{flex-grow:1}.origin-top-right{transform-origin:top right}.translate-x-32{--tw-translate-x:8rem}.scale-95,.translate-x-32{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.scale-95{--tw-scale-x:.95;--tw-scale-y:.95}.scale-100{--tw-scale-x:1;--tw-scale-y:1}.scale-100,.transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.cursor-pointer{cursor:pointer}.cursor-default{cursor:default}.cursor-text{cursor:text}.select-none{-webkit-user-select:none;user-select:none}.resize{resize:both}.flex-row{flex-direction:row}.flex-col{flex-direction:column}.items-start{align-items:flex-start}.items-center{align-items:center}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.justify-items-center{justify-items:center}.gap-4{gap:1rem}.divide-y>:not([hidden])~:not([hidden]){--tw-divide-y-reverse:0;border-bottom-width:calc(1px*var(--tw-divide-y-reverse));border-top-width:calc(1px*(1 - var(--tw-divide-y-reverse)))}.divide-slate-200>:not([hidden])~:not([hidden]){--tw-divide-opacity:1;border-color:rgb(226 232 240/var(--tw-divide-opacity))}.overflow-auto{overflow:auto}.overflow-hidden{overflow:hidden}.overflow-y-scroll{overflow-y:scroll}.truncate{overflow:hidden;text-overflow:ellipsis}.truncate,.whitespace-nowrap{white-space:nowrap}.rounded-md{border-radius:.375rem}.rounded-full{border-radius:9999px}.rounded-none{border-radius:0}.rounded-lg{border-radius:.5rem}.rounded-l-md{border-bottom-left-radius:.375rem;border-top-left-radius:.375rem}.rounded-r-md{border-bottom-right-radius:.375rem;border-top-right-radius:.375rem}.border{border-width:1px}.border-2{border-width:2px}.border-b{border-bottom-width:1px}.border-t{border-top-width:1px}.border-r-0{border-right-width:0}.border-solid{border-style:solid}.border-dashed{border-style:dashed}.border-slate-900\/10{border-color:rgba(15,23,42,.1)}.border-slate-300{--tw-border-opacity:1;border-color:rgb(203 213 225/var(--tw-border-opacity))}.border-slate-200{--tw-border-opacity:1;border-color:rgb(226 232 240/var(--tw-border-opacity))}.border-slate-400\/10{border-color:rgba(148,163,184,.1)}.border-slate-200\/10{border-color:rgba(226,232,240,.1)}.border-red-300{--tw-border-opacity:1;border-color:rgb(252 165 165/var(--tw-border-opacity))}.border-purple-500{--tw-border-opacity:1;border-color:rgb(168 85 247/var(--tw-border-opacity))}.border-blue-nx-base{border-color:#143157}.border-gray-300{--tw-border-opacity:1;border-color:rgb(209 213 219/var(--tw-border-opacity))}.bg-white{--tw-bg-opacity:1;background-color:rgb(255 255 255/var(--tw-bg-opacity))}.bg-slate-50{--tw-bg-opacity:1;background-color:rgb(248 250 252/var(--tw-bg-opacity))}.bg-green-nx-base{background-color:#44bb97}.bg-blue-nx-base{background-color:#143157}.p-4{padding:1rem}.p-2{padding:.5rem}.p-1{padding:.25rem}.p-1\.5{padding:.375rem}.px-4{padding-left:1rem;padding-right:1rem}.py-2{padding-bottom:.5rem;padding-top:.5rem}.py-1{padding-bottom:.25rem;padding-top:.25rem}.px-10{padding-left:2.5rem;padding-right:2.5rem}.px-1{padding-left:.25rem;padding-right:.25rem}.px-2{padding-right:.5rem}.pl-2,.px-2{padding-left:.5rem}.pr-6{padding-right:1.5rem}.pb-10{padding-bottom:2.5rem}.pb-2{padding-bottom:.5rem}.text-left{text-align:left}.text-center{text-align:center}.font-mono{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace}.text-lg{font-size:1.125rem;line-height:1.75rem}.text-sm{font-size:.875rem;line-height:1.25rem}.text-xs{font-size:.75rem;line-height:1rem}.text-xl{font-size:1.25rem;line-height:1.75rem}.font-normal{font-weight:400}.font-medium{font-weight:500}.font-semibold{font-weight:600}.font-light{font-weight:300}.uppercase{text-transform:uppercase}.tracking-wide{letter-spacing:.025em}.text-slate-500{--tw-text-opacity:1;color:rgb(100 116 139/var(--tw-text-opacity))}.text-slate-700{--tw-text-opacity:1;color:rgb(51 65 85/var(--tw-text-opacity))}.text-slate-800{--tw-text-opacity:1;color:rgb(30 41 59/var(--tw-text-opacity))}.text-white{--tw-text-opacity:1;color:rgb(255 255 255/var(--tw-text-opacity))}.text-slate-600{--tw-text-opacity:1;color:rgb(71 85 105/var(--tw-text-opacity))}.text-slate-400{--tw-text-opacity:1;color:rgb(148 163 184/var(--tw-text-opacity))}.text-slate-50{--tw-text-opacity:1;color:rgb(248 250 252/var(--tw-text-opacity))}.text-green-nx-base{color:#44bb97}.text-red-500{--tw-text-opacity:1;color:rgb(239 68 68/var(--tw-text-opacity))}.accent-purple-500{accent-color:#a855f7}.accent-green-nx-base{accent-color:#44bb97}.opacity-0{opacity:0}.opacity-100{opacity:1}.shadow-sm{--tw-shadow:0 1px 2px 0 rgba(0,0,0,.05);--tw-shadow-colored:0 1px 2px 0 var(--tw-shadow-color)}.shadow-lg,.shadow-sm{box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.shadow-lg{--tw-shadow:0 10px 15px -3px rgba(0,0,0,.1),0 4px 6px -4px rgba(0,0,0,.1);--tw-shadow-colored:0 10px 15px -3px var(--tw-shadow-color),0 4px 6px -4px var(--tw-shadow-color)}.ring-1{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}.ring-slate-500{--tw-ring-opacity:1;--tw-ring-color:rgb(100 116 139/var(--tw-ring-opacity))}.ring-slate-200{--tw-ring-opacity:1;--tw-ring-color:rgb(226 232 240/var(--tw-ring-opacity))}.ring-blue-nx-base{--tw-ring-color:#143157}.ring-slate-900\/10{--tw-ring-color:rgba(15,23,42,.1)}.ring-opacity-10{--tw-ring-opacity:0.1}.ring-opacity-5{--tw-ring-opacity:0.05}.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.transition-all{transition-duration:.15s;transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1)}.transition{transition-duration:.15s;transition-property:color,background-color,border-color,fill,stroke,opacity,box-shadow,transform,filter,-webkit-text-decoration-color,-webkit-backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter,-webkit-text-decoration-color,-webkit-backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1)}.duration-300{transition-duration:.3s}.duration-200{transition-duration:.2s}.duration-100{transition-duration:.1s}.duration-75{transition-duration:75ms}.ease-in-out{transition-timing-function:cubic-bezier(.4,0,.2,1)}.ease-out{transition-timing-function:cubic-bezier(0,0,.2,1)}.ease-in{transition-timing-function:cubic-bezier(.4,0,1,1)}#app,body,html{height:100%;margin:0;overflow:hidden;padding:0;width:100%}#app{display:flex}#no-projects-chosen{align-items:center;display:flex;justify-content:center}#cytoscape-graph,#graph-container,#no-projects-chosen{height:100%;width:100%}canvas{cursor:pointer}.tippy-box,.tippy-box[data-theme~=dark-nx],[data-theme~=nx]{background-color:#fff;border:1px solid #64748b;border-radius:.375rem;box-shadow:0 1px 2px 0 rgba(0,0,0,.05);box-sizing:border-box;color:#384252;min-width:250px;padding:.375rem}.tippy-box .tippy-content,[data-theme~=nx] .tippy-content{padding:.375rem}.tippy-box[data-placement^=top],[data-theme~=nx][data-placement^=top]{margin-bottom:1rem}.tippy-box[data-placement^=top]>.tippy-arrow:before,[data-theme~=nx][data-placement^=top]>.tippy-arrow:before{border-top-color:#64748b}.tippy-box[data-placement^=bottom]>.tippy-arrow:before,[data-theme~=nx][data-placement^=bottom]>.tippy-arrow:before{border-bottom-color:#64748b}.tippy-box[data-placement^=left]>.tippy-arrow:before,[data-theme~=nx][data-placement^=left]>.tippy-arrow:before{border-left-color:#64748b}.tippy-box[data-placement^=right]>.tippy-arrow:before,[data-theme~=nx][data-placement^=right]>.tippy-arrow:before{border-right-color:#64748b}.tag{background-color:#143157;border-radius:.375rem;color:#fff;display:inline-block;font-family:system-ui;font-size:.75rem;font-weight:600;letter-spacing:.025em;line-height:1rem;margin-right:.75rem;padding:.5rem;text-transform:uppercase}.tippy-box[data-theme~=dark-nx] h4,.tippy-box[data-theme~=nx] h4{font-family:monospace}.tippy-box[data-theme~=dark-nx] p,.tippy-box[data-theme~=nx] p{margin:.375rem}.tippy-box[data-theme~=dark-nx] button,.tippy-box[data-theme~=nx] button{background-color:#f9fafb;border-color:#64748b;border-radius:.375rem;border-width:1px;color:#6b7280;margin:.375rem;padding:.5rem 1rem}.tippy-box[data-theme~=dark-nx] button:hover,.tippy-box[data-theme~=nx] button:hover{background-color:#f3f4f6}.tippy-box[data-theme~=dark-nx]{background-color:#0f172a;color:#94a3b8}.tippy-box[data-theme~=dark-nx] button{background-color:#0f172a;border-color:#475569;color:#cbd5e1}.tippy-box[data-theme~=dark-nx] button:hover{background-color:#334155}.placeholder\:font-light::placeholder{font-weight:300}.placeholder\:text-slate-400::placeholder{--tw-text-opacity:1;color:rgb(148 163 184/var(--tw-text-opacity))}.hover\:bg-slate-50:hover{--tw-bg-opacity:1;background-color:rgb(248 250 252/var(--tw-bg-opacity))}.hover\:bg-slate-100:hover{--tw-bg-opacity:1;background-color:rgb(241 245 249/var(--tw-bg-opacity))}.hover\:bg-red-50:hover{--tw-bg-opacity:1;background-color:rgb(254 242 242/var(--tw-bg-opacity))}.hover\:underline:hover{-webkit-text-decoration-line:underline;text-decoration-line:underline}.focus\:outline-none:focus{outline:2px solid transparent;outline-offset:2px}.focus-visible\:ring-2:focus-visible{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}.focus-visible\:ring-white:focus-visible{--tw-ring-opacity:1;--tw-ring-color:rgb(255 255 255/var(--tw-ring-opacity))}.focus-visible\:ring-opacity-75:focus-visible{--tw-ring-opacity:0.75}.group:hover .group-hover\:translate-x-0{--tw-translate-x:0px;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.group:hover .group-hover\:opacity-60{opacity:.6}.dark .dark\:divide-slate-800>:not([hidden])~:not([hidden]){--tw-divide-opacity:1;border-color:rgb(30 41 59/var(--tw-divide-opacity))}.dark .dark\:border-slate-300\/10{border-color:rgba(203,213,225,.1)}.dark .dark\:border-slate-600{--tw-border-opacity:1;border-color:rgb(71 85 105/var(--tw-border-opacity))}.dark .dark\:border-slate-800{--tw-border-opacity:1;border-color:rgb(30 41 59/var(--tw-border-opacity))}.dark .dark\:border-slate-700{--tw-border-opacity:1;border-color:rgb(51 65 85/var(--tw-border-opacity))}.dark .dark\:border-red-700{--tw-border-opacity:1;border-color:rgb(185 28 28/var(--tw-border-opacity))}.dark .dark\:border-purple-600{--tw-border-opacity:1;border-color:rgb(147 51 234/var(--tw-border-opacity))}.dark .dark\:border-slate-900{--tw-border-opacity:1;border-color:rgb(15 23 42/var(--tw-border-opacity))}.dark .dark\:border-slate-200{--tw-border-opacity:1;border-color:rgb(226 232 240/var(--tw-border-opacity))}.dark .dark\:bg-slate-900{--tw-bg-opacity:1;background-color:rgb(15 23 42/var(--tw-bg-opacity))}.dark .dark\:bg-transparent{background-color:transparent}.dark .dark\:bg-slate-800{--tw-bg-opacity:1;background-color:rgb(30 41 59/var(--tw-bg-opacity))}.dark .dark\:bg-\[\#0B1221\]{--tw-bg-opacity:1;background-color:rgb(11 18 33/var(--tw-bg-opacity))}.dark .dark\:bg-slate-600\/30{background-color:rgba(71,85,105,.3)}.dark .dark\:text-slate-400{--tw-text-opacity:1;color:rgb(148 163 184/var(--tw-text-opacity))}.dark .dark\:text-slate-300{--tw-text-opacity:1;color:rgb(203 213 225/var(--tw-text-opacity))}.dark .dark\:text-slate-500{--tw-text-opacity:1;color:rgb(100 116 139/var(--tw-text-opacity))}.dark .dark\:text-slate-200{--tw-text-opacity:1;color:rgb(226 232 240/var(--tw-text-opacity))}.dark .dark\:text-white{--tw-text-opacity:1;color:rgb(255 255 255/var(--tw-text-opacity))}.dark .dark\:text-green-nx-base{color:#44bb97}.dark .dark\:ring-0{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}.dark .dark\:ring-slate-600{--tw-ring-opacity:1;--tw-ring-color:rgb(71 85 105/var(--tw-ring-opacity))}.dark .dark\:ring-slate-300\/10{--tw-ring-color:rgba(203,213,225,.1)}.dark .dark\:ring-slate-700{--tw-ring-opacity:1;--tw-ring-color:rgb(51 65 85/var(--tw-ring-opacity))}.dark .dark\:hover\:bg-slate-700:hover,.dark .hover\:dark\:bg-slate-700:hover{--tw-bg-opacity:1;background-color:rgb(51 65 85/var(--tw-bg-opacity))}@media (min-width:1024px){.lg\:text-xs{font-size:.75rem;line-height:1rem}}
|
|
@@ -2,4 +2,5 @@ import type { Tree } from 'nx/src/generators/tree';
|
|
|
2
2
|
/**
|
|
3
3
|
* Creates a host for testing.
|
|
4
4
|
*/
|
|
5
|
-
export declare function createTreeWithEmptyWorkspace(
|
|
5
|
+
export declare function createTreeWithEmptyWorkspace(): Tree;
|
|
6
|
+
export declare function createTreeWithEmptyV1Workspace(): Tree;
|
|
@@ -1,13 +1,23 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.createTreeWithEmptyWorkspace = void 0;
|
|
3
|
+
exports.createTreeWithEmptyV1Workspace = exports.createTreeWithEmptyWorkspace = void 0;
|
|
4
4
|
const tree_1 = require("nx/src/generators/tree");
|
|
5
5
|
/**
|
|
6
6
|
* Creates a host for testing.
|
|
7
7
|
*/
|
|
8
|
-
function createTreeWithEmptyWorkspace(
|
|
8
|
+
function createTreeWithEmptyWorkspace() {
|
|
9
9
|
const tree = new tree_1.FsTree('/virtual', false);
|
|
10
|
-
tree.write('/workspace.json', JSON.stringify({ version, projects: {} }));
|
|
10
|
+
tree.write('/workspace.json', JSON.stringify({ version: 2, projects: {} }));
|
|
11
|
+
return addCommonFiles(tree);
|
|
12
|
+
}
|
|
13
|
+
exports.createTreeWithEmptyWorkspace = createTreeWithEmptyWorkspace;
|
|
14
|
+
function createTreeWithEmptyV1Workspace() {
|
|
15
|
+
const tree = new tree_1.FsTree('/virtual', false);
|
|
16
|
+
tree.write('/workspace.json', JSON.stringify({ version: 1, projects: {} }));
|
|
17
|
+
return addCommonFiles(tree);
|
|
18
|
+
}
|
|
19
|
+
exports.createTreeWithEmptyV1Workspace = createTreeWithEmptyV1Workspace;
|
|
20
|
+
function addCommonFiles(tree) {
|
|
11
21
|
tree.write('./.prettierrc', JSON.stringify({ singleQuote: true }));
|
|
12
22
|
tree.write('/package.json', JSON.stringify({
|
|
13
23
|
name: 'test-name',
|
|
@@ -31,5 +41,4 @@ function createTreeWithEmptyWorkspace(version = 1) {
|
|
|
31
41
|
tree.write('/tsconfig.base.json', JSON.stringify({ compilerOptions: { paths: {} } }));
|
|
32
42
|
return tree;
|
|
33
43
|
}
|
|
34
|
-
exports.createTreeWithEmptyWorkspace = createTreeWithEmptyWorkspace;
|
|
35
44
|
//# sourceMappingURL=create-tree-with-empty-workspace.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"create-tree-with-empty-workspace.js","sourceRoot":"","sources":["../../../../../../packages/nx/src/generators/testing-utils/create-tree-with-empty-workspace.ts"],"names":[],"mappings":";;;AAAA,iDAAgD;AAGhD;;GAEG;AACH,SAAgB,4BAA4B,CAAC,OAAO,
|
|
1
|
+
{"version":3,"file":"create-tree-with-empty-workspace.js","sourceRoot":"","sources":["../../../../../../packages/nx/src/generators/testing-utils/create-tree-with-empty-workspace.ts"],"names":[],"mappings":";;;AAAA,iDAAgD;AAGhD;;GAEG;AACH,SAAgB,4BAA4B;IAC1C,MAAM,IAAI,GAAG,IAAI,aAAM,CAAC,UAAU,EAAE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AAC,EAAE,eAAe,EAAE,EAAE,KAAK,EAAE,EAAE,EAAE,EAAE,CAAC,CACnD,CAAC;IACF,OAAO,IAAI,CAAC;AACd,CAAC"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { Task, TaskGraph } from '../config/task-graph';
|
|
2
|
+
import { Hasher } from './hasher';
|
|
3
|
+
import { ProjectGraph } from '../config/project-graph';
|
|
4
|
+
import { Workspaces } from '../config/workspaces';
|
|
5
|
+
export declare function hashDependsOnOtherTasks(workspaces: Workspaces, hasher: Hasher, projectGraph: ProjectGraph, taskGraph: TaskGraph, task: Task): boolean;
|
|
6
|
+
export declare function hashTask(workspaces: Workspaces, hasher: Hasher, projectGraph: ProjectGraph, taskGraph: TaskGraph, task: Task): Promise<void>;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.hashTask = exports.hashDependsOnOtherTasks = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const utils_1 = require("../tasks-runner/utils");
|
|
6
|
+
const project_graph_1 = require("../project-graph/project-graph");
|
|
7
|
+
function hashDependsOnOtherTasks(workspaces, hasher, projectGraph, taskGraph, task) {
|
|
8
|
+
const customHasher = (0, utils_1.getCustomHasher)(task, workspaces, workspaces.readNxJson(), projectGraph);
|
|
9
|
+
if (customHasher)
|
|
10
|
+
return true;
|
|
11
|
+
return hasher.hashDependsOnOtherTasks(task);
|
|
12
|
+
}
|
|
13
|
+
exports.hashDependsOnOtherTasks = hashDependsOnOtherTasks;
|
|
14
|
+
function hashTask(workspaces, hasher, projectGraph, taskGraph, task) {
|
|
15
|
+
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
16
|
+
const customHasher = (0, utils_1.getCustomHasher)(task, workspaces, workspaces.readNxJson(), projectGraph);
|
|
17
|
+
const { value, details } = yield (customHasher
|
|
18
|
+
? customHasher(task, {
|
|
19
|
+
hasher,
|
|
20
|
+
projectGraph,
|
|
21
|
+
taskGraph,
|
|
22
|
+
workspaceConfig: (0, project_graph_1.readProjectsConfigurationFromProjectGraph)(projectGraph),
|
|
23
|
+
})
|
|
24
|
+
: hasher.hashTask(task));
|
|
25
|
+
task.hash = value;
|
|
26
|
+
task.hashDetails = details;
|
|
27
|
+
});
|
|
28
|
+
}
|
|
29
|
+
exports.hashTask = hashTask;
|
|
30
|
+
//# sourceMappingURL=hash-task.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"hash-task.js","sourceRoot":"","sources":["../../../../../packages/nx/src/hasher/hash-task.ts"],"names":[],"mappings":";;;;AACA,iDAAwD;AACxD,kEAA2F;AAK3F,SAAgB,uBAAuB,CACrC,UAAsB,EACtB,MAAc,EACd,YAA0B,EAC1B,SAAoB,EACpB,IAAU;IAEV,MAAM,YAAY,GAAG,IAAA,uBAAe,EAClC,IAAI,EACJ,UAAU,EACV,UAAU,CAAC,UAAU,EAAE,EACvB,YAAY,CACb,CAAC;IACF,IAAI,YAAY;QAAE,OAAO,IAAI,CAAC;IAC9B,OAAO,MAAM,CAAC,uBAAuB,CAAC,IAAI,CAAC,CAAC;AAC9C,CAAC;AAfD,0DAeC;AAED,SAAsB,QAAQ,CAC5B,UAAsB,EACtB,MAAc,EACd,YAA0B,EAC1B,SAAoB,EACpB,IAAU;;QAEV,MAAM,YAAY,GAAG,IAAA,uBAAe,EAClC,IAAI,EACJ,UAAU,EACV,UAAU,CAAC,UAAU,EAAE,EACvB,YAAY,CACb,CAAC;QACF,MAAM,EAAE,KAAK,EAAE,OAAO,EAAE,GAAG,MAAM,CAAC,YAAY;YAC5C,CAAC,CAAC,YAAY,CAAC,IAAI,EAAE;gBACjB,MAAM;gBACN,YAAY;gBACZ,SAAS;gBACT,eAAe,EACb,IAAA,yDAAyC,EAAC,YAAY,CAAC;aAC1D,CAAC;YACJ,CAAC,CAAC,MAAM,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC;QAC3B,IAAI,CAAC,IAAI,GAAG,KAAK,CAAC;QAClB,IAAI,CAAC,WAAW,GAAG,OAAO,CAAC;IAC7B,CAAC;CAAA;AAxBD,4BAwBC"}
|
package/src/hasher/hasher.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { HashingImpl } from './hashing-impl';
|
|
2
|
-
import { ProjectGraph } from '../config/project-graph';
|
|
2
|
+
import { FileData, ProjectGraph } from '../config/project-graph';
|
|
3
3
|
import { NxJsonConfiguration } from '../config/nx-json';
|
|
4
4
|
import { Task } from '../config/task-graph';
|
|
5
5
|
import { InputDefinition } from '../config/workspace-json-project-json';
|
|
@@ -49,6 +49,7 @@ export declare class Hasher {
|
|
|
49
49
|
private hashing;
|
|
50
50
|
constructor(projectGraph: ProjectGraph, nxJson: NxJsonConfiguration, options: any, hashing?: HashingImpl);
|
|
51
51
|
hashTask(task: Task): Promise<Hash>;
|
|
52
|
+
hashDependsOnOtherTasks(task: Task): boolean;
|
|
52
53
|
/**
|
|
53
54
|
* @deprecated use hashTask instead
|
|
54
55
|
*/
|
|
@@ -77,4 +78,5 @@ export declare function splitInputsIntoSelfAndDependencies(inputs: (InputDefinit
|
|
|
77
78
|
export declare function expandNamedInput(input: string, namedInputs: {
|
|
78
79
|
[inputName: string]: (InputDefinition | string)[];
|
|
79
80
|
}): ExpandedSelfInput[];
|
|
81
|
+
export declare function filterUsingGlobPatterns(projectRoot: string, files: FileData[], patterns: string[]): FileData[];
|
|
80
82
|
export {};
|