nx 19.7.0-beta.4 → 19.7.0-beta.5
Sign up to get free protection for your applications and to get access to all the features.
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "nx",
|
3
|
-
"version": "19.7.0-beta.
|
3
|
+
"version": "19.7.0-beta.5",
|
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": {
|
@@ -71,7 +71,7 @@
|
|
71
71
|
"yargs-parser": "21.1.1",
|
72
72
|
"node-machine-id": "1.1.12",
|
73
73
|
"ora": "5.3.0",
|
74
|
-
"@nrwl/tao": "19.7.0-beta.
|
74
|
+
"@nrwl/tao": "19.7.0-beta.5"
|
75
75
|
},
|
76
76
|
"peerDependencies": {
|
77
77
|
"@swc-node/register": "^1.8.0",
|
@@ -86,16 +86,16 @@
|
|
86
86
|
}
|
87
87
|
},
|
88
88
|
"optionalDependencies": {
|
89
|
-
"@nx/nx-darwin-x64": "19.7.0-beta.
|
90
|
-
"@nx/nx-darwin-arm64": "19.7.0-beta.
|
91
|
-
"@nx/nx-linux-x64-gnu": "19.7.0-beta.
|
92
|
-
"@nx/nx-linux-x64-musl": "19.7.0-beta.
|
93
|
-
"@nx/nx-win32-x64-msvc": "19.7.0-beta.
|
94
|
-
"@nx/nx-linux-arm64-gnu": "19.7.0-beta.
|
95
|
-
"@nx/nx-linux-arm64-musl": "19.7.0-beta.
|
96
|
-
"@nx/nx-linux-arm-gnueabihf": "19.7.0-beta.
|
97
|
-
"@nx/nx-win32-arm64-msvc": "19.7.0-beta.
|
98
|
-
"@nx/nx-freebsd-x64": "19.7.0-beta.
|
89
|
+
"@nx/nx-darwin-x64": "19.7.0-beta.5",
|
90
|
+
"@nx/nx-darwin-arm64": "19.7.0-beta.5",
|
91
|
+
"@nx/nx-linux-x64-gnu": "19.7.0-beta.5",
|
92
|
+
"@nx/nx-linux-x64-musl": "19.7.0-beta.5",
|
93
|
+
"@nx/nx-win32-x64-msvc": "19.7.0-beta.5",
|
94
|
+
"@nx/nx-linux-arm64-gnu": "19.7.0-beta.5",
|
95
|
+
"@nx/nx-linux-arm64-musl": "19.7.0-beta.5",
|
96
|
+
"@nx/nx-linux-arm-gnueabihf": "19.7.0-beta.5",
|
97
|
+
"@nx/nx-win32-arm64-msvc": "19.7.0-beta.5",
|
98
|
+
"@nx/nx-freebsd-x64": "19.7.0-beta.5"
|
99
99
|
},
|
100
100
|
"nx-migrations": {
|
101
101
|
"migrations": "./migrations.json",
|
@@ -4,7 +4,7 @@ exports.yargsLoginCommand = void 0;
|
|
4
4
|
const shared_options_1 = require("../../command-line/yargs-utils/shared-options");
|
5
5
|
exports.yargsLoginCommand = {
|
6
6
|
command: 'login [nxCloudUrl]',
|
7
|
-
describe:
|
7
|
+
describe: 'Login to Nx Cloud. This command is an alias for [`nx-cloud login`](/ci/reference/nx-cloud-cli#npx-nxcloud-login).',
|
8
8
|
builder: (yargs) => (0, shared_options_1.withVerbose)(yargs.positional('nxCloudUrl', {
|
9
9
|
describe: 'The Nx Cloud URL of the instance you are trying to connect to. If no positional argument is provided, this command will connect to https://cloud.nx.app.',
|
10
10
|
type: 'string',
|
@@ -4,7 +4,7 @@ exports.yargsLogoutCommand = void 0;
|
|
4
4
|
const shared_options_1 = require("../../command-line/yargs-utils/shared-options");
|
5
5
|
exports.yargsLogoutCommand = {
|
6
6
|
command: 'logout',
|
7
|
-
describe:
|
7
|
+
describe: 'Logout from Nx Cloud. This command is an alias for [`nx-cloud logout`](/ci/reference/nx-cloud-cli#npx-nxcloud-logout).',
|
8
8
|
builder: (yargs) => (0, shared_options_1.withVerbose)(yargs),
|
9
9
|
handler: async (args) => {
|
10
10
|
process.exit(await (await Promise.resolve().then(() => require('./logout'))).logoutHandler(args));
|
Binary file
|
@@ -42,18 +42,6 @@ function getNxInitDate() {
|
|
42
42
|
return null;
|
43
43
|
}
|
44
44
|
}
|
45
|
-
async function createNxCloudWorkspaceV1(workspaceName, installationSource, nxInitDate) {
|
46
|
-
const apiUrl = (0, get_cloud_options_1.getCloudUrl)();
|
47
|
-
const response = await require('axios').post(`${apiUrl}/nx-cloud/create-org-and-workspace`, {
|
48
|
-
workspaceName,
|
49
|
-
installationSource,
|
50
|
-
nxInitDate,
|
51
|
-
});
|
52
|
-
if (response.data.message) {
|
53
|
-
throw new Error(response.data.message);
|
54
|
-
}
|
55
|
-
return response.data;
|
56
|
-
}
|
57
45
|
async function createNxCloudWorkspaceV2(workspaceName, installationSource, nxInitDate) {
|
58
46
|
const apiUrl = (0, get_cloud_options_1.getCloudUrl)();
|
59
47
|
const response = await require('axios').post(`${apiUrl}/nx-cloud/v2/create-org-and-workspace`, {
|
@@ -81,19 +69,6 @@ async function printSuccessMessage(token, installationSource, usesGithub) {
|
|
81
69
|
});
|
82
70
|
return connectCloudUrl;
|
83
71
|
}
|
84
|
-
function addNxCloudOptionsToNxJson(tree, token, directory = '') {
|
85
|
-
const nxJsonPath = (0, path_1.join)(directory, 'nx.json');
|
86
|
-
if (tree.exists(nxJsonPath)) {
|
87
|
-
(0, json_1.updateJson)(tree, (0, path_1.join)(directory, 'nx.json'), (nxJson) => {
|
88
|
-
const overrideUrl = process.env.NX_CLOUD_API || process.env.NRWL_API;
|
89
|
-
if (overrideUrl) {
|
90
|
-
nxJson.nxCloudUrl = overrideUrl;
|
91
|
-
}
|
92
|
-
nxJson.nxCloudAccessToken = token;
|
93
|
-
return nxJson;
|
94
|
-
});
|
95
|
-
}
|
96
|
-
}
|
97
72
|
function addNxCloudIdToNxJson(tree, nxCloudId, directory = '') {
|
98
73
|
const nxJsonPath = (0, path_1.join)(directory, 'nx.json');
|
99
74
|
if (tree.exists(nxJsonPath)) {
|
@@ -124,22 +99,12 @@ async function connectToNxCloud(tree, schema, nxJson = (0, nx_json_1.readNxJson)
|
|
124
99
|
isGitHubDetected &&
|
125
100
|
schema.installationSource === 'nx-connect')
|
126
101
|
return null;
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
return responseFromCreateNxCloudWorkspaceV2.nxCloudId;
|
134
|
-
}
|
135
|
-
else {
|
136
|
-
responseFromCreateNxCloudWorkspaceV1 = await createNxCloudWorkspaceV1(getRootPackageName(tree), schema.installationSource, getNxInitDate());
|
137
|
-
addNxCloudOptionsToNxJson(tree, responseFromCreateNxCloudWorkspaceV1?.token, schema.directory);
|
138
|
-
await (0, format_changed_files_with_prettier_if_available_1.formatChangedFilesWithPrettierIfAvailable)(tree, {
|
139
|
-
silent: schema.hideFormatLogs,
|
140
|
-
});
|
141
|
-
return responseFromCreateNxCloudWorkspaceV1.token;
|
142
|
-
}
|
102
|
+
responseFromCreateNxCloudWorkspaceV2 = await createNxCloudWorkspaceV2(getRootPackageName(tree), schema.installationSource, getNxInitDate());
|
103
|
+
addNxCloudIdToNxJson(tree, responseFromCreateNxCloudWorkspaceV2?.nxCloudId, schema.directory);
|
104
|
+
await (0, format_changed_files_with_prettier_if_available_1.formatChangedFilesWithPrettierIfAvailable)(tree, {
|
105
|
+
silent: schema.hideFormatLogs,
|
106
|
+
});
|
107
|
+
return responseFromCreateNxCloudWorkspaceV2.nxCloudId;
|
143
108
|
}
|
144
109
|
async function connectToNxCloudGenerator(tree, options) {
|
145
110
|
await connectToNxCloud(tree, options);
|