nx 22.1.0-beta.5 → 22.1.0-beta.7
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/migrations.json +6 -0
- package/package.json +12 -11
- package/src/command-line/init/implementation/dot-nx/add-nx-scripts.d.ts +2 -0
- package/src/command-line/init/implementation/dot-nx/add-nx-scripts.d.ts.map +1 -1
- package/src/command-line/init/implementation/dot-nx/add-nx-scripts.js +11 -1
- package/src/command-line/init/init-v2.js +1 -1
- package/src/core/graph/main.js +1 -1
- package/src/generators/internal-utils/format-changed-files-with-prettier-if-available.d.ts.map +1 -1
- package/src/generators/internal-utils/format-changed-files-with-prettier-if-available.js +5 -1
- package/src/migrations/update-22-1-0/update-nx-wrapper.d.ts +3 -0
- package/src/migrations/update-22-1-0/update-nx-wrapper.d.ts.map +1 -0
- package/src/migrations/update-22-1-0/update-nx-wrapper.js +7 -0
- package/src/native/index.d.ts +13 -2
- package/src/native/nx.wasm32-wasi.wasm +0 -0
- package/src/plugins/js/project-graph/build-dependencies/target-project-locator.js +1 -1
- package/src/project-graph/plugins/get-plugins.d.ts.map +1 -1
- package/src/project-graph/plugins/get-plugins.js +4 -4
- package/src/project-graph/plugins/isolation/index.d.ts +1 -1
- package/src/project-graph/plugins/isolation/index.d.ts.map +1 -1
- package/src/project-graph/plugins/isolation/index.js +2 -2
- package/src/project-graph/plugins/isolation/plugin-pool.d.ts +1 -1
- package/src/project-graph/plugins/isolation/plugin-pool.d.ts.map +1 -1
- package/src/project-graph/plugins/isolation/plugin-pool.js +10 -6
- package/src/tasks-runner/process-metrics-service.d.ts +1 -1
- package/src/tasks-runner/process-metrics-service.d.ts.map +1 -1
- package/src/tasks-runner/process-metrics-service.js +2 -2
- package/src/utils/update-nxw.d.ts.map +1 -1
- package/src/utils/update-nxw.js +11 -0
package/src/generators/internal-utils/format-changed-files-with-prettier-if-available.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"format-changed-files-with-prettier-if-available.d.ts","sourceRoot":"","sources":["../../../../../../packages/nx/src/generators/internal-utils/format-changed-files-with-prettier-if-available.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"format-changed-files-with-prettier-if-available.d.ts","sourceRoot":"","sources":["../../../../../../packages/nx/src/generators/internal-utils/format-changed-files-with-prettier-if-available.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,SAAS,CAAC;AAGpC;;;GAGG;AACH,wBAAsB,yCAAyC,CAC7D,IAAI,EAAE,IAAI,EACV,OAAO,CAAC,EAAE;IACR,MAAM,CAAC,EAAE,OAAO,CAAC;CAClB,GACA,OAAO,CAAC,IAAI,CAAC,CAcf;AAED,wBAAsB,kCAAkC,CACtD,KAAK,EAAE;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,MAAM,GAAG,MAAM,CAAA;CAAE,EAAE,EACnD,IAAI,EAAE,MAAM,EACZ,OAAO,CAAC,EAAE;IACR,MAAM,CAAC,EAAE,OAAO,CAAC;CAClB,GACA,OAAO,CAAC,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CA8D9B"}
|
|
@@ -4,6 +4,7 @@ exports.formatChangedFilesWithPrettierIfAvailable = formatChangedFilesWithPretti
|
|
|
4
4
|
exports.formatFilesWithPrettierIfAvailable = formatFilesWithPrettierIfAvailable;
|
|
5
5
|
const path = require("path");
|
|
6
6
|
const is_using_prettier_1 = require("../../utils/is-using-prettier");
|
|
7
|
+
const installation_directory_1 = require("../../utils/installation-directory");
|
|
7
8
|
/**
|
|
8
9
|
* Formats all the created or updated files using Prettier
|
|
9
10
|
* @param tree - the file system tree
|
|
@@ -19,7 +20,10 @@ async function formatFilesWithPrettierIfAvailable(files, root, options) {
|
|
|
19
20
|
const results = new Map();
|
|
20
21
|
let prettier;
|
|
21
22
|
try {
|
|
22
|
-
|
|
23
|
+
const prettierPath = require.resolve('prettier', {
|
|
24
|
+
paths: [...(0, installation_directory_1.getNxRequirePaths)(root), __dirname],
|
|
25
|
+
});
|
|
26
|
+
prettier = require(prettierPath);
|
|
23
27
|
/**
|
|
24
28
|
* Even after we discovered prettier in node_modules, we need to be sure that the user is intentionally using prettier
|
|
25
29
|
* before proceeding to format with it.
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"update-nx-wrapper.d.ts","sourceRoot":"","sources":["../../../../../../packages/nx/src/migrations/update-22-1-0/update-nx-wrapper.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,uBAAuB,CAAC;AAGlD,yBAA+B,IAAI,EAAE,IAAI,iBAExC"}
|
package/src/native/index.d.ts
CHANGED
|
@@ -117,6 +117,8 @@ export declare class ProcessMetricsCollector {
|
|
|
117
117
|
getSystemInfo(): SystemInfo
|
|
118
118
|
/** Register the main CLI process for metrics collection */
|
|
119
119
|
registerMainCliProcess(pid: number): void
|
|
120
|
+
/** Register a subprocess of the main CLI for metrics collection */
|
|
121
|
+
registerMainCliSubprocess(pid: number, alias?: string | undefined | null): void
|
|
120
122
|
/** Register the daemon process for metrics collection */
|
|
121
123
|
registerDaemonProcess(pid: number): void
|
|
122
124
|
/**
|
|
@@ -126,8 +128,6 @@ export declare class ProcessMetricsCollector {
|
|
|
126
128
|
registerTaskProcess(taskId: string, pid: number): void
|
|
127
129
|
/** Register a batch with multiple tasks sharing a worker */
|
|
128
130
|
registerBatch(batchId: string, taskIds: Array<string>, pid: number): void
|
|
129
|
-
/** Register a subprocess of the main CLI for metrics collection */
|
|
130
|
-
registerMainCliSubprocess(pid: number): void
|
|
131
131
|
/** Subscribe to push-based metrics notifications from TypeScript */
|
|
132
132
|
subscribe(callback: (err: Error | null, event: MetricsUpdate) => void): void
|
|
133
133
|
}
|
|
@@ -343,6 +343,7 @@ export interface ProcessMetadata {
|
|
|
343
343
|
command: string
|
|
344
344
|
exePath: string
|
|
345
345
|
cwd: string
|
|
346
|
+
alias?: string
|
|
346
347
|
}
|
|
347
348
|
|
|
348
349
|
/** Process metrics (dynamic, changes every collection) */
|
|
@@ -355,6 +356,7 @@ export interface ProcessMetrics {
|
|
|
355
356
|
/** Organized collection of process metrics with timestamp */
|
|
356
357
|
export interface ProcessMetricsSnapshot {
|
|
357
358
|
timestamp: number
|
|
359
|
+
system: SystemMetrics
|
|
358
360
|
mainCli?: ProcessTreeMetrics
|
|
359
361
|
daemon?: ProcessTreeMetrics
|
|
360
362
|
tasks: Record<string, Array<ProcessMetrics>>
|
|
@@ -408,6 +410,15 @@ export interface SystemInfo {
|
|
|
408
410
|
totalMemory: number
|
|
409
411
|
}
|
|
410
412
|
|
|
413
|
+
/** System metrics (dynamic, changes every collection) */
|
|
414
|
+
export interface SystemMetrics {
|
|
415
|
+
cpu: number
|
|
416
|
+
memory: number
|
|
417
|
+
availableMemory: number
|
|
418
|
+
swapUsed: number
|
|
419
|
+
swapTotal: number
|
|
420
|
+
}
|
|
421
|
+
|
|
411
422
|
export interface Target {
|
|
412
423
|
executor?: string
|
|
413
424
|
inputs?: Array<JsInputs>
|
|
Binary file
|
|
@@ -246,7 +246,7 @@ class TargetProjectLocator {
|
|
|
246
246
|
if (normalizedRange.startsWith('file:')) {
|
|
247
247
|
const targetPath = maybeDep?.data.root;
|
|
248
248
|
const normalizedPath = normalizedRange.replace('file:', '');
|
|
249
|
-
const resolvedPath =
|
|
249
|
+
const resolvedPath = node_path_1.posix.join((0, node_path_1.dirname)(packageJsonPath), normalizedPath);
|
|
250
250
|
if (targetPath === resolvedPath) {
|
|
251
251
|
return maybeDep?.name;
|
|
252
252
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get-plugins.d.ts","sourceRoot":"","sources":["../../../../../../packages/nx/src/project-graph/plugins/get-plugins.ts"],"names":[],"mappings":"AAUA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;
|
|
1
|
+
{"version":3,"file":"get-plugins.d.ts","sourceRoot":"","sources":["../../../../../../packages/nx/src/project-graph/plugins/get-plugins.ts"],"names":[],"mappings":"AAUA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AA0BzD,wBAAsB,UAAU,CAC9B,IAAI,SAAgB,GACnB,OAAO,CAAC,cAAc,EAAE,CAAC,CAgC3B;AAaD,wBAAsB,qBAAqB,CAAC,IAAI,SAAgB,6BAyB/D;AAED,wBAAgB,cAAc,SAG7B"}
|
|
@@ -19,6 +19,9 @@ let currentPluginsConfigurationHash;
|
|
|
19
19
|
let loadedPlugins;
|
|
20
20
|
let pendingPluginsPromise;
|
|
21
21
|
let cleanupSpecifiedPlugins;
|
|
22
|
+
const loadingMethod = (plugin, root, index) => (0, enabled_1.isIsolationEnabled)()
|
|
23
|
+
? (0, isolation_1.loadNxPluginInIsolation)(plugin, root, index)
|
|
24
|
+
: (0, in_process_loader_1.loadNxPlugin)(plugin, root);
|
|
22
25
|
async function getPlugins(root = workspace_root_1.workspaceRoot) {
|
|
23
26
|
const pluginsConfiguration = (0, nx_json_1.readNxJson)(root).plugins ?? [];
|
|
24
27
|
const pluginsConfigurationHash = (0, file_hasher_1.hashObject)(pluginsConfiguration);
|
|
@@ -78,9 +81,6 @@ function cleanupPlugins() {
|
|
|
78
81
|
/**
|
|
79
82
|
* Stuff for generic loading
|
|
80
83
|
*/
|
|
81
|
-
const loadingMethod = (0, enabled_1.isIsolationEnabled)()
|
|
82
|
-
? isolation_1.loadNxPluginInIsolation
|
|
83
|
-
: in_process_loader_1.loadNxPlugin;
|
|
84
84
|
async function loadDefaultNxPlugins(root = workspace_root_1.workspaceRoot) {
|
|
85
85
|
performance.mark('loadDefaultNxPlugins:start');
|
|
86
86
|
const plugins = getDefaultPlugins(root);
|
|
@@ -116,7 +116,7 @@ async function loadSpecifiedNxPlugins(plugins, root = workspace_root_1.workspace
|
|
|
116
116
|
await Promise.all(plugins.map(async (plugin, index) => {
|
|
117
117
|
const pluginPath = typeof plugin === 'string' ? plugin : plugin.plugin;
|
|
118
118
|
performance.mark(`Load Nx Plugin: ${pluginPath} - start`);
|
|
119
|
-
const [loadedPluginPromise, cleanup] = await loadingMethod(plugin, root);
|
|
119
|
+
const [loadedPluginPromise, cleanup] = await loadingMethod(plugin, root, index);
|
|
120
120
|
cleanupFunctions.push(cleanup);
|
|
121
121
|
const res = await loadedPluginPromise;
|
|
122
122
|
res.index = index;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import type { PluginConfiguration } from '../../../config/nx-json';
|
|
2
2
|
import type { LoadedNxPlugin } from '../loaded-nx-plugin';
|
|
3
|
-
export declare function loadNxPluginInIsolation(plugin: PluginConfiguration, root?: string): Promise<readonly [Promise<LoadedNxPlugin>, () => void]>;
|
|
3
|
+
export declare function loadNxPluginInIsolation(plugin: PluginConfiguration, root?: string, index?: number): Promise<readonly [Promise<LoadedNxPlugin>, () => void]>;
|
|
4
4
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../../packages/nx/src/project-graph/plugins/isolation/index.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,yBAAyB,CAAC;AACnE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAG1D,wBAAsB,uBAAuB,CAC3C,MAAM,EAAE,mBAAmB,EAC3B,IAAI,SAAgB,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../../packages/nx/src/project-graph/plugins/isolation/index.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,yBAAyB,CAAC;AACnE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAG1D,wBAAsB,uBAAuB,CAC3C,MAAM,EAAE,mBAAmB,EAC3B,IAAI,SAAgB,EACpB,KAAK,CAAC,EAAE,MAAM,GACb,OAAO,CAAC,SAAS,CAAC,OAAO,CAAC,cAAc,CAAC,EAAE,MAAM,IAAI,CAAC,CAAC,CAEzD"}
|
|
@@ -3,6 +3,6 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.loadNxPluginInIsolation = loadNxPluginInIsolation;
|
|
4
4
|
const workspace_root_1 = require("../../../utils/workspace-root");
|
|
5
5
|
const plugin_pool_1 = require("./plugin-pool");
|
|
6
|
-
async function loadNxPluginInIsolation(plugin, root = workspace_root_1.workspaceRoot) {
|
|
7
|
-
return (0, plugin_pool_1.loadRemoteNxPlugin)(plugin, root);
|
|
6
|
+
async function loadNxPluginInIsolation(plugin, root = workspace_root_1.workspaceRoot, index) {
|
|
7
|
+
return (0, plugin_pool_1.loadRemoteNxPlugin)(plugin, root, index);
|
|
8
8
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { PluginConfiguration } from '../../../config/nx-json';
|
|
2
2
|
import type { LoadedNxPlugin } from '../loaded-nx-plugin';
|
|
3
|
-
export declare function loadRemoteNxPlugin(plugin: PluginConfiguration, root: string): Promise<[Promise<LoadedNxPlugin>, () => void]>;
|
|
3
|
+
export declare function loadRemoteNxPlugin(plugin: PluginConfiguration, root: string, index?: number): Promise<[Promise<LoadedNxPlugin>, () => void]>;
|
|
4
4
|
//# sourceMappingURL=plugin-pool.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plugin-pool.d.ts","sourceRoot":"","sources":["../../../../../../../packages/nx/src/project-graph/plugins/isolation/plugin-pool.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,mBAAmB,EAAE,MAAM,yBAAyB,CAAC;AAK9D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AA8C1D,wBAAsB,kBAAkB,CACtC,MAAM,EAAE,mBAAmB,EAC3B,IAAI,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"plugin-pool.d.ts","sourceRoot":"","sources":["../../../../../../../packages/nx/src/project-graph/plugins/isolation/plugin-pool.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,mBAAmB,EAAE,MAAM,yBAAyB,CAAC;AAK9D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AA8C1D,wBAAsB,kBAAkB,CACtC,MAAM,EAAE,mBAAmB,EAC3B,IAAI,EAAE,MAAM,EACZ,KAAK,CAAC,EAAE,MAAM,GACb,OAAO,CAAC,CAAC,OAAO,CAAC,cAAc,CAAC,EAAE,MAAM,IAAI,CAAC,CAAC,CAuFhD"}
|
|
@@ -25,7 +25,7 @@ const MAX_MESSAGE_WAIT = process.env.NX_PLUGIN_NO_TIMEOUTS === 'true'
|
|
|
25
25
|
2147483647
|
|
26
26
|
: 1000 * 60 * MINUTES; // 10 minutes
|
|
27
27
|
const nxPluginWorkerCache = (global['nxPluginWorkerCache'] ??= new Map());
|
|
28
|
-
async function loadRemoteNxPlugin(plugin, root) {
|
|
28
|
+
async function loadRemoteNxPlugin(plugin, root, index) {
|
|
29
29
|
const cacheKey = JSON.stringify({ plugin, root });
|
|
30
30
|
if (nxPluginWorkerCache.has(cacheKey)) {
|
|
31
31
|
return [nxPluginWorkerCache.get(cacheKey), () => { }];
|
|
@@ -37,12 +37,16 @@ async function loadRemoteNxPlugin(plugin, root) {
|
|
|
37
37
|
// This allows metrics collection when the daemon is not used
|
|
38
38
|
if (worker.pid) {
|
|
39
39
|
try {
|
|
40
|
-
const {
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
40
|
+
const { isOnDaemon } = await Promise.resolve().then(() => require('../../../daemon/is-on-daemon'));
|
|
41
|
+
/**
|
|
42
|
+
* We can only register the plugin worker as a subprocess of the main CLI
|
|
43
|
+
* when the daemon is not used. Additionally, we can't explcitly register
|
|
44
|
+
* the plugin worker as a subprocess of the daemon, because when on the
|
|
45
|
+
* daemon, we'd get a different instance of the process metrics service.
|
|
46
|
+
*/
|
|
47
|
+
if (!isOnDaemon()) {
|
|
44
48
|
const { getProcessMetricsService } = await Promise.resolve().then(() => require('../../../tasks-runner/process-metrics-service'));
|
|
45
|
-
getProcessMetricsService().registerMainCliSubprocess(worker.pid);
|
|
49
|
+
getProcessMetricsService().registerMainCliSubprocess(worker.pid, `${name}${index !== undefined ? ` (${index})` : ''}`);
|
|
46
50
|
}
|
|
47
51
|
}
|
|
48
52
|
catch {
|
|
@@ -36,7 +36,7 @@ declare class ProcessMetricsService {
|
|
|
36
36
|
/**
|
|
37
37
|
* Register a subprocess of the main CLI (e.g., plugin worker)
|
|
38
38
|
*/
|
|
39
|
-
registerMainCliSubprocess(pid: number): void;
|
|
39
|
+
registerMainCliSubprocess(pid: number, alias?: string): void;
|
|
40
40
|
/**
|
|
41
41
|
* Get system information (CPU cores and total memory)
|
|
42
42
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"process-metrics-service.d.ts","sourceRoot":"","sources":["../../../../../packages/nx/src/tasks-runner/process-metrics-service.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,eAAe,EACf,cAAc,EACd,kBAAkB,EAClB,sBAAsB,EACtB,oBAAoB,EACpB,aAAa,EACb,UAAU,EACX,MAAM,WAAW,CAAC;AAGnB,YAAY,EACV,eAAe,EACf,cAAc,EACd,kBAAkB,EAClB,sBAAsB,EACtB,oBAAoB,EACpB,aAAa,EACb,UAAU,GACX,CAAC;AAEF,MAAM,MAAM,eAAe,GAAG,CAAC,KAAK,EAAE,aAAa,KAAK,IAAI,CAAC;AAE7D;;;;GAIG;AACH,cAAM,qBAAqB;IACzB,OAAO,CAAC,SAAS,CAAwC;IACzD,OAAO,CAAC,iBAAiB,CAAS;;IAmBlC;;;OAGG;IACH,OAAO,CAAC,uBAAuB;IAe/B;;;OAGG;IACH,SAAS,CAAC,QAAQ,EAAE,eAAe,GAAG,IAAI;IA+B1C;;;OAGG;IACH,mBAAmB,CAAC,MAAM,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,GAAG,IAAI;IAQtD;;OAEG;IACH,aAAa,CAAC,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,EAAE,GAAG,EAAE,MAAM,GAAG,IAAI;IAQpE;;OAEG;IACH,qBAAqB,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI;IAQxC;;OAEG;IACH,yBAAyB,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI;
|
|
1
|
+
{"version":3,"file":"process-metrics-service.d.ts","sourceRoot":"","sources":["../../../../../packages/nx/src/tasks-runner/process-metrics-service.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,eAAe,EACf,cAAc,EACd,kBAAkB,EAClB,sBAAsB,EACtB,oBAAoB,EACpB,aAAa,EACb,UAAU,EACX,MAAM,WAAW,CAAC;AAGnB,YAAY,EACV,eAAe,EACf,cAAc,EACd,kBAAkB,EAClB,sBAAsB,EACtB,oBAAoB,EACpB,aAAa,EACb,UAAU,GACX,CAAC;AAEF,MAAM,MAAM,eAAe,GAAG,CAAC,KAAK,EAAE,aAAa,KAAK,IAAI,CAAC;AAE7D;;;;GAIG;AACH,cAAM,qBAAqB;IACzB,OAAO,CAAC,SAAS,CAAwC;IACzD,OAAO,CAAC,iBAAiB,CAAS;;IAmBlC;;;OAGG;IACH,OAAO,CAAC,uBAAuB;IAe/B;;;OAGG;IACH,SAAS,CAAC,QAAQ,EAAE,eAAe,GAAG,IAAI;IA+B1C;;;OAGG;IACH,mBAAmB,CAAC,MAAM,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,GAAG,IAAI;IAQtD;;OAEG;IACH,aAAa,CAAC,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,EAAE,GAAG,EAAE,MAAM,GAAG,IAAI;IAQpE;;OAEG;IACH,qBAAqB,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI;IAQxC;;OAEG;IACH,yBAAyB,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI;IAQ5D;;OAEG;IACH,aAAa,IAAI,UAAU,GAAG,IAAI;IASlC;;OAEG;IACH,QAAQ,IAAI,IAAI;CAOjB;AAOD;;;GAGG;AACH,wBAAgB,wBAAwB,IAAI,qBAAqB,CAKhE"}
|
|
@@ -113,9 +113,9 @@ class ProcessMetricsService {
|
|
|
113
113
|
/**
|
|
114
114
|
* Register a subprocess of the main CLI (e.g., plugin worker)
|
|
115
115
|
*/
|
|
116
|
-
registerMainCliSubprocess(pid) {
|
|
116
|
+
registerMainCliSubprocess(pid, alias) {
|
|
117
117
|
try {
|
|
118
|
-
this.collector?.registerMainCliSubprocess(pid);
|
|
118
|
+
this.collector?.registerMainCliSubprocess(pid, alias);
|
|
119
119
|
}
|
|
120
120
|
catch {
|
|
121
121
|
// Silent failure - metrics collection is optional
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"update-nxw.d.ts","sourceRoot":"","sources":["../../../../../packages/nx/src/utils/update-nxw.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"update-nxw.d.ts","sourceRoot":"","sources":["../../../../../packages/nx/src/utils/update-nxw.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,oBAAoB,CAAC;AAI/C,wBAAgB,SAAS,CAAC,IAAI,EAAE,IAAI,QAiBnC"}
|
package/src/utils/update-nxw.js
CHANGED
|
@@ -3,9 +3,20 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.updateNxw = updateNxw;
|
|
4
4
|
const add_nx_scripts_1 = require("../command-line/init/implementation/dot-nx/add-nx-scripts");
|
|
5
5
|
const path_1 = require("../utils/path");
|
|
6
|
+
const fs_1 = require("fs");
|
|
6
7
|
function updateNxw(tree) {
|
|
7
8
|
const wrapperPath = (0, path_1.normalizePath)((0, add_nx_scripts_1.nxWrapperPath)());
|
|
8
9
|
if (tree.exists(wrapperPath)) {
|
|
9
10
|
tree.write(wrapperPath, (0, add_nx_scripts_1.getNxWrapperContents)());
|
|
10
11
|
}
|
|
12
|
+
const bashScriptPath = 'nx';
|
|
13
|
+
if (tree.exists(bashScriptPath) && tree.isFile(bashScriptPath)) {
|
|
14
|
+
tree.write(bashScriptPath, (0, add_nx_scripts_1.getShellScriptContents)(), {
|
|
15
|
+
mode: fs_1.constants.S_IXUSR | fs_1.constants.S_IRUSR | fs_1.constants.S_IWUSR,
|
|
16
|
+
});
|
|
17
|
+
}
|
|
18
|
+
const batchScriptPath = 'nx.bat';
|
|
19
|
+
if (tree.exists(batchScriptPath) && tree.isFile(batchScriptPath)) {
|
|
20
|
+
tree.write(batchScriptPath, (0, add_nx_scripts_1.getBatchScriptContents)());
|
|
21
|
+
}
|
|
11
22
|
}
|