Comparing version 19.6.0-canary.20240801-2111841 to 19.6.0-canary.20240803-bd7a2c9
{ | ||
"name": "nx", | ||
"version": "19.6.0-canary.20240801-2111841", | ||
"version": "19.6.0-canary.20240803-bd7a2c9", | ||
"private": false, | ||
@@ -74,3 +74,3 @@ "description": "The core Nx plugin contains the core functionality of Nx like the project graph, nx commands and task orchestration.", | ||
"ora": "5.3.0", | ||
"@nrwl/tao": "19.6.0-canary.20240801-2111841" | ||
"@nrwl/tao": "19.6.0-canary.20240803-bd7a2c9" | ||
}, | ||
@@ -90,12 +90,12 @@ "peerDependencies": { | ||
"optionalDependencies": { | ||
"@nx/nx-darwin-x64": "19.6.0-canary.20240801-2111841", | ||
"@nx/nx-darwin-arm64": "19.6.0-canary.20240801-2111841", | ||
"@nx/nx-linux-x64-gnu": "19.6.0-canary.20240801-2111841", | ||
"@nx/nx-linux-x64-musl": "19.6.0-canary.20240801-2111841", | ||
"@nx/nx-win32-x64-msvc": "19.6.0-canary.20240801-2111841", | ||
"@nx/nx-linux-arm64-gnu": "19.6.0-canary.20240801-2111841", | ||
"@nx/nx-linux-arm64-musl": "19.6.0-canary.20240801-2111841", | ||
"@nx/nx-linux-arm-gnueabihf": "19.6.0-canary.20240801-2111841", | ||
"@nx/nx-win32-arm64-msvc": "19.6.0-canary.20240801-2111841", | ||
"@nx/nx-freebsd-x64": "19.6.0-canary.20240801-2111841" | ||
"@nx/nx-darwin-x64": "19.6.0-canary.20240803-bd7a2c9", | ||
"@nx/nx-darwin-arm64": "19.6.0-canary.20240803-bd7a2c9", | ||
"@nx/nx-linux-x64-gnu": "19.6.0-canary.20240803-bd7a2c9", | ||
"@nx/nx-linux-x64-musl": "19.6.0-canary.20240803-bd7a2c9", | ||
"@nx/nx-win32-x64-msvc": "19.6.0-canary.20240803-bd7a2c9", | ||
"@nx/nx-linux-arm64-gnu": "19.6.0-canary.20240803-bd7a2c9", | ||
"@nx/nx-linux-arm64-musl": "19.6.0-canary.20240803-bd7a2c9", | ||
"@nx/nx-linux-arm-gnueabihf": "19.6.0-canary.20240803-bd7a2c9", | ||
"@nx/nx-win32-arm64-msvc": "19.6.0-canary.20240803-bd7a2c9", | ||
"@nx/nx-freebsd-x64": "19.6.0-canary.20240803-bd7a2c9" | ||
}, | ||
@@ -102,0 +102,0 @@ "nx-migrations": { |
export declare const allowedProjectExtensions: readonly ["tags", "implicitDependencies", "configFilePath", "$schema", "generators", "namedInputs", "name", "files", "root", "sourceRoot", "projectType", "release", "includedScripts", "metadata"]; | ||
export declare const allowedWorkspaceExtensions: readonly ["implicitDependencies", "affected", "defaultBase", "tasksRunnerOptions", "workspaceLayout", "plugins", "targetDefaults", "files", "generators", "namedInputs", "extends", "cli", "pluginsConfig", "defaultProject", "installation", "release", "nxCloudAccessToken", "nxCloudUrl", "nxCloudEncryptionKey", "parallel", "cacheDirectory", "useDaemonProcess", "useInferencePlugins"]; | ||
export declare const allowedWorkspaceExtensions: readonly ["implicitDependencies", "affected", "defaultBase", "tasksRunnerOptions", "workspaceLayout", "plugins", "targetDefaults", "files", "generators", "namedInputs", "extends", "cli", "pluginsConfig", "defaultProject", "installation", "release", "nxCloudAccessToken", "nxCloudUrl", "nxCloudEncryptionKey", "parallel", "cacheDirectory", "useDaemonProcess", "useInferencePlugins", "neverConnectToCloud"]; |
@@ -63,2 +63,3 @@ "use strict"; | ||
'useInferencePlugins', | ||
'neverConnectToCloud', | ||
]; | ||
@@ -65,0 +66,0 @@ if (!patched) { |
@@ -7,5 +7,5 @@ import { ConnectToNxCloudOptions } from '../../nx-cloud/generators/connect-to-nx-cloud/connect-to-nx-cloud'; | ||
export declare function connectToNxCloudIfExplicitlyAsked(opts: NxArgs): Promise<void>; | ||
export declare function connectWorkspaceToCloud(options: ConnectToNxCloudOptions): Promise<string>; | ||
export declare function connectWorkspaceToCloud(options: ConnectToNxCloudOptions, directory?: string): Promise<string>; | ||
export declare function connectToNxCloudCommand(command?: string): Promise<boolean>; | ||
export declare function connectExistingRepoToNxCloudPrompt(command?: string, key?: MessageKey): Promise<boolean>; | ||
export declare function connectToNxCloudWithPrompt(command: string): Promise<void>; |
@@ -49,7 +49,7 @@ "use strict"; | ||
} | ||
async function connectWorkspaceToCloud(options) { | ||
const tree = new tree_1.FsTree(workspace_root_1.workspaceRoot, false, 'connect-to-nx-cloud'); | ||
async function connectWorkspaceToCloud(options, directory = workspace_root_1.workspaceRoot) { | ||
const tree = new tree_1.FsTree(directory, false, 'connect-to-nx-cloud'); | ||
const accessToken = await (0, connect_to_nx_cloud_1.connectToNxCloud)(tree, options); | ||
tree.lock(); | ||
(0, tree_1.flushChanges)(workspace_root_1.workspaceRoot, tree.listChanges()); | ||
(0, tree_1.flushChanges)(directory, tree.listChanges()); | ||
return accessToken; | ||
@@ -56,0 +56,0 @@ } |
@@ -407,2 +407,6 @@ import type { ChangelogRenderOptions } from '../../release/changelog-renderer'; | ||
useInferencePlugins?: boolean; | ||
/** | ||
* Set this to false to disable connection to Nx Cloud | ||
*/ | ||
neverConnectToCloud?: boolean; | ||
} | ||
@@ -409,0 +413,0 @@ export type PluginConfiguration = string | ExpandedPluginConfiguration; |
@@ -11,3 +11,3 @@ /** | ||
export { retrieveProjectConfigurationsWithAngularProjects } from './project-graph/utils/retrieve-workspace-files'; | ||
export { mergeTargetConfigurations } from './project-graph/utils/project-configuration-utils'; | ||
export { mergeTargetConfigurations, findMatchingConfigFiles, } from './project-graph/utils/project-configuration-utils'; | ||
export { readProjectConfigurationsFromRootMap } from './project-graph/utils/project-configuration-utils'; | ||
@@ -14,0 +14,0 @@ export { splitTarget } from './utils/split-target'; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.interpolate = exports.registerTsProject = exports.LoadedNxPlugin = exports.retrieveProjectConfigurations = exports.findProjectForPath = exports.createProjectRootMappingsFromProjectConfigurations = exports.hashWithWorkspaceContext = exports.hashObject = exports.splitByColons = exports.readModulePackageJson = exports.stripIndent = exports.sortObjectByKeys = exports.combineOptionsForExecutor = exports.splitTarget = exports.readProjectConfigurationsFromRootMap = exports.mergeTargetConfigurations = exports.retrieveProjectConfigurationsWithAngularProjects = exports.calculateDefaultProjectName = exports.readNxJsonFromDisk = exports.getExecutorInformation = exports.createTempNpmDirectory = void 0; | ||
exports.interpolate = exports.registerTsProject = exports.LoadedNxPlugin = exports.retrieveProjectConfigurations = exports.findProjectForPath = exports.createProjectRootMappingsFromProjectConfigurations = exports.hashWithWorkspaceContext = exports.hashObject = exports.splitByColons = exports.readModulePackageJson = exports.stripIndent = exports.sortObjectByKeys = exports.combineOptionsForExecutor = exports.splitTarget = exports.readProjectConfigurationsFromRootMap = exports.findMatchingConfigFiles = exports.mergeTargetConfigurations = exports.retrieveProjectConfigurationsWithAngularProjects = exports.calculateDefaultProjectName = exports.readNxJsonFromDisk = exports.getExecutorInformation = exports.createTempNpmDirectory = void 0; | ||
const tslib_1 = require("tslib"); | ||
@@ -22,2 +22,3 @@ /** | ||
Object.defineProperty(exports, "mergeTargetConfigurations", { enumerable: true, get: function () { return project_configuration_utils_1.mergeTargetConfigurations; } }); | ||
Object.defineProperty(exports, "findMatchingConfigFiles", { enumerable: true, get: function () { return project_configuration_utils_1.findMatchingConfigFiles; } }); | ||
var project_configuration_utils_2 = require("./project-graph/utils/project-configuration-utils"); | ||
@@ -24,0 +25,0 @@ Object.defineProperty(exports, "readProjectConfigurationsFromRootMap", { enumerable: true, get: function () { return project_configuration_utils_2.readProjectConfigurationsFromRootMap; } }); |
import { Tree } from '../../../generators/tree'; | ||
import { NxJsonConfiguration } from '../../../config/nx-json'; | ||
export declare function printSuccessMessage(token: string | undefined, installationSource: string, usesGithub: boolean): Promise<string>; | ||
@@ -10,3 +11,3 @@ export interface ConnectToNxCloudOptions { | ||
} | ||
export declare function connectToNxCloud(tree: Tree, schema: ConnectToNxCloudOptions): Promise<string>; | ||
export declare function connectToNxCloud(tree: Tree, schema: ConnectToNxCloudOptions, nxJson?: NxJsonConfiguration<string[] | "*">): Promise<string>; | ||
export default connectToNxCloud; |
@@ -12,2 +12,3 @@ "use strict"; | ||
const get_cloud_options_1 = require("../../utilities/get-cloud-options"); | ||
const path_1 = require("path"); | ||
function printCloudConnectionDisabledMessage() { | ||
@@ -72,16 +73,17 @@ output_1.output.error({ | ||
} | ||
function addNxCloudOptionsToNxJson(tree, nxJson, token) { | ||
nxJson ??= { | ||
extends: 'nx/presets/npm.json', | ||
}; | ||
nxJson.nxCloudAccessToken = token; | ||
const overrideUrl = process.env.NX_CLOUD_API || process.env.NRWL_API; | ||
if (overrideUrl) { | ||
nxJson.nxCloudUrl = overrideUrl; | ||
function addNxCloudOptionsToNxJson(tree, token, directory = tree.root) { | ||
const nxJsonPath = (0, path_1.join)(directory, 'nx.json'); | ||
if (tree.exists(nxJsonPath)) { | ||
(0, json_1.updateJson)(tree, (0, path_1.join)(directory, 'nx.json'), (nxJson) => { | ||
const overrideUrl = process.env.NX_CLOUD_API || process.env.NRWL_API; | ||
if (overrideUrl) { | ||
nxJson.nxCloudUrl = overrideUrl; | ||
} | ||
nxJson.nxCloudAccessToken = token; | ||
return nxJson; | ||
}); | ||
} | ||
(0, nx_json_1.updateNxJson)(tree, nxJson); | ||
} | ||
async function connectToNxCloud(tree, schema) { | ||
async function connectToNxCloud(tree, schema, nxJson = (0, nx_json_1.readNxJson)(tree)) { | ||
schema.installationSource ??= 'user'; | ||
const nxJson = (0, nx_json_1.readNxJson)(tree); | ||
if (nxJson?.neverConnectToCloud) { | ||
@@ -98,3 +100,3 @@ printCloudConnectionDisabledMessage(); | ||
responseFromCreateNxCloudWorkspace = await createNxCloudWorkspace(getRootPackageName(tree), schema.installationSource, getNxInitDate()); | ||
addNxCloudOptionsToNxJson(tree, nxJson, responseFromCreateNxCloudWorkspace?.token); | ||
addNxCloudOptionsToNxJson(tree, responseFromCreateNxCloudWorkspace?.token, schema.directory); | ||
await (0, format_changed_files_with_prettier_if_available_1.formatChangedFilesWithPrettierIfAvailable)(tree, { | ||
@@ -101,0 +103,0 @@ silent: schema.hideFormatLogs, |
import { CloudTaskRunnerOptions } from '../nx-cloud-tasks-runner-shell'; | ||
export declare function getCloudOptions(): CloudTaskRunnerOptions; | ||
export declare function getCloudOptions(directory?: string): CloudTaskRunnerOptions; | ||
export declare function getCloudUrl(): string; | ||
export declare function removeTrailingSlash(apiUrl: string): string; |
@@ -8,4 +8,5 @@ "use strict"; | ||
const run_command_1 = require("../../tasks-runner/run-command"); | ||
function getCloudOptions() { | ||
const nxJson = (0, nx_json_1.readNxJson)(); | ||
const workspace_root_1 = require("../../utils/workspace-root"); | ||
function getCloudOptions(directory = workspace_root_1.workspaceRoot) { | ||
const nxJson = (0, nx_json_1.readNxJson)(directory); | ||
// TODO: The default is not always cloud? But it's not handled at the moment | ||
@@ -12,0 +13,0 @@ return (0, run_command_1.getRunnerOptions)('default', nxJson, {}, true); |
@@ -40,2 +40,3 @@ import { NxJsonConfiguration, TargetDefaults } from '../../config/nx-json'; | ||
plugins: LoadedNxPlugin[]): Promise<ConfigurationResult>; | ||
export declare function findMatchingConfigFiles(projectFiles: string[], pattern: string, include: string[], exclude: string[]): string[]; | ||
export declare function readProjectConfigurationsFromRootMap(projectRootMap: Record<string, ProjectConfiguration>): Record<string, ProjectConfiguration>; | ||
@@ -42,0 +43,0 @@ export declare function validateProject(project: ProjectConfiguration, knownProjects: Record<string, ProjectConfiguration>): void; |
@@ -6,2 +6,3 @@ "use strict"; | ||
exports.createProjectConfigurations = createProjectConfigurations; | ||
exports.findMatchingConfigFiles = findMatchingConfigFiles; | ||
exports.readProjectConfigurationsFromRootMap = readProjectConfigurationsFromRootMap; | ||
@@ -8,0 +9,0 @@ exports.validateProject = validateProject; |
@@ -28,3 +28,3 @@ "use strict"; | ||
try { | ||
const p = (0, child_process_1.spawn)('node', [scriptPath, `"${this.cachePath}"`], { | ||
const p = (0, child_process_1.spawn)('node', [scriptPath, `${this.cachePath}`], { | ||
stdio: 'ignore', | ||
@@ -31,0 +31,0 @@ detached: true, |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
7179880
49199
+ Added@nrwl/tao@19.6.0-canary.20240803-bd7a2c9(transitive)
+ Added@nx/nx-darwin-arm64@19.6.0-canary.20240803-bd7a2c9(transitive)
+ Added@nx/nx-darwin-x64@19.6.0-canary.20240803-bd7a2c9(transitive)
+ Added@nx/nx-freebsd-x64@19.6.0-canary.20240803-bd7a2c9(transitive)
+ Added@nx/nx-linux-arm-gnueabihf@19.6.0-canary.20240803-bd7a2c9(transitive)
+ Added@nx/nx-linux-arm64-gnu@19.6.0-canary.20240803-bd7a2c9(transitive)
+ Added@nx/nx-linux-arm64-musl@19.6.0-canary.20240803-bd7a2c9(transitive)
+ Added@nx/nx-linux-x64-gnu@19.6.0-canary.20240803-bd7a2c9(transitive)
+ Added@nx/nx-linux-x64-musl@19.6.0-canary.20240803-bd7a2c9(transitive)
+ Added@nx/nx-win32-arm64-msvc@19.6.0-canary.20240803-bd7a2c9(transitive)
+ Added@nx/nx-win32-x64-msvc@19.6.0-canary.20240803-bd7a2c9(transitive)
- Removed@nrwl/tao@19.6.0-canary.20240801-2111841(transitive)
- Removed@nx/nx-darwin-arm64@19.6.0-canary.20240801-2111841(transitive)
- Removed@nx/nx-darwin-x64@19.6.0-canary.20240801-2111841(transitive)
- Removed@nx/nx-freebsd-x64@19.6.0-canary.20240801-2111841(transitive)
- Removed@nx/nx-linux-arm-gnueabihf@19.6.0-canary.20240801-2111841(transitive)
- Removed@nx/nx-linux-arm64-gnu@19.6.0-canary.20240801-2111841(transitive)
- Removed@nx/nx-linux-arm64-musl@19.6.0-canary.20240801-2111841(transitive)
- Removed@nx/nx-linux-x64-gnu@19.6.0-canary.20240801-2111841(transitive)
- Removed@nx/nx-linux-x64-musl@19.6.0-canary.20240801-2111841(transitive)
- Removed@nx/nx-win32-arm64-msvc@19.6.0-canary.20240801-2111841(transitive)
- Removed@nx/nx-win32-x64-msvc@19.6.0-canary.20240801-2111841(transitive)