nx 22.4.1 → 22.4.3
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 +11 -11
- package/project.json +4 -0
- package/src/command-line/import/import.d.ts.map +1 -1
- package/src/command-line/import/import.js +9 -1
- package/src/command-line/init/init-v2.d.ts +2 -1
- package/src/command-line/init/init-v2.d.ts.map +1 -1
- package/src/command-line/init/init-v2.js +12 -2
- package/src/command-line/nx-cloud/complete-run/stop-all-agents.d.ts.map +1 -1
- package/src/command-line/nx-cloud/complete-run/stop-all-agents.js +6 -0
- package/src/command-line/nx-cloud/fix-ci/fix-ci.d.ts.map +1 -1
- package/src/command-line/nx-cloud/fix-ci/fix-ci.js +6 -0
- package/src/command-line/nx-cloud/login/login.d.ts.map +1 -1
- package/src/command-line/nx-cloud/login/login.js +6 -0
- package/src/command-line/nx-cloud/logout/logout.d.ts.map +1 -1
- package/src/command-line/nx-cloud/logout/logout.js +6 -0
- package/src/command-line/nx-cloud/record/command-object.d.ts.map +1 -1
- package/src/command-line/nx-cloud/record/command-object.js +3 -0
- package/src/command-line/nx-cloud/record/record.d.ts +1 -0
- package/src/command-line/nx-cloud/record/record.d.ts.map +1 -1
- package/src/command-line/nx-cloud/record/record.js +26 -0
- package/src/command-line/nx-cloud/start-agent/start-agent.d.ts.map +1 -1
- package/src/command-line/nx-cloud/start-agent/start-agent.js +6 -0
- package/src/command-line/nx-cloud/start-ci-run/start-ci-run.d.ts.map +1 -1
- package/src/command-line/nx-cloud/start-ci-run/start-ci-run.js +6 -0
- package/src/command-line/nx-cloud/utils.d.ts +1 -0
- package/src/command-line/nx-cloud/utils.d.ts.map +1 -1
- package/src/command-line/nx-cloud/utils.js +11 -0
- package/src/core/graph/main.js +1 -1
- package/src/core/graph/styles.css +1 -1
- package/src/native/index.d.ts +14 -0
- package/src/native/index.js +22 -2
- package/src/native/native-bindings.js +1 -0
- package/src/native/nx.wasm32-wasi.wasm +0 -0
- package/src/project-graph/plugins/get-plugins.d.ts.map +1 -1
- package/src/project-graph/plugins/get-plugins.js +81 -11
- package/src/project-graph/plugins/isolation/plugin-pool.d.ts.map +1 -1
- package/src/project-graph/plugins/isolation/plugin-pool.js +78 -27
- package/src/project-graph/plugins/isolation/plugin-worker.js +33 -17
- package/src/tasks-runner/create-task-graph.d.ts.map +1 -1
- package/src/tasks-runner/create-task-graph.js +5 -1
- package/src/tasks-runner/forked-process-task-runner.js +1 -1
- package/src/tasks-runner/life-cycle.d.ts +7 -1
- package/src/tasks-runner/life-cycle.d.ts.map +1 -1
- package/src/tasks-runner/life-cycle.js +21 -0
- package/src/tasks-runner/life-cycles/tui-summary-life-cycle.d.ts.map +1 -1
- package/src/tasks-runner/life-cycles/tui-summary-life-cycle.js +9 -1
- package/src/tasks-runner/run-command.d.ts.map +1 -1
- package/src/tasks-runner/run-command.js +7 -12
- package/src/tasks-runner/running-tasks/batch-process.d.ts +10 -3
- package/src/tasks-runner/running-tasks/batch-process.d.ts.map +1 -1
- package/src/tasks-runner/running-tasks/batch-process.js +50 -6
- package/src/tasks-runner/task-orchestrator.d.ts +1 -0
- package/src/tasks-runner/task-orchestrator.d.ts.map +1 -1
- package/src/tasks-runner/task-orchestrator.js +77 -23
- package/src/tasks-runner/tasks-schedule.d.ts +2 -0
- package/src/tasks-runner/tasks-schedule.d.ts.map +1 -1
- package/src/tasks-runner/tasks-schedule.js +10 -3
- package/src/utils/params.d.ts.map +1 -1
- package/src/utils/params.js +12 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "nx",
|
|
3
|
-
"version": "22.4.
|
|
3
|
+
"version": "22.4.3",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "The core Nx plugin contains the core functionality of Nx like the project graph, nx commands and task orchestration.",
|
|
6
6
|
"repository": {
|
|
@@ -83,16 +83,16 @@
|
|
|
83
83
|
}
|
|
84
84
|
},
|
|
85
85
|
"optionalDependencies": {
|
|
86
|
-
"@nx/nx-darwin-arm64": "22.4.
|
|
87
|
-
"@nx/nx-darwin-x64": "22.4.
|
|
88
|
-
"@nx/nx-freebsd-x64": "22.4.
|
|
89
|
-
"@nx/nx-linux-arm-gnueabihf": "22.4.
|
|
90
|
-
"@nx/nx-linux-arm64-gnu": "22.4.
|
|
91
|
-
"@nx/nx-linux-arm64-musl": "22.4.
|
|
92
|
-
"@nx/nx-linux-x64-gnu": "22.4.
|
|
93
|
-
"@nx/nx-linux-x64-musl": "22.4.
|
|
94
|
-
"@nx/nx-win32-arm64-msvc": "22.4.
|
|
95
|
-
"@nx/nx-win32-x64-msvc": "22.4.
|
|
86
|
+
"@nx/nx-darwin-arm64": "22.4.3",
|
|
87
|
+
"@nx/nx-darwin-x64": "22.4.3",
|
|
88
|
+
"@nx/nx-freebsd-x64": "22.4.3",
|
|
89
|
+
"@nx/nx-linux-arm-gnueabihf": "22.4.3",
|
|
90
|
+
"@nx/nx-linux-arm64-gnu": "22.4.3",
|
|
91
|
+
"@nx/nx-linux-arm64-musl": "22.4.3",
|
|
92
|
+
"@nx/nx-linux-x64-gnu": "22.4.3",
|
|
93
|
+
"@nx/nx-linux-x64-musl": "22.4.3",
|
|
94
|
+
"@nx/nx-win32-arm64-msvc": "22.4.3",
|
|
95
|
+
"@nx/nx-win32-x64-msvc": "22.4.3"
|
|
96
96
|
},
|
|
97
97
|
"nx-migrations": {
|
|
98
98
|
"migrations": "./migrations.json",
|
package/project.json
CHANGED
|
@@ -56,6 +56,10 @@
|
|
|
56
56
|
"echo": {
|
|
57
57
|
"command": "echo hi"
|
|
58
58
|
},
|
|
59
|
+
"long-task": {
|
|
60
|
+
"command": "node -e \"let i = 0; let interval = setInterval(() => { console.log('Long task running ' + i++ + '---------------------------------------------------------------'); }, 200); setTimeout(() => { clearInterval(interval); console.log('Long task finished'); }, 62_000);\"",
|
|
61
|
+
"dependsOn": ["echo"]
|
|
62
|
+
},
|
|
59
63
|
"build": {
|
|
60
64
|
"dependsOn": [
|
|
61
65
|
"^build-client",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"import.d.ts","sourceRoot":"","sources":["../../../../../../packages/nx/src/command-line/import/import.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"import.d.ts","sourceRoot":"","sources":["../../../../../../packages/nx/src/command-line/import/import.ts"],"names":[],"mappings":"AAwCA,MAAM,WAAW,aAAa;IAC5B;;OAEG;IACH,gBAAgB,EAAE,MAAM,CAAC;IACzB;;OAEG;IACH,GAAG,EAAE,MAAM,CAAC;IACZ;;OAEG;IACH,MAAM,EAAE,MAAM,CAAC;IACf;;OAEG;IACH,WAAW,EAAE,MAAM,CAAC;IACpB;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IAEd,OAAO,EAAE,OAAO,CAAC;IACjB,WAAW,EAAE,OAAO,CAAC;CACtB;AAED,wBAAsB,aAAa,CAAC,OAAO,EAAE,aAAa,iBAmUzD"}
|
|
@@ -12,6 +12,7 @@ const output_1 = require("../../utils/output");
|
|
|
12
12
|
const createSpinner = require('ora');
|
|
13
13
|
const init_v2_1 = require("../init/init-v2");
|
|
14
14
|
const nx_json_1 = require("../../config/nx-json");
|
|
15
|
+
const fileutils_1 = require("../../utils/fileutils");
|
|
15
16
|
const workspace_root_1 = require("../../utils/workspace-root");
|
|
16
17
|
const package_manager_1 = require("../../utils/package-manager");
|
|
17
18
|
const workspace_context_1 = require("../../utils/workspace-context");
|
|
@@ -154,7 +155,14 @@ async function importHandler(options) {
|
|
|
154
155
|
const pmc = (0, package_manager_1.getPackageManagerCommand)();
|
|
155
156
|
const nxJson = (0, nx_json_1.readNxJson)(workspace_root_1.workspaceRoot);
|
|
156
157
|
(0, workspace_context_1.resetWorkspaceContext)();
|
|
157
|
-
|
|
158
|
+
let packageJson;
|
|
159
|
+
try {
|
|
160
|
+
packageJson = (0, fileutils_1.readJsonFile)('package.json');
|
|
161
|
+
}
|
|
162
|
+
catch {
|
|
163
|
+
packageJson = null;
|
|
164
|
+
}
|
|
165
|
+
const { plugins, updatePackageScripts } = await (0, init_v2_1.detectPlugins)(nxJson, packageJson, options.interactive, true);
|
|
158
166
|
if (packageManager !== sourcePackageManager) {
|
|
159
167
|
output_1.output.warn({
|
|
160
168
|
title: `Mismatched package managers`,
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { NxJsonConfiguration } from '../../config/nx-json';
|
|
2
|
+
import { PackageJson } from '../../utils/package-json';
|
|
2
3
|
import { Agent } from '../../ai/utils';
|
|
3
4
|
export interface InitArgs {
|
|
4
5
|
interactive: boolean;
|
|
@@ -10,7 +11,7 @@ export interface InitArgs {
|
|
|
10
11
|
aiAgents?: Agent[];
|
|
11
12
|
}
|
|
12
13
|
export declare function initHandler(options: InitArgs, inner?: boolean): Promise<void>;
|
|
13
|
-
export declare function detectPlugins(nxJson: NxJsonConfiguration, interactive: boolean, includeAngularCli?: boolean): Promise<{
|
|
14
|
+
export declare function detectPlugins(nxJson: NxJsonConfiguration, packageJson: PackageJson | null, interactive: boolean, includeAngularCli?: boolean): Promise<{
|
|
14
15
|
plugins: string[];
|
|
15
16
|
updatePackageScripts: boolean;
|
|
16
17
|
}>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"init-v2.d.ts","sourceRoot":"","sources":["../../../../../../packages/nx/src/command-line/init/init-v2.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,mBAAmB,EAAc,MAAM,sBAAsB,CAAC;
|
|
1
|
+
{"version":3,"file":"init-v2.d.ts","sourceRoot":"","sources":["../../../../../../packages/nx/src/command-line/init/init-v2.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,mBAAmB,EAAc,MAAM,sBAAsB,CAAC;AAIvE,OAAO,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AASvD,OAAO,EAAE,KAAK,EAAE,MAAM,gBAAgB,CAAC;AAkBvC,MAAM,WAAW,QAAQ;IACvB,WAAW,EAAE,OAAO,CAAC;IACrB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,oBAAoB,CAAC,EAAE,OAAO,CAAC;IAC/B,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,QAAQ,CAAC,EAAE,KAAK,EAAE,CAAC;CACpB;AAED,wBAAsB,WAAW,CAC/B,OAAO,EAAE,QAAQ,EACjB,KAAK,UAAQ,GACZ,OAAO,CAAC,IAAI,CAAC,CA2Bf;AAsMD,wBAAsB,aAAa,CACjC,MAAM,EAAE,mBAAmB,EAC3B,WAAW,EAAE,WAAW,GAAG,IAAI,EAC/B,WAAW,EAAE,OAAO,EACpB,iBAAiB,CAAC,EAAE,OAAO,GAC1B,OAAO,CAAC;IACT,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB,oBAAoB,EAAE,OAAO,CAAC;CAC/B,CAAC,CAsKD"}
|
|
@@ -143,7 +143,7 @@ async function initHandlerImpl(options) {
|
|
|
143
143
|
updatePackageScripts = true;
|
|
144
144
|
}
|
|
145
145
|
else {
|
|
146
|
-
const { plugins: _plugins, updatePackageScripts: _updatePackageScripts } = await detectPlugins(nxJson, options.interactive);
|
|
146
|
+
const { plugins: _plugins, updatePackageScripts: _updatePackageScripts } = await detectPlugins(nxJson, packageJson, options.interactive);
|
|
147
147
|
plugins = _plugins;
|
|
148
148
|
updatePackageScripts = _updatePackageScripts;
|
|
149
149
|
}
|
|
@@ -212,12 +212,22 @@ const npmPackageToPluginMap = {
|
|
|
212
212
|
'@rsbuild/core': '@nx/rsbuild',
|
|
213
213
|
'@react-router/dev': '@nx/react',
|
|
214
214
|
};
|
|
215
|
-
async function detectPlugins(nxJson, interactive, includeAngularCli) {
|
|
215
|
+
async function detectPlugins(nxJson, packageJson, interactive, includeAngularCli) {
|
|
216
216
|
let files = ['package.json'].concat((0, workspace_context_1.globWithWorkspaceContextSync)(process.cwd(), ['**/*/package.json']));
|
|
217
217
|
const currentPlugins = new Set((nxJson.plugins ?? []).map((p) => {
|
|
218
218
|
const plugin = typeof p === 'string' ? p : p.plugin;
|
|
219
219
|
return (0, get_package_name_from_import_path_1.getPackageNameFromImportPath)(plugin);
|
|
220
220
|
}));
|
|
221
|
+
// Also treat already-installed @nx/* and @nrwl/* packages as current plugins
|
|
222
|
+
const rootDeps = {
|
|
223
|
+
...packageJson?.dependencies,
|
|
224
|
+
...packageJson?.devDependencies,
|
|
225
|
+
};
|
|
226
|
+
for (const dep of Object.keys(rootDeps)) {
|
|
227
|
+
if (dep.startsWith('@nx/') || dep.startsWith('@nrwl/')) {
|
|
228
|
+
currentPlugins.add((0, get_package_name_from_import_path_1.getPackageNameFromImportPath)(dep));
|
|
229
|
+
}
|
|
230
|
+
}
|
|
221
231
|
const detectedPlugins = new Set();
|
|
222
232
|
for (const file of files) {
|
|
223
233
|
if (!(0, fs_1.existsSync)(file))
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"stop-all-agents.d.ts","sourceRoot":"","sources":["../../../../../../../packages/nx/src/command-line/nx-cloud/complete-run/stop-all-agents.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"stop-all-agents.d.ts","sourceRoot":"","sources":["../../../../../../../packages/nx/src/command-line/nx-cloud/complete-run/stop-all-agents.ts"],"names":[],"mappings":"AAIA,MAAM,WAAW,iBAAiB;IAChC,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB;AAED,wBAAgB,oBAAoB,CAAC,IAAI,EAAE,iBAAiB,GAAG,OAAO,CAAC,MAAM,CAAC,CAM7E"}
|
|
@@ -1,7 +1,13 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.stopAllAgentsHandler = stopAllAgentsHandler;
|
|
4
|
+
const nx_json_1 = require("../../../config/nx-json");
|
|
5
|
+
const nx_cloud_utils_1 = require("../../../utils/nx-cloud-utils");
|
|
4
6
|
const utils_1 = require("../utils");
|
|
5
7
|
function stopAllAgentsHandler(args) {
|
|
8
|
+
if (!(0, nx_cloud_utils_1.isNxCloudUsed)((0, nx_json_1.readNxJson)())) {
|
|
9
|
+
(0, utils_1.warnNotConnectedToCloud)();
|
|
10
|
+
return Promise.resolve(0);
|
|
11
|
+
}
|
|
6
12
|
return (0, utils_1.executeNxCloudCommand)('stop-all-agents', args.verbose);
|
|
7
13
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fix-ci.d.ts","sourceRoot":"","sources":["../../../../../../../packages/nx/src/command-line/nx-cloud/fix-ci/fix-ci.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"fix-ci.d.ts","sourceRoot":"","sources":["../../../../../../../packages/nx/src/command-line/nx-cloud/fix-ci/fix-ci.ts"],"names":[],"mappings":"AAIA,MAAM,WAAW,SAAS;IACxB,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB;AAED,wBAAgB,YAAY,CAAC,IAAI,EAAE,SAAS,GAAG,OAAO,CAAC,MAAM,CAAC,CAM7D"}
|
|
@@ -1,7 +1,13 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.fixCiHandler = fixCiHandler;
|
|
4
|
+
const nx_json_1 = require("../../../config/nx-json");
|
|
5
|
+
const nx_cloud_utils_1 = require("../../../utils/nx-cloud-utils");
|
|
4
6
|
const utils_1 = require("../utils");
|
|
5
7
|
function fixCiHandler(args) {
|
|
8
|
+
if (!(0, nx_cloud_utils_1.isNxCloudUsed)((0, nx_json_1.readNxJson)())) {
|
|
9
|
+
(0, utils_1.warnNotConnectedToCloud)();
|
|
10
|
+
return Promise.resolve(0);
|
|
11
|
+
}
|
|
6
12
|
return (0, utils_1.executeNxCloudCommand)('fix-ci', args.verbose);
|
|
7
13
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"login.d.ts","sourceRoot":"","sources":["../../../../../../../packages/nx/src/command-line/nx-cloud/login/login.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"login.d.ts","sourceRoot":"","sources":["../../../../../../../packages/nx/src/command-line/nx-cloud/login/login.ts"],"names":[],"mappings":"AAIA,MAAM,WAAW,SAAS;IACxB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB;AAED,wBAAgB,YAAY,CAAC,IAAI,EAAE,SAAS,GAAG,OAAO,CAAC,MAAM,CAAC,CAW7D"}
|
|
@@ -1,8 +1,14 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.loginHandler = loginHandler;
|
|
4
|
+
const nx_json_1 = require("../../../config/nx-json");
|
|
5
|
+
const nx_cloud_utils_1 = require("../../../utils/nx-cloud-utils");
|
|
4
6
|
const utils_1 = require("../utils");
|
|
5
7
|
function loginHandler(args) {
|
|
8
|
+
if (!(0, nx_cloud_utils_1.isNxCloudUsed)((0, nx_json_1.readNxJson)())) {
|
|
9
|
+
(0, utils_1.warnNotConnectedToCloud)();
|
|
10
|
+
return Promise.resolve(0);
|
|
11
|
+
}
|
|
6
12
|
if (args.nxCloudUrl) {
|
|
7
13
|
process.env.NX_CLOUD_API = args.nxCloudUrl;
|
|
8
14
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"logout.d.ts","sourceRoot":"","sources":["../../../../../../../packages/nx/src/command-line/nx-cloud/logout/logout.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"logout.d.ts","sourceRoot":"","sources":["../../../../../../../packages/nx/src/command-line/nx-cloud/logout/logout.ts"],"names":[],"mappings":"AAIA,MAAM,WAAW,UAAU;IACzB,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB;AAED,wBAAgB,aAAa,CAAC,IAAI,EAAE,UAAU,GAAG,OAAO,CAAC,MAAM,CAAC,CAM/D"}
|
|
@@ -1,7 +1,13 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.logoutHandler = logoutHandler;
|
|
4
|
+
const nx_json_1 = require("../../../config/nx-json");
|
|
5
|
+
const nx_cloud_utils_1 = require("../../../utils/nx-cloud-utils");
|
|
4
6
|
const utils_1 = require("../utils");
|
|
5
7
|
function logoutHandler(args) {
|
|
8
|
+
if (!(0, nx_cloud_utils_1.isNxCloudUsed)((0, nx_json_1.readNxJson)())) {
|
|
9
|
+
(0, utils_1.warnNotConnectedToCloud)();
|
|
10
|
+
return Promise.resolve(0);
|
|
11
|
+
}
|
|
6
12
|
return (0, utils_1.executeNxCloudCommand)('logout', args.verbose);
|
|
7
13
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"command-object.d.ts","sourceRoot":"","sources":["../../../../../../../packages/nx/src/command-line/nx-cloud/record/command-object.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAGtC,eAAO,MAAM,kBAAkB,EAAE,
|
|
1
|
+
{"version":3,"file":"command-object.d.ts","sourceRoot":"","sources":["../../../../../../../packages/nx/src/command-line/nx-cloud/record/command-object.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAGtC,eAAO,MAAM,kBAAkB,EAAE,aAehC,CAAC"}
|
|
@@ -6,6 +6,9 @@ exports.yargsRecordCommand = {
|
|
|
6
6
|
command: 'record [options]',
|
|
7
7
|
describe: 'Records a command execution for distributed task execution. This command is an alias for [`nx-cloud record`](/ci/reference/nx-cloud-cli#npx-nxcloud-record).',
|
|
8
8
|
builder: (yargs) => (0, shared_options_1.withVerbose)(yargs)
|
|
9
|
+
.parserConfiguration({
|
|
10
|
+
'populate--': true,
|
|
11
|
+
})
|
|
9
12
|
.help(false)
|
|
10
13
|
.showHelpOnFail(false)
|
|
11
14
|
.option('help', { describe: 'Show help.', type: 'boolean' }),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"record.d.ts","sourceRoot":"","sources":["../../../../../../../packages/nx/src/command-line/nx-cloud/record/record.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"record.d.ts","sourceRoot":"","sources":["../../../../../../../packages/nx/src/command-line/nx-cloud/record/record.ts"],"names":[],"mappings":"AAMA,MAAM,WAAW,UAAU;IACzB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,IAAI,CAAC,EAAE,MAAM,EAAE,CAAC;CACjB;AAED,wBAAgB,aAAa,CAAC,IAAI,EAAE,UAAU,GAAG,OAAO,CAAC,MAAM,CAAC,CAwB/D"}
|
|
@@ -1,7 +1,33 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.recordHandler = recordHandler;
|
|
4
|
+
const child_process_1 = require("child_process");
|
|
5
|
+
const nx_json_1 = require("../../../config/nx-json");
|
|
6
|
+
const output_1 = require("../../../utils/output");
|
|
7
|
+
const nx_cloud_utils_1 = require("../../../utils/nx-cloud-utils");
|
|
4
8
|
const utils_1 = require("../utils");
|
|
5
9
|
function recordHandler(args) {
|
|
10
|
+
if (!(0, nx_cloud_utils_1.isNxCloudUsed)((0, nx_json_1.readNxJson)())) {
|
|
11
|
+
let exitCode = 0;
|
|
12
|
+
const commandArgs = args['--'];
|
|
13
|
+
if (commandArgs && commandArgs.length > 0) {
|
|
14
|
+
const [cmd, ...cmdArgs] = commandArgs;
|
|
15
|
+
const result = (0, child_process_1.spawnSync)(cmd, cmdArgs, {
|
|
16
|
+
stdio: 'inherit',
|
|
17
|
+
shell: true,
|
|
18
|
+
encoding: 'utf-8',
|
|
19
|
+
maxBuffer: 10 * 1024 * 1024, // 10MB buffer
|
|
20
|
+
windowsHide: true,
|
|
21
|
+
});
|
|
22
|
+
exitCode = result.status ?? 1;
|
|
23
|
+
}
|
|
24
|
+
output_1.output.warn({
|
|
25
|
+
title: 'Nx Cloud is not enabled',
|
|
26
|
+
bodyLines: [
|
|
27
|
+
'To record command using Nx Cloud, connect your workspace with `nx connect`.',
|
|
28
|
+
],
|
|
29
|
+
});
|
|
30
|
+
return Promise.resolve(exitCode);
|
|
31
|
+
}
|
|
6
32
|
return (0, utils_1.executeNxCloudCommand)('record', args.verbose);
|
|
7
33
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"start-agent.d.ts","sourceRoot":"","sources":["../../../../../../../packages/nx/src/command-line/nx-cloud/start-agent/start-agent.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"start-agent.d.ts","sourceRoot":"","sources":["../../../../../../../packages/nx/src/command-line/nx-cloud/start-agent/start-agent.ts"],"names":[],"mappings":"AAIA,MAAM,WAAW,cAAc;IAC7B,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB;AAED,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,cAAc,GAAG,OAAO,CAAC,MAAM,CAAC,CAMvE"}
|
|
@@ -1,7 +1,13 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.startAgentHandler = startAgentHandler;
|
|
4
|
+
const nx_json_1 = require("../../../config/nx-json");
|
|
5
|
+
const nx_cloud_utils_1 = require("../../../utils/nx-cloud-utils");
|
|
4
6
|
const utils_1 = require("../utils");
|
|
5
7
|
function startAgentHandler(args) {
|
|
8
|
+
if (!(0, nx_cloud_utils_1.isNxCloudUsed)((0, nx_json_1.readNxJson)())) {
|
|
9
|
+
(0, utils_1.warnNotConnectedToCloud)();
|
|
10
|
+
return Promise.resolve(0);
|
|
11
|
+
}
|
|
6
12
|
return (0, utils_1.executeNxCloudCommand)('start-agent', args.verbose);
|
|
7
13
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"start-ci-run.d.ts","sourceRoot":"","sources":["../../../../../../../packages/nx/src/command-line/nx-cloud/start-ci-run/start-ci-run.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"start-ci-run.d.ts","sourceRoot":"","sources":["../../../../../../../packages/nx/src/command-line/nx-cloud/start-ci-run/start-ci-run.ts"],"names":[],"mappings":"AAIA,MAAM,WAAW,cAAc;IAC7B,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB;AAED,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,cAAc,GAAG,OAAO,CAAC,MAAM,CAAC,CAMvE"}
|
|
@@ -1,7 +1,13 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.startCiRunHandler = startCiRunHandler;
|
|
4
|
+
const nx_json_1 = require("../../../config/nx-json");
|
|
5
|
+
const nx_cloud_utils_1 = require("../../../utils/nx-cloud-utils");
|
|
4
6
|
const utils_1 = require("../utils");
|
|
5
7
|
function startCiRunHandler(args) {
|
|
8
|
+
if (!(0, nx_cloud_utils_1.isNxCloudUsed)((0, nx_json_1.readNxJson)())) {
|
|
9
|
+
(0, utils_1.warnNotConnectedToCloud)();
|
|
10
|
+
return Promise.resolve(0);
|
|
11
|
+
}
|
|
6
12
|
return (0, utils_1.executeNxCloudCommand)('start-ci-run', args.verbose);
|
|
7
13
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../../../../packages/nx/src/command-line/nx-cloud/utils.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../../../../packages/nx/src/command-line/nx-cloud/utils.ts"],"names":[],"mappings":"AAMA,wBAAgB,uBAAuB,IAAI,IAAI,CAQ9C;AAED,wBAAsB,qBAAqB,CACzC,WAAW,EAAE,MAAM,EACnB,OAAO,CAAC,EAAE,OAAO,GAChB,OAAO,CAAC,MAAM,CAAC,CAUjB"}
|
|
@@ -1,10 +1,21 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.warnNotConnectedToCloud = warnNotConnectedToCloud;
|
|
3
4
|
exports.executeNxCloudCommand = executeNxCloudCommand;
|
|
4
5
|
const update_manager_1 = require("../../nx-cloud/update-manager");
|
|
5
6
|
const get_cloud_options_1 = require("../../nx-cloud/utilities/get-cloud-options");
|
|
6
7
|
const handle_errors_1 = require("../../utils/handle-errors");
|
|
7
8
|
const resolution_helpers_1 = require("../../nx-cloud/resolution-helpers");
|
|
9
|
+
const output_1 = require("../../utils/output");
|
|
10
|
+
function warnNotConnectedToCloud() {
|
|
11
|
+
output_1.output.warn({
|
|
12
|
+
title: 'Nx Cloud is not enabled',
|
|
13
|
+
bodyLines: [
|
|
14
|
+
'This command requires a connection to the full Nx platform.',
|
|
15
|
+
'Run `nx connect` to connect your workspace.',
|
|
16
|
+
],
|
|
17
|
+
});
|
|
18
|
+
}
|
|
8
19
|
async function executeNxCloudCommand(commandName, verbose) {
|
|
9
20
|
return (0, handle_errors_1.handleErrors)(verbose, async () => {
|
|
10
21
|
const nxCloudClient = (await (0, update_manager_1.verifyOrUpdateNxCloudClient)((0, get_cloud_options_1.getCloudOptions)()))
|