nx
Advanced tools
Comparing version 19.5.0-beta.0 to 19.5.0-beta.1
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.rewriteTargetsAndProjects = exports.initLocal = void 0; | ||
exports.initLocal = initLocal; | ||
exports.rewriteTargetsAndProjects = rewriteTargetsAndProjects; | ||
const perf_hooks_1 = require("perf_hooks"); | ||
@@ -48,3 +49,2 @@ const nx_commands_1 = require("../src/command-line/nx-commands"); | ||
} | ||
exports.initLocal = initLocal; | ||
function rewriteTargetsAndProjects(args) { | ||
@@ -80,3 +80,2 @@ const newArgs = [args[2]]; | ||
} | ||
exports.rewriteTargetsAndProjects = rewriteTargetsAndProjects; | ||
function isKnownCommand(command) { | ||
@@ -83,0 +82,0 @@ const commands = [ |
{ | ||
"name": "nx", | ||
"version": "19.5.0-beta.0", | ||
"version": "19.5.0-beta.1", | ||
"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.5.0-beta.0" | ||
"@nrwl/tao": "19.5.0-beta.1" | ||
}, | ||
@@ -90,12 +90,12 @@ "peerDependencies": { | ||
"optionalDependencies": { | ||
"@nx/nx-darwin-x64": "19.5.0-beta.0", | ||
"@nx/nx-darwin-arm64": "19.5.0-beta.0", | ||
"@nx/nx-linux-x64-gnu": "19.5.0-beta.0", | ||
"@nx/nx-linux-x64-musl": "19.5.0-beta.0", | ||
"@nx/nx-win32-x64-msvc": "19.5.0-beta.0", | ||
"@nx/nx-linux-arm64-gnu": "19.5.0-beta.0", | ||
"@nx/nx-linux-arm64-musl": "19.5.0-beta.0", | ||
"@nx/nx-linux-arm-gnueabihf": "19.5.0-beta.0", | ||
"@nx/nx-win32-arm64-msvc": "19.5.0-beta.0", | ||
"@nx/nx-freebsd-x64": "19.5.0-beta.0" | ||
"@nx/nx-darwin-x64": "19.5.0-beta.1", | ||
"@nx/nx-darwin-arm64": "19.5.0-beta.1", | ||
"@nx/nx-linux-x64-gnu": "19.5.0-beta.1", | ||
"@nx/nx-linux-x64-musl": "19.5.0-beta.1", | ||
"@nx/nx-win32-x64-msvc": "19.5.0-beta.1", | ||
"@nx/nx-linux-arm64-gnu": "19.5.0-beta.1", | ||
"@nx/nx-linux-arm64-musl": "19.5.0-beta.1", | ||
"@nx/nx-linux-arm-gnueabihf": "19.5.0-beta.1", | ||
"@nx/nx-win32-arm64-msvc": "19.5.0-beta.1", | ||
"@nx/nx-freebsd-x64": "19.5.0-beta.1" | ||
}, | ||
@@ -102,0 +102,0 @@ "nx-migrations": { |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.renamePropertyWithStableKeys = exports.toOldFormat = exports.toNewFormat = exports.isAngularPluginInstalled = exports.shouldMergeAngularProjects = exports.NxAngularJsonPlugin = exports.NX_ANGULAR_JSON_PLUGIN_NAME = void 0; | ||
exports.NxAngularJsonPlugin = exports.NX_ANGULAR_JSON_PLUGIN_NAME = void 0; | ||
exports.shouldMergeAngularProjects = shouldMergeAngularProjects; | ||
exports.isAngularPluginInstalled = isAngularPluginInstalled; | ||
exports.toNewFormat = toNewFormat; | ||
exports.toOldFormat = toOldFormat; | ||
exports.renamePropertyWithStableKeys = renamePropertyWithStableKeys; | ||
const fs_1 = require("fs"); | ||
@@ -31,3 +36,2 @@ const path = require("path"); | ||
} | ||
exports.shouldMergeAngularProjects = shouldMergeAngularProjects; | ||
function isAngularPluginInstalled() { | ||
@@ -49,3 +53,2 @@ try { | ||
} | ||
exports.isAngularPluginInstalled = isAngularPluginInstalled; | ||
function readAngularJson(angularCliWorkspaceRoot) { | ||
@@ -83,3 +86,2 @@ return toNewFormat((0, fileutils_1.readJsonFile)(path.join(angularCliWorkspaceRoot, 'angular.json'))).projects; | ||
} | ||
exports.toNewFormat = toNewFormat; | ||
function toOldFormat(w) { | ||
@@ -114,3 +116,2 @@ if (w.projects) { | ||
} | ||
exports.toOldFormat = toOldFormat; | ||
// we have to do it this way to preserve the order of properties | ||
@@ -132,2 +133,1 @@ // not to screw up the formatting | ||
} | ||
exports.renamePropertyWithStableKeys = renamePropertyWithStableKeys; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.decorateCli = void 0; | ||
exports.decorateCli = decorateCli; | ||
const fs_1 = require("fs"); | ||
@@ -25,2 +25,1 @@ const output_1 = require("../utils/output"); | ||
} | ||
exports.decorateCli = decorateCli; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.getLogger = exports.wrapAngularDevkitSchematic = exports.mockSchematicsForTesting = exports.runMigration = exports.generate = exports.NxScopeHostUsedForWrappedSchematics = exports.arrayBufferToString = exports.NxScopedHostForBuilders = exports.NxScopedHost = exports.scheduleTarget = exports.createBuilderContext = void 0; | ||
exports.getLogger = exports.NxScopeHostUsedForWrappedSchematics = exports.NxScopedHostForBuilders = exports.NxScopedHost = void 0; | ||
exports.createBuilderContext = createBuilderContext; | ||
exports.scheduleTarget = scheduleTarget; | ||
exports.arrayBufferToString = arrayBufferToString; | ||
exports.generate = generate; | ||
exports.runMigration = runMigration; | ||
exports.mockSchematicsForTesting = mockSchematicsForTesting; | ||
exports.wrapAngularDevkitSchematic = wrapAngularDevkitSchematic; | ||
const core_1 = require("@angular-devkit/core"); | ||
@@ -107,3 +114,2 @@ const node_1 = require("@angular-devkit/core/node"); | ||
} | ||
exports.createBuilderContext = createBuilderContext; | ||
async function scheduleTarget(root, opts, verbose) { | ||
@@ -133,3 +139,2 @@ const { Architect } = require('@angular-devkit/architect'); | ||
} | ||
exports.scheduleTarget = scheduleTarget; | ||
function createNodeModulesEngineHost(resolvePaths, projects) { | ||
@@ -418,3 +423,2 @@ const NodeModulesEngineHost = require('@angular-devkit/schematics/tools') | ||
} | ||
exports.arrayBufferToString = arrayBufferToString; | ||
/** | ||
@@ -513,3 +517,2 @@ * Host used by Angular CLI schematics. It reads the project configurations from | ||
} | ||
exports.generate = generate; | ||
function createPromptProvider() { | ||
@@ -585,3 +588,2 @@ return (definitions) => { | ||
} | ||
exports.runMigration = runMigration; | ||
function resolveMigrationsCollection(name) { | ||
@@ -644,3 +646,2 @@ let collectionPath = undefined; | ||
} | ||
exports.mockSchematicsForTesting = mockSchematicsForTesting; | ||
function wrapAngularDevkitSchematic(collectionName, generatorName) { | ||
@@ -732,3 +733,2 @@ // This is idempotent, if it happens to get called | ||
} | ||
exports.wrapAngularDevkitSchematic = wrapAngularDevkitSchematic; | ||
let logger; | ||
@@ -735,0 +735,0 @@ const getLogger = (isVerbose = false) => { |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.nextValueFrom = exports.latestValueFrom = exports.bufferedValuesFrom = exports.eachValueFrom = exports.Deferred = void 0; | ||
exports.Deferred = void 0; | ||
exports.eachValueFrom = eachValueFrom; | ||
exports.bufferedValuesFrom = bufferedValuesFrom; | ||
exports.latestValueFrom = latestValueFrom; | ||
exports.nextValueFrom = nextValueFrom; | ||
class Deferred { | ||
@@ -103,3 +107,2 @@ constructor() { | ||
} | ||
exports.eachValueFrom = eachValueFrom; | ||
/** | ||
@@ -196,3 +199,2 @@ * Will subscribe to the `source` observable provided | ||
} | ||
exports.bufferedValuesFrom = bufferedValuesFrom; | ||
/** | ||
@@ -287,3 +289,2 @@ * Will subscribe to the provided `source` observable, | ||
} | ||
exports.latestValueFrom = latestValueFrom; | ||
/** | ||
@@ -365,2 +366,1 @@ * Subscribes to the provided `source` observable and allows | ||
} | ||
exports.nextValueFrom = nextValueFrom; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.coreNxPluginVersions = exports.addHandler = void 0; | ||
exports.coreNxPluginVersions = void 0; | ||
exports.addHandler = addHandler; | ||
const child_process_1 = require("child_process"); | ||
@@ -35,3 +36,2 @@ const fs_1 = require("fs"); | ||
} | ||
exports.addHandler = addHandler; | ||
async function installPackage(pkgName, version, nxJson) { | ||
@@ -38,0 +38,0 @@ const spinner = ora(`Installing ${pkgName}@${version}...`); |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.getAffectedGraphNodes = exports.affected = void 0; | ||
exports.affected = affected; | ||
exports.getAffectedGraphNodes = getAffectedGraphNodes; | ||
const file_utils_1 = require("../../project-graph/file-utils"); | ||
@@ -65,3 +66,2 @@ const run_command_1 = require("../../tasks-runner/run-command"); | ||
} | ||
exports.affected = affected; | ||
async function getAffectedGraphNodes(nxArgs, projectGraph) { | ||
@@ -79,3 +79,2 @@ let affectedGraph = nxArgs.all | ||
} | ||
exports.getAffectedGraphNodes = getAffectedGraphNodes; | ||
function allProjectsWithTarget(projects, nxArgs) { | ||
@@ -82,0 +81,0 @@ return projects.filter((p) => nxArgs.targets.find((target) => (0, project_graph_utils_1.projectHasTarget)(p, target))); |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.connectExistingRepoToNxCloudPrompt = exports.connectToNxCloudWithPrompt = exports.connectToNxCloudCommand = exports.connectToNxCloudIfExplicitlyAsked = exports.onlyDefaultRunnerIsUsed = void 0; | ||
exports.onlyDefaultRunnerIsUsed = onlyDefaultRunnerIsUsed; | ||
exports.connectToNxCloudIfExplicitlyAsked = connectToNxCloudIfExplicitlyAsked; | ||
exports.connectToNxCloudCommand = connectToNxCloudCommand; | ||
exports.connectToNxCloudWithPrompt = connectToNxCloudWithPrompt; | ||
exports.connectExistingRepoToNxCloudPrompt = connectExistingRepoToNxCloudPrompt; | ||
const output_1 = require("../../utils/output"); | ||
@@ -25,3 +29,2 @@ const configuration_1 = require("../../config/configuration"); | ||
} | ||
exports.onlyDefaultRunnerIsUsed = onlyDefaultRunnerIsUsed; | ||
async function connectToNxCloudIfExplicitlyAsked(opts) { | ||
@@ -44,3 +47,2 @@ if (opts['cloud'] === true) { | ||
} | ||
exports.connectToNxCloudIfExplicitlyAsked = connectToNxCloudIfExplicitlyAsked; | ||
async function connectToNxCloudCommand(command) { | ||
@@ -74,3 +76,2 @@ const nxJson = (0, configuration_1.readNxJson)(); | ||
} | ||
exports.connectToNxCloudCommand = connectToNxCloudCommand; | ||
async function connectToNxCloudWithPrompt(command) { | ||
@@ -86,7 +87,5 @@ const setNxCloud = await nxCloudPrompt('setupNxCloud'); | ||
} | ||
exports.connectToNxCloudWithPrompt = connectToNxCloudWithPrompt; | ||
async function connectExistingRepoToNxCloudPrompt(key = 'setupNxCloud') { | ||
return nxCloudPrompt(key).then((value) => value === 'yes'); | ||
} | ||
exports.connectExistingRepoToNxCloudPrompt = connectExistingRepoToNxCloudPrompt; | ||
async function nxCloudPrompt(key) { | ||
@@ -93,0 +92,0 @@ const { message, choices, initial, footer, hint } = ab_testing_1.messages.getPrompt(key); |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.viewLogs = void 0; | ||
exports.viewLogs = viewLogs; | ||
const package_manager_1 = require("../../utils/package-manager"); | ||
@@ -53,2 +53,1 @@ const child_process_1 = require("child_process"); | ||
} | ||
exports.viewLogs = viewLogs; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.daemonHandler = void 0; | ||
exports.daemonHandler = daemonHandler; | ||
const tmp_dir_1 = require("../../daemon/tmp-dir"); | ||
@@ -27,2 +27,1 @@ const output_1 = require("../../utils/output"); | ||
} | ||
exports.daemonHandler = daemonHandler; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.nxExecCommand = void 0; | ||
exports.nxExecCommand = nxExecCommand; | ||
const child_process_1 = require("child_process"); | ||
@@ -47,3 +47,2 @@ const path_1 = require("path"); | ||
} | ||
exports.nxExecCommand = nxExecCommand; | ||
async function runScriptAsNxTarget(projectGraph, argv, nxArgs) { | ||
@@ -50,0 +49,0 @@ // NPM, Yarn, and PNPM set this to the name of the currently executing script. Lets use it if we can. |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.format = void 0; | ||
exports.format = format; | ||
const node_child_process_1 = require("node:child_process"); | ||
@@ -63,3 +63,2 @@ const path = require("node:path"); | ||
} | ||
exports.format = format; | ||
async function getPatterns(args) { | ||
@@ -66,0 +65,0 @@ const graph = await (0, project_graph_1.createProjectGraphAsync)({ exitOnError: true }); |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.generate = exports.printGenHelp = exports.parseGeneratorString = exports.printChanges = void 0; | ||
exports.printChanges = printChanges; | ||
exports.parseGeneratorString = parseGeneratorString; | ||
exports.printGenHelp = printGenHelp; | ||
exports.generate = generate; | ||
const chalk = require("chalk"); | ||
@@ -31,3 +34,2 @@ const enquirer_1 = require("enquirer"); | ||
} | ||
exports.printChanges = printChanges; | ||
async function promptForCollection(generatorName, interactive, projectsConfiguration) { | ||
@@ -148,3 +150,2 @@ const localPlugins = await (0, local_plugins_1.getLocalWorkspacePlugins)(projectsConfiguration, (0, configuration_1.readNxJson)()); | ||
} | ||
exports.parseGeneratorString = parseGeneratorString; | ||
async function convertToGenerateOptions(generatorOptions, mode, projectsConfiguration) { | ||
@@ -209,3 +210,2 @@ let collectionName = null; | ||
} | ||
exports.printGenHelp = printGenHelp; | ||
async function generate(cwd, args) { | ||
@@ -269,2 +269,1 @@ if (args['verbose']) { | ||
} | ||
exports.generate = generate; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.readGeneratorsJson = exports.getGeneratorInformation = void 0; | ||
exports.getGeneratorInformation = getGeneratorInformation; | ||
exports.readGeneratorsJson = readGeneratorsJson; | ||
const path_1 = require("path"); | ||
@@ -42,3 +43,2 @@ const schema_utils_1 = require("../../config/schema-utils"); | ||
} | ||
exports.getGeneratorInformation = getGeneratorInformation; | ||
function readGeneratorsJson(collectionName, generator, root, projects) { | ||
@@ -78,3 +78,2 @@ let generatorsFilePath; | ||
} | ||
exports.readGeneratorsJson = readGeneratorsJson; | ||
function findFullGeneratorName(name, generators) { | ||
@@ -81,0 +80,0 @@ if (generators) { |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.withGraphOptions = exports.yargsGraphCommand = void 0; | ||
exports.yargsGraphCommand = void 0; | ||
exports.withGraphOptions = withGraphOptions; | ||
const documentation_1 = require("../yargs-utils/documentation"); | ||
@@ -75,2 +76,1 @@ const shared_options_1 = require("../yargs-utils/shared-options"); | ||
} | ||
exports.withGraphOptions = withGraphOptions; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.generateGraph = void 0; | ||
exports.generateGraph = generateGraph; | ||
const crypto_1 = require("crypto"); | ||
@@ -321,3 +321,2 @@ const node_child_process_1 = require("node:child_process"); | ||
} | ||
exports.generateGraph = generateGraph; | ||
async function startServer(html, environmentJs, host, port = 4211, watchForChanges = true, affected = [], focus = null, groupByFolder = false, exclude = []) { | ||
@@ -783,4 +782,4 @@ let unregisterFileWatcher; | ||
return (0, node_child_process_1.execSync)(command, { | ||
cwd: (0, path_1.join)(workspace_root_1.workspaceRoot, project.data.root), | ||
cwd: target.options?.cwd ?? workspace_root_1.workspaceRoot, | ||
}).toString(); | ||
} |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.addNxToMonorepo = void 0; | ||
exports.addNxToMonorepo = addNxToMonorepo; | ||
const enquirer_1 = require("enquirer"); | ||
@@ -80,3 +80,2 @@ const fs_1 = require("fs"); | ||
} | ||
exports.addNxToMonorepo = addNxToMonorepo; | ||
// scanning package.json files | ||
@@ -83,0 +82,0 @@ function allProjectPackageJsonFiles(repoRoot) { |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.addNxToNest = void 0; | ||
exports.addNxToNest = addNxToNest; | ||
const enquirer = require("enquirer"); | ||
@@ -99,3 +99,2 @@ const fs_extra_1 = require("fs-extra"); | ||
} | ||
exports.addNxToNest = addNxToNest; | ||
function addNestPluginToPackageJson(repoRoot) { | ||
@@ -102,0 +101,0 @@ const path = (0, path_1.join)(repoRoot, `package.json`); |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.addNxToNpmRepo = void 0; | ||
exports.addNxToNpmRepo = addNxToNpmRepo; | ||
const enquirer = require("enquirer"); | ||
@@ -73,2 +73,1 @@ const path_1 = require("path"); | ||
} | ||
exports.addNxToNpmRepo = addNxToNpmRepo; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.addNxToAngularCliRepo = void 0; | ||
exports.addNxToAngularCliRepo = addNxToAngularCliRepo; | ||
const enquirer_1 = require("enquirer"); | ||
@@ -50,3 +50,2 @@ const path_1 = require("path"); | ||
} | ||
exports.addNxToAngularCliRepo = addNxToAngularCliRepo; | ||
async function collectCacheableOperations(options) { | ||
@@ -53,0 +52,0 @@ let cacheableOperations; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.setupIntegratedWorkspace = void 0; | ||
exports.setupIntegratedWorkspace = setupIntegratedWorkspace; | ||
const child_process_1 = require("child_process"); | ||
@@ -10,2 +10,1 @@ const package_manager_1 = require("../../../../utils/package-manager"); | ||
} | ||
exports.setupIntegratedWorkspace = setupIntegratedWorkspace; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.getLegacyMigrationFunctionIfApplicable = void 0; | ||
exports.getLegacyMigrationFunctionIfApplicable = getLegacyMigrationFunctionIfApplicable; | ||
const child_process_1 = require("child_process"); | ||
@@ -92,3 +92,2 @@ const path_1 = require("path"); | ||
} | ||
exports.getLegacyMigrationFunctionIfApplicable = getLegacyMigrationFunctionIfApplicable; | ||
async function installDependencies(repoRoot, pkgInfo, pmc) { | ||
@@ -95,0 +94,0 @@ const json = (0, fileutils_1.readJsonFile)((0, path_1.join)(repoRoot, 'package.json')); |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.setupStandaloneWorkspace = void 0; | ||
exports.setupStandaloneWorkspace = setupStandaloneWorkspace; | ||
const fs_1 = require("fs"); | ||
@@ -37,3 +37,2 @@ const path_1 = require("path"); | ||
} | ||
exports.setupStandaloneWorkspace = setupStandaloneWorkspace; | ||
function createNxJson(repoRoot, angularJson, cacheableOperations, { eslintProjectConfigFile, test, karmaProjectConfigFile, }, workspaceTargets) { | ||
@@ -40,0 +39,0 @@ (0, utils_1.createNxJsonFile)(repoRoot, [], cacheableOperations, {}); |
import { Tree } from '../../../../generators/tree'; | ||
export declare const nxWrapperPath: (p?: typeof import('path')) => string; | ||
export declare const nxWrapperPath: (p?: typeof import("path")) => string; | ||
export declare function generateDotNxSetup(version?: string): void; | ||
@@ -4,0 +4,0 @@ export declare function normalizeVersionForNxJson(pkg: string, version: string): string; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.sanitizeWrapperScript = exports.getNxWrapperContents = exports.updateGitIgnore = exports.writeMinimalNxJson = exports.normalizeVersionForNxJson = exports.generateDotNxSetup = exports.nxWrapperPath = void 0; | ||
exports.nxWrapperPath = void 0; | ||
exports.generateDotNxSetup = generateDotNxSetup; | ||
exports.normalizeVersionForNxJson = normalizeVersionForNxJson; | ||
exports.writeMinimalNxJson = writeMinimalNxJson; | ||
exports.updateGitIgnore = updateGitIgnore; | ||
exports.getNxWrapperContents = getNxWrapperContents; | ||
exports.sanitizeWrapperScript = sanitizeWrapperScript; | ||
const child_process_1 = require("child_process"); | ||
@@ -57,3 +63,2 @@ const fs_1 = require("fs"); | ||
} | ||
exports.generateDotNxSetup = generateDotNxSetup; | ||
function normalizeVersionForNxJson(pkg, version) { | ||
@@ -65,3 +70,2 @@ if (!(0, semver_1.valid)(version)) { | ||
} | ||
exports.normalizeVersionForNxJson = normalizeVersionForNxJson; | ||
function writeMinimalNxJson(host, version) { | ||
@@ -76,3 +80,2 @@ if (!host.exists('nx.json')) { | ||
} | ||
exports.writeMinimalNxJson = writeMinimalNxJson; | ||
function updateGitIgnore(host) { | ||
@@ -87,3 +90,2 @@ let contents = host.read('.gitignore', 'utf-8') ?? ''; | ||
} | ||
exports.updateGitIgnore = updateGitIgnore; | ||
// Gets the sanitized contents for nxw.js | ||
@@ -93,3 +95,2 @@ function getNxWrapperContents() { | ||
} | ||
exports.getNxWrapperContents = getNxWrapperContents; | ||
// Remove any empty comments or comments that start with `//#: ` or eslint-disable comments. | ||
@@ -109,2 +110,1 @@ // This removes the sourceMapUrl since it is invalid, as well as any internal comments. | ||
} | ||
exports.sanitizeWrapperScript = sanitizeWrapperScript; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.addCracoCommandsToPackageScripts = void 0; | ||
exports.addCracoCommandsToPackageScripts = addCracoCommandsToPackageScripts; | ||
const fileutils_1 = require("../../../../utils/fileutils"); | ||
@@ -22,2 +22,1 @@ function addCracoCommandsToPackageScripts(appName, isStandalone) { | ||
} | ||
exports.addCracoCommandsToPackageScripts = addCracoCommandsToPackageScripts; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.addViteCommandsToPackageScripts = void 0; | ||
exports.addViteCommandsToPackageScripts = addViteCommandsToPackageScripts; | ||
const fileutils_1 = require("../../../../utils/fileutils"); | ||
@@ -19,2 +19,1 @@ function addViteCommandsToPackageScripts(appName, isStandalone) { | ||
} | ||
exports.addViteCommandsToPackageScripts = addViteCommandsToPackageScripts; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.checkForCustomWebpackSetup = void 0; | ||
exports.checkForCustomWebpackSetup = checkForCustomWebpackSetup; | ||
const fileutils_1 = require("../../../../utils/fileutils"); | ||
@@ -18,2 +18,1 @@ function checkForCustomWebpackSetup() { | ||
} | ||
exports.checkForCustomWebpackSetup = checkForCustomWebpackSetup; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.checkForUncommittedChanges = void 0; | ||
exports.checkForUncommittedChanges = checkForUncommittedChanges; | ||
const child_process_1 = require("child_process"); | ||
@@ -19,2 +19,1 @@ function checkForUncommittedChanges() { | ||
} | ||
exports.checkForUncommittedChanges = checkForUncommittedChanges; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.cleanUpFiles = void 0; | ||
exports.cleanUpFiles = cleanUpFiles; | ||
const fs_extra_1 = require("fs-extra"); | ||
@@ -31,2 +31,1 @@ const fileutils_1 = require("../../../../utils/fileutils"); | ||
} | ||
exports.cleanUpFiles = cleanUpFiles; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.addNxToCraRepo = void 0; | ||
exports.addNxToCraRepo = addNxToCraRepo; | ||
const child_process_1 = require("child_process"); | ||
@@ -29,3 +29,2 @@ const fs_extra_1 = require("fs-extra"); | ||
} | ||
exports.addNxToCraRepo = addNxToCraRepo; | ||
function installDependencies(options) { | ||
@@ -32,0 +31,0 @@ const dependencies = [ |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.readNameFromPackageJson = void 0; | ||
exports.readNameFromPackageJson = readNameFromPackageJson; | ||
const fileutils_1 = require("../../../../utils/fileutils"); | ||
@@ -17,2 +17,1 @@ function readNameFromPackageJson() { | ||
} | ||
exports.readNameFromPackageJson = readNameFromPackageJson; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.renameJsToJsx = void 0; | ||
exports.renameJsToJsx = renameJsToJsx; | ||
const fs_extra_1 = require("fs-extra"); | ||
@@ -23,2 +23,1 @@ const workspace_context_1 = require("../../../../utils/workspace-context"); | ||
} | ||
exports.renameJsToJsx = renameJsToJsx; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.setupTsConfig = void 0; | ||
exports.setupTsConfig = setupTsConfig; | ||
const path_1 = require("path"); | ||
@@ -109,2 +109,1 @@ const fileutils_1 = require("../../../../utils/fileutils"); | ||
} | ||
exports.setupTsConfig = setupTsConfig; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.writeCracoConfig = void 0; | ||
exports.writeCracoConfig = writeCracoConfig; | ||
const fs_1 = require("fs"); | ||
@@ -62,2 +62,1 @@ function writeCracoConfig(appName, isCRA5, isStandalone) { | ||
} | ||
exports.writeCracoConfig = writeCracoConfig; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.writeViteConfig = void 0; | ||
exports.writeViteConfig = writeViteConfig; | ||
const fs_1 = require("fs"); | ||
@@ -38,2 +38,1 @@ function writeViteConfig(appName, isStandalone, isJs) { | ||
} | ||
exports.writeViteConfig = writeViteConfig; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.writeViteIndexHtml = void 0; | ||
exports.writeViteIndexHtml = writeViteIndexHtml; | ||
const fs_1 = require("fs"); | ||
@@ -25,2 +25,1 @@ function writeViteIndexHtml(appName, isStandalone, isJs) { | ||
} | ||
exports.writeViteIndexHtml = writeViteIndexHtml; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.isMonorepo = exports.printFinalMessage = exports.markPackageJsonAsNxProject = exports.markRootPackageJsonAsNxProjectLegacy = exports.addVsCodeRecommendedExtensions = exports.initCloud = exports.runInstall = exports.updateGitIgnore = exports.addDepsToPackageJson = exports.createNxJsonFile = void 0; | ||
exports.createNxJsonFile = createNxJsonFile; | ||
exports.addDepsToPackageJson = addDepsToPackageJson; | ||
exports.updateGitIgnore = updateGitIgnore; | ||
exports.runInstall = runInstall; | ||
exports.initCloud = initCloud; | ||
exports.addVsCodeRecommendedExtensions = addVsCodeRecommendedExtensions; | ||
exports.markRootPackageJsonAsNxProjectLegacy = markRootPackageJsonAsNxProjectLegacy; | ||
exports.markPackageJsonAsNxProject = markPackageJsonAsNxProject; | ||
exports.printFinalMessage = printFinalMessage; | ||
exports.isMonorepo = isMonorepo; | ||
const child_process_1 = require("child_process"); | ||
@@ -47,3 +56,2 @@ const path_1 = require("path"); | ||
} | ||
exports.createNxJsonFile = createNxJsonFile; | ||
function deduceDefaultBase() { | ||
@@ -97,3 +105,2 @@ try { | ||
} | ||
exports.addDepsToPackageJson = addDepsToPackageJson; | ||
function updateGitIgnore(root) { | ||
@@ -123,7 +130,5 @@ const ignorePath = (0, path_1.join)(root, '.gitignore'); | ||
} | ||
exports.updateGitIgnore = updateGitIgnore; | ||
function runInstall(repoRoot, pmc = (0, package_manager_1.getPackageManagerCommand)()) { | ||
(0, child_process_1.execSync)(pmc.install, { stdio: [0, 1, 2], cwd: repoRoot }); | ||
} | ||
exports.runInstall = runInstall; | ||
function initCloud(repoRoot, installationSource) { | ||
@@ -135,3 +140,2 @@ (0, child_process_2.runNxSync)(`g nx:connect-to-nx-cloud --installationSource=${installationSource} --quiet --no-interactive`, { | ||
} | ||
exports.initCloud = initCloud; | ||
function addVsCodeRecommendedExtensions(repoRoot, extensions) { | ||
@@ -153,3 +157,2 @@ const vsCodeExtensionsPath = (0, path_1.join)(repoRoot, '.vscode/extensions.json'); | ||
} | ||
exports.addVsCodeRecommendedExtensions = addVsCodeRecommendedExtensions; | ||
function markRootPackageJsonAsNxProjectLegacy(repoRoot, cacheableScripts, pmc) { | ||
@@ -174,3 +177,2 @@ const json = (0, fileutils_1.readJsonFile)((0, path_2.joinPathFragments)(repoRoot, `package.json`)); | ||
} | ||
exports.markRootPackageJsonAsNxProjectLegacy = markRootPackageJsonAsNxProjectLegacy; | ||
function markPackageJsonAsNxProject(packageJsonPath) { | ||
@@ -184,3 +186,2 @@ const json = (0, fileutils_1.readJsonFile)(packageJsonPath); | ||
} | ||
exports.markPackageJsonAsNxProject = markPackageJsonAsNxProject; | ||
function printFinalMessage({ learnMoreLink, }) { | ||
@@ -197,3 +198,2 @@ const pmc = (0, package_manager_1.getPackageManagerCommand)(); | ||
} | ||
exports.printFinalMessage = printFinalMessage; | ||
function isMonorepo(packageJson) { | ||
@@ -208,2 +208,1 @@ if (!!packageJson.workspaces) | ||
} | ||
exports.isMonorepo = isMonorepo; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.initHandler = void 0; | ||
exports.initHandler = initHandler; | ||
const child_process_1 = require("child_process"); | ||
@@ -94,3 +94,2 @@ const enquirer_1 = require("enquirer"); | ||
} | ||
exports.initHandler = initHandler; | ||
function isCRA(packageJson) { | ||
@@ -97,0 +96,0 @@ const combinedDependencies = { |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.initHandler = void 0; | ||
exports.initHandler = initHandler; | ||
const fs_1 = require("fs"); | ||
@@ -102,3 +102,2 @@ const semver_1 = require("semver"); | ||
} | ||
exports.initHandler = initHandler; | ||
const npmPackageToPluginMap = { | ||
@@ -105,0 +104,0 @@ // Generic JS tools |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.listHandler = void 0; | ||
exports.listHandler = listHandler; | ||
const workspace_root_1 = require("../../utils/workspace-root"); | ||
@@ -47,2 +47,1 @@ const output_1 = require("../../utils/output"); | ||
} | ||
exports.listHandler = listHandler; |
@@ -109,3 +109,3 @@ import { MigrationsJson, PackageJsonUpdateForPackage as PackageUpdate } from '../../config/misc-interfaces'; | ||
version: string; | ||
cli?: 'nx' | 'angular'; | ||
cli?: "nx" | "angular"; | ||
}[]>; | ||
@@ -112,0 +112,0 @@ export declare function migrate(root: string, args: { |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.migrate = exports.executeMigrations = exports.parseMigrationsOptions = exports.Migrator = exports.normalizeVersion = void 0; | ||
exports.Migrator = void 0; | ||
exports.normalizeVersion = normalizeVersion; | ||
exports.parseMigrationsOptions = parseMigrationsOptions; | ||
exports.executeMigrations = executeMigrations; | ||
exports.migrate = migrate; | ||
const chalk = require("chalk"); | ||
@@ -57,3 +61,2 @@ const child_process_1 = require("child_process"); | ||
} | ||
exports.normalizeVersion = normalizeVersion; | ||
function cleanSemver(version) { | ||
@@ -491,3 +494,2 @@ return (0, semver_1.clean)(version) ?? (0, semver_1.coerce)(version); | ||
} | ||
exports.parseMigrationsOptions = parseMigrationsOptions; | ||
function createInstalledPackageVersionsResolver(root) { | ||
@@ -957,3 +959,2 @@ const cache = {}; | ||
} | ||
exports.executeMigrations = executeMigrations; | ||
async function runMigrations(root, opts, args, isVerbose, shouldCreateCommits = false, commitPrefix) { | ||
@@ -1039,3 +1040,2 @@ if (!process.env.NX_MIGRATE_SKIP_INSTALL) { | ||
} | ||
exports.migrate = migrate; | ||
function readMigrationCollection(packageName, root) { | ||
@@ -1042,0 +1042,0 @@ const collectionPath = readPackageMigrationConfig(packageName, root).migrations; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.newWorkspace = void 0; | ||
exports.newWorkspace = newWorkspace; | ||
const tree_1 = require("../../generators/tree"); | ||
@@ -30,2 +30,1 @@ const params_1 = require("../../utils/params"); | ||
} | ||
exports.newWorkspace = newWorkspace; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.shouldCreateGitHubRelease = exports.releaseChangelog = exports.releaseChangelogCLIHandler = void 0; | ||
exports.releaseChangelogCLIHandler = void 0; | ||
exports.releaseChangelog = releaseChangelog; | ||
exports.shouldCreateGitHubRelease = shouldCreateGitHubRelease; | ||
const chalk = require("chalk"); | ||
@@ -468,3 +470,2 @@ const enquirer_1 = require("enquirer"); | ||
} | ||
exports.releaseChangelog = releaseChangelog; | ||
function resolveChangelogVersions(args, releaseGroups, releaseGroupToFilteredProjects) { | ||
@@ -867,3 +868,2 @@ if (!args.version && !args.versionData) { | ||
} | ||
exports.shouldCreateGitHubRelease = shouldCreateGitHubRelease; | ||
async function promptForGitHubRelease() { | ||
@@ -870,0 +870,0 @@ try { |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.handleNxReleaseConfigError = exports.createNxReleaseConfig = exports.IMPLICIT_DEFAULT_RELEASE_GROUP = void 0; | ||
exports.IMPLICIT_DEFAULT_RELEASE_GROUP = void 0; | ||
exports.createNxReleaseConfig = createNxReleaseConfig; | ||
exports.handleNxReleaseConfigError = handleNxReleaseConfigError; | ||
/** | ||
@@ -371,3 +373,2 @@ * `nx release` is a powerful feature which spans many possible use cases. The possible variations | ||
} | ||
exports.createNxReleaseConfig = createNxReleaseConfig; | ||
/** | ||
@@ -542,3 +543,2 @@ * In some cases it is much cleaner and more intuitive for the user to be able to | ||
} | ||
exports.handleNxReleaseConfigError = handleNxReleaseConfigError; | ||
function ensureReleaseGroupReleaseTagPatternIsValid(releaseTagPattern, releaseGroupName) { | ||
@@ -545,0 +545,0 @@ // ensure that any provided releaseTagPattern contains exactly one instance of {version} |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.filterReleaseGroups = void 0; | ||
exports.filterReleaseGroups = filterReleaseGroups; | ||
const find_matching_projects_1 = require("../../../utils/find-matching-projects"); | ||
@@ -151,2 +151,1 @@ const output_1 = require("../../../utils/output"); | ||
} | ||
exports.filterReleaseGroups = filterReleaseGroups; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.getVersionPlansAbsolutePath = exports.setVersionPlansOnGroups = exports.readRawVersionPlans = void 0; | ||
exports.readRawVersionPlans = readRawVersionPlans; | ||
exports.setVersionPlansOnGroups = setVersionPlansOnGroups; | ||
exports.getVersionPlansAbsolutePath = getVersionPlansAbsolutePath; | ||
const fs_1 = require("fs"); | ||
@@ -36,3 +38,2 @@ const fs_extra_1 = require("fs-extra"); | ||
} | ||
exports.readRawVersionPlans = readRawVersionPlans; | ||
function setVersionPlansOnGroups(rawVersionPlans, releaseGroups, allProjectNamesInWorkspace) { | ||
@@ -170,3 +171,2 @@ const groupsByName = releaseGroups.reduce((acc, group) => acc.set(group.name, group), new Map()); | ||
} | ||
exports.setVersionPlansOnGroups = setVersionPlansOnGroups; | ||
function isDefault(releaseGroups) { | ||
@@ -179,3 +179,2 @@ return (releaseGroups.length === 1 && | ||
} | ||
exports.getVersionPlansAbsolutePath = getVersionPlansAbsolutePath; | ||
function isReleaseType(value) { | ||
@@ -182,0 +181,0 @@ return semver_1.RELEASE_TYPES.includes(value); |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.releasePlan = exports.releasePlanCLIHandler = void 0; | ||
exports.releasePlanCLIHandler = void 0; | ||
exports.releasePlan = releasePlan; | ||
const enquirer_1 = require("enquirer"); | ||
@@ -111,3 +112,2 @@ const fs_extra_1 = require("fs-extra"); | ||
} | ||
exports.releasePlan = releasePlan; | ||
async function promptForVersion(message) { | ||
@@ -114,0 +114,0 @@ try { |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.releasePublish = exports.releasePublishCLIHandler = void 0; | ||
exports.releasePublishCLIHandler = void 0; | ||
exports.releasePublish = releasePublish; | ||
const nx_json_1 = require("../../config/nx-json"); | ||
@@ -81,3 +82,2 @@ const file_map_utils_1 = require("../../project-graph/file-map-utils"); | ||
} | ||
exports.releasePublish = releasePublish; | ||
async function runPublishOnProjects(args, projectGraph, nxJson, projectNames, isCLI, extraOptions) { | ||
@@ -84,0 +84,0 @@ const projectsToRun = projectNames.map((projectName) => projectGraph.nodes[projectName]); |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.release = exports.releaseCLIHandler = void 0; | ||
exports.releaseCLIHandler = void 0; | ||
exports.release = release; | ||
const enquirer_1 = require("enquirer"); | ||
@@ -200,3 +201,2 @@ const fs_extra_1 = require("fs-extra"); | ||
} | ||
exports.release = release; | ||
async function promptForPublish() { | ||
@@ -203,0 +203,0 @@ try { |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.batchProjectsByGeneratorConfig = void 0; | ||
exports.batchProjectsByGeneratorConfig = batchProjectsByGeneratorConfig; | ||
const json_diff_1 = require("../../../utils/json-diff"); | ||
@@ -37,2 +37,1 @@ /** | ||
} | ||
exports.batchProjectsByGeneratorConfig = batchProjectsByGeneratorConfig; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.execCommand = void 0; | ||
exports.execCommand = execCommand; | ||
const node_child_process_1 = require("node:child_process"); | ||
@@ -34,2 +34,1 @@ async function execCommand(cmd, args, options) { | ||
} | ||
exports.execCommand = execCommand; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.getFirstGitCommit = exports.getCommitHash = exports.parseGitCommit = exports.parseConventionalCommitsMessage = exports.parseCommits = exports.gitPush = exports.gitTag = exports.gitCommit = exports.gitAdd = exports.getGitDiff = exports.getLatestGitTagForPattern = void 0; | ||
exports.getLatestGitTagForPattern = getLatestGitTagForPattern; | ||
exports.getGitDiff = getGitDiff; | ||
exports.gitAdd = gitAdd; | ||
exports.gitCommit = gitCommit; | ||
exports.gitTag = gitTag; | ||
exports.gitPush = gitPush; | ||
exports.parseCommits = parseCommits; | ||
exports.parseConventionalCommitsMessage = parseConventionalCommitsMessage; | ||
exports.parseGitCommit = parseGitCommit; | ||
exports.getCommitHash = getCommitHash; | ||
exports.getFirstGitCommit = getFirstGitCommit; | ||
/** | ||
@@ -68,3 +78,2 @@ * Special thanks to changelogen for the original inspiration for many of these utilities: | ||
} | ||
exports.getLatestGitTagForPattern = getLatestGitTagForPattern; | ||
async function getGitDiff(from, to = 'HEAD') { | ||
@@ -101,3 +110,2 @@ let range = ''; | ||
} | ||
exports.getGitDiff = getGitDiff; | ||
async function getChangedTrackedFiles(cwd) { | ||
@@ -164,3 +172,2 @@ const result = await (0, exec_command_1.execCommand)('git', ['status', '--porcelain'], { | ||
} | ||
exports.gitAdd = gitAdd; | ||
async function isIgnored(filePath, cwd) { | ||
@@ -210,3 +217,2 @@ try { | ||
} | ||
exports.gitCommit = gitCommit; | ||
async function gitTag({ tag, message, additionalArgs, dryRun, verbose, logFn, }) { | ||
@@ -241,3 +247,2 @@ logFn = logFn || console.log; | ||
} | ||
exports.gitTag = gitTag; | ||
async function gitPush({ gitRemote, dryRun, verbose, }) { | ||
@@ -269,7 +274,5 @@ const commandArgs = [ | ||
} | ||
exports.gitPush = gitPush; | ||
function parseCommits(commits) { | ||
return commits.map((commit) => parseGitCommit(commit)).filter(Boolean); | ||
} | ||
exports.parseCommits = parseCommits; | ||
function parseConventionalCommitsMessage(message) { | ||
@@ -287,3 +290,2 @@ const match = message.match(ConventionalCommitRegex); | ||
} | ||
exports.parseConventionalCommitsMessage = parseConventionalCommitsMessage; | ||
// https://www.conventionalcommits.org/en/v1.0.0/ | ||
@@ -353,3 +355,2 @@ // https://regex101.com/r/FSfNvA/1 | ||
} | ||
exports.parseGitCommit = parseGitCommit; | ||
async function getCommitHash(ref) { | ||
@@ -363,3 +364,2 @@ try { | ||
} | ||
exports.getCommitHash = getCommitHash; | ||
async function getFirstGitCommit() { | ||
@@ -378,2 +378,1 @@ try { | ||
} | ||
exports.getFirstGitCommit = getFirstGitCommit; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.formatReferences = exports.getGithubReleaseByTag = exports.resolveGithubToken = exports.createOrUpdateGithubRelease = exports.getGitHubRepoSlug = void 0; | ||
exports.getGitHubRepoSlug = getGitHubRepoSlug; | ||
exports.createOrUpdateGithubRelease = createOrUpdateGithubRelease; | ||
exports.resolveGithubToken = resolveGithubToken; | ||
exports.getGithubReleaseByTag = getGithubReleaseByTag; | ||
exports.formatReferences = formatReferences; | ||
const chalk = require("chalk"); | ||
@@ -36,3 +40,2 @@ const enquirer_1 = require("enquirer"); | ||
} | ||
exports.getGitHubRepoSlug = getGitHubRepoSlug; | ||
async function createOrUpdateGithubRelease(releaseVersion, changelogContents, latestCommit, { dryRun }) { | ||
@@ -95,3 +98,2 @@ const githubRepoSlug = getGitHubRepoSlug(); | ||
} | ||
exports.createOrUpdateGithubRelease = createOrUpdateGithubRelease; | ||
async function createOrUpdateGithubReleaseInternal(githubRequestConfig, release, existingGithubReleaseForVersion) { | ||
@@ -247,7 +249,5 @@ const result = await syncGithubRelease(githubRequestConfig, release, existingGithubReleaseForVersion); | ||
} | ||
exports.resolveGithubToken = resolveGithubToken; | ||
async function getGithubReleaseByTag(config, tag) { | ||
return await makeGithubRequest(config, `/repos/${config.repo}/releases/tags/${tag}`, {}); | ||
} | ||
exports.getGithubReleaseByTag = getGithubReleaseByTag; | ||
async function makeGithubRequest(config, url, opts = {}) { | ||
@@ -300,2 +300,1 @@ return (await axios(url, { | ||
} | ||
exports.formatReferences = formatReferences; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.launchEditor = void 0; | ||
exports.launchEditor = launchEditor; | ||
const node_child_process_1 = require("node:child_process"); | ||
@@ -27,3 +27,2 @@ async function launchEditor(filePath) { | ||
} | ||
exports.launchEditor = launchEditor; | ||
function getGitConfig(key) { | ||
@@ -30,0 +29,0 @@ try { |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.parseChangelogMarkdown = void 0; | ||
exports.parseChangelogMarkdown = parseChangelogMarkdown; | ||
function parseChangelogMarkdown(contents) { | ||
@@ -29,2 +29,1 @@ /** | ||
} | ||
exports.parseChangelogMarkdown = parseChangelogMarkdown; |
@@ -1,2 +0,1 @@ | ||
/// <reference types="node" /> | ||
import { Tree } from '../../../generators/tree'; | ||
@@ -3,0 +2,0 @@ export declare function printDiff(before: string, after: string, contextLines?: number, noDiffMessage?: string): void; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.printAndFlushChanges = exports.printDiff = void 0; | ||
exports.printDiff = printDiff; | ||
exports.printAndFlushChanges = printAndFlushChanges; | ||
const chalk = require("chalk"); | ||
@@ -29,3 +30,2 @@ const jest_diff_1 = require("jest-diff"); | ||
} | ||
exports.printDiff = printDiff; | ||
function printAndFlushChanges(tree, isDryRun, diffContextLines = 1, shouldPrintDryRunMessage = true, noDiffMessage, changePredicate) { | ||
@@ -61,2 +61,1 @@ changePredicate = changePredicate || (() => true); | ||
} | ||
exports.printAndFlushChanges = printAndFlushChanges; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.resolveChangelogRenderer = void 0; | ||
exports.resolveChangelogRenderer = resolveChangelogRenderer; | ||
const register_1 = require("../../../plugins/js/utils/register"); | ||
@@ -31,2 +31,1 @@ const typescript_1 = require("../../../plugins/js/utils/typescript"); | ||
} | ||
exports.resolveChangelogRenderer = resolveChangelogRenderer; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.resolveNxJsonConfigErrorMessage = void 0; | ||
exports.resolveNxJsonConfigErrorMessage = resolveNxJsonConfigErrorMessage; | ||
const node_fs_1 = require("node:fs"); | ||
@@ -18,3 +18,2 @@ const node_path_1 = require("node:path"); | ||
} | ||
exports.resolveNxJsonConfigErrorMessage = resolveNxJsonConfigErrorMessage; | ||
async function getJsonConfigLinesForErrorMessage(rawConfig, jsonPath) { | ||
@@ -21,0 +20,0 @@ try { |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.resolveSemverSpecifierFromPrompt = exports.resolveSemverSpecifierFromConventionalCommits = void 0; | ||
exports.resolveSemverSpecifierFromConventionalCommits = resolveSemverSpecifierFromConventionalCommits; | ||
exports.resolveSemverSpecifierFromPrompt = resolveSemverSpecifierFromPrompt; | ||
const enquirer_1 = require("enquirer"); | ||
@@ -15,3 +16,2 @@ const semver_1 = require("semver"); | ||
} | ||
exports.resolveSemverSpecifierFromConventionalCommits = resolveSemverSpecifierFromConventionalCommits; | ||
async function resolveSemverSpecifierFromPrompt(selectionMessage, customVersionMessage) { | ||
@@ -59,2 +59,1 @@ try { | ||
} | ||
exports.resolveSemverSpecifierFromPrompt = resolveSemverSpecifierFromPrompt; |
@@ -7,3 +7,6 @@ "use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.deriveNewSemverVersion = exports.determineSemverChange = exports.isValidSemverSpecifier = exports.isRelativeVersionKeyword = void 0; | ||
exports.isRelativeVersionKeyword = isRelativeVersionKeyword; | ||
exports.isValidSemverSpecifier = isValidSemverSpecifier; | ||
exports.determineSemverChange = determineSemverChange; | ||
exports.deriveNewSemverVersion = deriveNewSemverVersion; | ||
const semver_1 = require("semver"); | ||
@@ -13,7 +16,5 @@ function isRelativeVersionKeyword(val) { | ||
} | ||
exports.isRelativeVersionKeyword = isRelativeVersionKeyword; | ||
function isValidSemverSpecifier(specifier) { | ||
return (specifier && !!((0, semver_1.valid)(specifier) || isRelativeVersionKeyword(specifier))); | ||
} | ||
exports.isValidSemverSpecifier = isValidSemverSpecifier; | ||
// https://github.com/unjs/changelogen/blob/main/src/semver.ts | ||
@@ -39,3 +40,2 @@ function determineSemverChange(commits, config) { | ||
} | ||
exports.determineSemverChange = determineSemverChange; | ||
function deriveNewSemverVersion(currentSemverVersion, semverSpecifier, preid) { | ||
@@ -62,2 +62,1 @@ if (!(0, semver_1.valid)(currentSemverVersion)) { | ||
} | ||
exports.deriveNewSemverVersion = deriveNewSemverVersion; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.getCommitsRelevantToProjects = exports.handleDuplicateGitTags = exports.createGitTagValues = exports.createCommitMessageValues = exports.commitChanges = exports.ReleaseVersion = exports.noDiffInChangelogMessage = void 0; | ||
exports.ReleaseVersion = exports.noDiffInChangelogMessage = void 0; | ||
exports.commitChanges = commitChanges; | ||
exports.createCommitMessageValues = createCommitMessageValues; | ||
exports.createGitTagValues = createGitTagValues; | ||
exports.handleDuplicateGitTags = handleDuplicateGitTags; | ||
exports.getCommitsRelevantToProjects = getCommitsRelevantToProjects; | ||
const chalk = require("chalk"); | ||
@@ -51,3 +56,2 @@ const semver_1 = require("semver"); | ||
} | ||
exports.commitChanges = commitChanges; | ||
function createCommitMessageValues(releaseGroups, releaseGroupToFilteredProjects, versionData, commitMessage) { | ||
@@ -136,3 +140,2 @@ const commitMessageValues = [commitMessage]; | ||
} | ||
exports.createCommitMessageValues = createCommitMessageValues; | ||
function stripPlaceholders(str, placeholders) { | ||
@@ -176,3 +179,2 @@ for (const placeholder of placeholders) { | ||
} | ||
exports.createGitTagValues = createGitTagValues; | ||
function findDuplicates(arr) { | ||
@@ -206,3 +208,2 @@ const seen = new Set(); | ||
} | ||
exports.handleDuplicateGitTags = handleDuplicateGitTags; | ||
async function getCommitsRelevantToProjects(projectGraph, commits, projects) { | ||
@@ -220,2 +221,1 @@ const { fileMap } = await (0, file_map_utils_1.createFileMapUsingProjectGraph)(projectGraph); | ||
} | ||
exports.getCommitsRelevantToProjects = getCommitsRelevantToProjects; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.releaseVersion = exports.releaseVersionCLIHandler = exports.validReleaseVersionPrefixes = exports.deriveNewSemverVersion = void 0; | ||
exports.releaseVersionCLIHandler = exports.validReleaseVersionPrefixes = exports.deriveNewSemverVersion = void 0; | ||
exports.releaseVersion = releaseVersion; | ||
const chalk = require("chalk"); | ||
@@ -284,3 +285,2 @@ const node_child_process_1 = require("node:child_process"); | ||
} | ||
exports.releaseVersion = releaseVersion; | ||
function appendVersionData(existingVersionData, newVersionData) { | ||
@@ -287,0 +287,0 @@ // Mutate the existing version data |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.repair = void 0; | ||
exports.repair = repair; | ||
const params_1 = require("../../utils/params"); | ||
@@ -41,2 +41,1 @@ const migrationsJson = require("../../../migrations.json"); | ||
} | ||
exports.repair = repair; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.findInstalledPackagesWeCareAbout = exports.findRegisteredPluginsBeingUsed = exports.findInstalledCommunityPlugins = exports.findMisalignedPackagesForPackage = exports.getReportData = exports.reportHandler = exports.patternsWeIgnoreInCommunityReport = exports.packagesWeCareAbout = void 0; | ||
exports.patternsWeIgnoreInCommunityReport = exports.packagesWeCareAbout = void 0; | ||
exports.reportHandler = reportHandler; | ||
exports.getReportData = getReportData; | ||
exports.findMisalignedPackagesForPackage = findMisalignedPackagesForPackage; | ||
exports.findInstalledCommunityPlugins = findInstalledCommunityPlugins; | ||
exports.findRegisteredPluginsBeingUsed = findRegisteredPluginsBeingUsed; | ||
exports.findInstalledPackagesWeCareAbout = findInstalledPackagesWeCareAbout; | ||
const chalk = require("chalk"); | ||
@@ -16,2 +22,3 @@ const output_1 = require("../../utils/output"); | ||
const nx_json_1 = require("../../config/nx-json"); | ||
const error_types_1 = require("../../project-graph/error-types"); | ||
const nxPackageJson = (0, fileutils_1.readJsonFile)((0, path_1.join)(__dirname, '../../../package.json')); | ||
@@ -93,19 +100,10 @@ exports.packagesWeCareAbout = [ | ||
} | ||
exports.reportHandler = reportHandler; | ||
async function getReportData() { | ||
const pm = (0, package_manager_1.detectPackageManager)(); | ||
const pmVersion = (0, package_manager_1.getPackageManagerVersion)(pm); | ||
const { graph, error: projectGraphError } = await tryGetProjectGraph(); | ||
const nxJson = (0, nx_json_1.readNxJson)(); | ||
const localPlugins = await findLocalPlugins(nxJson); | ||
const localPlugins = await findLocalPlugins(graph, nxJson); | ||
const communityPlugins = findInstalledCommunityPlugins(); | ||
const registeredPlugins = findRegisteredPluginsBeingUsed(nxJson); | ||
let projectGraphError = null; | ||
if (isNativeAvailable()) { | ||
try { | ||
await (0, project_graph_1.createProjectGraphAsync)(); | ||
} | ||
catch (e) { | ||
projectGraphError = e; | ||
} | ||
} | ||
const packageVersionsWeCareAbout = findInstalledPackagesWeCareAbout(); | ||
@@ -134,6 +132,20 @@ packageVersionsWeCareAbout.unshift({ | ||
} | ||
exports.getReportData = getReportData; | ||
async function findLocalPlugins(nxJson) { | ||
async function tryGetProjectGraph() { | ||
try { | ||
const projectGraph = await (0, project_graph_1.createProjectGraphAsync)({ exitOnError: true }); | ||
return { graph: await (0, project_graph_1.createProjectGraphAsync)() }; | ||
} | ||
catch (error) { | ||
if (error instanceof error_types_1.ProjectGraphError) { | ||
return { | ||
graph: error.getPartialProjectGraph(), | ||
error: error, | ||
}; | ||
} | ||
return { | ||
error, | ||
}; | ||
} | ||
} | ||
async function findLocalPlugins(projectGraph, nxJson) { | ||
try { | ||
const localPlugins = await (0, local_plugins_1.getLocalWorkspacePlugins)((0, project_graph_1.readProjectsConfigurationFromProjectGraph)(projectGraph), nxJson); | ||
@@ -185,3 +197,2 @@ return Array.from(localPlugins.keys()); | ||
} | ||
exports.findMisalignedPackagesForPackage = findMisalignedPackagesForPackage; | ||
function findInstalledCommunityPlugins() { | ||
@@ -194,3 +205,2 @@ const installedPlugins = (0, installed_plugins_1.findInstalledPlugins)(); | ||
} | ||
exports.findInstalledCommunityPlugins = findInstalledCommunityPlugins; | ||
function findRegisteredPluginsBeingUsed(nxJson) { | ||
@@ -202,3 +212,2 @@ if (!nxJson.plugins) { | ||
} | ||
exports.findRegisteredPluginsBeingUsed = findRegisteredPluginsBeingUsed; | ||
function findInstalledPackagesWeCareAbout() { | ||
@@ -246,3 +255,2 @@ const packagesWeMayCareAbout = {}; | ||
} | ||
exports.findInstalledPackagesWeCareAbout = findInstalledPackagesWeCareAbout; | ||
function isNativeAvailable() { | ||
@@ -249,0 +257,0 @@ try { |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.resetHandler = void 0; | ||
exports.resetHandler = resetHandler; | ||
const fs_extra_1 = require("fs-extra"); | ||
@@ -77,3 +77,2 @@ const client_1 = require("../../daemon/client/client"); | ||
} | ||
exports.resetHandler = resetHandler; | ||
function killDaemon() { | ||
@@ -80,0 +79,0 @@ return client_1.daemonClient.stop(); |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.projectsToRun = exports.runMany = void 0; | ||
exports.runMany = runMany; | ||
exports.projectsToRun = projectsToRun; | ||
const run_command_1 = require("../../tasks-runner/run-command"); | ||
@@ -49,3 +50,2 @@ const command_line_utils_1 = require("../../utils/command-line-utils"); | ||
} | ||
exports.runMany = runMany; | ||
function projectsToRun(nxArgs, projectGraph) { | ||
@@ -84,3 +84,2 @@ const selectedProjects = {}; | ||
} | ||
exports.projectsToRun = projectsToRun; | ||
function runnableForTarget(projects, targets) { | ||
@@ -87,0 +86,0 @@ const runnable = new Set(); |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.getExecutorInformation = exports.normalizeExecutorSchema = void 0; | ||
exports.normalizeExecutorSchema = normalizeExecutorSchema; | ||
exports.getExecutorInformation = getExecutorInformation; | ||
const path_1 = require("path"); | ||
@@ -20,3 +21,2 @@ const plugins_1 = require("../../project-graph/plugins"); | ||
} | ||
exports.normalizeExecutorSchema = normalizeExecutorSchema; | ||
function cacheKey(nodeModule, executor, root) { | ||
@@ -57,3 +57,2 @@ return `${root}:${nodeModule}:${executor}`; | ||
} | ||
exports.getExecutorInformation = getExecutorInformation; | ||
function readExecutorJson(nodeModule, executor, root, projects) { | ||
@@ -60,0 +59,0 @@ const { json: packageJson, path: packageJsonPath } = (0, plugins_1.readPluginPackageJson)(nodeModule, projects, root |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.runOne = void 0; | ||
exports.runOne = runOne; | ||
const run_command_1 = require("../../tasks-runner/run-command"); | ||
@@ -57,3 +57,2 @@ const command_line_utils_1 = require("../../utils/command-line-utils"); | ||
} | ||
exports.runOne = runOne; | ||
function getProjects(projectGraph, project) { | ||
@@ -60,0 +59,0 @@ if (!projectGraph.nodes[project]) { |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.run = exports.printTargetRunHelp = exports.runExecutor = exports.validateProject = exports.printRunHelp = void 0; | ||
exports.printRunHelp = printRunHelp; | ||
exports.validateProject = validateProject; | ||
exports.runExecutor = runExecutor; | ||
exports.printTargetRunHelp = printTargetRunHelp; | ||
exports.run = run; | ||
const npm_run_path_1 = require("npm-run-path"); | ||
@@ -21,3 +25,2 @@ const params_1 = require("../../utils/params"); | ||
} | ||
exports.printRunHelp = printRunHelp; | ||
function validateProject(projects, projectName) { | ||
@@ -29,3 +32,2 @@ const project = projects.projects[projectName]; | ||
} | ||
exports.validateProject = validateProject; | ||
function isPromise(v) { | ||
@@ -176,3 +178,2 @@ return typeof v?.then === 'function'; | ||
} | ||
exports.runExecutor = runExecutor; | ||
function printTargetRunHelp(targetDescription, root) { | ||
@@ -185,3 +186,2 @@ const projectGraph = (0, project_graph_1.readCachedProjectGraph)(); | ||
} | ||
exports.printTargetRunHelp = printTargetRunHelp; | ||
function run(cwd, root, targetDescription, overrides, isVerbose, taskGraph) { | ||
@@ -194,2 +194,1 @@ const projectGraph = (0, project_graph_1.readCachedProjectGraph)(); | ||
} | ||
exports.run = run; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.showProjectHandler = void 0; | ||
exports.showProjectHandler = showProjectHandler; | ||
const output_1 = require("../../utils/output"); | ||
@@ -61,2 +61,1 @@ const project_graph_1 = require("../../project-graph/project-graph"); | ||
} | ||
exports.showProjectHandler = showProjectHandler; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.showProjectsHandler = void 0; | ||
exports.showProjectsHandler = showProjectsHandler; | ||
const output_1 = require("../../utils/output"); | ||
@@ -64,3 +64,2 @@ const nx_json_1 = require("../../config/nx-json"); | ||
} | ||
exports.showProjectsHandler = showProjectsHandler; | ||
function getGraphNodesMatchingPatterns(graph, patterns) { | ||
@@ -67,0 +66,0 @@ const nodes = {}; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.watch = exports.BatchFunctionRunner = void 0; | ||
exports.BatchFunctionRunner = void 0; | ||
exports.watch = watch; | ||
const child_process_1 = require("child_process"); | ||
@@ -175,2 +176,1 @@ const client_1 = require("../../daemon/client/client"); | ||
} | ||
exports.watch = watch; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.linkToNxDevAndExamples = void 0; | ||
exports.linkToNxDevAndExamples = linkToNxDevAndExamples; | ||
const chalk = require("chalk"); | ||
@@ -12,2 +12,1 @@ const examples_1 = require("../examples"); | ||
} | ||
exports.linkToNxDevAndExamples = linkToNxDevAndExamples; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.parseCSV = exports.withRunOneOptions = exports.withOutputStyleOption = exports.withOverrides = exports.withRunManyOptions = exports.withAffectedOptions = exports.withBatch = exports.withVerbose = exports.withConfiguration = exports.withTargetAndConfigurationOption = exports.withRunOptions = exports.withExcludeOption = void 0; | ||
exports.withExcludeOption = withExcludeOption; | ||
exports.withRunOptions = withRunOptions; | ||
exports.withTargetAndConfigurationOption = withTargetAndConfigurationOption; | ||
exports.withConfiguration = withConfiguration; | ||
exports.withVerbose = withVerbose; | ||
exports.withBatch = withBatch; | ||
exports.withAffectedOptions = withAffectedOptions; | ||
exports.withRunManyOptions = withRunManyOptions; | ||
exports.withOverrides = withOverrides; | ||
exports.withOutputStyleOption = withOutputStyleOption; | ||
exports.withRunOneOptions = withRunOneOptions; | ||
exports.parseCSV = parseCSV; | ||
function withExcludeOption(yargs) { | ||
@@ -11,3 +22,2 @@ return yargs.option('exclude', { | ||
} | ||
exports.withExcludeOption = withExcludeOption; | ||
function withRunOptions(yargs) { | ||
@@ -75,3 +85,2 @@ return withVerbose(withExcludeOption(yargs)) | ||
} | ||
exports.withRunOptions = withRunOptions; | ||
function withTargetAndConfigurationOption(yargs, demandOption = true) { | ||
@@ -88,3 +97,2 @@ return withConfiguration(yargs).option('targets', { | ||
} | ||
exports.withTargetAndConfigurationOption = withTargetAndConfigurationOption; | ||
function withConfiguration(yargs) { | ||
@@ -97,3 +105,2 @@ return yargs.options('configuration', { | ||
} | ||
exports.withConfiguration = withConfiguration; | ||
function withVerbose(yargs) { | ||
@@ -111,3 +118,2 @@ return yargs | ||
} | ||
exports.withVerbose = withVerbose; | ||
function withBatch(yargs) { | ||
@@ -123,3 +129,2 @@ return yargs.options('batch', { | ||
} | ||
exports.withBatch = withBatch; | ||
function withAffectedOptions(yargs) { | ||
@@ -166,3 +171,2 @@ return withExcludeOption(yargs) | ||
} | ||
exports.withAffectedOptions = withAffectedOptions; | ||
function withRunManyOptions(yargs) { | ||
@@ -187,3 +191,2 @@ return withRunOptions(yargs) | ||
} | ||
exports.withRunManyOptions = withRunManyOptions; | ||
function withOverrides(args, commandLevel = 1) { | ||
@@ -198,3 +201,2 @@ const unparsedArgs = (args['--'] ?? args._.slice(commandLevel)).map((v) => v.toString()); | ||
} | ||
exports.withOverrides = withOverrides; | ||
const allOutputStyles = [ | ||
@@ -227,3 +229,2 @@ 'dynamic', | ||
} | ||
exports.withOutputStyleOption = withOutputStyleOption; | ||
function withRunOneOptions(yargs) { | ||
@@ -252,3 +253,2 @@ const executorShouldShowHelp = !(process.argv[2] === 'run' && process.argv[3] === '--help'); | ||
} | ||
exports.withRunOneOptions = withRunOneOptions; | ||
function parseCSV(args) { | ||
@@ -267,2 +267,1 @@ if (!args) { | ||
} | ||
exports.parseCSV = parseCSV; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.createCommandGraph = void 0; | ||
exports.createCommandGraph = createCommandGraph; | ||
const task_graph_utils_1 = require("../tasks-runner/task-graph-utils"); | ||
@@ -66,2 +66,1 @@ const output_1 = require("../utils/output"); | ||
} | ||
exports.createCommandGraph = createCommandGraph; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.getCommandProjects = void 0; | ||
exports.getCommandProjects = getCommandProjects; | ||
const utils_1 = require("../tasks-runner/utils"); | ||
@@ -10,3 +10,2 @@ const create_command_graph_1 = require("./create-command-graph"); | ||
} | ||
exports.getCommandProjects = getCommandProjects; | ||
function getSortedProjects(commandGraph, sortedProjects = []) { | ||
@@ -13,0 +12,0 @@ const roots = commandGraph.roots; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.findMatchingProjectInCwd = exports.calculateDefaultProjectName = void 0; | ||
exports.calculateDefaultProjectName = calculateDefaultProjectName; | ||
exports.findMatchingProjectInCwd = findMatchingProjectInCwd; | ||
const find_project_for_path_1 = require("../project-graph/utils/find-project-for-path"); | ||
@@ -32,3 +33,2 @@ const path_1 = require("path"); | ||
} | ||
exports.calculateDefaultProjectName = calculateDefaultProjectName; | ||
function findMatchingProjectInCwd(projects, relativeCwd) { | ||
@@ -43,2 +43,1 @@ const projectRootMappings = new Map(); | ||
} | ||
exports.findMatchingProjectInCwd = findMatchingProjectInCwd; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.readNxJson = exports.workspaceLayout = void 0; | ||
exports.readNxJson = void 0; | ||
exports.workspaceLayout = workspaceLayout; | ||
const nx_json_1 = require("./nx-json"); | ||
@@ -15,4 +16,3 @@ /** | ||
} | ||
exports.workspaceLayout = workspaceLayout; | ||
var nx_json_2 = require("./nx-json"); | ||
Object.defineProperty(exports, "readNxJson", { enumerable: true, get: function () { return nx_json_2.readNxJson; } }); |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.hasNxJson = exports.readNxJson = void 0; | ||
exports.readNxJson = readNxJson; | ||
exports.hasNxJson = hasNxJson; | ||
const fs_1 = require("fs"); | ||
@@ -35,3 +36,2 @@ const path_1 = require("path"); | ||
} | ||
exports.readNxJson = readNxJson; | ||
function hasNxJson(root) { | ||
@@ -41,2 +41,1 @@ const nxJson = (0, path_1.join)(root, 'nx.json'); | ||
} | ||
exports.hasNxJson = hasNxJson; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.DependencyType = exports.fileDataDepType = exports.fileDataDepTarget = void 0; | ||
exports.DependencyType = void 0; | ||
exports.fileDataDepTarget = fileDataDepTarget; | ||
exports.fileDataDepType = fileDataDepType; | ||
function fileDataDepTarget(dep) { | ||
@@ -11,3 +13,2 @@ return typeof dep === 'string' | ||
} | ||
exports.fileDataDepTarget = fileDataDepTarget; | ||
function fileDataDepType(dep) { | ||
@@ -20,3 +21,2 @@ return typeof dep === 'string' | ||
} | ||
exports.fileDataDepType = fileDataDepType; | ||
/** | ||
@@ -23,0 +23,0 @@ * Type of dependency between projects |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.resolveSchema = exports.resolveImplementation = exports.getImplementationFactory = void 0; | ||
exports.getImplementationFactory = getImplementationFactory; | ||
exports.resolveImplementation = resolveImplementation; | ||
exports.resolveSchema = resolveSchema; | ||
const fs_1 = require("fs"); | ||
@@ -26,3 +28,2 @@ const path_1 = require("path"); | ||
} | ||
exports.getImplementationFactory = getImplementationFactory; | ||
/** | ||
@@ -50,3 +51,2 @@ * This function is used to resolve the implementation of an executor or generator. | ||
} | ||
exports.resolveImplementation = resolveImplementation; | ||
function resolveSchema(schemaPath, directory) { | ||
@@ -61,2 +61,1 @@ const maybeSchemaPath = (0, path_1.join)(directory, schemaPath); | ||
} | ||
exports.resolveSchema = resolveSchema; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.toProjectName = void 0; | ||
exports.toProjectName = toProjectName; | ||
const path_1 = require("path"); | ||
@@ -13,2 +13,1 @@ /** | ||
} | ||
exports.toProjectName = toProjectName; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.getDaemonProcessIdSync = exports.safelyCleanUpExistingProcess = exports.writeDaemonJsonProcessCache = exports.deleteDaemonJsonProcessCache = exports.readDaemonProcessJsonCache = exports.serverProcessJsonPath = void 0; | ||
exports.serverProcessJsonPath = void 0; | ||
exports.readDaemonProcessJsonCache = readDaemonProcessJsonCache; | ||
exports.deleteDaemonJsonProcessCache = deleteDaemonJsonProcessCache; | ||
exports.writeDaemonJsonProcessCache = writeDaemonJsonProcessCache; | ||
exports.safelyCleanUpExistingProcess = safelyCleanUpExistingProcess; | ||
exports.getDaemonProcessIdSync = getDaemonProcessIdSync; | ||
const fs_extra_1 = require("fs-extra"); | ||
@@ -14,3 +19,2 @@ const path_1 = require("path"); | ||
} | ||
exports.readDaemonProcessJsonCache = readDaemonProcessJsonCache; | ||
function deleteDaemonJsonProcessCache() { | ||
@@ -24,7 +28,5 @@ try { | ||
} | ||
exports.deleteDaemonJsonProcessCache = deleteDaemonJsonProcessCache; | ||
async function writeDaemonJsonProcessCache(daemonJson) { | ||
await (0, fs_extra_1.writeJson)(exports.serverProcessJsonPath, daemonJson); | ||
} | ||
exports.writeDaemonJsonProcessCache = writeDaemonJsonProcessCache; | ||
async function safelyCleanUpExistingProcess() { | ||
@@ -58,3 +60,2 @@ const daemonProcessJson = await readDaemonProcessJsonCache(); | ||
} | ||
exports.safelyCleanUpExistingProcess = safelyCleanUpExistingProcess; | ||
// Must be sync for the help output use case | ||
@@ -73,2 +74,1 @@ function getDaemonProcessIdSync() { | ||
} | ||
exports.getDaemonProcessIdSync = getDaemonProcessIdSync; |
@@ -1,3 +0,1 @@ | ||
/// <reference types="node" /> | ||
/// <reference types="node" /> | ||
import { ChildProcess } from 'child_process'; | ||
@@ -4,0 +2,0 @@ import { FileData, ProjectGraph } from '../../config/project-graph'; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.isDaemonEnabled = exports.daemonClient = exports.DaemonClient = void 0; | ||
exports.daemonClient = exports.DaemonClient = void 0; | ||
exports.isDaemonEnabled = isDaemonEnabled; | ||
const workspace_root_1 = require("../../utils/workspace-root"); | ||
@@ -416,3 +417,2 @@ const child_process_1 = require("child_process"); | ||
} | ||
exports.isDaemonEnabled = isDaemonEnabled; | ||
function isDocker() { | ||
@@ -419,0 +419,0 @@ try { |
@@ -1,2 +0,1 @@ | ||
/// <reference types="node" /> | ||
import { Socket } from 'net'; | ||
@@ -3,0 +2,0 @@ export interface Message extends Record<string, any> { |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.generateDaemonHelpOutput = void 0; | ||
exports.generateDaemonHelpOutput = generateDaemonHelpOutput; | ||
const child_process_1 = require("child_process"); | ||
@@ -26,2 +26,1 @@ const cache_1 = require("../cache"); | ||
} | ||
exports.generateDaemonHelpOutput = generateDaemonHelpOutput; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.isOnDaemon = void 0; | ||
exports.isOnDaemon = isOnDaemon; | ||
function isOnDaemon() { | ||
return !!global.NX_DAEMON; | ||
} | ||
exports.isOnDaemon = isOnDaemon; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.isHandleContextFileDataMessage = exports.GET_CONTEXT_FILE_DATA = void 0; | ||
exports.GET_CONTEXT_FILE_DATA = void 0; | ||
exports.isHandleContextFileDataMessage = isHandleContextFileDataMessage; | ||
exports.GET_CONTEXT_FILE_DATA = 'GET_CONTEXT_FILE_DATA'; | ||
@@ -11,2 +12,1 @@ function isHandleContextFileDataMessage(message) { | ||
} | ||
exports.isHandleContextFileDataMessage = isHandleContextFileDataMessage; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.isHandleGetFilesInDirectoryMessage = exports.GET_FILES_IN_DIRECTORY = void 0; | ||
exports.GET_FILES_IN_DIRECTORY = void 0; | ||
exports.isHandleGetFilesInDirectoryMessage = isHandleGetFilesInDirectoryMessage; | ||
exports.GET_FILES_IN_DIRECTORY = 'GET_FILES_IN_DIRECTORY'; | ||
@@ -11,2 +12,1 @@ function isHandleGetFilesInDirectoryMessage(message) { | ||
} | ||
exports.isHandleGetFilesInDirectoryMessage = isHandleGetFilesInDirectoryMessage; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.isHandleNxWorkspaceFilesMessage = exports.GET_NX_WORKSPACE_FILES = void 0; | ||
exports.GET_NX_WORKSPACE_FILES = void 0; | ||
exports.isHandleNxWorkspaceFilesMessage = isHandleNxWorkspaceFilesMessage; | ||
exports.GET_NX_WORKSPACE_FILES = 'GET_NX_WORKSPACE_FILES'; | ||
@@ -11,2 +12,1 @@ function isHandleNxWorkspaceFilesMessage(message) { | ||
} | ||
exports.isHandleNxWorkspaceFilesMessage = isHandleNxWorkspaceFilesMessage; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.isHandleGlobMessage = exports.GLOB = void 0; | ||
exports.GLOB = void 0; | ||
exports.isHandleGlobMessage = isHandleGlobMessage; | ||
exports.GLOB = 'GLOB'; | ||
@@ -11,2 +12,1 @@ function isHandleGlobMessage(message) { | ||
} | ||
exports.isHandleGlobMessage = isHandleGlobMessage; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.isHandleHashGlobMessage = exports.HASH_GLOB = void 0; | ||
exports.HASH_GLOB = void 0; | ||
exports.isHandleHashGlobMessage = isHandleHashGlobMessage; | ||
exports.HASH_GLOB = 'HASH_GLOB'; | ||
@@ -11,2 +12,1 @@ function isHandleHashGlobMessage(message) { | ||
} | ||
exports.isHandleHashGlobMessage = isHandleHashGlobMessage; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.isHandleWriteTaskRunsToHistoryMessage = exports.WRITE_TASK_RUNS_TO_HISTORY = exports.isHandleGetTaskHistoryForHashesMessage = exports.GET_TASK_HISTORY_FOR_HASHES = void 0; | ||
exports.WRITE_TASK_RUNS_TO_HISTORY = exports.GET_TASK_HISTORY_FOR_HASHES = void 0; | ||
exports.isHandleGetTaskHistoryForHashesMessage = isHandleGetTaskHistoryForHashesMessage; | ||
exports.isHandleWriteTaskRunsToHistoryMessage = isHandleWriteTaskRunsToHistoryMessage; | ||
exports.GET_TASK_HISTORY_FOR_HASHES = 'GET_TASK_HISTORY_FOR_HASHES'; | ||
@@ -11,3 +13,2 @@ function isHandleGetTaskHistoryForHashesMessage(message) { | ||
} | ||
exports.isHandleGetTaskHistoryForHashesMessage = isHandleGetTaskHistoryForHashesMessage; | ||
exports.WRITE_TASK_RUNS_TO_HISTORY = 'WRITE_TASK_RUNS_TO_HISTORY'; | ||
@@ -20,2 +21,1 @@ function isHandleWriteTaskRunsToHistoryMessage(message) { | ||
} | ||
exports.isHandleWriteTaskRunsToHistoryMessage = isHandleWriteTaskRunsToHistoryMessage; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.isHandleUpdateContextMessage = exports.GLOB = void 0; | ||
exports.GLOB = void 0; | ||
exports.isHandleUpdateContextMessage = isHandleUpdateContextMessage; | ||
exports.GLOB = 'GLOB'; | ||
@@ -11,2 +12,1 @@ function isHandleUpdateContextMessage(message) { | ||
} | ||
exports.isHandleUpdateContextMessage = isHandleUpdateContextMessage; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.getProjectsAndGlobalChanges = void 0; | ||
exports.getProjectsAndGlobalChanges = getProjectsAndGlobalChanges; | ||
const perf_hooks_1 = require("perf_hooks"); | ||
@@ -45,2 +45,1 @@ const project_graph_incremental_recomputation_1 = require("../project-graph-incremental-recomputation"); | ||
} | ||
exports.getProjectsAndGlobalChanges = getProjectsAndGlobalChanges; |
@@ -1,2 +0,1 @@ | ||
/// <reference types="node" /> | ||
import { Socket } from 'net'; | ||
@@ -3,0 +2,0 @@ export declare let registeredFileWatcherSockets: { |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.notifyFileWatcherSockets = exports.hasRegisteredFileWatcherSockets = exports.removeRegisteredFileWatcherSocket = exports.registeredFileWatcherSockets = void 0; | ||
exports.registeredFileWatcherSockets = void 0; | ||
exports.removeRegisteredFileWatcherSocket = removeRegisteredFileWatcherSocket; | ||
exports.hasRegisteredFileWatcherSockets = hasRegisteredFileWatcherSockets; | ||
exports.notifyFileWatcherSockets = notifyFileWatcherSockets; | ||
const find_matching_projects_1 = require("../../../utils/find-matching-projects"); | ||
@@ -15,7 +18,5 @@ const project_graph_utils_1 = require("../../../utils/project-graph-utils"); | ||
} | ||
exports.removeRegisteredFileWatcherSocket = removeRegisteredFileWatcherSocket; | ||
function hasRegisteredFileWatcherSockets() { | ||
return exports.registeredFileWatcherSockets.length > 0; | ||
} | ||
exports.hasRegisteredFileWatcherSockets = hasRegisteredFileWatcherSockets; | ||
function notifyFileWatcherSockets(createdFiles, updatedFiles, deletedFiles) { | ||
@@ -67,2 +68,1 @@ if (!hasRegisteredFileWatcherSockets()) { | ||
} | ||
exports.notifyFileWatcherSockets = notifyFileWatcherSockets; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.handleContextFileData = void 0; | ||
exports.handleContextFileData = handleContextFileData; | ||
const workspace_context_1 = require("../../utils/workspace-context"); | ||
@@ -13,2 +13,1 @@ const workspace_root_1 = require("../../utils/workspace-root"); | ||
} | ||
exports.handleContextFileData = handleContextFileData; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.handleGetFilesInDirectory = void 0; | ||
exports.handleGetFilesInDirectory = handleGetFilesInDirectory; | ||
const workspace_context_1 = require("../../utils/workspace-context"); | ||
@@ -13,2 +13,1 @@ const workspace_root_1 = require("../../utils/workspace-root"); | ||
} | ||
exports.handleGetFilesInDirectory = handleGetFilesInDirectory; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.handleGetTaskHistoryForHashes = void 0; | ||
exports.handleGetTaskHistoryForHashes = handleGetTaskHistoryForHashes; | ||
const task_history_1 = require("../../utils/task-history"); | ||
@@ -12,2 +12,1 @@ async function handleGetTaskHistoryForHashes(hashes) { | ||
} | ||
exports.handleGetTaskHistoryForHashes = handleGetTaskHistoryForHashes; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.handleGlob = void 0; | ||
exports.handleGlob = handleGlob; | ||
const workspace_root_1 = require("../../utils/workspace-root"); | ||
@@ -13,2 +13,1 @@ const workspace_context_1 = require("../../utils/workspace-context"); | ||
} | ||
exports.handleGlob = handleGlob; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.handleHashGlob = void 0; | ||
exports.handleHashGlob = handleHashGlob; | ||
const workspace_root_1 = require("../../utils/workspace-root"); | ||
@@ -13,2 +13,1 @@ const workspace_context_1 = require("../../utils/workspace-context"); | ||
} | ||
exports.handleHashGlob = handleHashGlob; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.handleHashTasks = void 0; | ||
exports.handleHashTasks = handleHashTasks; | ||
const project_graph_incremental_recomputation_1 = require("./project-graph-incremental-recomputation"); | ||
@@ -36,2 +36,1 @@ const task_hasher_1 = require("../../hasher/task-hasher"); | ||
} | ||
exports.handleHashTasks = handleHashTasks; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.handleNxWorkspaceFiles = void 0; | ||
exports.handleNxWorkspaceFiles = handleNxWorkspaceFiles; | ||
const workspace_context_1 = require("../../utils/workspace-context"); | ||
@@ -13,2 +13,1 @@ const workspace_root_1 = require("../../utils/workspace-root"); | ||
} | ||
exports.handleNxWorkspaceFiles = handleNxWorkspaceFiles; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.handleOutputsHashesMatch = exports.handleRecordOutputsHash = void 0; | ||
exports.handleRecordOutputsHash = handleRecordOutputsHash; | ||
exports.handleOutputsHashesMatch = handleOutputsHashesMatch; | ||
const outputs_tracking_1 = require("./outputs-tracking"); | ||
@@ -20,3 +21,2 @@ async function handleRecordOutputsHash(payload) { | ||
} | ||
exports.handleRecordOutputsHash = handleRecordOutputsHash; | ||
async function handleOutputsHashesMatch(payload) { | ||
@@ -37,2 +37,1 @@ try { | ||
} | ||
exports.handleOutputsHashesMatch = handleOutputsHashesMatch; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.handleProcessInBackground = void 0; | ||
exports.handleProcessInBackground = handleProcessInBackground; | ||
const logger_1 = require("./logger"); | ||
@@ -33,2 +33,1 @@ const installation_directory_1 = require("../../utils/installation-directory"); | ||
} | ||
exports.handleProcessInBackground = handleProcessInBackground; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.handleRequestProjectGraph = void 0; | ||
exports.handleRequestProjectGraph = handleRequestProjectGraph; | ||
const perf_hooks_1 = require("perf_hooks"); | ||
@@ -37,2 +37,1 @@ const socket_utils_1 = require("../socket-utils"); | ||
} | ||
exports.handleRequestProjectGraph = handleRequestProjectGraph; |
@@ -1,2 +0,1 @@ | ||
/// <reference types="node" /> | ||
import { Server } from 'net'; | ||
@@ -3,0 +2,0 @@ export declare function handleRequestShutdown(server: Server, numberOfConnections: number): Promise<{ |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.handleRequestShutdown = void 0; | ||
exports.handleRequestShutdown = handleRequestShutdown; | ||
const shutdown_utils_1 = require("./shutdown-utils"); | ||
@@ -26,2 +26,1 @@ async function handleRequestShutdown(server, numberOfConnections) { | ||
} | ||
exports.handleRequestShutdown = handleRequestShutdown; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.handleWriteTaskRunsToHistory = void 0; | ||
exports.handleWriteTaskRunsToHistory = handleWriteTaskRunsToHistory; | ||
const task_history_1 = require("../../utils/task-history"); | ||
@@ -12,2 +12,1 @@ async function handleWriteTaskRunsToHistory(taskRuns) { | ||
} | ||
exports.handleWriteTaskRunsToHistory = handleWriteTaskRunsToHistory; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.disableOutputsTracking = exports.processFileChangesInOutputs = exports.outputsHashesMatch = exports.recordOutputsHash = exports.recordedHash = exports._outputsHashesMatch = exports._recordOutputsHash = void 0; | ||
exports._recordOutputsHash = _recordOutputsHash; | ||
exports._outputsHashesMatch = _outputsHashesMatch; | ||
exports.recordedHash = recordedHash; | ||
exports.recordOutputsHash = recordOutputsHash; | ||
exports.outputsHashesMatch = outputsHashesMatch; | ||
exports.processFileChangesInOutputs = processFileChangesInOutputs; | ||
exports.disableOutputsTracking = disableOutputsTracking; | ||
const path_1 = require("path"); | ||
@@ -28,3 +34,2 @@ const native_1 = require("../../native"); | ||
} | ||
exports._recordOutputsHash = _recordOutputsHash; | ||
function _outputsHashesMatch(outputs, hash) { | ||
@@ -43,7 +48,5 @@ if (outputs.length !== numberOfExpandedOutputs[hash]) { | ||
} | ||
exports._outputsHashesMatch = _outputsHashesMatch; | ||
function recordedHash(output) { | ||
return recordedHashes[output]; | ||
} | ||
exports.recordedHash = recordedHash; | ||
async function recordOutputsHash(_outputs, hash) { | ||
@@ -55,3 +58,2 @@ const outputs = await normalizeOutputs(_outputs); | ||
} | ||
exports.recordOutputsHash = recordOutputsHash; | ||
async function outputsHashesMatch(_outputs, hash) { | ||
@@ -63,3 +65,2 @@ const outputs = await normalizeOutputs(_outputs); | ||
} | ||
exports.outputsHashesMatch = outputsHashesMatch; | ||
async function normalizeOutputs(outputs) { | ||
@@ -94,6 +95,4 @@ let expandedOutputs = (0, collapse_expanded_outputs_1.collapseExpandedOutputs)((0, native_1.getFilesForOutputs)(workspace_root_1.workspaceRoot, outputs)); | ||
} | ||
exports.processFileChangesInOutputs = processFileChangesInOutputs; | ||
function disableOutputsTracking() { | ||
disabled = true; | ||
} | ||
exports.disableOutputsTracking = disableOutputsTracking; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.cleanupPlugins = exports.getPlugins = void 0; | ||
exports.getPlugins = getPlugins; | ||
exports.cleanupPlugins = cleanupPlugins; | ||
const file_hasher_1 = require("../../hasher/file-hasher"); | ||
@@ -29,6 +30,4 @@ const nx_json_1 = require("../../config/nx-json"); | ||
} | ||
exports.getPlugins = getPlugins; | ||
function cleanupPlugins() { | ||
cleanup(); | ||
} | ||
exports.cleanupPlugins = cleanupPlugins; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.addUpdatedAndDeletedFiles = exports.getCachedSerializedProjectGraphPromise = exports.currentProjectGraph = exports.currentProjectFileMapCache = exports.fileMapWithFiles = void 0; | ||
exports.currentProjectGraph = exports.currentProjectFileMapCache = exports.fileMapWithFiles = void 0; | ||
exports.getCachedSerializedProjectGraphPromise = getCachedSerializedProjectGraphPromise; | ||
exports.addUpdatedAndDeletedFiles = addUpdatedAndDeletedFiles; | ||
const perf_hooks_1 = require("perf_hooks"); | ||
@@ -61,3 +63,2 @@ const nx_json_1 = require("../../config/nx-json"); | ||
} | ||
exports.getCachedSerializedProjectGraphPromise = getCachedSerializedProjectGraphPromise; | ||
function addUpdatedAndDeletedFiles(createdFiles, updatedFiles, deletedFiles) { | ||
@@ -93,3 +94,2 @@ for (let f of [...createdFiles, ...updatedFiles]) { | ||
} | ||
exports.addUpdatedAndDeletedFiles = addUpdatedAndDeletedFiles; | ||
function computeWorkspaceConfigHash(projectsConfigurations) { | ||
@@ -96,0 +96,0 @@ const projectConfigurationStrings = Object.entries(projectsConfigurations) |
@@ -1,2 +0,1 @@ | ||
/// <reference types="node" /> | ||
import { Server, Socket } from 'net'; | ||
@@ -3,0 +2,0 @@ export type HandlerResult = { |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.startServer = exports.handleResult = void 0; | ||
exports.handleResult = handleResult; | ||
exports.startServer = startServer; | ||
const fs_1 = require("fs"); | ||
@@ -150,3 +151,2 @@ const net_1 = require("net"); | ||
} | ||
exports.handleResult = handleResult; | ||
function handleInactivityTimeout() { | ||
@@ -341,2 +341,1 @@ if (numberOfOpenConnections > 0) { | ||
} | ||
exports.startServer = startServer; |
@@ -1,2 +0,1 @@ | ||
/// <reference types="node" /> | ||
import type { Server, Socket } from 'net'; | ||
@@ -3,0 +2,0 @@ import type { Watcher } from '../../native'; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.respondWithErrorAndExit = exports.respondToClient = exports.resetInactivityTimeout = exports.handleServerProcessTermination = exports.getOutputWatcherInstance = exports.storeOutputWatcherInstance = exports.getWatcherInstance = exports.storeWatcherInstance = exports.SERVER_INACTIVITY_TIMEOUT_MS = void 0; | ||
exports.SERVER_INACTIVITY_TIMEOUT_MS = void 0; | ||
exports.storeWatcherInstance = storeWatcherInstance; | ||
exports.getWatcherInstance = getWatcherInstance; | ||
exports.storeOutputWatcherInstance = storeOutputWatcherInstance; | ||
exports.getOutputWatcherInstance = getOutputWatcherInstance; | ||
exports.handleServerProcessTermination = handleServerProcessTermination; | ||
exports.resetInactivityTimeout = resetInactivityTimeout; | ||
exports.respondToClient = respondToClient; | ||
exports.respondWithErrorAndExit = respondWithErrorAndExit; | ||
const workspace_root_1 = require("../../utils/workspace-root"); | ||
@@ -15,7 +23,5 @@ const logger_1 = require("./logger"); | ||
} | ||
exports.storeWatcherInstance = storeWatcherInstance; | ||
function getWatcherInstance() { | ||
return watcherInstance; | ||
} | ||
exports.getWatcherInstance = getWatcherInstance; | ||
let outputWatcherInstance; | ||
@@ -25,7 +31,5 @@ function storeOutputWatcherInstance(instance) { | ||
} | ||
exports.storeOutputWatcherInstance = storeOutputWatcherInstance; | ||
function getOutputWatcherInstance() { | ||
return outputWatcherInstance; | ||
} | ||
exports.getOutputWatcherInstance = getOutputWatcherInstance; | ||
async function handleServerProcessTermination({ server, reason, }) { | ||
@@ -50,3 +54,2 @@ try { | ||
} | ||
exports.handleServerProcessTermination = handleServerProcessTermination; | ||
let serverInactivityTimerId; | ||
@@ -59,3 +62,2 @@ function resetInactivityTimeout(cb) { | ||
} | ||
exports.resetInactivityTimeout = resetInactivityTimeout; | ||
function respondToClient(socket, response, description) { | ||
@@ -75,3 +77,2 @@ return new Promise(async (res) => { | ||
} | ||
exports.respondToClient = respondToClient; | ||
async function respondWithErrorAndExit(socket, description, error) { | ||
@@ -87,2 +88,1 @@ const normalizedError = error instanceof error_types_1.DaemonProjectGraphError | ||
} | ||
exports.respondWithErrorAndExit = respondWithErrorAndExit; |
@@ -1,2 +0,1 @@ | ||
/// <reference types="node" /> | ||
import { Server } from 'net'; | ||
@@ -3,0 +2,0 @@ import type { WatchEvent } from '../../native'; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.convertChangeEventsToLogMessage = exports.watchOutputFiles = exports.watchWorkspace = void 0; | ||
exports.watchWorkspace = watchWorkspace; | ||
exports.watchOutputFiles = watchOutputFiles; | ||
exports.convertChangeEventsToLogMessage = convertChangeEventsToLogMessage; | ||
const workspace_root_1 = require("../../utils/workspace-root"); | ||
@@ -43,3 +45,2 @@ const path_1 = require("path"); | ||
} | ||
exports.watchWorkspace = watchWorkspace; | ||
async function watchOutputFiles(cb) { | ||
@@ -58,3 +59,2 @@ const { Watcher } = await Promise.resolve().then(() => require('../../native')); | ||
} | ||
exports.watchOutputFiles = watchOutputFiles; | ||
/** | ||
@@ -101,2 +101,1 @@ * NOTE: An event type of "create" will also apply to the case where the user has restored | ||
} | ||
exports.convertChangeEventsToLogMessage = convertChangeEventsToLogMessage; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.serializeResult = exports.killSocketOrPath = exports.getPluginOsSocketPath = exports.getForkedProcessOsSocketPath = exports.getFullOsSocketPath = exports.isWindows = void 0; | ||
exports.getPluginOsSocketPath = exports.getForkedProcessOsSocketPath = exports.getFullOsSocketPath = exports.isWindows = void 0; | ||
exports.killSocketOrPath = killSocketOrPath; | ||
exports.serializeResult = serializeResult; | ||
const fs_1 = require("fs"); | ||
@@ -36,3 +38,2 @@ const os_1 = require("os"); | ||
} | ||
exports.killSocketOrPath = killSocketOrPath; | ||
// Prepare a serialized project graph result for sending over IPC from the server to the client | ||
@@ -43,2 +44,1 @@ function serializeResult(error, serializedProjectGraph, serializedSourceMaps) { | ||
} | ||
exports.serializeResult = serializeResult; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.removeSocketDir = exports.getSocketDir = exports.isDaemonDisabled = exports.markDaemonAsDisabled = exports.writeDaemonLogs = exports.getDaemonSocketDir = exports.DAEMON_OUTPUT_LOG_FILE = exports.DAEMON_DIR_FOR_CURRENT_WORKSPACE = void 0; | ||
exports.getDaemonSocketDir = exports.DAEMON_OUTPUT_LOG_FILE = exports.DAEMON_DIR_FOR_CURRENT_WORKSPACE = void 0; | ||
exports.writeDaemonLogs = writeDaemonLogs; | ||
exports.markDaemonAsDisabled = markDaemonAsDisabled; | ||
exports.isDaemonDisabled = isDaemonDisabled; | ||
exports.getSocketDir = getSocketDir; | ||
exports.removeSocketDir = removeSocketDir; | ||
/** | ||
@@ -27,7 +32,5 @@ * Per workspace (to avoid subtle differences and issues), we want to have a deterministic | ||
} | ||
exports.writeDaemonLogs = writeDaemonLogs; | ||
function markDaemonAsDisabled() { | ||
(0, fs_1.writeFileSync)((0, path_1.join)(exports.DAEMON_DIR_FOR_CURRENT_WORKSPACE, 'disabled'), 'true'); | ||
} | ||
exports.markDaemonAsDisabled = markDaemonAsDisabled; | ||
function isDaemonDisabled() { | ||
@@ -42,3 +45,2 @@ try { | ||
} | ||
exports.isDaemonDisabled = isDaemonDisabled; | ||
function socketDirName() { | ||
@@ -64,3 +66,2 @@ const hasher = (0, crypto_1.createHash)('sha256'); | ||
} | ||
exports.getSocketDir = getSocketDir; | ||
function removeSocketDir() { | ||
@@ -72,2 +73,1 @@ try { | ||
} | ||
exports.removeSocketDir = removeSocketDir; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.default = default_1; | ||
async function default_1() { | ||
return { success: true }; | ||
} | ||
exports.default = default_1; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.interpolateArgsIntoCommand = exports.LARGE_BUFFER = void 0; | ||
exports.LARGE_BUFFER = void 0; | ||
exports.default = default_1; | ||
exports.interpolateArgsIntoCommand = interpolateArgsIntoCommand; | ||
const child_process_1 = require("child_process"); | ||
@@ -75,3 +77,2 @@ const path = require("path"); | ||
} | ||
exports.default = default_1; | ||
async function runInParallel(options, context) { | ||
@@ -349,3 +350,2 @@ const procs = options.commands.map((c) => createProcess(null, c, options.readyWhenStatus, options.color, calculateCwd(options.cwd, context), options.env ?? {}, true, options.usePty, options.streamOutput, options.tty, options.envFile).then((result) => ({ | ||
} | ||
exports.interpolateArgsIntoCommand = interpolateArgsIntoCommand; | ||
function parseArgs(unparsedCommandArgs, unknownOptions, args) { | ||
@@ -352,0 +352,0 @@ if (!args) { |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.default = default_1; | ||
const path = require("path"); | ||
@@ -32,3 +33,2 @@ const package_manager_1 = require("../../utils/package-manager"); | ||
} | ||
exports.default = default_1; | ||
function nodeProcess(command, cwd, env) { | ||
@@ -35,0 +35,0 @@ (0, child_process_1.execSync)(command, { |
@@ -6,3 +6,3 @@ "use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.convertNxExecutor = void 0; | ||
exports.convertNxExecutor = convertNxExecutor; | ||
const nx_json_1 = require("../../config/nx-json"); | ||
@@ -47,3 +47,2 @@ const retrieve_workspace_files_1 = require("../../project-graph/utils/retrieve-workspace-files"); | ||
} | ||
exports.convertNxExecutor = convertNxExecutor; | ||
function toObservable(promiseOrAsyncIterator) { | ||
@@ -50,0 +49,0 @@ return new (require('rxjs').Observable)((subscriber) => { |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.formatChangedFilesWithPrettierIfAvailable = void 0; | ||
exports.formatChangedFilesWithPrettierIfAvailable = formatChangedFilesWithPrettierIfAvailable; | ||
const path = require("path"); | ||
@@ -49,2 +49,1 @@ /** | ||
} | ||
exports.formatChangedFilesWithPrettierIfAvailable = formatChangedFilesWithPrettierIfAvailable; |
@@ -6,3 +6,3 @@ import type { Tree } from '../tree'; | ||
export declare function createTreeWithEmptyWorkspace(opts?: { | ||
layout?: 'apps-libs'; | ||
layout?: "apps-libs"; | ||
}): Tree; | ||
@@ -9,0 +9,0 @@ /** |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.createTreeWithEmptyV1Workspace = exports.createTreeWithEmptyWorkspace = void 0; | ||
exports.createTreeWithEmptyWorkspace = createTreeWithEmptyWorkspace; | ||
exports.createTreeWithEmptyV1Workspace = createTreeWithEmptyV1Workspace; | ||
const tree_1 = require("../tree"); | ||
@@ -19,3 +20,2 @@ const workspace_root_1 = require("../../utils/workspace-root"); | ||
} | ||
exports.createTreeWithEmptyWorkspace = createTreeWithEmptyWorkspace; | ||
/** | ||
@@ -27,3 +27,2 @@ * @deprecated use createTreeWithEmptyWorkspace instead | ||
} | ||
exports.createTreeWithEmptyV1Workspace = createTreeWithEmptyV1Workspace; | ||
function addCommonFiles(tree, addAppsAndLibsFolders) { | ||
@@ -30,0 +29,0 @@ tree.write('./.prettierrc', JSON.stringify({ singleQuote: true })); |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.createTree = void 0; | ||
exports.createTree = createTree; | ||
const tree_1 = require("../tree"); | ||
@@ -11,2 +11,1 @@ /** | ||
} | ||
exports.createTree = createTree; |
@@ -1,3 +0,1 @@ | ||
/// <reference types="node" /> | ||
/// <reference types="node" /> | ||
import type { Mode } from 'fs'; | ||
@@ -4,0 +2,0 @@ /** |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.printChanges = exports.flushChanges = exports.FsTree = void 0; | ||
exports.FsTree = void 0; | ||
exports.flushChanges = flushChanges; | ||
exports.printChanges = printChanges; | ||
const fs_extra_1 = require("fs-extra"); | ||
@@ -295,3 +297,2 @@ const logger_1 = require("../utils/logger"); | ||
} | ||
exports.flushChanges = flushChanges; | ||
function printChanges(fileChanges, indent = '') { | ||
@@ -310,2 +311,1 @@ fileChanges.forEach((f) => { | ||
} | ||
exports.printChanges = printChanges; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.globAsync = exports.glob = void 0; | ||
exports.glob = glob; | ||
exports.globAsync = globAsync; | ||
const minimatch_1 = require("minimatch"); | ||
@@ -20,3 +21,2 @@ const globs_1 = require("../../utils/globs"); | ||
} | ||
exports.glob = glob; | ||
/** | ||
@@ -34,3 +34,2 @@ * Performs a tree-aware glob search on the files in a workspace. Able to find newly | ||
} | ||
exports.globAsync = globAsync; | ||
function combineGlobResultsWithTree(tree, patterns, results) { | ||
@@ -37,0 +36,0 @@ const matches = new Set(results); |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.updateJson = exports.writeJson = exports.readJson = void 0; | ||
exports.readJson = readJson; | ||
exports.writeJson = writeJson; | ||
exports.updateJson = updateJson; | ||
const json_1 = require("../../utils/json"); | ||
@@ -23,3 +25,2 @@ /** | ||
} | ||
exports.readJson = readJson; | ||
/** | ||
@@ -37,3 +38,2 @@ * Writes a JSON value to the file system tree | ||
} | ||
exports.writeJson = writeJson; | ||
/** | ||
@@ -51,2 +51,1 @@ * Updates a JSON value to the file system tree | ||
} | ||
exports.updateJson = updateJson; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.updateNxJson = exports.readNxJson = void 0; | ||
exports.readNxJson = readNxJson; | ||
exports.updateNxJson = updateNxJson; | ||
const path_1 = require("path"); | ||
@@ -25,3 +26,2 @@ const json_1 = require("./json"); | ||
} | ||
exports.readNxJson = readNxJson; | ||
/** | ||
@@ -50,3 +50,2 @@ * Update nx.json | ||
} | ||
exports.updateNxJson = updateNxJson; | ||
function readNxJsonExtends(tree, extendsPath) { | ||
@@ -53,0 +52,0 @@ try { |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.getRelativeProjectJsonSchemaPath = exports.getProjects = exports.readProjectConfiguration = exports.removeProjectConfiguration = exports.updateProjectConfiguration = exports.addProjectConfiguration = exports.updateNxJson = exports.readNxJson = void 0; | ||
exports.updateNxJson = exports.readNxJson = void 0; | ||
exports.addProjectConfiguration = addProjectConfiguration; | ||
exports.updateProjectConfiguration = updateProjectConfiguration; | ||
exports.removeProjectConfiguration = removeProjectConfiguration; | ||
exports.readProjectConfiguration = readProjectConfiguration; | ||
exports.getProjects = getProjects; | ||
exports.getRelativeProjectJsonSchemaPath = getRelativeProjectJsonSchemaPath; | ||
const minimatch_1 = require("minimatch"); | ||
@@ -45,3 +51,2 @@ const path_1 = require("path"); | ||
} | ||
exports.addProjectConfiguration = addProjectConfiguration; | ||
/** | ||
@@ -67,3 +72,2 @@ * Updates the configuration of an existing project. | ||
} | ||
exports.updateProjectConfiguration = updateProjectConfiguration; | ||
/** | ||
@@ -85,3 +89,2 @@ * Removes the configuration of an existing project. | ||
} | ||
exports.removeProjectConfiguration = removeProjectConfiguration; | ||
/** | ||
@@ -107,3 +110,2 @@ * Reads a project configuration. | ||
} | ||
exports.readProjectConfiguration = readProjectConfiguration; | ||
/** | ||
@@ -125,7 +127,5 @@ * Get a map of all projects in a workspace. | ||
} | ||
exports.getProjects = getProjects; | ||
function getRelativeProjectJsonSchemaPath(tree, project) { | ||
return (0, path_2.normalizePath)((0, path_1.relative)((0, path_1.join)(tree.root, project.root), (0, path_1.join)(tree.root, 'node_modules/nx/schemas/project-schema.json'))); | ||
} | ||
exports.getRelativeProjectJsonSchemaPath = getRelativeProjectJsonSchemaPath; | ||
function readAndCombineAllProjectConfigurations(tree) { | ||
@@ -132,0 +132,0 @@ /** |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.createTaskHasher = void 0; | ||
exports.createTaskHasher = createTaskHasher; | ||
const client_1 = require("../daemon/client/client"); | ||
@@ -16,2 +16,1 @@ const build_project_graph_1 = require("../project-graph/build-project-graph"); | ||
} | ||
exports.createTaskHasher = createTaskHasher; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.hashObject = exports.hashArray = void 0; | ||
exports.hashArray = hashArray; | ||
exports.hashObject = hashObject; | ||
function hashArray(content) { | ||
@@ -9,3 +10,2 @@ // Import as needed. There is also an issue running unit tests in Nx repo if this is a top-level import. | ||
} | ||
exports.hashArray = hashArray; | ||
function hashObject(obj) { | ||
@@ -20,2 +20,1 @@ const { hashArray } = require('../native'); | ||
} | ||
exports.hashObject = hashObject; |
@@ -1,2 +0,1 @@ | ||
/// <reference types="node" /> | ||
import { Task, TaskGraph } from '../config/task-graph'; | ||
@@ -3,0 +2,0 @@ import { TaskHasher } from './task-hasher'; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.hashTask = exports.hashTasksThatDoNotDependOnOutputsOfOtherTasks = void 0; | ||
exports.hashTasksThatDoNotDependOnOutputsOfOtherTasks = hashTasksThatDoNotDependOnOutputsOfOtherTasks; | ||
exports.hashTask = hashTask; | ||
const utils_1 = require("../tasks-runner/utils"); | ||
@@ -33,3 +34,2 @@ const project_graph_1 = require("../project-graph/project-graph"); | ||
} | ||
exports.hashTasksThatDoNotDependOnOutputsOfOtherTasks = hashTasksThatDoNotDependOnOutputsOfOtherTasks; | ||
async function hashTask(hasher, projectGraph, taskGraph, task, env) { | ||
@@ -55,2 +55,1 @@ performance.mark('hashSingleTask:start'); | ||
} | ||
exports.hashTask = hashTask; |
@@ -1,2 +0,1 @@ | ||
/// <reference types="node" /> | ||
import { NxJsonConfiguration } from '../config/nx-json'; | ||
@@ -3,0 +2,0 @@ import { ProjectGraph } from '../config/project-graph'; |
@@ -1,2 +0,1 @@ | ||
/// <reference types="node" /> | ||
import { NxJsonConfiguration } from '../config/nx-json'; | ||
@@ -3,0 +2,0 @@ import { FileData, ProjectFileMap, ProjectGraph } from '../config/project-graph'; |
@@ -1,2 +0,1 @@ | ||
/// <reference types="node" /> | ||
import { FileData, ProjectFileMap, ProjectGraph, ProjectGraphProjectNode } from '../config/project-graph'; | ||
@@ -3,0 +2,0 @@ import { NxJsonConfiguration } from '../config/nx-json'; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.filterUsingGlobPatterns = exports.expandNamedInput = exports.expandSingleProjectInputs = exports.isDepsOutput = exports.isSelfInput = exports.getInputs = exports.extractPatternsFromFileSets = exports.getTargetInputs = exports.getNamedInputs = exports.InProcessTaskHasher = exports.DaemonBasedTaskHasher = void 0; | ||
exports.InProcessTaskHasher = exports.DaemonBasedTaskHasher = void 0; | ||
exports.getNamedInputs = getNamedInputs; | ||
exports.getTargetInputs = getTargetInputs; | ||
exports.extractPatternsFromFileSets = extractPatternsFromFileSets; | ||
exports.getInputs = getInputs; | ||
exports.isSelfInput = isSelfInput; | ||
exports.isDepsOutput = isDepsOutput; | ||
exports.expandSingleProjectInputs = expandSingleProjectInputs; | ||
exports.expandNamedInput = expandNamedInput; | ||
exports.filterUsingGlobPatterns = filterUsingGlobPatterns; | ||
const file_hasher_1 = require("./file-hasher"); | ||
@@ -109,3 +118,2 @@ const node_task_hasher_impl_1 = require("./node-task-hasher-impl"); | ||
} | ||
exports.getNamedInputs = getNamedInputs; | ||
function getTargetInputs(nxJson, projectNode, target) { | ||
@@ -120,3 +128,2 @@ const namedInputs = getNamedInputs(nxJson, projectNode); | ||
} | ||
exports.getTargetInputs = getTargetInputs; | ||
function extractPatternsFromFileSets(inputs) { | ||
@@ -127,3 +134,2 @@ return inputs | ||
} | ||
exports.extractPatternsFromFileSets = extractPatternsFromFileSets; | ||
function getInputs(task, projectGraph, nxJson) { | ||
@@ -137,3 +143,2 @@ const projectNode = projectGraph.nodes[task.target.project]; | ||
} | ||
exports.getInputs = getInputs; | ||
function splitInputsIntoSelfAndDependencies(inputs, namedInputs) { | ||
@@ -188,7 +193,5 @@ const depsInputs = []; | ||
} | ||
exports.isSelfInput = isSelfInput; | ||
function isDepsOutput(input) { | ||
return 'dependentTasksOutputFiles' in input; | ||
} | ||
exports.isDepsOutput = isDepsOutput; | ||
function expandSingleProjectInputs(inputs, namedInputs) { | ||
@@ -225,3 +228,2 @@ const expanded = []; | ||
} | ||
exports.expandSingleProjectInputs = expandSingleProjectInputs; | ||
function expandNamedInput(input, namedInputs) { | ||
@@ -233,3 +235,2 @@ namedInputs ||= {}; | ||
} | ||
exports.expandNamedInput = expandNamedInput; | ||
function filterUsingGlobPatterns(root, files, patterns) { | ||
@@ -273,2 +274,1 @@ const filesetWithExpandedProjectRoot = patterns | ||
} | ||
exports.filterUsingGlobPatterns = filterUsingGlobPatterns; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.default = default_1; | ||
const format_changed_files_with_prettier_if_available_1 = require("../../generators/internal-utils/format-changed-files-with-prettier-if-available"); | ||
@@ -93,3 +94,2 @@ const project_configuration_1 = require("../../generators/utils/project-configuration"); | ||
} | ||
exports.default = default_1; | ||
function isBuildATarget(tree) { | ||
@@ -96,0 +96,0 @@ const projects = (0, project_configuration_1.getProjects)(tree); |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.default = default_1; | ||
const format_changed_files_with_prettier_if_available_1 = require("../../generators/internal-utils/format-changed-files-with-prettier-if-available"); | ||
@@ -64,2 +65,1 @@ const project_configuration_1 = require("../../generators/utils/project-configuration"); | ||
} | ||
exports.default = default_1; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.default = default_1; | ||
const format_changed_files_with_prettier_if_available_1 = require("../../generators/internal-utils/format-changed-files-with-prettier-if-available"); | ||
@@ -16,2 +17,1 @@ const json_1 = require("../../generators/utils/json"); | ||
} | ||
exports.default = default_1; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.default = default_1; | ||
const project_configuration_1 = require("../../generators/utils/project-configuration"); | ||
@@ -53,3 +54,2 @@ const format_changed_files_with_prettier_if_available_1 = require("../../generators/internal-utils/format-changed-files-with-prettier-if-available"); | ||
} | ||
exports.default = default_1; | ||
function updateDependsOnAndInputsInsideNxJson(tree) { | ||
@@ -56,0 +56,0 @@ const nxJson = (0, project_configuration_1.readNxJson)(tree); |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.default = default_1; | ||
const project_configuration_1 = require("../../generators/utils/project-configuration"); | ||
@@ -27,2 +28,1 @@ const json_1 = require("../../generators/utils/json"); | ||
} | ||
exports.default = default_1; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.default = removeRunCommandsOutputPath; | ||
const path_1 = require("../../utils/path"); | ||
@@ -28,3 +29,2 @@ const format_changed_files_with_prettier_if_available_1 = require("../../generators/internal-utils/format-changed-files-with-prettier-if-available"); | ||
} | ||
exports.default = removeRunCommandsOutputPath; | ||
function updateTargetBlock(target) { | ||
@@ -31,0 +31,0 @@ let changed = false; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.default = escapeDollarSignEnvVariables; | ||
const logger_1 = require("../../utils/logger"); | ||
@@ -33,3 +34,2 @@ const project_configuration_1 = require("../../generators/utils/project-configuration"); | ||
} | ||
exports.default = escapeDollarSignEnvVariables; | ||
/** | ||
@@ -36,0 +36,0 @@ * This function parse the env file and escape dollar sign |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.default = removeProjectNameAndRootFormat; | ||
const json_1 = require("../../generators/utils/json"); | ||
@@ -21,2 +22,1 @@ const format_changed_files_with_prettier_if_available_1 = require("../../generators/internal-utils/format-changed-files-with-prettier-if-available"); | ||
} | ||
exports.default = removeProjectNameAndRootFormat; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.default = moveCacheDirectory; | ||
const ignore_1 = require("ignore"); | ||
@@ -22,3 +23,2 @@ function moveCacheDirectory(tree) { | ||
} | ||
exports.default = moveCacheDirectory; | ||
function updateGitIgnore(tree) { | ||
@@ -25,0 +25,0 @@ const gitignore = tree.exists('.gitignore') |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.default = update; | ||
const format_changed_files_with_prettier_if_available_1 = require("../../generators/internal-utils/format-changed-files-with-prettier-if-available"); | ||
@@ -22,3 +23,2 @@ const nx_json_1 = require("../../generators/utils/nx-json"); | ||
} | ||
exports.default = update; | ||
function warnNpmScopeHasChanged(tree, nxJson) { | ||
@@ -25,0 +25,0 @@ const originalScope = nxJson['npmScope']; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.default = migrate; | ||
const json_1 = require("../../generators/utils/json"); | ||
@@ -76,3 +77,2 @@ const format_changed_files_with_prettier_if_available_1 = require("../../generators/internal-utils/format-changed-files-with-prettier-if-available"); | ||
} | ||
exports.default = migrate; | ||
async function isNxCloudClientSupported(nxJson) { | ||
@@ -79,0 +79,0 @@ const nxCloudOptions = (0, run_command_1.getRunnerOptions)('default', nxJson, {}, true); |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.default = update; | ||
/* eslint-disable @typescript-eslint/no-unused-vars */ | ||
@@ -21,2 +22,1 @@ const nx_json_1 = require("../../generators/utils/nx-json"); | ||
} | ||
exports.default = update; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.visitNotIgnoredFiles = void 0; | ||
exports.default = nxReleasePath; | ||
exports.visitNotIgnoredFiles = visitNotIgnoredFiles; | ||
const node_path_1 = require("node:path"); | ||
@@ -23,3 +24,2 @@ const ignore_1 = require("../../utils/ignore"); | ||
} | ||
exports.default = nxReleasePath; | ||
// Adapted from devkit | ||
@@ -45,3 +45,2 @@ function visitNotIgnoredFiles(tree, dirPath = tree.root, visitor) { | ||
} | ||
exports.visitNotIgnoredFiles = visitNotIgnoredFiles; | ||
// Copied from devkit | ||
@@ -48,0 +47,0 @@ function normalizePathRelativeToRoot(path, root) { |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.default = default_1; | ||
const update_nxw_1 = require("../../utils/update-nxw"); | ||
@@ -7,2 +8,1 @@ async function default_1(tree) { | ||
} | ||
exports.default = default_1; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.default = migrate; | ||
const nx_json_1 = require("../../generators/utils/nx-json"); | ||
@@ -9,2 +10,1 @@ function migrate(tree) { | ||
} | ||
exports.default = migrate; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.updateGitIgnore = exports.updatePrettierIgnore = void 0; | ||
exports.default = moveGraphCacheDirectory; | ||
exports.updatePrettierIgnore = updatePrettierIgnore; | ||
exports.updateGitIgnore = updateGitIgnore; | ||
async function moveGraphCacheDirectory(tree) { | ||
@@ -8,3 +10,2 @@ updateGitIgnore(tree); | ||
} | ||
exports.default = moveGraphCacheDirectory; | ||
function updatePrettierIgnore(tree) { | ||
@@ -18,3 +19,2 @@ if (tree.exists('.prettierignore')) { | ||
} | ||
exports.updatePrettierIgnore = updatePrettierIgnore; | ||
function updateGitIgnore(tree) { | ||
@@ -36,2 +36,1 @@ const gitignore = tree.read('.gitignore', 'utf-8'); | ||
} | ||
exports.updateGitIgnore = updateGitIgnore; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.default = setProjectName; | ||
const to_project_name_1 = require("../../config/to-project-name"); | ||
@@ -34,2 +35,1 @@ const format_changed_files_with_prettier_if_available_1 = require("../../generators/internal-utils/format-changed-files-with-prettier-if-available"); | ||
} | ||
exports.default = setProjectName; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.assertSupportedPlatform = void 0; | ||
exports.assertSupportedPlatform = assertSupportedPlatform; | ||
const output_1 = require("../utils/output"); | ||
@@ -39,2 +39,1 @@ function assertSupportedPlatform() { | ||
} | ||
exports.assertSupportedPlatform = assertSupportedPlatform; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.getNativeFileCacheLocation = void 0; | ||
exports.getNativeFileCacheLocation = getNativeFileCacheLocation; | ||
const os_1 = require("os"); | ||
@@ -23,2 +23,1 @@ const path_1 = require("path"); | ||
} | ||
exports.getNativeFileCacheLocation = getNativeFileCacheLocation; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.transformProjectGraphForRust = void 0; | ||
exports.transformProjectGraphForRust = transformProjectGraphForRust; | ||
function transformProjectGraphForRust(graph) { | ||
@@ -51,2 +51,1 @@ const dependencies = {}; | ||
} | ||
exports.transformProjectGraphForRust = transformProjectGraphForRust; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.debugLog = void 0; | ||
exports.debugLog = debugLog; | ||
function debugLog(...args) { | ||
@@ -9,2 +9,1 @@ if (process.env['NX_VERBOSE_LOGGING'] === 'true') { | ||
} | ||
exports.debugLog = debugLog; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.connectToNxCloud = void 0; | ||
exports.connectToNxCloud = connectToNxCloud; | ||
const child_process_1 = require("child_process"); | ||
@@ -152,3 +152,2 @@ const output_1 = require("../../../utils/output"); | ||
} | ||
exports.connectToNxCloud = connectToNxCloud; | ||
function sleep(ms) { | ||
@@ -155,0 +154,0 @@ return new Promise((resolve) => setTimeout(resolve, ms)); |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.findAncestorNodeModules = void 0; | ||
exports.findAncestorNodeModules = findAncestorNodeModules; | ||
const fs_1 = require("fs"); | ||
@@ -20,2 +20,1 @@ const path_1 = require("path"); | ||
} | ||
exports.findAncestorNodeModules = findAncestorNodeModules; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.verifyOrUpdateNxCloudClient = exports.NxCloudClientUnavailableError = exports.NxCloudEnterpriseOutdatedError = void 0; | ||
exports.NxCloudClientUnavailableError = exports.NxCloudEnterpriseOutdatedError = void 0; | ||
exports.verifyOrUpdateNxCloudClient = verifyOrUpdateNxCloudClient; | ||
const fs_1 = require("fs"); | ||
@@ -85,3 +86,2 @@ const zlib_1 = require("zlib"); | ||
} | ||
exports.verifyOrUpdateNxCloudClient = verifyOrUpdateNxCloudClient; | ||
const runnerBundleInstallDirectory = (0, path_1.join)(cache_directory_1.cacheDir, 'cloud'); | ||
@@ -88,0 +88,0 @@ function getLatestInstalledRunnerBundle() { |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.createApiAxiosInstance = void 0; | ||
exports.createApiAxiosInstance = createApiAxiosInstance; | ||
const path_1 = require("path"); | ||
@@ -24,2 +24,1 @@ const environment_1 = require("./environment"); | ||
} | ||
exports.createApiAxiosInstance = createApiAxiosInstance; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.getCloudOptions = void 0; | ||
exports.getCloudOptions = getCloudOptions; | ||
const nx_json_1 = require("../../config/nx-json"); | ||
@@ -11,2 +11,1 @@ const run_command_1 = require("../../tasks-runner/run-command"); | ||
} | ||
exports.getCloudOptions = getCloudOptions; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.compareCleanCloudVersions = exports.versionIsValid = exports.removeVersionModifier = exports.getNxCloudVersion = exports.getURLifShortenFailed = exports.removeTrailingSlash = exports.repoUsesGithub = exports.shortenedCloudUrl = void 0; | ||
exports.shortenedCloudUrl = shortenedCloudUrl; | ||
exports.repoUsesGithub = repoUsesGithub; | ||
exports.removeTrailingSlash = removeTrailingSlash; | ||
exports.getURLifShortenFailed = getURLifShortenFailed; | ||
exports.getNxCloudVersion = getNxCloudVersion; | ||
exports.removeVersionModifier = removeVersionModifier; | ||
exports.versionIsValid = versionIsValid; | ||
exports.compareCleanCloudVersions = compareCleanCloudVersions; | ||
const devkit_exports_1 = require("../../devkit-exports"); | ||
@@ -40,3 +47,2 @@ const git_utils_1 = require("../../utils/git-utils"); | ||
} | ||
exports.shortenedCloudUrl = shortenedCloudUrl; | ||
async function repoUsesGithub(github) { | ||
@@ -51,7 +57,5 @@ const githubSlug = (0, git_utils_1.getGithubSlugOrNull)(); | ||
} | ||
exports.repoUsesGithub = repoUsesGithub; | ||
function removeTrailingSlash(apiUrl) { | ||
return apiUrl[apiUrl.length - 1] === '/' ? apiUrl.slice(0, -1) : apiUrl; | ||
} | ||
exports.removeTrailingSlash = removeTrailingSlash; | ||
function getSource(installationSource) { | ||
@@ -82,3 +86,2 @@ if (installationSource.includes('nx-init')) { | ||
} | ||
exports.getURLifShortenFailed = getURLifShortenFailed; | ||
async function getInstallationSupportsGitHub(apiUrl) { | ||
@@ -119,3 +122,2 @@ try { | ||
} | ||
exports.getNxCloudVersion = getNxCloudVersion; | ||
function removeVersionModifier(versionString) { | ||
@@ -125,3 +127,2 @@ // Cloud version string is in the format of YYMM.DD.BuildNumber-Modifier | ||
} | ||
exports.removeVersionModifier = removeVersionModifier; | ||
function versionIsValid(version) { | ||
@@ -133,3 +134,2 @@ // Updated Regex pattern to require YYMM.DD.BuildNumber format | ||
} | ||
exports.versionIsValid = versionIsValid; | ||
function compareCleanCloudVersions(version1, version2) { | ||
@@ -158,2 +158,1 @@ const parseVersion = (version) => { | ||
} | ||
exports.compareCleanCloudVersions = compareCleanCloudVersions; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.hashTsConfig = void 0; | ||
exports.hashTsConfig = hashTsConfig; | ||
const fileutils_1 = require("../../../utils/fileutils"); | ||
@@ -31,3 +31,2 @@ const typescript_1 = require("../utils/typescript"); | ||
} | ||
exports.hashTsConfig = hashTsConfig; | ||
function removeOtherProjectsPathRecords(p, tsConfigJson, projectRootMapping) { | ||
@@ -34,0 +33,0 @@ const { paths, ...compilerOptions } = tsConfigJson.compilerOptions; |
@@ -7,3 +7,8 @@ "use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.createLockFile = exports.getLockFileName = exports.lockFileExists = exports.getLockFileDependencies = exports.getLockFileNodes = exports.LOCKFILES = void 0; | ||
exports.LOCKFILES = void 0; | ||
exports.getLockFileNodes = getLockFileNodes; | ||
exports.getLockFileDependencies = getLockFileDependencies; | ||
exports.lockFileExists = lockFileExists; | ||
exports.getLockFileName = getLockFileName; | ||
exports.createLockFile = createLockFile; | ||
const fs_1 = require("fs"); | ||
@@ -66,3 +71,2 @@ const path_1 = require("path"); | ||
} | ||
exports.getLockFileNodes = getLockFileNodes; | ||
/** | ||
@@ -98,3 +102,2 @@ * Parses lock file and maps dependencies and metadata to {@link LockFileGraph} | ||
} | ||
exports.getLockFileDependencies = getLockFileDependencies; | ||
function lockFileExists(packageManager) { | ||
@@ -115,3 +118,2 @@ if (packageManager === 'yarn') { | ||
} | ||
exports.lockFileExists = lockFileExists; | ||
/** | ||
@@ -137,3 +139,2 @@ * Returns lock file name based on the detected package manager in the root | ||
} | ||
exports.getLockFileName = getLockFileName; | ||
function getLockFilePath(packageManager) { | ||
@@ -203,3 +204,2 @@ if (packageManager === 'yarn') { | ||
} | ||
exports.createLockFile = createLockFile; | ||
// generate body lines for error message | ||
@@ -206,0 +206,0 @@ function errorBodyLines(originalError, additionalInfo = []) { |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.stringifyNpmLockfile = exports.getNpmLockfileDependencies = exports.getNpmLockfileNodes = void 0; | ||
exports.getNpmLockfileNodes = getNpmLockfileNodes; | ||
exports.getNpmLockfileDependencies = getNpmLockfileDependencies; | ||
exports.stringifyNpmLockfile = stringifyNpmLockfile; | ||
const fs_1 = require("fs"); | ||
@@ -30,3 +32,2 @@ const semver_1 = require("semver"); | ||
} | ||
exports.getNpmLockfileNodes = getNpmLockfileNodes; | ||
function getNpmLockfileDependencies(lockFileContent, lockFileHash, ctx) { | ||
@@ -36,3 +37,2 @@ const data = parsePackageLockFile(lockFileContent, lockFileHash); | ||
} | ||
exports.getNpmLockfileDependencies = getNpmLockfileDependencies; | ||
function getNodes(data, keyMap) { | ||
@@ -258,3 +258,2 @@ const nodes = new Map(); | ||
} | ||
exports.stringifyNpmLockfile = stringifyNpmLockfile; | ||
function mapV3Snapshots(mappedPackages, packageJson) { | ||
@@ -261,0 +260,0 @@ const output = {}; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.stringifyPnpmLockfile = exports.getPnpmLockfileDependencies = exports.getPnpmLockfileNodes = void 0; | ||
exports.getPnpmLockfileNodes = getPnpmLockfileNodes; | ||
exports.getPnpmLockfileDependencies = getPnpmLockfileDependencies; | ||
exports.stringifyPnpmLockfile = stringifyPnpmLockfile; | ||
const pnpm_normalizer_1 = require("./utils/pnpm-normalizer"); | ||
@@ -32,3 +34,2 @@ const package_json_1 = require("./utils/package-json"); | ||
} | ||
exports.getPnpmLockfileNodes = getPnpmLockfileNodes; | ||
function getPnpmLockfileDependencies(lockFileContent, lockFileHash, ctx) { | ||
@@ -42,3 +43,2 @@ const data = parsePnpmLockFile(lockFileContent, lockFileHash); | ||
} | ||
exports.getPnpmLockfileDependencies = getPnpmLockfileDependencies; | ||
function matchPropValue(record, key, originalPackageName) { | ||
@@ -295,3 +295,2 @@ if (!record) { | ||
} | ||
exports.stringifyPnpmLockfile = stringifyPnpmLockfile; | ||
function mapSnapshots(packages, nodes, lockfileVersion) { | ||
@@ -298,0 +297,0 @@ const result = {}; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.pruneProjectGraph = void 0; | ||
exports.pruneProjectGraph = pruneProjectGraph; | ||
const semver_1 = require("semver"); | ||
@@ -20,3 +20,2 @@ const project_graph_builder_1 = require("../../../project-graph/project-graph-builder"); | ||
} | ||
exports.pruneProjectGraph = pruneProjectGraph; | ||
// ensure that dependency ranges from package.json (e.g. ^1.0.0) | ||
@@ -23,0 +22,0 @@ // are replaced with the actual version based on the available nodes (e.g. 1.0.1) |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.normalizePackageJson = exports.getHoistedPackageVersion = void 0; | ||
exports.getHoistedPackageVersion = getHoistedPackageVersion; | ||
exports.normalizePackageJson = normalizePackageJson; | ||
const fs_1 = require("fs"); | ||
@@ -17,3 +18,2 @@ const workspace_root_1 = require("../../../../utils/workspace-root"); | ||
} | ||
exports.getHoistedPackageVersion = getHoistedPackageVersion; | ||
/** | ||
@@ -35,2 +35,1 @@ * Strip off non-pruning related fields from package.json | ||
} | ||
exports.normalizePackageJson = normalizePackageJson; |
@@ -7,3 +7,7 @@ "use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.stringifyToPnpmYaml = exports.parseAndNormalizePnpmLockfile = exports.loadPnpmHoistedDepsDefinition = exports.usesLeadingDash = exports.isV5Syntax = void 0; | ||
exports.isV5Syntax = isV5Syntax; | ||
exports.usesLeadingDash = usesLeadingDash; | ||
exports.loadPnpmHoistedDepsDefinition = loadPnpmHoistedDepsDefinition; | ||
exports.parseAndNormalizePnpmLockfile = parseAndNormalizePnpmLockfile; | ||
exports.stringifyToPnpmYaml = stringifyToPnpmYaml; | ||
const fs_1 = require("fs"); | ||
@@ -21,3 +25,2 @@ const semver_1 = require("semver"); | ||
} | ||
exports.isV5Syntax = isV5Syntax; | ||
function usesLeadingDash(data) { | ||
@@ -31,3 +34,2 @@ if (+data.lockfileVersion.toString() >= 9) { | ||
} | ||
exports.usesLeadingDash = usesLeadingDash; | ||
function loadPnpmHoistedDepsDefinition() { | ||
@@ -44,3 +46,2 @@ const fullPath = `${workspace_root_1.workspaceRoot}/node_modules/.modules.yaml`; | ||
} | ||
exports.loadPnpmHoistedDepsDefinition = loadPnpmHoistedDepsDefinition; | ||
/** | ||
@@ -53,3 +54,2 @@ * Parsing and mapping logic from pnpm lockfile `read` function | ||
} | ||
exports.parseAndNormalizePnpmLockfile = parseAndNormalizePnpmLockfile; | ||
// https://github.com/pnpm/pnpm/blob/50e37072f42bcca6d393a74bed29f7f0e029805d/lockfile/lockfile-file/src/write.ts#L22 | ||
@@ -87,3 +87,2 @@ const LOCKFILE_YAML_FORMAT = { | ||
} | ||
exports.stringifyToPnpmYaml = stringifyToPnpmYaml; | ||
/** | ||
@@ -90,0 +89,0 @@ * The following code was copied over from pnpm source code and modified to work in this context. |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.stringifyYarnLockfile = exports.getYarnLockfileDependencies = exports.getYarnLockfileNodes = void 0; | ||
exports.getYarnLockfileNodes = getYarnLockfileNodes; | ||
exports.getYarnLockfileDependencies = getYarnLockfileDependencies; | ||
exports.stringifyYarnLockfile = stringifyYarnLockfile; | ||
const package_json_1 = require("./utils/package-json"); | ||
@@ -32,3 +34,2 @@ const project_graph_builder_1 = require("../../../project-graph/project-graph-builder"); | ||
} | ||
exports.getYarnLockfileNodes = getYarnLockfileNodes; | ||
function getYarnLockfileDependencies(lockFileContent, lockFileHash, ctx) { | ||
@@ -41,3 +42,2 @@ const { __metadata, ...dependencies } = parseLockFile(lockFileContent, lockFileHash); | ||
} | ||
exports.getYarnLockfileDependencies = getYarnLockfileDependencies; | ||
function getPackageNameKeyPairs(keys) { | ||
@@ -247,3 +247,2 @@ const result = new Map(); | ||
} | ||
exports.stringifyYarnLockfile = stringifyYarnLockfile; | ||
function groupDependencies(dependencies, isBerry) { | ||
@@ -250,0 +249,0 @@ if (isBerry) { |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.findProjectsNpmDependencies = exports.createPackageJson = void 0; | ||
exports.createPackageJson = createPackageJson; | ||
exports.findProjectsNpmDependencies = findProjectsNpmDependencies; | ||
const fileutils_1 = require("../../../utils/fileutils"); | ||
@@ -125,3 +126,2 @@ const object_sort_1 = require("../../../utils/object-sort"); | ||
} | ||
exports.createPackageJson = createPackageJson; | ||
function findProjectsNpmDependencies(projectNode, graph, target, rootPackageJson, options, fileMap) { | ||
@@ -156,3 +156,2 @@ if (fileMap == null) { | ||
} | ||
exports.findProjectsNpmDependencies = findProjectsNpmDependencies; | ||
function findAllNpmDeps(projectFileMap, projectNode, graph, npmDeps, seen, ignoredDependencies, dependencyPatterns, rootPatterns) { | ||
@@ -159,0 +158,0 @@ if (seen.has(projectNode.name)) |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.buildExplicitDependencies = void 0; | ||
exports.buildExplicitDependencies = buildExplicitDependencies; | ||
const explicit_package_json_dependencies_1 = require("./explicit-package-json-dependencies"); | ||
@@ -41,3 +41,2 @@ const explicit_project_dependencies_1 = require("./explicit-project-dependencies"); | ||
} | ||
exports.buildExplicitDependencies = buildExplicitDependencies; | ||
function totalNumberOfFilesToProcess(ctx) { | ||
@@ -44,0 +43,0 @@ let totalNumOfFilesToProcess = 0; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.buildExplicitPackageJsonDependencies = void 0; | ||
exports.buildExplicitPackageJsonDependencies = buildExplicitPackageJsonDependencies; | ||
const node_path_1 = require("node:path"); | ||
@@ -25,3 +25,2 @@ const project_graph_1 = require("../../../../config/project-graph"); | ||
} | ||
exports.buildExplicitPackageJsonDependencies = buildExplicitPackageJsonDependencies; | ||
function createPackageNameMap(projects) { | ||
@@ -28,0 +27,0 @@ const res = {}; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.buildExplicitTypeScriptDependencies = void 0; | ||
exports.buildExplicitTypeScriptDependencies = buildExplicitTypeScriptDependencies; | ||
const path_1 = require("path"); | ||
@@ -79,3 +79,2 @@ const project_graph_1 = require("../../../../config/project-graph"); | ||
} | ||
exports.buildExplicitTypeScriptDependencies = buildExplicitTypeScriptDependencies; | ||
function isVuePluginInstalled() { | ||
@@ -82,0 +81,0 @@ try { |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.stripSourceCode = void 0; | ||
exports.stripSourceCode = stripSourceCode; | ||
let SyntaxKind; | ||
@@ -136,3 +136,2 @@ /** | ||
} | ||
exports.stripSourceCode = stripSourceCode; | ||
function shouldRescanSlashToken(lastNonTriviaToken) { | ||
@@ -139,0 +138,0 @@ switch (lastNonTriviaToken) { |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.TargetProjectLocator = exports.isBuiltinModuleImport = void 0; | ||
exports.TargetProjectLocator = void 0; | ||
exports.isBuiltinModuleImport = isBuiltinModuleImport; | ||
const node_module_1 = require("node:module"); | ||
@@ -25,3 +26,2 @@ const node_path_1 = require("node:path"); | ||
} | ||
exports.isBuiltinModuleImport = isBuiltinModuleImport; | ||
class TargetProjectLocator { | ||
@@ -28,0 +28,0 @@ constructor(nodes, externalNodes = {}, npmResolutionCache = defaultNpmResolutionCache) { |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.buildNpmPackageNodes = void 0; | ||
exports.buildNpmPackageNodes = buildNpmPackageNodes; | ||
const fs_1 = require("fs"); | ||
@@ -32,2 +32,1 @@ const file_hasher_1 = require("../../../../hasher/file-hasher"); | ||
} | ||
exports.buildNpmPackageNodes = buildNpmPackageNodes; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.jsPluginConfig = void 0; | ||
exports.jsPluginConfig = jsPluginConfig; | ||
const node_path_1 = require("node:path"); | ||
@@ -69,2 +69,1 @@ const fileutils_1 = require("../../../utils/fileutils"); | ||
} | ||
exports.jsPluginConfig = jsPluginConfig; |
@@ -81,2 +81,3 @@ import type { CompilerOptions } from 'typescript'; | ||
isolatedModules?: any; | ||
isolatedDeclarations?: any; | ||
jsx?: any; | ||
@@ -83,0 +84,0 @@ keyofStringsOnly?: any; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.getTsNodeCompilerOptions = exports.registerTsConfigPaths = exports.registerTranspiler = exports.getTranspiler = exports.getTsNodeTranspiler = exports.getSwcTranspiler = exports.registerTsProject = void 0; | ||
exports.registerTsProject = registerTsProject; | ||
exports.getSwcTranspiler = getSwcTranspiler; | ||
exports.getTsNodeTranspiler = getTsNodeTranspiler; | ||
exports.getTranspiler = getTranspiler; | ||
exports.registerTranspiler = registerTranspiler; | ||
exports.registerTsConfigPaths = registerTsConfigPaths; | ||
exports.getTsNodeCompilerOptions = getTsNodeCompilerOptions; | ||
const path_1 = require("path"); | ||
@@ -73,3 +79,2 @@ const logger_1 = require("../../../utils/logger"); | ||
} | ||
exports.registerTsProject = registerTsProject; | ||
function getSwcTranspiler(compilerOptions) { | ||
@@ -82,3 +87,2 @@ // These are requires to prevent it from registering when it shouldn't | ||
} | ||
exports.getSwcTranspiler = getSwcTranspiler; | ||
function getTsNodeTranspiler(compilerOptions) { | ||
@@ -102,3 +106,2 @@ const { register } = require('ts-node'); | ||
} | ||
exports.getTsNodeTranspiler = getTsNodeTranspiler; | ||
/** | ||
@@ -191,3 +194,2 @@ * Given the raw "ts-node" sub-object from a tsconfig, return an object with only the properties | ||
} | ||
exports.getTranspiler = getTranspiler; | ||
/** | ||
@@ -210,3 +212,2 @@ * Register ts-node or swc-node given a set of compiler options. | ||
} | ||
exports.registerTranspiler = registerTranspiler; | ||
/** | ||
@@ -241,3 +242,2 @@ * @param tsConfigPath Adds the paths from a tsconfig file into node resolutions | ||
} | ||
exports.registerTsConfigPaths = registerTsConfigPaths; | ||
function readCompilerOptions(tsConfigPath) { | ||
@@ -343,2 +343,1 @@ const preferTsNode = process.env.NX_PREFER_TS_NODE === 'true'; | ||
} | ||
exports.getTsNodeCompilerOptions = getTsNodeCompilerOptions; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.resolveRelativeToDir = void 0; | ||
exports.resolveRelativeToDir = resolveRelativeToDir; | ||
/** | ||
@@ -18,2 +18,1 @@ * NOTE: This function is in its own file because it is not possible to mock | ||
} | ||
exports.resolveRelativeToDir = resolveRelativeToDir; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.findNodes = exports.getRootTsConfigPath = exports.getRootTsConfigFileName = exports.resolveModuleByImport = exports.readTsConfig = void 0; | ||
exports.readTsConfig = readTsConfig; | ||
exports.resolveModuleByImport = resolveModuleByImport; | ||
exports.getRootTsConfigFileName = getRootTsConfigFileName; | ||
exports.getRootTsConfigPath = getRootTsConfigPath; | ||
exports.findNodes = findNodes; | ||
const workspace_root_1 = require("../../../utils/workspace-root"); | ||
@@ -16,3 +20,2 @@ const fs_1 = require("fs"); | ||
} | ||
exports.readTsConfig = readTsConfig; | ||
function readTsConfigOptions(tsConfigPath) { | ||
@@ -50,3 +53,2 @@ if (!tsModule) { | ||
} | ||
exports.resolveModuleByImport = resolveModuleByImport; | ||
function getCompilerHost(tsConfigPath) { | ||
@@ -67,3 +69,2 @@ const options = readTsConfigOptions(tsConfigPath); | ||
} | ||
exports.getRootTsConfigFileName = getRootTsConfigFileName; | ||
function getRootTsConfigPath() { | ||
@@ -73,3 +74,2 @@ const tsConfigFileName = getRootTsConfigFileName(); | ||
} | ||
exports.getRootTsConfigPath = getRootTsConfigPath; | ||
function findNodes(node, kind, max = Infinity) { | ||
@@ -102,2 +102,1 @@ if (!node || max == 0) { | ||
} | ||
exports.findNodes = findNodes; |
@@ -1,1 +0,1 @@ | ||
export declare const typescriptVersion = "~5.4.2"; | ||
export declare const typescriptVersion = "~5.5.2"; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.typescriptVersion = void 0; | ||
exports.typescriptVersion = '~5.4.2'; | ||
exports.typescriptVersion = '~5.5.2'; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.getGlobPatternsFromPackageManagerWorkspaces = exports.buildProjectConfigurationFromPackageJson = exports.createNodeFromPackageJson = exports.buildPackageJsonWorkspacesMatcher = exports.createNodes = void 0; | ||
exports.createNodes = void 0; | ||
exports.buildPackageJsonWorkspacesMatcher = buildPackageJsonWorkspacesMatcher; | ||
exports.createNodeFromPackageJson = createNodeFromPackageJson; | ||
exports.buildProjectConfigurationFromPackageJson = buildProjectConfigurationFromPackageJson; | ||
exports.getGlobPatternsFromPackageManagerWorkspaces = getGlobPatternsFromPackageManagerWorkspaces; | ||
const minimatch_1 = require("minimatch"); | ||
@@ -52,3 +56,2 @@ const node_fs_1 = require("node:fs"); | ||
} | ||
exports.buildPackageJsonWorkspacesMatcher = buildPackageJsonWorkspacesMatcher; | ||
function createNodeFromPackageJson(pkgJsonPath, workspaceRoot) { | ||
@@ -63,3 +66,2 @@ const json = (0, fileutils_1.readJsonFile)((0, node_path_1.join)(workspaceRoot, pkgJsonPath)); | ||
} | ||
exports.createNodeFromPackageJson = createNodeFromPackageJson; | ||
function buildProjectConfigurationFromPackageJson(packageJson, workspaceRoot, packageJsonPath, nxJson) { | ||
@@ -98,3 +100,2 @@ const normalizedPath = packageJsonPath.split('\\').join('/'); | ||
} | ||
exports.buildProjectConfigurationFromPackageJson = buildProjectConfigurationFromPackageJson; | ||
/** | ||
@@ -144,3 +145,2 @@ * Get the package.json globs from package manager workspaces | ||
} | ||
exports.getGlobPatternsFromPackageManagerWorkspaces = getGlobPatternsFromPackageManagerWorkspaces; | ||
function normalizePatterns(patterns) { | ||
@@ -147,0 +147,0 @@ return patterns.map((pattern) => removeRelativePath(pattern.endsWith('/package.json') |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.readNameFromPackageJson = exports.buildProjectFromProjectJson = exports.ProjectJsonProjectsPlugin = void 0; | ||
exports.ProjectJsonProjectsPlugin = void 0; | ||
exports.buildProjectFromProjectJson = buildProjectFromProjectJson; | ||
exports.readNameFromPackageJson = readNameFromPackageJson; | ||
const node_path_1 = require("node:path"); | ||
@@ -32,3 +34,2 @@ const to_project_name_1 = require("../../../config/to-project-name"); | ||
} | ||
exports.buildProjectFromProjectJson = buildProjectFromProjectJson; | ||
function readNameFromPackageJson(path) { | ||
@@ -43,2 +44,1 @@ try { | ||
} | ||
exports.readNameFromPackageJson = readNameFromPackageJson; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.filterAffected = void 0; | ||
exports.filterAffected = filterAffected; | ||
const file_utils_1 = require("../file-utils"); | ||
@@ -29,3 +29,2 @@ const workspace_projects_1 = require("./locators/workspace-projects"); | ||
} | ||
exports.filterAffected = filterAffected; | ||
// ----------------------------------------------------------------------------- | ||
@@ -32,0 +31,0 @@ function filterAffectedProjects(graph, ctx) { |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.applyProjectMetadata = exports.buildProjectGraphUsingProjectFileMap = exports.getFileMap = void 0; | ||
exports.getFileMap = getFileMap; | ||
exports.buildProjectGraphUsingProjectFileMap = buildProjectGraphUsingProjectFileMap; | ||
exports.applyProjectMetadata = applyProjectMetadata; | ||
const workspace_root_1 = require("../utils/workspace-root"); | ||
@@ -42,3 +44,2 @@ const path_1 = require("path"); | ||
} | ||
exports.getFileMap = getFileMap; | ||
async function buildProjectGraphUsingProjectFileMap(projectRootMap, externalNodes, fileMap, allWorkspaceFiles, rustReferences, fileMapCache, plugins, sourceMap) { | ||
@@ -107,3 +108,2 @@ storedFileMap = fileMap; | ||
} | ||
exports.buildProjectGraphUsingProjectFileMap = buildProjectGraphUsingProjectFileMap; | ||
function readCombinedDeps() { | ||
@@ -295,2 +295,1 @@ const installationPackageJsonPath = (0, path_1.join)(workspace_root_1.workspaceRoot, '.nx', 'installation', 'package.json'); | ||
} | ||
exports.applyProjectMetadata = applyProjectMetadata; |
"use strict"; | ||
var _ProjectGraphError_errors, _ProjectGraphError_partialProjectGraph, _ProjectGraphError_partialSourceMaps; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.LoadPluginError = exports.DaemonProjectGraphError = exports.isMergeNodesError = exports.isAggregateCreateNodesError = exports.isCreateMetadataError = exports.isAggregateProjectGraphError = exports.AggregateProjectGraphError = exports.ProcessProjectGraphError = exports.isWorkspaceValidityError = exports.WorkspaceValidityError = exports.ProcessDependenciesError = exports.CreateMetadataError = exports.MergeNodesError = exports.AggregateCreateNodesError = exports.isProjectConfigurationsError = exports.ProjectConfigurationsError = exports.isProjectWithNoNameError = exports.ProjectWithNoNameError = exports.isProjectsWithNoNameError = exports.ProjectsWithNoNameError = exports.isMultipleProjectsWithSameNameError = exports.isProjectWithExistingNameError = exports.ProjectWithExistingNameError = exports.MultipleProjectsWithSameNameError = exports.ProjectGraphError = void 0; | ||
exports.LoadPluginError = exports.DaemonProjectGraphError = exports.AggregateProjectGraphError = exports.ProcessProjectGraphError = exports.WorkspaceValidityError = exports.ProcessDependenciesError = exports.CreateMetadataError = exports.MergeNodesError = exports.AggregateCreateNodesError = exports.ProjectConfigurationsError = exports.ProjectWithNoNameError = exports.ProjectsWithNoNameError = exports.ProjectWithExistingNameError = exports.MultipleProjectsWithSameNameError = exports.ProjectGraphError = void 0; | ||
exports.isProjectWithExistingNameError = isProjectWithExistingNameError; | ||
exports.isMultipleProjectsWithSameNameError = isMultipleProjectsWithSameNameError; | ||
exports.isProjectsWithNoNameError = isProjectsWithNoNameError; | ||
exports.isProjectWithNoNameError = isProjectWithNoNameError; | ||
exports.isProjectConfigurationsError = isProjectConfigurationsError; | ||
exports.isWorkspaceValidityError = isWorkspaceValidityError; | ||
exports.isAggregateProjectGraphError = isAggregateProjectGraphError; | ||
exports.isCreateMetadataError = isCreateMetadataError; | ||
exports.isAggregateCreateNodesError = isAggregateCreateNodesError; | ||
exports.isMergeNodesError = isMergeNodesError; | ||
const tslib_1 = require("tslib"); | ||
@@ -74,3 +84,2 @@ class ProjectGraphError extends Error { | ||
} | ||
exports.isProjectWithExistingNameError = isProjectWithExistingNameError; | ||
function isMultipleProjectsWithSameNameError(e) { | ||
@@ -82,3 +91,2 @@ return (e instanceof MultipleProjectsWithSameNameError || | ||
} | ||
exports.isMultipleProjectsWithSameNameError = isMultipleProjectsWithSameNameError; | ||
class ProjectsWithNoNameError extends Error { | ||
@@ -99,3 +107,2 @@ constructor(projectRoots, projects) { | ||
} | ||
exports.isProjectsWithNoNameError = isProjectsWithNoNameError; | ||
class ProjectWithNoNameError extends Error { | ||
@@ -115,3 +122,2 @@ constructor(projectRoot) { | ||
} | ||
exports.isProjectWithNoNameError = isProjectWithNoNameError; | ||
class ProjectConfigurationsError extends Error { | ||
@@ -132,3 +138,2 @@ constructor(errors, partialProjectConfigurationsResult) { | ||
} | ||
exports.isProjectConfigurationsError = isProjectConfigurationsError; | ||
/** | ||
@@ -230,3 +235,2 @@ * This error should be thrown when a `createNodesV2` function hits a recoverable error. | ||
} | ||
exports.isWorkspaceValidityError = isWorkspaceValidityError; | ||
class ProcessProjectGraphError extends Error { | ||
@@ -258,3 +262,2 @@ constructor(pluginName, { cause }) { | ||
} | ||
exports.isAggregateProjectGraphError = isAggregateProjectGraphError; | ||
function isCreateMetadataError(e) { | ||
@@ -266,3 +269,2 @@ return (e instanceof CreateMetadataError || | ||
} | ||
exports.isCreateMetadataError = isCreateMetadataError; | ||
function isAggregateCreateNodesError(e) { | ||
@@ -274,3 +276,2 @@ return (e instanceof AggregateCreateNodesError || | ||
} | ||
exports.isAggregateCreateNodesError = isAggregateCreateNodesError; | ||
function isMergeNodesError(e) { | ||
@@ -280,3 +281,2 @@ return (e instanceof MergeNodesError || | ||
} | ||
exports.isMergeNodesError = isMergeNodesError; | ||
class DaemonProjectGraphError extends Error { | ||
@@ -283,0 +283,0 @@ constructor(errors, projectGraph, sourceMaps) { |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.updateFileMap = exports.createFileMap = exports.createFileMapUsingProjectGraph = exports.createProjectFileMapUsingProjectGraph = void 0; | ||
exports.createProjectFileMapUsingProjectGraph = createProjectFileMapUsingProjectGraph; | ||
exports.createFileMapUsingProjectGraph = createFileMapUsingProjectGraph; | ||
exports.createFileMap = createFileMap; | ||
exports.updateFileMap = updateFileMap; | ||
const workspace_context_1 = require("../utils/workspace-context"); | ||
@@ -12,3 +15,2 @@ const workspace_root_1 = require("../utils/workspace-root"); | ||
} | ||
exports.createProjectFileMapUsingProjectGraph = createProjectFileMapUsingProjectGraph; | ||
// TODO: refactor this to pull straight from the rust context instead of creating the file map in JS | ||
@@ -20,3 +22,2 @@ async function createFileMapUsingProjectGraph(graph) { | ||
} | ||
exports.createFileMapUsingProjectGraph = createFileMapUsingProjectGraph; | ||
function createFileMap(projectsConfigurations, allWorkspaceFiles) { | ||
@@ -49,3 +50,2 @@ const projectFileMap = {}; | ||
} | ||
exports.createFileMap = createFileMap; | ||
function updateFileMap(projectsConfigurations, rustReferences, updatedFiles, deletedFiles) { | ||
@@ -59,2 +59,1 @@ const updates = (0, workspace_context_1.updateProjectFiles)(Object.fromEntries((0, find_project_for_path_1.createProjectRootMappingsFromProjectConfigurations)(projectsConfigurations)), rustReferences, updatedFiles, deletedFiles); | ||
} | ||
exports.updateFileMap = updateFileMap; |
@@ -18,3 +18,3 @@ import { FileData } from '../config/project-graph'; | ||
export declare function isDeletedFileChange(change: Change): change is DeletedFileChange; | ||
export declare function calculateFileChanges(files: string[], allWorkspaceFiles: FileData[], nxArgs?: NxArgs, readFileAtRevision?: (f: string, r: void | string) => string, ignore?: any): FileChange[]; | ||
export declare function calculateFileChanges(files: string[], allWorkspaceFiles: FileData[], nxArgs?: NxArgs, readFileAtRevision?: (f: string, r: void | string) => string, ignore?: ReturnType<typeof ignore>): FileChange[]; | ||
export declare const TEN_MEGABYTES: number; | ||
@@ -21,0 +21,0 @@ /** |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.readPackageJson = exports.defaultFileRead = exports.readWorkspaceConfig = exports.TEN_MEGABYTES = exports.calculateFileChanges = exports.isDeletedFileChange = exports.isWholeFileChange = exports.DeletedFileChange = exports.WholeFileChange = void 0; | ||
exports.TEN_MEGABYTES = exports.DeletedFileChange = exports.WholeFileChange = void 0; | ||
exports.isWholeFileChange = isWholeFileChange; | ||
exports.isDeletedFileChange = isDeletedFileChange; | ||
exports.calculateFileChanges = calculateFileChanges; | ||
exports.readWorkspaceConfig = readWorkspaceConfig; | ||
exports.defaultFileRead = defaultFileRead; | ||
exports.readPackageJson = readPackageJson; | ||
const child_process_1 = require("child_process"); | ||
@@ -33,7 +39,5 @@ const fs_1 = require("fs"); | ||
} | ||
exports.isWholeFileChange = isWholeFileChange; | ||
function isDeletedFileChange(change) { | ||
return change.type === 'WholeFileDeleted'; | ||
} | ||
exports.isDeletedFileChange = isDeletedFileChange; | ||
function calculateFileChanges(files, allWorkspaceFiles, nxArgs, readFileAtRevision = defaultReadFileAtRevision, ignore = (0, ignore_1.getIgnoreObject)()) { | ||
@@ -76,3 +80,2 @@ files = files.filter((f) => !ignore.ignores(f)); | ||
} | ||
exports.calculateFileChanges = calculateFileChanges; | ||
exports.TEN_MEGABYTES = 1024 * 10000; | ||
@@ -129,7 +132,5 @@ function defaultReadFileAtRevision(file, revision) { | ||
} | ||
exports.readWorkspaceConfig = readWorkspaceConfig; | ||
function defaultFileRead(filePath) { | ||
return (0, fs_1.readFileSync)((0, path_1.join)(workspace_root_1.workspaceRoot, filePath), 'utf-8'); | ||
} | ||
exports.defaultFileRead = defaultFileRead; | ||
function readPackageJson() { | ||
@@ -143,3 +144,2 @@ try { | ||
} | ||
exports.readPackageJson = readPackageJson; | ||
/** | ||
@@ -146,0 +146,0 @@ * TODO(v20): Remove this function. |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.extractCachedFileData = exports.shouldRecomputeWholeGraph = exports.writeCache = exports.createProjectFileMapCache = exports.readProjectGraphCache = exports.readFileMapCache = exports.ensureCacheDirectory = exports.nxFileMap = exports.nxProjectGraph = void 0; | ||
exports.nxFileMap = exports.nxProjectGraph = void 0; | ||
exports.ensureCacheDirectory = ensureCacheDirectory; | ||
exports.readFileMapCache = readFileMapCache; | ||
exports.readProjectGraphCache = readProjectGraphCache; | ||
exports.createProjectFileMapCache = createProjectFileMapCache; | ||
exports.writeCache = writeCache; | ||
exports.shouldRecomputeWholeGraph = shouldRecomputeWholeGraph; | ||
exports.extractCachedFileData = extractCachedFileData; | ||
const fs_1 = require("fs"); | ||
@@ -35,3 +42,2 @@ const fs_extra_1 = require("fs-extra"); | ||
} | ||
exports.ensureCacheDirectory = ensureCacheDirectory; | ||
function readFileMapCache() { | ||
@@ -54,3 +60,2 @@ perf_hooks_1.performance.mark('read cache:start'); | ||
} | ||
exports.readFileMapCache = readFileMapCache; | ||
function readProjectGraphCache() { | ||
@@ -73,3 +78,2 @@ perf_hooks_1.performance.mark('read project-graph:start'); | ||
} | ||
exports.readProjectGraphCache = readProjectGraphCache; | ||
function createProjectFileMapCache(nxJson, packageJsonDeps, fileMap, tsConfig) { | ||
@@ -89,3 +93,2 @@ const nxJsonPlugins = getNxJsonPluginsData(nxJson, packageJsonDeps); | ||
} | ||
exports.createProjectFileMapCache = createProjectFileMapCache; | ||
function writeCache(cache, projectGraph) { | ||
@@ -124,3 +127,2 @@ perf_hooks_1.performance.mark('write cache:start'); | ||
} | ||
exports.writeCache = writeCache; | ||
function shouldRecomputeWholeGraph(cache, packageJsonDeps, projects, nxJson, tsConfig) { | ||
@@ -161,3 +163,2 @@ if (cache.version !== '6.0') { | ||
} | ||
exports.shouldRecomputeWholeGraph = shouldRecomputeWholeGraph; | ||
/* | ||
@@ -187,3 +188,2 @@ This can only be invoked when the list of projects is either the same | ||
} | ||
exports.extractCachedFileData = extractCachedFileData; | ||
function processNonProjectFiles(cachedFiles, nonProjectFiles, filesToProcess, cachedFileData) { | ||
@@ -190,0 +190,0 @@ const cachedHashMap = new Map(cachedFiles.map((f) => [f.file, f])); |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.withDeps = exports.pruneExternalNodes = exports.isNpmProject = exports.filterNodes = exports.reverse = void 0; | ||
exports.pruneExternalNodes = void 0; | ||
exports.reverse = reverse; | ||
exports.filterNodes = filterNodes; | ||
exports.isNpmProject = isNpmProject; | ||
exports.withDeps = withDeps; | ||
const reverseMemo = new Map(); | ||
@@ -43,3 +47,2 @@ /** | ||
} | ||
exports.reverse = reverse; | ||
function filterNodes(predicate) { | ||
@@ -66,7 +69,5 @@ return (original) => { | ||
} | ||
exports.filterNodes = filterNodes; | ||
function isNpmProject(project) { | ||
return project?.type === 'npm'; | ||
} | ||
exports.isNpmProject = isNpmProject; | ||
exports.pruneExternalNodes = filterNodes(); | ||
@@ -116,2 +117,1 @@ function withDeps(original, subsetNodes) { | ||
} | ||
exports.withDeps = withDeps; |
@@ -28,3 +28,3 @@ import { PluginConfiguration } from '../../config/nx-json'; | ||
]>; | ||
export declare function loadNxPlugins(plugins: PluginConfiguration[], root?: string): Promise<[LoadedNxPlugin[], () => void]>; | ||
export declare function loadNxPlugins(plugins: PluginConfiguration[], root?: string): Promise<readonly [LoadedNxPlugin[], () => void]>; | ||
export declare function getDefaultPlugins(root: string): Promise<string[]>; |
@@ -5,3 +5,5 @@ "use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.getDefaultPlugins = exports.loadNxPlugins = exports.nxPluginCache = exports.LoadedNxPlugin = void 0; | ||
exports.nxPluginCache = exports.LoadedNxPlugin = void 0; | ||
exports.loadNxPlugins = loadNxPlugins; | ||
exports.getDefaultPlugins = getDefaultPlugins; | ||
const path_1 = require("path"); | ||
@@ -73,14 +75,15 @@ const workspace_root_1 = require("../../utils/workspace-root"); | ||
async function loadNxPlugins(plugins, root = workspace_root_1.workspaceRoot) { | ||
const result = []; | ||
const loadingMethod = process.env.NX_ISOLATE_PLUGINS === 'true' | ||
performance.mark('loadNxPlugins:start'); | ||
const loadingMethod = process.env.NX_ISOLATE_PLUGINS !== 'false' | ||
? isolation_1.loadNxPluginInIsolation | ||
: loader_1.loadNxPlugin; | ||
plugins = await normalizePlugins(plugins, root); | ||
const result = new Array(plugins?.length); | ||
const cleanupFunctions = []; | ||
for (const plugin of plugins) { | ||
await Promise.all(plugins.map(async (plugin, idx) => { | ||
const [loadedPluginPromise, cleanup] = await loadingMethod(plugin, root); | ||
result.push(loadedPluginPromise); | ||
result[idx] = loadedPluginPromise; | ||
cleanupFunctions.push(cleanup); | ||
} | ||
return [ | ||
})); | ||
const ret = [ | ||
await Promise.all(result), | ||
@@ -96,4 +99,6 @@ () => { | ||
]; | ||
performance.mark('loadNxPlugins:end'); | ||
performance.measure('loadNxPlugins', 'loadNxPlugins:start', 'loadNxPlugins:end'); | ||
return ret; | ||
} | ||
exports.loadNxPlugins = loadNxPlugins; | ||
async function normalizePlugins(plugins, root) { | ||
@@ -120,2 +125,1 @@ plugins ??= []; | ||
} | ||
exports.getDefaultPlugins = getDefaultPlugins; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.loadNxPluginInIsolation = void 0; | ||
exports.loadNxPluginInIsolation = loadNxPluginInIsolation; | ||
const workspace_root_1 = require("../../../utils/workspace-root"); | ||
@@ -15,2 +15,1 @@ const plugin_pool_1 = require("./plugin-pool"); | ||
} | ||
exports.loadNxPluginInIsolation = loadNxPluginInIsolation; |
@@ -1,3 +0,1 @@ | ||
/// <reference types="node" /> | ||
/// <reference types="node" /> | ||
import { ProjectGraph, ProjectGraphProcessorContext } from '../../../config/project-graph'; | ||
@@ -87,3 +85,3 @@ import { PluginConfiguration } from '../../../config/nx-json'; | ||
success: false; | ||
error: string; | ||
error: Error; | ||
tx: string; | ||
@@ -90,0 +88,0 @@ }; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.sendMessageOverSocket = exports.consumeMessage = exports.isPluginWorkerResult = exports.isPluginWorkerMessage = void 0; | ||
exports.isPluginWorkerMessage = isPluginWorkerMessage; | ||
exports.isPluginWorkerResult = isPluginWorkerResult; | ||
exports.consumeMessage = consumeMessage; | ||
exports.sendMessageOverSocket = sendMessageOverSocket; | ||
function isPluginWorkerMessage(message) { | ||
@@ -16,3 +19,2 @@ return (typeof message === 'object' && | ||
} | ||
exports.isPluginWorkerMessage = isPluginWorkerMessage; | ||
function isPluginWorkerResult(message) { | ||
@@ -30,3 +32,2 @@ return (typeof message === 'object' && | ||
} | ||
exports.isPluginWorkerResult = isPluginWorkerResult; | ||
// Takes a message and a map of handlers and calls the appropriate handler | ||
@@ -44,6 +45,4 @@ // type safe and requires all handlers to be handled | ||
} | ||
exports.consumeMessage = consumeMessage; | ||
function sendMessageOverSocket(socket, message) { | ||
socket.write(JSON.stringify(message) + String.fromCodePoint(4)); | ||
} | ||
exports.sendMessageOverSocket = sendMessageOverSocket; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.loadRemoteNxPlugin = void 0; | ||
exports.loadRemoteNxPlugin = loadRemoteNxPlugin; | ||
const child_process_1 = require("child_process"); | ||
@@ -51,3 +51,2 @@ const path = require("path"); | ||
} | ||
exports.loadRemoteNxPlugin = loadRemoteNxPlugin; | ||
function shutdownPluginWorker(worker) { | ||
@@ -54,0 +53,0 @@ // Clears the plugin cache so no refs to the workers are held |
@@ -6,4 +6,4 @@ "use strict"; | ||
const serializable_error_1 = require("../../../utils/serializable-error"); | ||
const consume_messages_from_socket_1 = require("../../../utils/consume-messages-from-socket"); | ||
const net_1 = require("net"); | ||
const consume_messages_from_socket_1 = require("../../../utils/consume-messages-from-socket"); | ||
const fs_1 = require("fs"); | ||
@@ -121,3 +121,7 @@ if (process.env.NX_PERF_LOGGING === 'true') { | ||
type: 'createMetadataResult', | ||
payload: { success: false, error: e.stack, tx }, | ||
payload: { | ||
success: false, | ||
error: (0, serializable_error_1.createSerializableError)(e), | ||
tx, | ||
}, | ||
}; | ||
@@ -124,0 +128,0 @@ } |
"use strict"; | ||
// This file contains methods and utilities that should **only** be used by the plugin worker. | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.loadNxPluginAsync = exports.loadNxPlugin = exports.getPluginPathAndName = exports.registerPluginTSTranspiler = exports.unregisterPluginTSTranspiler = exports.resolveLocalNxPlugin = exports.readPluginPackageJson = void 0; | ||
exports.unregisterPluginTSTranspiler = void 0; | ||
exports.readPluginPackageJson = readPluginPackageJson; | ||
exports.resolveLocalNxPlugin = resolveLocalNxPlugin; | ||
exports.registerPluginTSTranspiler = registerPluginTSTranspiler; | ||
exports.getPluginPathAndName = getPluginPathAndName; | ||
exports.loadNxPlugin = loadNxPlugin; | ||
exports.loadNxPluginAsync = loadNxPluginAsync; | ||
const posix_1 = require("node:path/posix"); | ||
@@ -47,7 +53,5 @@ const installation_directory_1 = require("../../utils/installation-directory"); | ||
} | ||
exports.readPluginPackageJson = readPluginPackageJson; | ||
function resolveLocalNxPlugin(importPath, projects, root = workspace_root_1.workspaceRoot) { | ||
return lookupLocalPlugin(importPath, projects, root); | ||
} | ||
exports.resolveLocalNxPlugin = resolveLocalNxPlugin; | ||
exports.unregisterPluginTSTranspiler = null; | ||
@@ -82,3 +86,2 @@ /** | ||
} | ||
exports.registerPluginTSTranspiler = registerPluginTSTranspiler; | ||
function lookupLocalPlugin(importPath, projects, root = workspace_root_1.workspaceRoot) { | ||
@@ -178,3 +181,2 @@ const projectConfig = findNxProjectForImportPath(importPath, projects, root); | ||
} | ||
exports.getPluginPathAndName = getPluginPathAndName; | ||
let projectsWithoutInference; | ||
@@ -187,3 +189,2 @@ function loadNxPlugin(plugin, root) { | ||
} | ||
exports.loadNxPlugin = loadNxPlugin; | ||
async function loadNxPluginAsync(pluginConfiguration, paths, root) { | ||
@@ -214,3 +215,2 @@ const moduleName = typeof pluginConfiguration === 'string' | ||
} | ||
exports.loadNxPluginAsync = loadNxPluginAsync; | ||
async function importPluginModule(pluginPath) { | ||
@@ -217,0 +217,0 @@ const m = await Promise.resolve(`${pluginPath}`).then(s => require(s)); |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.createNodesFromFiles = exports.normalizeNxPlugin = exports.isNxPluginV1 = exports.isNxPluginV2 = void 0; | ||
exports.isNxPluginV2 = isNxPluginV2; | ||
exports.isNxPluginV1 = isNxPluginV1; | ||
exports.normalizeNxPlugin = normalizeNxPlugin; | ||
exports.createNodesFromFiles = createNodesFromFiles; | ||
const node_path_1 = require("node:path"); | ||
@@ -11,7 +14,5 @@ const to_project_name_1 = require("../../config/to-project-name"); | ||
} | ||
exports.isNxPluginV2 = isNxPluginV2; | ||
function isNxPluginV1(plugin) { | ||
return 'processProjectGraph' in plugin || 'projectFilePatterns' in plugin; | ||
} | ||
exports.isNxPluginV1 = isNxPluginV1; | ||
function normalizeNxPlugin(plugin) { | ||
@@ -42,3 +43,2 @@ if (isNxPluginV2(plugin)) { | ||
} | ||
exports.normalizeNxPlugin = normalizeNxPlugin; | ||
async function createNodesFromFiles(createNodes, configFiles, options, context) { | ||
@@ -64,2 +64,1 @@ const results = []; | ||
} | ||
exports.createNodesFromFiles = createNodesFromFiles; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.validateDependency = exports.ProjectGraphBuilder = void 0; | ||
exports.ProjectGraphBuilder = void 0; | ||
exports.validateDependency = validateDependency; | ||
/** | ||
@@ -315,3 +316,2 @@ * Builder for adding nodes and dependencies to a {@link ProjectGraph} | ||
} | ||
exports.validateDependency = validateDependency; | ||
function validateCommonDependencyRules(d, { externalNodes, projects, fileMap }) { | ||
@@ -318,0 +318,0 @@ if (!projects[d.source] && !externalNodes[d.source]) { |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.createProjectGraphAndSourceMapsAsync = exports.createProjectGraphAsync = exports.handleProjectGraphError = exports.buildProjectGraphAndSourceMapsWithoutDaemon = exports.readProjectsConfigurationFromProjectGraph = exports.readCachedProjectConfiguration = exports.readCachedProjectGraph = void 0; | ||
exports.readCachedProjectGraph = readCachedProjectGraph; | ||
exports.readCachedProjectConfiguration = readCachedProjectConfiguration; | ||
exports.readProjectsConfigurationFromProjectGraph = readProjectsConfigurationFromProjectGraph; | ||
exports.buildProjectGraphAndSourceMapsWithoutDaemon = buildProjectGraphAndSourceMapsWithoutDaemon; | ||
exports.handleProjectGraphError = handleProjectGraphError; | ||
exports.createProjectGraphAsync = createProjectGraphAsync; | ||
exports.createProjectGraphAndSourceMapsAsync = createProjectGraphAndSourceMapsAsync; | ||
const perf_hooks_1 = require("perf_hooks"); | ||
@@ -44,3 +50,2 @@ const nx_json_1 = require("../config/nx-json"); | ||
} | ||
exports.readCachedProjectGraph = readCachedProjectGraph; | ||
function readCachedProjectConfiguration(projectName) { | ||
@@ -56,3 +61,2 @@ const graph = readCachedProjectGraph(); | ||
} | ||
exports.readCachedProjectConfiguration = readCachedProjectConfiguration; | ||
/** | ||
@@ -70,3 +74,2 @@ * Get the {@link ProjectsConfigurations} from the {@link ProjectGraph} | ||
} | ||
exports.readProjectsConfigurationFromProjectGraph = readProjectsConfigurationFromProjectGraph; | ||
async function buildProjectGraphAndSourceMapsWithoutDaemon() { | ||
@@ -141,3 +144,2 @@ global.NX_GRAPH_CREATION = true; | ||
} | ||
exports.buildProjectGraphAndSourceMapsWithoutDaemon = buildProjectGraphAndSourceMapsWithoutDaemon; | ||
function handleProjectGraphError(opts, e) { | ||
@@ -175,3 +177,2 @@ if (opts.exitOnError) { | ||
} | ||
exports.handleProjectGraphError = handleProjectGraphError; | ||
/** | ||
@@ -205,3 +206,2 @@ * Computes and returns a ProjectGraph. | ||
} | ||
exports.createProjectGraphAsync = createProjectGraphAsync; | ||
async function createProjectGraphAndSourceMapsAsync(opts = { | ||
@@ -268,2 +268,1 @@ exitOnError: false, | ||
} | ||
exports.createProjectGraphAndSourceMapsAsync = createProjectGraphAndSourceMapsAsync; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.buildAllWorkspaceFiles = void 0; | ||
exports.buildAllWorkspaceFiles = buildAllWorkspaceFiles; | ||
const perf_hooks_1 = require("perf_hooks"); | ||
@@ -15,2 +15,1 @@ function buildAllWorkspaceFiles(projectFileMap, globalFiles) { | ||
} | ||
exports.buildAllWorkspaceFiles = buildAllWorkspaceFiles; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.normalizeProjectRoot = exports.findProjectForPath = exports.createProjectRootMappings = exports.createProjectRootMappingsFromProjectConfigurations = void 0; | ||
exports.createProjectRootMappingsFromProjectConfigurations = createProjectRootMappingsFromProjectConfigurations; | ||
exports.createProjectRootMappings = createProjectRootMappings; | ||
exports.findProjectForPath = findProjectForPath; | ||
exports.normalizeProjectRoot = normalizeProjectRoot; | ||
const path_1 = require("path"); | ||
@@ -17,3 +20,2 @@ const path_2 = require("../../utils/path"); | ||
} | ||
exports.createProjectRootMappingsFromProjectConfigurations = createProjectRootMappingsFromProjectConfigurations; | ||
/** | ||
@@ -31,3 +33,2 @@ * This creates a map of project roots to project names to easily look up the project of a file | ||
} | ||
exports.createProjectRootMappings = createProjectRootMappings; | ||
/** | ||
@@ -53,3 +54,2 @@ * Locates a project in projectRootMap based on a file within it | ||
} | ||
exports.findProjectForPath = findProjectForPath; | ||
function normalizeProjectRoot(root) { | ||
@@ -59,2 +59,1 @@ root = root === '' ? '.' : root; | ||
} | ||
exports.normalizeProjectRoot = normalizeProjectRoot; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.applyImplicitDependencies = void 0; | ||
exports.applyImplicitDependencies = applyImplicitDependencies; | ||
function applyImplicitDependencies(projects, builder) { | ||
@@ -19,2 +19,1 @@ Object.keys(projects).forEach((source) => { | ||
} | ||
exports.applyImplicitDependencies = applyImplicitDependencies; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.normalizeImplicitDependencies = exports.normalizeProjectNodes = void 0; | ||
exports.normalizeProjectNodes = normalizeProjectNodes; | ||
exports.normalizeImplicitDependencies = normalizeImplicitDependencies; | ||
const find_matching_projects_1 = require("../../utils/find-matching-projects"); | ||
@@ -59,3 +60,2 @@ async function normalizeProjectNodes({ projects }, builder) { | ||
} | ||
exports.normalizeProjectNodes = normalizeProjectNodes; | ||
function normalizeImplicitDependencies(source, implicitDependencies, projects) { | ||
@@ -90,2 +90,1 @@ if (!implicitDependencies?.length) { | ||
} | ||
exports.normalizeImplicitDependencies = normalizeImplicitDependencies; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.normalizeTarget = exports.readTargetDefaultsForTarget = exports.resolveNxTokensInOptions = exports.isCompatibleTarget = exports.mergeTargetConfigurations = exports.mergeTargetDefaultWithTargetDefinition = exports.validateProject = exports.readProjectConfigurationsFromRootMap = exports.createProjectConfigurations = exports.mergeMetadata = exports.mergeProjectConfigurationIntoRootMap = void 0; | ||
exports.mergeProjectConfigurationIntoRootMap = mergeProjectConfigurationIntoRootMap; | ||
exports.mergeMetadata = mergeMetadata; | ||
exports.createProjectConfigurations = createProjectConfigurations; | ||
exports.readProjectConfigurationsFromRootMap = readProjectConfigurationsFromRootMap; | ||
exports.validateProject = validateProject; | ||
exports.mergeTargetDefaultWithTargetDefinition = mergeTargetDefaultWithTargetDefinition; | ||
exports.mergeTargetConfigurations = mergeTargetConfigurations; | ||
exports.isCompatibleTarget = isCompatibleTarget; | ||
exports.resolveNxTokensInOptions = resolveNxTokensInOptions; | ||
exports.readTargetDefaultsForTarget = readTargetDefaultsForTarget; | ||
exports.normalizeTarget = normalizeTarget; | ||
const logger_1 = require("../../utils/logger"); | ||
@@ -135,3 +145,2 @@ const fileutils_1 = require("../../utils/fileutils"); | ||
} | ||
exports.mergeProjectConfigurationIntoRootMap = mergeProjectConfigurationIntoRootMap; | ||
function mergeMetadata(sourceMap, sourceInformation, baseSourceMapPath, metadata, matchingMetadata) { | ||
@@ -206,3 +215,2 @@ const result = { | ||
} | ||
exports.mergeMetadata = mergeMetadata; | ||
/** | ||
@@ -248,4 +256,6 @@ * Transforms a list of project paths into a map of project configurations. | ||
} | ||
const innerStackTrace = ' ' + e.stack.split('\n').join('\n '); | ||
errorBodyLines.push(innerStackTrace); | ||
} | ||
error.message = errorBodyLines.join('\n'); | ||
error.stack = errorBodyLines.join('\n'); | ||
// This represents a single plugin erroring out with a hard error. | ||
@@ -282,3 +292,2 @@ errors.push(error); | ||
} | ||
exports.createProjectConfigurations = createProjectConfigurations; | ||
function mergeCreateNodesResults(results, nxJsonConfiguration, errors) { | ||
@@ -394,3 +403,2 @@ perf_hooks_1.performance.mark('createNodes:merge - start'); | ||
} | ||
exports.readProjectConfigurationsFromRootMap = readProjectConfigurationsFromRootMap; | ||
function validateAndNormalizeProjectRootMap(projectRootMap, nxJsonConfiguration, sourceMaps = {}) { | ||
@@ -486,3 +494,2 @@ // Name -> Project, used to validate that all projects have unique names | ||
} | ||
exports.validateProject = validateProject; | ||
function targetDefaultShouldBeApplied(key, sourceMap) { | ||
@@ -556,3 +563,2 @@ const sourceInfo = sourceMap[key]; | ||
} | ||
exports.mergeTargetDefaultWithTargetDefinition = mergeTargetDefaultWithTargetDefinition; | ||
/** | ||
@@ -614,3 +620,2 @@ * Merges two targets. | ||
} | ||
exports.mergeTargetConfigurations = mergeTargetConfigurations; | ||
/** | ||
@@ -648,3 +653,2 @@ * Checks if targets options are compatible - used when merging configurations | ||
} | ||
exports.isCompatibleTarget = isCompatibleTarget; | ||
function mergeConfigurations(newConfigurations, baseConfigurations, projectConfigSourceMap, sourceInformation, targetIdentifier) { | ||
@@ -707,3 +711,2 @@ const mergedConfigurations = {}; | ||
} | ||
exports.resolveNxTokensInOptions = resolveNxTokensInOptions; | ||
function readTargetDefaultsForTarget(targetName, targetDefaults, executor) { | ||
@@ -724,3 +727,2 @@ if (executor) { | ||
} | ||
exports.readTargetDefaultsForTarget = readTargetDefaultsForTarget; | ||
function createRootMap(projectRootMap) { | ||
@@ -768,2 +770,1 @@ const map = {}; | ||
} | ||
exports.normalizeTarget = normalizeTarget; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.configurationGlobs = exports.retrieveProjectConfigurationsWithoutPluginInference = exports.retrieveProjectConfigurationPaths = exports.retrieveProjectConfigurationsWithAngularProjects = exports.retrieveProjectConfigurations = exports.retrieveWorkspaceFiles = void 0; | ||
exports.retrieveWorkspaceFiles = retrieveWorkspaceFiles; | ||
exports.retrieveProjectConfigurations = retrieveProjectConfigurations; | ||
exports.retrieveProjectConfigurationsWithAngularProjects = retrieveProjectConfigurationsWithAngularProjects; | ||
exports.retrieveProjectConfigurationPaths = retrieveProjectConfigurationPaths; | ||
exports.retrieveProjectConfigurationsWithoutPluginInference = retrieveProjectConfigurationsWithoutPluginInference; | ||
exports.configurationGlobs = configurationGlobs; | ||
const perf_hooks_1 = require("perf_hooks"); | ||
@@ -35,3 +40,2 @@ const angular_json_1 = require("../../adapter/angular-json"); | ||
} | ||
exports.retrieveWorkspaceFiles = retrieveWorkspaceFiles; | ||
/** | ||
@@ -45,3 +49,2 @@ * Walk through the workspace and return `ProjectConfigurations`. Only use this if the projectFileMap is not needed. | ||
} | ||
exports.retrieveProjectConfigurations = retrieveProjectConfigurations; | ||
async function retrieveProjectConfigurationsWithAngularProjects(workspaceRoot, nxJson) { | ||
@@ -59,3 +62,2 @@ const pluginsToLoad = nxJson?.plugins ?? []; | ||
} | ||
exports.retrieveProjectConfigurationsWithAngularProjects = retrieveProjectConfigurationsWithAngularProjects; | ||
function retrieveProjectConfigurationPaths(root, plugins) { | ||
@@ -65,3 +67,2 @@ const projectGlobPatterns = configurationGlobs(plugins); | ||
} | ||
exports.retrieveProjectConfigurationPaths = retrieveProjectConfigurationPaths; | ||
const projectsWithoutPluginCache = new Map(); | ||
@@ -83,3 +84,2 @@ // TODO: This function is called way too often, it should be optimized without this cache | ||
} | ||
exports.retrieveProjectConfigurationsWithoutPluginInference = retrieveProjectConfigurationsWithoutPluginInference; | ||
function configurationGlobs(plugins) { | ||
@@ -94,2 +94,1 @@ const globPatterns = []; | ||
} | ||
exports.configurationGlobs = configurationGlobs; |
@@ -14,6 +14,7 @@ import { ProjectGraph, ProjectGraphProjectNode } from '../config/project-graph'; | ||
}; | ||
private readonly allTargetNames; | ||
constructor(extraTargetDependencies: TargetDependencies, projectGraph: ProjectGraph); | ||
processTasks(projectNames: string[], targets: string[], configuration: string, overrides: Object, excludeTaskDependencies: boolean): string[]; | ||
processTask(task: Task, projectUsedToDeriveDependencies: string, configuration: string, overrides: Object): void; | ||
private processTasksForMatchingProjects; | ||
private processTasksForMultipleProjects; | ||
private processTasksForSingleProject; | ||
@@ -20,0 +21,0 @@ private processTasksForDependencies; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.mapTargetDefaultsToDependencies = exports.createTaskGraph = exports.ProcessTasks = void 0; | ||
exports.ProcessTasks = void 0; | ||
exports.createTaskGraph = createTaskGraph; | ||
exports.mapTargetDefaultsToDependencies = mapTargetDefaultsToDependencies; | ||
const utils_1 = require("./utils"); | ||
const project_graph_utils_1 = require("../utils/project-graph-utils"); | ||
const find_matching_projects_1 = require("../utils/find-matching-projects"); | ||
const output_1 = require("../utils/output"); | ||
@@ -15,2 +16,10 @@ class ProcessTasks { | ||
this.dependencies = {}; | ||
const allTargetNames = new Set(); | ||
for (const projectName in projectGraph.nodes) { | ||
const project = projectGraph.nodes[projectName]; | ||
for (const targetName in project.data.targets ?? {}) { | ||
allTargetNames.add(targetName); | ||
} | ||
} | ||
this.allTargetNames = Array.from(allTargetNames); | ||
} | ||
@@ -62,3 +71,3 @@ processTasks(projectNames, targets, configuration, overrides, excludeTaskDependencies) { | ||
this.seen.add(seenKey); | ||
const dependencyConfigs = (0, utils_1.getDependencyConfigs)({ project: task.target.project, target: task.target.target }, this.extraTargetDependencies, this.projectGraph); | ||
const dependencyConfigs = (0, utils_1.getDependencyConfigs)({ project: task.target.project, target: task.target.target }, this.extraTargetDependencies, this.projectGraph, this.allTargetNames); | ||
for (const dependencyConfig of dependencyConfigs) { | ||
@@ -69,22 +78,3 @@ const taskOverrides = dependencyConfig.params === 'forward' | ||
if (dependencyConfig.projects) { | ||
/** LERNA SUPPORT START - Remove in v20 */ | ||
// Lerna uses `dependencies` in `prepNxOptions`, so we need to maintain | ||
// support for it until lerna can be updated to use the syntax. | ||
// | ||
// This should have been removed in v17, but the updates to lerna had not | ||
// been made yet. | ||
// | ||
// TODO(@agentender): Remove this part in v20 | ||
if (typeof dependencyConfig.projects === 'string') { | ||
if (dependencyConfig.projects === 'self') { | ||
this.processTasksForSingleProject(task, task.target.project, dependencyConfig, configuration, taskOverrides, overrides); | ||
continue; | ||
} | ||
else if (dependencyConfig.projects === 'dependencies') { | ||
this.processTasksForDependencies(projectUsedToDeriveDependencies, dependencyConfig, configuration, task, taskOverrides, overrides); | ||
continue; | ||
} | ||
} | ||
/** LERNA SUPPORT END - Remove in v17 */ | ||
this.processTasksForMatchingProjects(dependencyConfig, configuration, task, taskOverrides, overrides); | ||
this.processTasksForMultipleProjects(dependencyConfig, configuration, task, taskOverrides, overrides); | ||
} | ||
@@ -99,16 +89,12 @@ else if (dependencyConfig.dependencies) { | ||
} | ||
processTasksForMatchingProjects(dependencyConfig, configuration, task, taskOverrides, overrides) { | ||
const targetProjectSpecifiers = typeof dependencyConfig.projects === 'string' | ||
? [dependencyConfig.projects] | ||
: dependencyConfig.projects; | ||
const matchingProjects = (0, find_matching_projects_1.findMatchingProjects)(targetProjectSpecifiers, this.projectGraph.nodes); | ||
if (matchingProjects.length === 0) { | ||
processTasksForMultipleProjects(dependencyConfig, configuration, task, taskOverrides, overrides) { | ||
if (dependencyConfig.projects.length === 0) { | ||
output_1.output.warn({ | ||
title: `\`dependsOn\` is misconfigured for ${task.target.project}:${task.target.target}`, | ||
bodyLines: [ | ||
`Project patterns "${targetProjectSpecifiers}" does not match any projects.`, | ||
`Project patterns "${dependencyConfig.projects}" does not match any projects.`, | ||
], | ||
}); | ||
} | ||
for (const projectName of matchingProjects) { | ||
for (const projectName of dependencyConfig.projects) { | ||
this.processTasksForSingleProject(task, projectName, dependencyConfig, configuration, taskOverrides, overrides); | ||
@@ -204,3 +190,2 @@ } | ||
} | ||
exports.createTaskGraph = createTaskGraph; | ||
function mapTargetDefaultsToDependencies(defaults) { | ||
@@ -213,3 +198,2 @@ const res = {}; | ||
} | ||
exports.mapTargetDefaultsToDependencies = mapTargetDefaultsToDependencies; | ||
function interpolateOverrides(args, projectName, project) { | ||
@@ -216,0 +200,0 @@ const interpolatedArgs = { ...args }; |
@@ -1,2 +0,1 @@ | ||
/// <reference types="node" /> | ||
import { DefaultTasksRunnerOptions } from './default-tasks-runner'; | ||
@@ -3,0 +2,0 @@ import { Batch } from './tasks-schedule'; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.initTasksRunner = void 0; | ||
exports.initTasksRunner = initTasksRunner; | ||
const workspace_configuration_check_1 = require("../utils/workspace-configuration-check"); | ||
@@ -59,2 +59,1 @@ const configuration_1 = require("../config/configuration"); | ||
} | ||
exports.initTasksRunner = initTasksRunner; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.createRunManyDynamicOutputRenderer = void 0; | ||
exports.createRunManyDynamicOutputRenderer = createRunManyDynamicOutputRenderer; | ||
const cliCursor = require("cli-cursor"); | ||
@@ -321,3 +321,2 @@ const cli_spinners_1 = require("cli-spinners"); | ||
} | ||
exports.createRunManyDynamicOutputRenderer = createRunManyDynamicOutputRenderer; | ||
function writeCompletedTaskResultLine(line) { | ||
@@ -324,0 +323,0 @@ output_1.output.overwriteLine(LEFT_PAD + line); |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.createRunOneDynamicOutputRenderer = void 0; | ||
exports.createRunOneDynamicOutputRenderer = createRunOneDynamicOutputRenderer; | ||
const cliCursor = require("cli-cursor"); | ||
@@ -229,2 +229,1 @@ const cli_spinners_1 = require("cli-spinners"); | ||
} | ||
exports.createRunOneDynamicOutputRenderer = createRunOneDynamicOutputRenderer; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.formatTargetsAndProjects = exports.formatFlags = void 0; | ||
exports.formatFlags = formatFlags; | ||
exports.formatTargetsAndProjects = formatTargetsAndProjects; | ||
const output_1 = require("../../utils/output"); | ||
@@ -10,3 +11,2 @@ function formatFlags(leftPadding, flag, value) { | ||
} | ||
exports.formatFlags = formatFlags; | ||
function formatValue(value) { | ||
@@ -45,2 +45,1 @@ if (Array.isArray(value)) { | ||
} | ||
exports.formatTargetsAndProjects = formatTargetsAndProjects; |
@@ -6,3 +6,3 @@ "use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.prettyTime = void 0; | ||
exports.prettyTime = prettyTime; | ||
const nano = (time) => +time[0] * 1e9 + +time[1]; | ||
@@ -75,2 +75,1 @@ const scale = { | ||
} | ||
exports.prettyTime = prettyTime; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.viewLogsFooterRows = void 0; | ||
exports.viewLogsFooterRows = viewLogsFooterRows; | ||
const nx_json_1 = require("../../config/nx-json"); | ||
@@ -16,2 +16,1 @@ const nx_cloud_utils_1 = require("../../utils/nx-cloud-utils"); | ||
} | ||
exports.viewLogsFooterRows = viewLogsFooterRows; |
@@ -19,3 +19,2 @@ /** | ||
*/ | ||
/// <reference types="node" /> | ||
import { Serializable } from 'child_process'; | ||
@@ -22,0 +21,0 @@ export interface PseudoIPCMessage { |
@@ -1,2 +0,1 @@ | ||
/// <reference types="node" /> | ||
import { ChildProcess, RustPseudoTerminal } from '../native'; | ||
@@ -3,0 +2,0 @@ import { PseudoIPCServer } from './pseudo-ipc'; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.PseudoTtyProcessWithSend = exports.PseudoTtyProcess = exports.PseudoTerminal = exports.getPseudoTerminal = void 0; | ||
exports.PseudoTtyProcessWithSend = exports.PseudoTtyProcess = exports.PseudoTerminal = void 0; | ||
exports.getPseudoTerminal = getPseudoTerminal; | ||
const native_1 = require("../native"); | ||
@@ -16,3 +17,2 @@ const pseudo_ipc_1 = require("./pseudo-ipc"); | ||
} | ||
exports.getPseudoTerminal = getPseudoTerminal; | ||
class PseudoTerminal { | ||
@@ -19,0 +19,0 @@ static isSupported() { |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.getRunnerOptions = exports.getRunner = exports.invokeTasksRunner = exports.runCommand = void 0; | ||
exports.runCommand = runCommand; | ||
exports.invokeTasksRunner = invokeTasksRunner; | ||
exports.getRunner = getRunner; | ||
exports.getRunnerOptions = getRunnerOptions; | ||
const path_1 = require("path"); | ||
@@ -106,3 +109,2 @@ const workspace_root_1 = require("../utils/workspace-root"); | ||
} | ||
exports.runCommand = runCommand; | ||
function setEnvVarsBasedOnArgs(nxArgs, loadDotEnvFiles) { | ||
@@ -199,3 +201,2 @@ if (nxArgs.outputStyle == 'stream' || | ||
} | ||
exports.invokeTasksRunner = invokeTasksRunner; | ||
function constructLifeCycles(lifeCycle) { | ||
@@ -303,3 +304,2 @@ const lifeCycles = []; | ||
} | ||
exports.getRunner = getRunner; | ||
function getTasksRunnerPath(runner, nxJson) { | ||
@@ -361,2 +361,1 @@ let modulePath = nxJson.tasksRunnerOptions?.[runner]?.runner; | ||
} | ||
exports.getRunnerOptions = getRunnerOptions; |
@@ -1,2 +0,1 @@ | ||
/// <reference types="node" /> | ||
import { Task } from '../config/task-graph'; | ||
@@ -3,0 +2,0 @@ export declare function getEnvVariablesForBatchProcess(skipNxCache: boolean, captureStderr: boolean): NodeJS.ProcessEnv; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.unloadDotEnvFile = exports.loadAndExpandDotEnvFile = exports.getEnvVariablesForTask = exports.getTaskSpecificEnv = exports.getEnvVariablesForBatchProcess = void 0; | ||
exports.getEnvVariablesForBatchProcess = getEnvVariablesForBatchProcess; | ||
exports.getTaskSpecificEnv = getTaskSpecificEnv; | ||
exports.getEnvVariablesForTask = getEnvVariablesForTask; | ||
exports.loadAndExpandDotEnvFile = loadAndExpandDotEnvFile; | ||
exports.unloadDotEnvFile = unloadDotEnvFile; | ||
const dotenv_1 = require("dotenv"); | ||
@@ -15,3 +19,2 @@ const dotenv_expand_1 = require("dotenv-expand"); | ||
} | ||
exports.getEnvVariablesForBatchProcess = getEnvVariablesForBatchProcess; | ||
function getTaskSpecificEnv(task) { | ||
@@ -25,3 +28,2 @@ // Unload any dot env files at the root of the workspace that were loaded on init of Nx. | ||
} | ||
exports.getTaskSpecificEnv = getTaskSpecificEnv; | ||
function getEnvVariablesForTask(task, taskSpecificEnv, forceColor, skipNxCache, captureStderr, outputPath, streamOutput) { | ||
@@ -44,3 +46,2 @@ const res = { | ||
} | ||
exports.getEnvVariablesForTask = getEnvVariablesForTask; | ||
function getNxEnvVariablesForForkedProcess(forceColor, skipNxCache, captureStderr, outputPath, streamOutput) { | ||
@@ -98,3 +99,2 @@ const env = { | ||
} | ||
exports.loadAndExpandDotEnvFile = loadAndExpandDotEnvFile; | ||
/** | ||
@@ -114,3 +114,2 @@ * This function unloads a .env file and removes the variables in it from the environmentVariables. | ||
} | ||
exports.unloadDotEnvFile = unloadDotEnvFile; | ||
function getEnvFilesForTask(task) { | ||
@@ -117,0 +116,0 @@ // Collect dot env files that may pertain to a task |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.makeAcyclic = exports.findCycle = void 0; | ||
exports.findCycle = findCycle; | ||
exports.makeAcyclic = makeAcyclic; | ||
function _findCycle(graph, id, visited, path) { | ||
@@ -29,3 +30,2 @@ if (visited[id]) | ||
} | ||
exports.findCycle = findCycle; | ||
function _makeAcyclic(graph, id, visited, path) { | ||
@@ -56,2 +56,1 @@ if (visited[id]) | ||
} | ||
exports.makeAcyclic = makeAcyclic; |
@@ -267,2 +267,10 @@ "use strict"; | ||
} | ||
else if (targetConfiguration.executor === 'nx:noop') { | ||
(0, fs_1.writeFileSync)(temporaryOutputPath, ''); | ||
results.push({ | ||
task, | ||
status: 'success', | ||
terminalOutput: '', | ||
}); | ||
} | ||
else { | ||
@@ -269,0 +277,0 @@ // cache prep |
@@ -5,8 +5,21 @@ import { Task, TaskGraph } from '../config/task-graph'; | ||
import { CustomHasher, ExecutorConfig } from '../config/misc-interfaces'; | ||
export type NormalizedTargetDependencyConfig = TargetDependencyConfig & { | ||
projects: string[]; | ||
}; | ||
export declare function getDependencyConfigs({ project, target }: { | ||
project: string; | ||
target: string; | ||
}, extraTargetDependencies: Record<string, (TargetDependencyConfig | string)[]>, projectGraph: ProjectGraph): TargetDependencyConfig[] | undefined; | ||
export declare function expandDependencyConfigSyntaxSugar(dependencyConfigString: string, graph: ProjectGraph): TargetDependencyConfig; | ||
}, extraTargetDependencies: Record<string, (TargetDependencyConfig | string)[]>, projectGraph: ProjectGraph, allTargetNames: string[]): NormalizedTargetDependencyConfig[] | undefined; | ||
export declare function normalizeDependencyConfigDefinition(definition: string | TargetDependencyConfig, currentProject: string, graph: ProjectGraph, allTargetNames: string[]): NormalizedTargetDependencyConfig[]; | ||
export declare function normalizeDependencyConfigProjects(dependencyConfig: TargetDependencyConfig, currentProject: string, graph: ProjectGraph): NormalizedTargetDependencyConfig; | ||
export declare function expandDependencyConfigSyntaxSugar(dependencyConfigString: string | TargetDependencyConfig, graph: ProjectGraph): TargetDependencyConfig; | ||
export declare function expandWildcardTargetConfiguration(dependencyConfig: NormalizedTargetDependencyConfig, allTargetNames: string[]): NormalizedTargetDependencyConfig[]; | ||
export declare function readProjectAndTargetFromTargetString(targetString: string, projects: Record<string, ProjectGraphProjectNode>): { | ||
projects?: string[]; | ||
target: string; | ||
}; | ||
export declare function getOutputs(p: Record<string, ProjectGraphProjectNode>, target: Task['target'], overrides: Task['overrides']): string[]; | ||
export declare function normalizeTargetDependencyWithStringProjects(dependencyConfig: TargetDependencyConfig): Omit<TargetDependencyConfig, 'projects'> & { | ||
projects: string[]; | ||
}; | ||
declare class InvalidOutputsError extends Error { | ||
@@ -13,0 +26,0 @@ outputs: string[]; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.unparse = exports.isCacheableTask = exports.shouldStreamOutput = exports.getSerializedArgsForTask = exports.getPrintableCommandArgsForTask = exports.getCliPath = exports.calculateReverseDeps = exports.removeIdsFromGraph = exports.removeTasksFromTaskGraph = exports.getCustomHasher = exports.getExecutorForTask = exports.getExecutorNameForTask = exports.getTargetConfigurationForTask = exports.interpolate = exports.getOutputsForTargetAndConfiguration = exports.transformLegacyOutputs = exports.validateOutputs = exports.getOutputs = exports.expandDependencyConfigSyntaxSugar = exports.getDependencyConfigs = void 0; | ||
const output_1 = require("../utils/output"); | ||
exports.getDependencyConfigs = getDependencyConfigs; | ||
exports.normalizeDependencyConfigDefinition = normalizeDependencyConfigDefinition; | ||
exports.normalizeDependencyConfigProjects = normalizeDependencyConfigProjects; | ||
exports.expandDependencyConfigSyntaxSugar = expandDependencyConfigSyntaxSugar; | ||
exports.expandWildcardTargetConfiguration = expandWildcardTargetConfiguration; | ||
exports.readProjectAndTargetFromTargetString = readProjectAndTargetFromTargetString; | ||
exports.getOutputs = getOutputs; | ||
exports.normalizeTargetDependencyWithStringProjects = normalizeTargetDependencyWithStringProjects; | ||
exports.validateOutputs = validateOutputs; | ||
exports.transformLegacyOutputs = transformLegacyOutputs; | ||
exports.getOutputsForTargetAndConfiguration = getOutputsForTargetAndConfiguration; | ||
exports.interpolate = interpolate; | ||
exports.getTargetConfigurationForTask = getTargetConfigurationForTask; | ||
exports.getExecutorNameForTask = getExecutorNameForTask; | ||
exports.getExecutorForTask = getExecutorForTask; | ||
exports.getCustomHasher = getCustomHasher; | ||
exports.removeTasksFromTaskGraph = removeTasksFromTaskGraph; | ||
exports.removeIdsFromGraph = removeIdsFromGraph; | ||
exports.calculateReverseDeps = calculateReverseDeps; | ||
exports.getCliPath = getCliPath; | ||
exports.getPrintableCommandArgsForTask = getPrintableCommandArgsForTask; | ||
exports.getSerializedArgsForTask = getSerializedArgsForTask; | ||
exports.shouldStreamOutput = shouldStreamOutput; | ||
exports.isCacheableTask = isCacheableTask; | ||
exports.unparse = unparse; | ||
const path_1 = require("path"); | ||
@@ -14,24 +37,28 @@ const posix_1 = require("path/posix"); | ||
const project_graph_1 = require("../project-graph/project-graph"); | ||
function getDependencyConfigs({ project, target }, extraTargetDependencies, projectGraph) { | ||
const find_matching_projects_1 = require("../utils/find-matching-projects"); | ||
const minimatch_1 = require("minimatch"); | ||
function getDependencyConfigs({ project, target }, extraTargetDependencies, projectGraph, allTargetNames) { | ||
const dependencyConfigs = (projectGraph.nodes[project].data?.targets[target]?.dependsOn ?? | ||
// This is passed into `run-command` from programmatic invocations | ||
extraTargetDependencies[target] ?? | ||
[]).map((config) => typeof config === 'string' | ||
? expandDependencyConfigSyntaxSugar(config, projectGraph) | ||
: config); | ||
for (const dependencyConfig of dependencyConfigs) { | ||
if (dependencyConfig.projects && dependencyConfig.dependencies) { | ||
output_1.output.error({ | ||
title: `dependsOn is improperly configured for ${project}:${target}`, | ||
bodyLines: [ | ||
`dependsOn.projects and dependsOn.dependencies cannot be used together.`, | ||
], | ||
}); | ||
process.exit(1); | ||
} | ||
} | ||
[]).flatMap((config) => normalizeDependencyConfigDefinition(config, project, projectGraph, allTargetNames)); | ||
return dependencyConfigs; | ||
} | ||
exports.getDependencyConfigs = getDependencyConfigs; | ||
function normalizeDependencyConfigDefinition(definition, currentProject, graph, allTargetNames) { | ||
return expandWildcardTargetConfiguration(normalizeDependencyConfigProjects(expandDependencyConfigSyntaxSugar(definition, graph), currentProject, graph), allTargetNames); | ||
} | ||
function normalizeDependencyConfigProjects(dependencyConfig, currentProject, graph) { | ||
const noStringConfig = normalizeTargetDependencyWithStringProjects(dependencyConfig); | ||
if (noStringConfig.projects) { | ||
dependencyConfig.projects = (0, find_matching_projects_1.findMatchingProjects)(noStringConfig.projects, graph.nodes); | ||
} | ||
else if (!noStringConfig.dependencies) { | ||
dependencyConfig.projects = [currentProject]; | ||
} | ||
return dependencyConfig; | ||
} | ||
function expandDependencyConfigSyntaxSugar(dependencyConfigString, graph) { | ||
if (typeof dependencyConfigString !== 'string') { | ||
return dependencyConfigString; | ||
} | ||
const [dependencies, targetString] = dependencyConfigString.startsWith('^') | ||
@@ -48,22 +75,75 @@ ? [true, dependencyConfigString.substring(1)] | ||
} | ||
const { projects, target } = readProjectAndTargetFromTargetString(targetString, graph.nodes); | ||
return projects ? { projects, target } : { target }; | ||
} | ||
// Weakmap let's the cache get cleared by garbage collector if allTargetNames is no longer used | ||
const patternResultCache = new WeakMap(); | ||
function expandWildcardTargetConfiguration(dependencyConfig, allTargetNames) { | ||
if (!find_matching_projects_1.GLOB_CHARACTERS.some((char) => dependencyConfig.target.includes(char))) { | ||
return [dependencyConfig]; | ||
} | ||
let cache = patternResultCache.get(allTargetNames); | ||
if (!cache) { | ||
cache = new Map(); | ||
patternResultCache.set(allTargetNames, cache); | ||
} | ||
const cachedResult = cache.get(dependencyConfig.target); | ||
if (cachedResult) { | ||
return cachedResult; | ||
} | ||
const matcher = minimatch_1.minimatch.filter(dependencyConfig.target); | ||
const matchingTargets = allTargetNames.filter((t) => matcher(t)); | ||
const result = matchingTargets.map((t) => ({ | ||
...dependencyConfig, | ||
target: t, | ||
})); | ||
cache.set(dependencyConfig.target, result); | ||
return result; | ||
} | ||
function readProjectAndTargetFromTargetString(targetString, projects) { | ||
// Support for both `project:target` and `target:with:colons` syntax | ||
const [maybeProject, ...segments] = (0, split_target_1.splitByColons)(targetString); | ||
// if no additional segments are provided, then the string references | ||
// a target of the same project | ||
if (!segments.length) { | ||
// if no additional segments are provided, then the string references | ||
// a target of the same project | ||
return { target: maybeProject }; | ||
} | ||
return { | ||
else if (maybeProject in projects) { | ||
// Only the first segment could be a project. If it is, the rest is a target. | ||
// If its not, then the whole targetString was a target with colons in its name. | ||
target: maybeProject in graph.nodes ? segments.join(':') : targetString, | ||
return { projects: [maybeProject], target: segments.join(':') }; | ||
} | ||
else { | ||
// If the first segment is a project, then we have a specific project. Otherwise, we don't. | ||
projects: maybeProject in graph.nodes ? [maybeProject] : undefined, | ||
}; | ||
return { target: targetString }; | ||
} | ||
} | ||
exports.expandDependencyConfigSyntaxSugar = expandDependencyConfigSyntaxSugar; | ||
function getOutputs(p, target, overrides) { | ||
return getOutputsForTargetAndConfiguration(target, overrides, p[target.project]); | ||
} | ||
exports.getOutputs = getOutputs; | ||
function normalizeTargetDependencyWithStringProjects(dependencyConfig) { | ||
if (typeof dependencyConfig.projects === 'string') { | ||
/** LERNA SUPPORT START - Remove in v20 */ | ||
// Lerna uses `dependencies` in `prepNxOptions`, so we need to maintain | ||
// support for it until lerna can be updated to use the syntax. | ||
// | ||
// This should have been removed in v17, but the updates to lerna had not | ||
// been made yet. | ||
// | ||
// TODO(@agentender): Remove this part in v20 | ||
if (dependencyConfig.projects === 'self') { | ||
delete dependencyConfig.projects; | ||
} | ||
else if (dependencyConfig.projects === 'dependencies') { | ||
dependencyConfig.dependencies = true; | ||
delete dependencyConfig.projects; | ||
return; | ||
/** LERNA SUPPORT END - Remove in v20 */ | ||
} | ||
else { | ||
dependencyConfig.projects = [dependencyConfig.projects]; | ||
} | ||
} | ||
return dependencyConfig; | ||
} | ||
class InvalidOutputsError extends Error { | ||
@@ -108,3 +188,2 @@ constructor(outputs, invalidOutputs) { | ||
} | ||
exports.validateOutputs = validateOutputs; | ||
function transformLegacyOutputs(projectRoot, error) { | ||
@@ -126,3 +205,2 @@ return error.outputs.map((output) => { | ||
} | ||
exports.transformLegacyOutputs = transformLegacyOutputs; | ||
/** | ||
@@ -173,3 +251,2 @@ * Returns the list of outputs that will be cached. | ||
} | ||
exports.getOutputsForTargetAndConfiguration = getOutputsForTargetAndConfiguration; | ||
/** | ||
@@ -194,3 +271,2 @@ * Matches portions of a string which need to be interpolated. | ||
} | ||
exports.interpolate = interpolate; | ||
function _interpolate(template, data) { | ||
@@ -217,7 +293,5 @@ let res = template; | ||
} | ||
exports.getTargetConfigurationForTask = getTargetConfigurationForTask; | ||
function getExecutorNameForTask(task, projectGraph) { | ||
return getTargetConfigurationForTask(task, projectGraph)?.executor; | ||
} | ||
exports.getExecutorNameForTask = getExecutorNameForTask; | ||
function getExecutorForTask(task, projectGraph) { | ||
@@ -228,3 +302,2 @@ const executor = getExecutorNameForTask(task, projectGraph); | ||
} | ||
exports.getExecutorForTask = getExecutorForTask; | ||
function getCustomHasher(task, projectGraph) { | ||
@@ -234,3 +307,2 @@ const factory = getExecutorForTask(task, projectGraph).hasherFactory; | ||
} | ||
exports.getCustomHasher = getCustomHasher; | ||
function removeTasksFromTaskGraph(graph, ids) { | ||
@@ -244,3 +316,2 @@ const newGraph = removeIdsFromGraph(graph, ids, graph.tasks); | ||
} | ||
exports.removeTasksFromTaskGraph = removeTasksFromTaskGraph; | ||
function removeIdsFromGraph(graph, ids, mapWithIds) { | ||
@@ -262,3 +333,2 @@ const filteredMapWithIds = {}; | ||
} | ||
exports.removeIdsFromGraph = removeIdsFromGraph; | ||
function calculateReverseDeps(taskGraph) { | ||
@@ -276,7 +346,5 @@ const reverseTaskDeps = {}; | ||
} | ||
exports.calculateReverseDeps = calculateReverseDeps; | ||
function getCliPath() { | ||
return require.resolve(`../../bin/run-executor.js`); | ||
} | ||
exports.getCliPath = getCliPath; | ||
function getPrintableCommandArgsForTask(task) { | ||
@@ -292,3 +360,2 @@ const args = task.overrides['__overrides_unparsed__']; | ||
} | ||
exports.getPrintableCommandArgsForTask = getPrintableCommandArgsForTask; | ||
function getSerializedArgsForTask(task, isVerbose) { | ||
@@ -303,3 +370,2 @@ return [ | ||
} | ||
exports.getSerializedArgsForTask = getSerializedArgsForTask; | ||
function shouldStreamOutput(task, initiatingProject) { | ||
@@ -314,3 +380,2 @@ if (process.env.NX_STREAM_OUTPUT === 'true') | ||
} | ||
exports.shouldStreamOutput = shouldStreamOutput; | ||
function isCacheableTask(task, options) { | ||
@@ -325,3 +390,2 @@ if (task.cache !== undefined && !longRunningTask(task)) { | ||
} | ||
exports.isCacheableTask = isCacheableTask; | ||
function longRunningTask(task) { | ||
@@ -340,2 +404,1 @@ const t = task.target.target; | ||
} | ||
exports.unparse = unparse; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.recordStat = exports.messages = exports.PromptMessages = void 0; | ||
exports.messages = exports.PromptMessages = void 0; | ||
exports.recordStat = recordStat; | ||
const node_child_process_1 = require("node:child_process"); | ||
@@ -90,3 +91,2 @@ const is_ci_1 = require("./is-ci"); | ||
} | ||
exports.recordStat = recordStat; | ||
function shouldRecordStats() { | ||
@@ -93,0 +93,0 @@ const pmc = (0, package_manager_1.getPackageManagerCommand)(); |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.allFileData = void 0; | ||
exports.allFileData = allFileData; | ||
const workspace_context_1 = require("./workspace-context"); | ||
@@ -9,2 +9,1 @@ const workspace_root_1 = require("./workspace-root"); | ||
} | ||
exports.allFileData = allFileData; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.assertWorkspaceValidity = void 0; | ||
exports.assertWorkspaceValidity = assertWorkspaceValidity; | ||
const find_matching_projects_1 = require("./find-matching-projects"); | ||
@@ -73,3 +73,2 @@ const output_1 = require("./output"); | ||
} | ||
exports.assertWorkspaceValidity = assertWorkspaceValidity; | ||
function detectAndSetInvalidProjectGlobValues(map, sourceName, desiredImplicitDeps, projectConfigurations, projects) { | ||
@@ -76,0 +75,0 @@ const invalidProjectsOrGlobs = desiredImplicitDeps.filter((implicit) => { |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.getLastValueFromAsyncIterableIterator = exports.isAsyncIterator = void 0; | ||
exports.isAsyncIterator = isAsyncIterator; | ||
exports.getLastValueFromAsyncIterableIterator = getLastValueFromAsyncIterableIterator; | ||
function isAsyncIterator(v) { | ||
return typeof v?.[Symbol.asyncIterator] === 'function'; | ||
} | ||
exports.isAsyncIterator = isAsyncIterator; | ||
async function getLastValueFromAsyncIterableIterator(i) { | ||
@@ -19,2 +19,1 @@ let prev; | ||
} | ||
exports.getLastValueFromAsyncIterableIterator = getLastValueFromAsyncIterableIterator; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.workspaceDataDirectory = exports.cacheDirectoryForWorkspace = exports.cacheDir = void 0; | ||
exports.workspaceDataDirectory = exports.cacheDir = void 0; | ||
exports.cacheDirectoryForWorkspace = cacheDirectoryForWorkspace; | ||
const fs_1 = require("fs"); | ||
@@ -64,5 +65,4 @@ const path_1 = require("path"); | ||
} | ||
exports.cacheDirectoryForWorkspace = cacheDirectoryForWorkspace; | ||
exports.workspaceDataDirectory = absolutePath(workspace_root_1.workspaceRoot, process.env.NX_WORKSPACE_DATA_DIRECTORY ?? | ||
process.env.NX_PROJECT_GRAPH_CACHE_DIRECTORY ?? | ||
defaultWorkspaceDataDirectory(workspace_root_1.workspaceRoot)); |
@@ -1,2 +0,1 @@ | ||
/// <reference types="node" /> | ||
import { type ExecOptions, type ExecSyncOptions } from 'child_process'; | ||
@@ -3,0 +2,0 @@ import { ChildProcess } from '../native'; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.PseudoTtyProcess = exports.runNxAsync = exports.runNxSync = void 0; | ||
exports.PseudoTtyProcess = void 0; | ||
exports.runNxSync = runNxSync; | ||
exports.runNxAsync = runNxAsync; | ||
const child_process_1 = require("child_process"); | ||
@@ -27,3 +29,2 @@ const fs_1 = require("fs"); | ||
} | ||
exports.runNxSync = runNxSync; | ||
async function runNxAsync(cmd, options) { | ||
@@ -64,3 +65,2 @@ let baseCmd; | ||
} | ||
exports.runNxAsync = runNxAsync; | ||
function messageToCode(message) { | ||
@@ -67,0 +67,0 @@ if (message.startsWith('Terminated by ')) { |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.chunkify = void 0; | ||
exports.chunkify = chunkify; | ||
const child_process_1 = require("child_process"); | ||
@@ -26,3 +26,2 @@ const TERMINAL_SIZE = process.platform === 'win32' ? 8192 : getUnixTerminalSize(); | ||
} | ||
exports.chunkify = chunkify; | ||
function getUnixTerminalSize() { | ||
@@ -29,0 +28,0 @@ try { |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.codeFrameColumns = void 0; | ||
exports.codeFrameColumns = codeFrameColumns; | ||
// Adapted from https://raw.githubusercontent.com/babel/babel/4108524/packages/babel-code-frame/src/index.js | ||
@@ -119,2 +119,1 @@ const chalk = require("chalk"); | ||
} | ||
exports.codeFrameColumns = codeFrameColumns; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.collapseExpandedOutputs = void 0; | ||
exports.collapseExpandedOutputs = collapseExpandedOutputs; | ||
const path_1 = require("path"); | ||
@@ -41,2 +41,1 @@ /** | ||
} | ||
exports.collapseExpandedOutputs = collapseExpandedOutputs; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.readGraphFileFromGraphArg = exports.getProjectRoots = exports.parseFiles = exports.splitArgsIntoNxArgsAndOverrides = exports.createOverrides = void 0; | ||
exports.createOverrides = createOverrides; | ||
exports.splitArgsIntoNxArgsAndOverrides = splitArgsIntoNxArgsAndOverrides; | ||
exports.parseFiles = parseFiles; | ||
exports.getProjectRoots = getProjectRoots; | ||
exports.readGraphFileFromGraphArg = readGraphFileFromGraphArg; | ||
const yargsParser = require("yargs-parser"); | ||
@@ -22,3 +26,2 @@ const file_utils_1 = require("../project-graph/file-utils"); | ||
} | ||
exports.createOverrides = createOverrides; | ||
function splitArgsIntoNxArgsAndOverrides(args, mode, options = { printWarnings: true }, nxJson) { | ||
@@ -131,3 +134,2 @@ // this is to lerna case when this function is invoked imperatively | ||
} | ||
exports.splitArgsIntoNxArgsAndOverrides = splitArgsIntoNxArgsAndOverrides; | ||
function normalizeNxArgsRunner(nxArgs, nxJson, options) { | ||
@@ -206,3 +208,2 @@ if (!nxArgs.runner) { | ||
} | ||
exports.parseFiles = parseFiles; | ||
function getUncommittedFiles() { | ||
@@ -252,3 +253,2 @@ return parseGitOutput(`git diff --name-only --no-renames --relative HEAD .`); | ||
} | ||
exports.getProjectRoots = getProjectRoots; | ||
function readGraphFileFromGraphArg({ graph }) { | ||
@@ -259,2 +259,1 @@ return typeof graph === 'string' && graph !== 'true' && graph !== '' | ||
} | ||
exports.readGraphFileFromGraphArg = readGraphFileFromGraphArg; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.consumeMessagesFromSocket = void 0; | ||
exports.consumeMessagesFromSocket = consumeMessagesFromSocket; | ||
function consumeMessagesFromSocket(callback) { | ||
@@ -22,2 +22,1 @@ let message = ''; | ||
} | ||
exports.consumeMessagesFromSocket = consumeMessagesFromSocket; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.deduceDefaultBase = void 0; | ||
exports.deduceDefaultBase = deduceDefaultBase; | ||
const child_process_1 = require("child_process"); | ||
@@ -15,2 +15,1 @@ function deduceDefaultBase() { | ||
} | ||
exports.deduceDefaultBase = deduceDefaultBase; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.loadRootEnvFiles = void 0; | ||
exports.loadRootEnvFiles = loadRootEnvFiles; | ||
const dotenv_1 = require("dotenv"); | ||
@@ -22,2 +22,1 @@ const dotenv_expand_1 = require("dotenv-expand"); | ||
} | ||
exports.loadRootEnvFiles = loadRootEnvFiles; |
@@ -1,2 +0,1 @@ | ||
/// <reference types="node" /> | ||
/** | ||
@@ -3,0 +2,0 @@ * Translates NodeJS signals to numeric exit code |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.signalToCode = void 0; | ||
exports.signalToCode = signalToCode; | ||
/** | ||
@@ -20,2 +20,1 @@ * Translates NodeJS signals to numeric exit code | ||
} | ||
exports.signalToCode = signalToCode; |
@@ -1,2 +0,1 @@ | ||
/// <reference types="node" /> | ||
import type { JsonParseOptions, JsonSerializeOptions } from './json'; | ||
@@ -3,0 +2,0 @@ import { PathLike } from 'fs'; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.readFileIfExisting = exports.extractFileFromTarball = exports.isRelativePath = exports.createDirectory = exports.fileExists = exports.directoryExists = exports.writeJsonFile = exports.readYamlFile = exports.readJsonFile = void 0; | ||
exports.readJsonFile = readJsonFile; | ||
exports.readYamlFile = readYamlFile; | ||
exports.writeJsonFile = writeJsonFile; | ||
exports.directoryExists = directoryExists; | ||
exports.fileExists = fileExists; | ||
exports.createDirectory = createDirectory; | ||
exports.isRelativePath = isRelativePath; | ||
exports.extractFileFromTarball = extractFileFromTarball; | ||
exports.readFileIfExisting = readFileIfExisting; | ||
const json_1 = require("./json"); | ||
@@ -29,3 +37,2 @@ const fs_1 = require("fs"); | ||
} | ||
exports.readJsonFile = readJsonFile; | ||
/** | ||
@@ -42,3 +49,2 @@ * Reads a YAML file and returns the object the YAML content represents. | ||
} | ||
exports.readYamlFile = readYamlFile; | ||
/** | ||
@@ -59,3 +65,2 @@ * Serializes the given data to JSON and writes it to a file. | ||
} | ||
exports.writeJsonFile = writeJsonFile; | ||
/** | ||
@@ -73,3 +78,2 @@ * Check if a directory exists | ||
} | ||
exports.directoryExists = directoryExists; | ||
/** | ||
@@ -87,7 +91,5 @@ * Check if a file exists. | ||
} | ||
exports.fileExists = fileExists; | ||
function createDirectory(path) { | ||
(0, fs_1.mkdirSync)(path, { recursive: true }); | ||
} | ||
exports.createDirectory = createDirectory; | ||
function isRelativePath(path) { | ||
@@ -99,3 +101,2 @@ return (path === '.' || | ||
} | ||
exports.isRelativePath = isRelativePath; | ||
/** | ||
@@ -137,6 +138,4 @@ * Extracts a file from a given tarball to the specified destination. | ||
} | ||
exports.extractFileFromTarball = extractFileFromTarball; | ||
function readFileIfExisting(path) { | ||
return (0, fs_1.existsSync)(path) ? (0, fs_1.readFileSync)(path, 'utf-8') : ''; | ||
} | ||
exports.readFileIfExisting = readFileIfExisting; |
import type { ProjectGraphProjectNode } from '../config/project-graph'; | ||
/** | ||
* The presence of these characters in a string indicates that it might be a glob pattern. | ||
*/ | ||
export declare const GLOB_CHARACTERS: string[]; | ||
/** | ||
* Find matching project names given a list of potential project names or globs. | ||
@@ -4,0 +8,0 @@ * |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.getMatchingStringsWithCache = exports.findMatchingProjects = void 0; | ||
exports.getMatchingStringsWithCache = exports.GLOB_CHARACTERS = void 0; | ||
exports.findMatchingProjects = findMatchingProjects; | ||
const minimatch_1 = require("minimatch"); | ||
@@ -11,4 +12,7 @@ const validPatternTypes = [ | ||
]; | ||
const globCharacters = ['*', '|', '{', '}', '(', ')']; | ||
/** | ||
* The presence of these characters in a string indicates that it might be a glob pattern. | ||
*/ | ||
exports.GLOB_CHARACTERS = ['*', '|', '{', '}', '(', ')']; | ||
/** | ||
* Find matching project names given a list of potential project names or globs. | ||
@@ -90,3 +94,2 @@ * | ||
} | ||
exports.findMatchingProjects = findMatchingProjects; | ||
function addMatchingProjectsByDirectory(projectNames, projects, pattern, matchedProjects) { | ||
@@ -115,3 +118,3 @@ for (const projectName of projectNames) { | ||
} | ||
if (!globCharacters.some((c) => pattern.value.includes(c))) { | ||
if (!exports.GLOB_CHARACTERS.some((c) => pattern.value.includes(c))) { | ||
return; | ||
@@ -141,3 +144,3 @@ } | ||
} | ||
if (!globCharacters.some((c) => pattern.value.includes(c))) { | ||
if (!exports.GLOB_CHARACTERS.some((c) => pattern.value.includes(c))) { | ||
continue; | ||
@@ -144,0 +147,0 @@ } |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.findWorkspaceRoot = void 0; | ||
exports.findWorkspaceRoot = findWorkspaceRoot; | ||
const workspace_root_1 = require("./workspace-root"); | ||
@@ -22,3 +22,2 @@ /** | ||
} | ||
exports.findWorkspaceRoot = findWorkspaceRoot; | ||
function isAngularCliInstalled(root) { | ||
@@ -25,0 +24,0 @@ try { |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.getPackageNameFromImportPath = void 0; | ||
exports.getPackageNameFromImportPath = getPackageNameFromImportPath; | ||
//# Converts import paths to package names. | ||
@@ -18,2 +18,1 @@ //# e.g. - `@nx/workspace` -> `@nx/workspace` | ||
} | ||
exports.getPackageNameFromImportPath = getPackageNameFromImportPath; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.getLatestCommitSha = exports.commitChanges = exports.extractUserAndRepoFromGitHubUrl = exports.getGithubSlugOrNull = void 0; | ||
exports.getGithubSlugOrNull = getGithubSlugOrNull; | ||
exports.extractUserAndRepoFromGitHubUrl = extractUserAndRepoFromGitHubUrl; | ||
exports.commitChanges = commitChanges; | ||
exports.getLatestCommitSha = getLatestCommitSha; | ||
const child_process_1 = require("child_process"); | ||
@@ -15,3 +18,2 @@ const devkit_exports_1 = require("../devkit-exports"); | ||
} | ||
exports.getGithubSlugOrNull = getGithubSlugOrNull; | ||
function extractUserAndRepoFromGitHubUrl(gitRemotes) { | ||
@@ -33,3 +35,2 @@ const regex = /^\s*(\w+)\s+(git@github\.com:|https:\/\/github\.com\/)([A-Za-z0-9_.-]+)\/([A-Za-z0-9_.-]+)\.git/gm; | ||
} | ||
exports.extractUserAndRepoFromGitHubUrl = extractUserAndRepoFromGitHubUrl; | ||
function parseGitHubUrl(url) { | ||
@@ -68,3 +69,2 @@ const sshPattern = /git@github\.com:([A-Za-z0-9_.-]+)\/([A-Za-z0-9_.-]+)\.git/; | ||
} | ||
exports.commitChanges = commitChanges; | ||
function getLatestCommitSha() { | ||
@@ -81,2 +81,1 @@ try { | ||
} | ||
exports.getLatestCommitSha = getLatestCommitSha; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.combineGlobPatterns = void 0; | ||
exports.combineGlobPatterns = combineGlobPatterns; | ||
function combineGlobPatterns(...patterns) { | ||
@@ -8,2 +8,1 @@ const p = patterns.flat(); | ||
} | ||
exports.combineGlobPatterns = combineGlobPatterns; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.getIgnoreObject = exports.getAlwaysIgnore = exports.getIgnoredGlobs = exports.ALWAYS_IGNORE = void 0; | ||
exports.ALWAYS_IGNORE = void 0; | ||
exports.getIgnoredGlobs = getIgnoredGlobs; | ||
exports.getAlwaysIgnore = getAlwaysIgnore; | ||
exports.getIgnoreObject = getIgnoreObject; | ||
const fs_extra_1 = require("fs-extra"); | ||
@@ -28,3 +31,2 @@ const ignore_1 = require("ignore"); | ||
} | ||
exports.getIgnoredGlobs = getIgnoredGlobs; | ||
function getAlwaysIgnore(root) { | ||
@@ -41,3 +43,2 @@ const paths = [ | ||
} | ||
exports.getAlwaysIgnore = getAlwaysIgnore; | ||
function getIgnoreObject(root = workspace_root_1.workspaceRoot) { | ||
@@ -49,3 +50,2 @@ const ig = (0, ignore_1.default)(); | ||
} | ||
exports.getIgnoreObject = getIgnoreObject; | ||
function getIgnoredGlobsFromFile(file, root) { | ||
@@ -52,0 +52,0 @@ try { |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.getNxRequirePaths = exports.getNxInstallationPath = void 0; | ||
exports.getNxInstallationPath = getNxInstallationPath; | ||
exports.getNxRequirePaths = getNxRequirePaths; | ||
const path_1 = require("path"); | ||
@@ -9,6 +10,4 @@ const workspace_root_1 = require("./workspace-root"); | ||
} | ||
exports.getNxInstallationPath = getNxInstallationPath; | ||
function getNxRequirePaths(root = workspace_root_1.workspaceRoot) { | ||
return [root, getNxInstallationPath(root)]; | ||
} | ||
exports.getNxRequirePaths = getNxRequirePaths; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.isCI = void 0; | ||
exports.isCI = isCI; | ||
function isCI() { | ||
@@ -21,2 +21,1 @@ return ((process.env.CI && process.env.CI !== 'false') || | ||
} | ||
exports.isCI = isCI; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.deepEquals = exports.walkJsonTree = exports.jsonDiff = exports.isJsonChange = exports.JsonDiffType = void 0; | ||
exports.JsonDiffType = void 0; | ||
exports.isJsonChange = isJsonChange; | ||
exports.jsonDiff = jsonDiff; | ||
exports.walkJsonTree = walkJsonTree; | ||
exports.deepEquals = deepEquals; | ||
var JsonDiffType; | ||
@@ -15,3 +19,2 @@ (function (JsonDiffType) { | ||
} | ||
exports.isJsonChange = isJsonChange; | ||
function jsonDiff(lhs, rhs) { | ||
@@ -61,3 +64,2 @@ const result = []; | ||
} | ||
exports.jsonDiff = jsonDiff; | ||
// Depth-first walk down JSON tree. | ||
@@ -76,3 +78,2 @@ function walkJsonTree(json, currPath, visitor) { | ||
} | ||
exports.walkJsonTree = walkJsonTree; | ||
function hashArray(ary) { | ||
@@ -115,2 +116,1 @@ return JSON.stringify(ary); | ||
} | ||
exports.deepEquals = deepEquals; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.serializeJson = exports.parseJson = exports.stripJsonComments = void 0; | ||
exports.stripJsonComments = void 0; | ||
exports.parseJson = parseJson; | ||
exports.serializeJson = serializeJson; | ||
const jsonc_parser_1 = require("jsonc-parser"); | ||
@@ -31,3 +33,2 @@ Object.defineProperty(exports, "stripJsonComments", { enumerable: true, get: function () { return jsonc_parser_1.stripComments; } }); | ||
} | ||
exports.parseJson = parseJson; | ||
/** | ||
@@ -63,2 +64,1 @@ * Nicely formats a JSON error with context | ||
} | ||
exports.serializeJson = serializeJson; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.stripIndent = exports.logger = exports.NX_ERROR = exports.NX_PREFIX = void 0; | ||
exports.logger = exports.NX_ERROR = exports.NX_PREFIX = void 0; | ||
exports.stripIndent = stripIndent; | ||
const chalk = require("chalk"); | ||
@@ -52,2 +53,1 @@ exports.NX_PREFIX = chalk.inverse(chalk.bold(chalk.cyan(' NX '))); | ||
} | ||
exports.stripIndent = stripIndent; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.getNxCloudToken = exports.getNxCloudUrl = exports.isNxCloudUsed = void 0; | ||
exports.isNxCloudUsed = isNxCloudUsed; | ||
exports.getNxCloudUrl = getNxCloudUrl; | ||
exports.getNxCloudToken = getNxCloudToken; | ||
function isNxCloudUsed(nxJson) { | ||
@@ -9,3 +11,2 @@ return (!!process.env.NX_CLOUD_ACCESS_TOKEN || | ||
} | ||
exports.isNxCloudUsed = isNxCloudUsed; | ||
function getNxCloudUrl(nxJson) { | ||
@@ -18,3 +19,2 @@ const cloudRunner = Object.values(nxJson.tasksRunnerOptions ?? {}).find((r) => r.runner == '@nrwl/nx-cloud' || r.runner == 'nx-cloud'); | ||
} | ||
exports.getNxCloudUrl = getNxCloudUrl; | ||
function getNxCloudToken(nxJson) { | ||
@@ -29,2 +29,1 @@ const cloudRunner = Object.values(nxJson.tasksRunnerOptions ?? {}).find((r) => r.runner == '@nrwl/nx-cloud' || r.runner == 'nx-cloud'); | ||
} | ||
exports.getNxCloudToken = getNxCloudToken; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.getDefaultPluginsSync = void 0; | ||
exports.getDefaultPluginsSync = getDefaultPluginsSync; | ||
const angular_json_1 = require("../adapter/angular-json"); | ||
@@ -21,2 +21,1 @@ const project_json_1 = require("../plugins/project-json/build-nodes/project-json"); | ||
} | ||
exports.getDefaultPluginsSync = getDefaultPluginsSync; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.sortObjectByKeys = void 0; | ||
exports.sortObjectByKeys = sortObjectByKeys; | ||
function sortObjectByKeys(originalObject) { | ||
@@ -10,2 +10,1 @@ const keys = Object.keys(originalObject).sort(); | ||
} | ||
exports.sortObjectByKeys = sortObjectByKeys; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.readModulePackageJson = exports.readModulePackageJsonWithoutFallbacks = exports.readTargetsFromPackageJson = exports.getTagsFromPackageJson = exports.getMetadataFromPackageJson = exports.buildTargetFromScript = exports.readNxMigrateConfig = exports.normalizePackageGroup = void 0; | ||
exports.normalizePackageGroup = normalizePackageGroup; | ||
exports.readNxMigrateConfig = readNxMigrateConfig; | ||
exports.buildTargetFromScript = buildTargetFromScript; | ||
exports.getMetadataFromPackageJson = getMetadataFromPackageJson; | ||
exports.getTagsFromPackageJson = getTagsFromPackageJson; | ||
exports.readTargetsFromPackageJson = readTargetsFromPackageJson; | ||
exports.readModulePackageJsonWithoutFallbacks = readModulePackageJsonWithoutFallbacks; | ||
exports.readModulePackageJson = readModulePackageJson; | ||
const fs_1 = require("fs"); | ||
@@ -18,3 +25,2 @@ const path_1 = require("path"); | ||
} | ||
exports.normalizePackageGroup = normalizePackageGroup; | ||
function readNxMigrateConfig(json) { | ||
@@ -42,3 +48,2 @@ const parseNxMigrationsConfig = (fromJson) => { | ||
} | ||
exports.readNxMigrateConfig = readNxMigrateConfig; | ||
function buildTargetFromScript(script, scripts = {}, packageManagerCommand) { | ||
@@ -56,3 +61,2 @@ return { | ||
} | ||
exports.buildTargetFromScript = buildTargetFromScript; | ||
let packageManagerCommand; | ||
@@ -69,3 +73,2 @@ function getMetadataFromPackageJson(packageJson) { | ||
} | ||
exports.getMetadataFromPackageJson = getMetadataFromPackageJson; | ||
function getTagsFromPackageJson(packageJson) { | ||
@@ -81,3 +84,2 @@ const tags = packageJson.private ? ['npm:private'] : ['npm:public']; | ||
} | ||
exports.getTagsFromPackageJson = getTagsFromPackageJson; | ||
function readTargetsFromPackageJson(packageJson) { | ||
@@ -108,3 +110,2 @@ const { scripts, nx, private: isPrivate } = packageJson ?? {}; | ||
} | ||
exports.readTargetsFromPackageJson = readTargetsFromPackageJson; | ||
/** | ||
@@ -127,3 +128,2 @@ * Uses `require.resolve` to read the package.json for a module. | ||
} | ||
exports.readModulePackageJsonWithoutFallbacks = readModulePackageJsonWithoutFallbacks; | ||
/** | ||
@@ -170,2 +170,1 @@ * Reads the package.json file for a specified module. | ||
} | ||
exports.readModulePackageJson = readModulePackageJson; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.packageRegistryPack = exports.packageRegistryView = exports.resolvePackageVersionUsingInstallation = exports.resolvePackageVersionUsingRegistry = exports.createTempNpmDirectory = exports.copyPackageManagerConfigurationFiles = exports.modifyYarnRcToFitNewDirectory = exports.modifyYarnRcYmlToFitNewDirectory = exports.findFileInPackageJsonDirectory = exports.getPackageManagerVersion = exports.getPackageManagerCommand = exports.isWorkspacesEnabled = exports.detectPackageManager = void 0; | ||
exports.detectPackageManager = detectPackageManager; | ||
exports.isWorkspacesEnabled = isWorkspacesEnabled; | ||
exports.getPackageManagerCommand = getPackageManagerCommand; | ||
exports.getPackageManagerVersion = getPackageManagerVersion; | ||
exports.findFileInPackageJsonDirectory = findFileInPackageJsonDirectory; | ||
exports.modifyYarnRcYmlToFitNewDirectory = modifyYarnRcYmlToFitNewDirectory; | ||
exports.modifyYarnRcToFitNewDirectory = modifyYarnRcToFitNewDirectory; | ||
exports.copyPackageManagerConfigurationFiles = copyPackageManagerConfigurationFiles; | ||
exports.createTempNpmDirectory = createTempNpmDirectory; | ||
exports.resolvePackageVersionUsingRegistry = resolvePackageVersionUsingRegistry; | ||
exports.resolvePackageVersionUsingInstallation = resolvePackageVersionUsingInstallation; | ||
exports.packageRegistryView = packageRegistryView; | ||
exports.packageRegistryPack = packageRegistryPack; | ||
const child_process_1 = require("child_process"); | ||
@@ -31,3 +43,2 @@ const fs_1 = require("fs"); | ||
} | ||
exports.detectPackageManager = detectPackageManager; | ||
/** | ||
@@ -46,3 +57,2 @@ * Returns true if the workspace is using npm workspaces, yarn workspaces, or pnpm workspaces. | ||
} | ||
exports.isWorkspacesEnabled = isWorkspacesEnabled; | ||
/** | ||
@@ -160,3 +170,2 @@ * Returns commands for the package manager used in the workspace. | ||
} | ||
exports.getPackageManagerCommand = getPackageManagerCommand; | ||
/** | ||
@@ -192,3 +201,2 @@ * Returns the version of the package manager used in the workspace. | ||
} | ||
exports.getPackageManagerVersion = getPackageManagerVersion; | ||
/** | ||
@@ -205,3 +213,2 @@ * Checks for a project level npmrc file by crawling up the file tree until | ||
} | ||
exports.findFileInPackageJsonDirectory = findFileInPackageJsonDirectory; | ||
/** | ||
@@ -232,3 +239,2 @@ * We copy yarnrc.yml to the temporary directory to ensure things like the specified | ||
} | ||
exports.modifyYarnRcYmlToFitNewDirectory = modifyYarnRcYmlToFitNewDirectory; | ||
/** | ||
@@ -252,3 +258,2 @@ * We copy .yarnrc to the temporary directory to ensure things like the specified | ||
} | ||
exports.modifyYarnRcToFitNewDirectory = modifyYarnRcToFitNewDirectory; | ||
function copyPackageManagerConfigurationFiles(root, destination) { | ||
@@ -291,3 +296,2 @@ for (const packageManagerConfigFile of [ | ||
} | ||
exports.copyPackageManagerConfigurationFiles = copyPackageManagerConfigurationFiles; | ||
/** | ||
@@ -315,3 +319,2 @@ * Creates a temporary directory where you can run package manager commands safely. | ||
} | ||
exports.createTempNpmDirectory = createTempNpmDirectory; | ||
/** | ||
@@ -349,3 +352,2 @@ * Returns the resolved version for a given package and version tag using the | ||
} | ||
exports.resolvePackageVersionUsingRegistry = resolvePackageVersionUsingRegistry; | ||
/** | ||
@@ -368,3 +370,2 @@ * Return the resolved version for a given package and version tag using by | ||
} | ||
exports.resolvePackageVersionUsingInstallation = resolvePackageVersionUsingInstallation; | ||
async function packageRegistryView(pkg, version, args) { | ||
@@ -388,3 +389,2 @@ let pm = detectPackageManager(); | ||
} | ||
exports.packageRegistryView = packageRegistryView; | ||
async function packageRegistryPack(cwd, pkg, version) { | ||
@@ -408,2 +408,1 @@ let pm = detectPackageManager(); | ||
} | ||
exports.packageRegistryPack = packageRegistryPack; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.getPromptsForSchema = exports.convertSmartDefaultsIntoNamedParams = exports.warnDeprecations = exports.combineOptionsForGenerator = exports.combineOptionsForExecutor = exports.applyVerbosity = exports.setDefaults = exports.validateObject = exports.validateOptsAgainstSchema = exports.SchemaError = exports.convertAliases = exports.coerceTypesInOptions = exports.convertToCamelCase = exports.handleErrors = void 0; | ||
exports.SchemaError = void 0; | ||
exports.handleErrors = handleErrors; | ||
exports.convertToCamelCase = convertToCamelCase; | ||
exports.coerceTypesInOptions = coerceTypesInOptions; | ||
exports.convertAliases = convertAliases; | ||
exports.validateOptsAgainstSchema = validateOptsAgainstSchema; | ||
exports.validateObject = validateObject; | ||
exports.setDefaults = setDefaults; | ||
exports.applyVerbosity = applyVerbosity; | ||
exports.combineOptionsForExecutor = combineOptionsForExecutor; | ||
exports.combineOptionsForGenerator = combineOptionsForGenerator; | ||
exports.warnDeprecations = warnDeprecations; | ||
exports.convertSmartDefaultsIntoNamedParams = convertSmartDefaultsIntoNamedParams; | ||
exports.getPromptsForSchema = getPromptsForSchema; | ||
const logger_1 = require("./logger"); | ||
@@ -54,3 +67,2 @@ const output_1 = require("./output"); | ||
} | ||
exports.handleErrors = handleErrors; | ||
function camelCase(input) { | ||
@@ -76,3 +88,2 @@ if (input.indexOf('-') > 1) { | ||
} | ||
exports.convertToCamelCase = convertToCamelCase; | ||
/** | ||
@@ -92,3 +103,2 @@ * Coerces (and replaces) options identified as 'boolean' or 'number' in the Schema | ||
} | ||
exports.coerceTypesInOptions = coerceTypesInOptions; | ||
function coerceType(prop, value) { | ||
@@ -160,3 +170,2 @@ if (!prop) | ||
} | ||
exports.convertAliases = convertAliases; | ||
class SchemaError { | ||
@@ -171,3 +180,2 @@ constructor(message) { | ||
} | ||
exports.validateOptsAgainstSchema = validateOptsAgainstSchema; | ||
function validateObject(opts, schema, definitions) { | ||
@@ -249,3 +257,2 @@ if (schema.anyOf) { | ||
} | ||
exports.validateObject = validateObject; | ||
function validateProperty(propName, value, schema, definitions) { | ||
@@ -395,3 +402,2 @@ if (!schema) | ||
} | ||
exports.setDefaults = setDefaults; | ||
function setDefaultsInObject(opts, properties, definitions) { | ||
@@ -451,3 +457,2 @@ Object.keys(properties).forEach((p) => { | ||
} | ||
exports.applyVerbosity = applyVerbosity; | ||
function combineOptionsForExecutor(commandLineOpts, config, target, schema, defaultProjectName, relativeCwd, isVerbose = false) { | ||
@@ -468,3 +473,2 @@ const r = convertAliases(coerceTypesInOptions(convertToCamelCase(commandLineOpts, schema), schema), schema, false); | ||
} | ||
exports.combineOptionsForExecutor = combineOptionsForExecutor; | ||
async function combineOptionsForGenerator(commandLineOpts, collectionName, generatorName, projectsConfigurations, nxJsonConfiguration, schema, isInteractive, defaultProjectName, relativeCwd, isVerbose = false) { | ||
@@ -485,3 +489,2 @@ const generatorDefaults = projectsConfigurations | ||
} | ||
exports.combineOptionsForGenerator = combineOptionsForGenerator; | ||
function warnDeprecations(opts, schema) { | ||
@@ -495,3 +498,2 @@ Object.keys(opts).forEach((option) => { | ||
} | ||
exports.warnDeprecations = warnDeprecations; | ||
function convertSmartDefaultsIntoNamedParams(opts, schema, defaultProjectName, relativeCwd) { | ||
@@ -544,3 +546,2 @@ const argv = opts['_'] || []; | ||
} | ||
exports.convertSmartDefaultsIntoNamedParams = convertSmartDefaultsIntoNamedParams; | ||
function getGeneratorDefaults(projectName, projectsConfigurations, nxJsonConfiguration, collectionName, generatorName) { | ||
@@ -675,3 +676,2 @@ let defaults = {}; | ||
} | ||
exports.getPromptsForSchema = getPromptsForSchema; | ||
async function promptForValues(opts, schema, projectsConfigurations) { | ||
@@ -678,0 +678,0 @@ return await (await Promise.resolve().then(() => require('enquirer'))) |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.getCwd = exports.joinPathFragments = exports.normalizePath = void 0; | ||
exports.normalizePath = normalizePath; | ||
exports.joinPathFragments = joinPathFragments; | ||
exports.getCwd = getCwd; | ||
const path = require("path"); | ||
@@ -16,3 +18,2 @@ const workspace_root_1 = require("./workspace-root"); | ||
} | ||
exports.normalizePath = normalizePath; | ||
/** | ||
@@ -25,3 +26,2 @@ * Normalized path fragments and joins them. Use this when writing paths to config files. | ||
} | ||
exports.joinPathFragments = joinPathFragments; | ||
/** | ||
@@ -40,2 +40,1 @@ * When running a script with the package manager (e.g. `npm run`), the package manager will | ||
} | ||
exports.getCwd = getCwd; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.fetchCommunityPlugins = void 0; | ||
exports.fetchCommunityPlugins = fetchCommunityPlugins; | ||
const https_1 = require("https"); | ||
@@ -29,2 +29,1 @@ const COMMUNITY_PLUGINS_JSON_URL = 'https://raw.githubusercontent.com/nrwl/nx/master/community/approved-plugins.json'; | ||
} | ||
exports.fetchCommunityPlugins = fetchCommunityPlugins; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.listCorePlugins = exports.fetchCorePlugins = void 0; | ||
exports.fetchCorePlugins = fetchCorePlugins; | ||
exports.listCorePlugins = listCorePlugins; | ||
const chalk = require("chalk"); | ||
@@ -106,3 +107,2 @@ const output_1 = require("../output"); | ||
} | ||
exports.fetchCorePlugins = fetchCorePlugins; | ||
function listCorePlugins(installedPlugins, corePlugins) { | ||
@@ -119,2 +119,1 @@ const alsoAvailable = corePlugins.filter((p) => !installedPlugins.has(p.name)); | ||
} | ||
exports.listCorePlugins = listCorePlugins; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.listInstalledPlugins = exports.getInstalledPluginsAndCapabilities = exports.findInstalledPlugins = void 0; | ||
exports.findInstalledPlugins = findInstalledPlugins; | ||
exports.getInstalledPluginsAndCapabilities = getInstalledPluginsAndCapabilities; | ||
exports.listInstalledPlugins = listInstalledPlugins; | ||
const chalk = require("chalk"); | ||
@@ -27,3 +29,2 @@ const output_1 = require("../output"); | ||
} | ||
exports.findInstalledPlugins = findInstalledPlugins; | ||
function getNxPluginPackageJsonOrNull(pkg) { | ||
@@ -81,3 +82,2 @@ try { | ||
} | ||
exports.getInstalledPluginsAndCapabilities = getInstalledPluginsAndCapabilities; | ||
function listInstalledPlugins(installedPlugins) { | ||
@@ -106,2 +106,1 @@ const bodyLines = []; | ||
} | ||
exports.listInstalledPlugins = listInstalledPlugins; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.listLocalWorkspacePlugins = exports.getLocalWorkspacePlugins = void 0; | ||
exports.getLocalWorkspacePlugins = getLocalWorkspacePlugins; | ||
exports.listLocalWorkspacePlugins = listLocalWorkspacePlugins; | ||
const chalk = require("chalk"); | ||
@@ -34,3 +35,2 @@ const output_1 = require("../output"); | ||
} | ||
exports.getLocalWorkspacePlugins = getLocalWorkspacePlugins; | ||
function listLocalWorkspacePlugins(installedPlugins) { | ||
@@ -59,2 +59,1 @@ const bodyLines = []; | ||
} | ||
exports.listLocalWorkspacePlugins = listLocalWorkspacePlugins; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.listPluginCapabilities = exports.getPluginCapabilities = void 0; | ||
exports.getPluginCapabilities = getPluginCapabilities; | ||
exports.listPluginCapabilities = listPluginCapabilities; | ||
const chalk = require("chalk"); | ||
@@ -59,3 +60,2 @@ const path_1 = require("path"); | ||
} | ||
exports.getPluginCapabilities = getPluginCapabilities; | ||
async function tryGetModule(packageJson, workspaceRoot) { | ||
@@ -131,3 +131,2 @@ try { | ||
} | ||
exports.listPluginCapabilities = listPluginCapabilities; | ||
function resolveExecutorDescription(executorJsonEntry, projects) { | ||
@@ -134,0 +133,0 @@ try { |
"use strict"; | ||
// Lifted in part from https://github.com/nrwl/angular-console | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.hasElements = void 0; | ||
exports.hasElements = hasElements; | ||
function hasElements(obj) { | ||
return obj && Object.values(obj).length > 0; | ||
} | ||
exports.hasElements = hasElements; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.printHelp = void 0; | ||
exports.printHelp = printHelp; | ||
const chalk = require("chalk"); | ||
@@ -39,3 +39,2 @@ const stringWidth = require("string-width"); | ||
} | ||
exports.printHelp = printHelp; | ||
function generateOverviewOutput({ pluginName, name, description, mode, aliases, }) { | ||
@@ -42,0 +41,0 @@ switch (mode) { |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.findAllProjectNodeDependencies = exports.getSourceDirOfDependentProjects = exports.projectHasTargetAndConfiguration = exports.projectHasTarget = void 0; | ||
exports.projectHasTarget = projectHasTarget; | ||
exports.projectHasTargetAndConfiguration = projectHasTargetAndConfiguration; | ||
exports.getSourceDirOfDependentProjects = getSourceDirOfDependentProjects; | ||
exports.findAllProjectNodeDependencies = findAllProjectNodeDependencies; | ||
const project_graph_1 = require("../project-graph/project-graph"); | ||
@@ -10,3 +13,2 @@ function projectHasTarget(project, target) { | ||
} | ||
exports.projectHasTarget = projectHasTarget; | ||
function projectHasTargetAndConfiguration(project, target, configuration) { | ||
@@ -17,3 +19,2 @@ return (projectHasTarget(project, target) && | ||
} | ||
exports.projectHasTargetAndConfiguration = projectHasTargetAndConfiguration; | ||
function getSourceDirOfDependentProjects(projectName, projectGraph = (0, project_graph_1.readCachedProjectGraph)()) { | ||
@@ -34,3 +35,2 @@ if (!projectGraph.nodes[projectName]) { | ||
} | ||
exports.getSourceDirOfDependentProjects = getSourceDirOfDependentProjects; | ||
/** | ||
@@ -49,3 +49,2 @@ * Find all internal project dependencies. | ||
} | ||
exports.findAllProjectNodeDependencies = findAllProjectNodeDependencies; | ||
// Recursively get all the dependencies of the node | ||
@@ -52,0 +51,0 @@ function collectDependentProjectNodesNames(nxDeps, dependencyNodeNames, parentNodeName, includeExternalDependencies) { |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.createSerializableError = void 0; | ||
exports.createSerializableError = createSerializableError; | ||
/** | ||
@@ -20,3 +20,9 @@ * This function transforms an error into an object which can be properly serialized and deserialized to be sent between processes. | ||
return createSerializableError(v); | ||
// Support for AggregateCreateNodesError | ||
} | ||
else if (Array.isArray(v) && | ||
v.length === 2 && | ||
v[1] instanceof Error) { | ||
return [v[0], createSerializableError(v[1])]; | ||
} | ||
return v; | ||
@@ -29,2 +35,1 @@ }); | ||
} | ||
exports.createSerializableError = createSerializableError; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.serializeOverridesIntoCommandLine = void 0; | ||
exports.serializeOverridesIntoCommandLine = serializeOverridesIntoCommandLine; | ||
const flat_1 = require("flat"); | ||
@@ -15,3 +15,2 @@ function serializeOverridesIntoCommandLine(options) { | ||
} | ||
exports.serializeOverridesIntoCommandLine = serializeOverridesIntoCommandLine; | ||
function serializeOption(key, value, unparsed) { | ||
@@ -18,0 +17,0 @@ if (value === true) { |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.serializeTarget = void 0; | ||
exports.serializeTarget = serializeTarget; | ||
function serializeTarget(project, target, configuration) { | ||
return [project, target, configuration].filter((part) => !!part).join(':'); | ||
} | ||
exports.serializeTarget = serializeTarget; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.splitByColons = exports.splitTarget = void 0; | ||
exports.splitTarget = splitTarget; | ||
exports.splitByColons = splitByColons; | ||
function splitTarget(s, projectGraph) { | ||
@@ -12,3 +13,2 @@ let [project, ...segments] = splitByColons(s); | ||
} | ||
exports.splitTarget = splitTarget; | ||
function groupJointSegments(segments, validTargetNames) { | ||
@@ -50,2 +50,1 @@ for (let endingSegmentIdx = segments.length; endingSegmentIdx > 0; endingSegmentIdx--) { | ||
} | ||
exports.splitByColons = splitByColons; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.stripIndents = void 0; | ||
exports.stripIndents = stripIndents; | ||
/** | ||
@@ -24,2 +24,1 @@ * Removes indents, which is useful for printing warning and messages. | ||
} | ||
exports.stripIndents = stripIndents; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.taskHistoryFile = exports.writeTaskRunsToHistory = exports.getHistoryForHashes = void 0; | ||
exports.taskHistoryFile = void 0; | ||
exports.getHistoryForHashes = getHistoryForHashes; | ||
exports.writeTaskRunsToHistory = writeTaskRunsToHistory; | ||
const fs_1 = require("fs"); | ||
@@ -40,3 +42,2 @@ const path_1 = require("path"); | ||
} | ||
exports.getHistoryForHashes = getHistoryForHashes; | ||
async function writeTaskRunsToHistory(taskRuns) { | ||
@@ -62,3 +63,2 @@ if ((0, is_on_daemon_1.isOnDaemon)() || !client_1.daemonClient.enabled()) { | ||
} | ||
exports.writeTaskRunsToHistory = writeTaskRunsToHistory; | ||
exports.taskHistoryFile = (0, path_1.join)(cache_directory_1.workspaceDataDirectory, 'task-history.csv'); | ||
@@ -65,0 +65,0 @@ function loadTaskHistoryFromDisk() { |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.updateNxw = void 0; | ||
exports.updateNxw = updateNxw; | ||
const add_nx_scripts_1 = require("../command-line/init/implementation/dot-nx/add-nx-scripts"); | ||
@@ -12,2 +12,1 @@ const path_1 = require("../utils/path"); | ||
} | ||
exports.updateNxw = updateNxw; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.workspaceConfigurationCheck = void 0; | ||
exports.workspaceConfigurationCheck = workspaceConfigurationCheck; | ||
const workspace_root_1 = require("./workspace-root"); | ||
@@ -37,2 +37,1 @@ const fs_1 = require("fs"); | ||
} | ||
exports.workspaceConfigurationCheck = workspaceConfigurationCheck; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.resetWorkspaceContext = exports.updateProjectFiles = exports.getFilesInDirectoryUsingContext = exports.getAllFileDataInContext = exports.updateFilesInContext = exports.hashWithWorkspaceContext = exports.globWithWorkspaceContext = exports.globWithWorkspaceContextSync = exports.getNxWorkspaceFilesFromContext = exports.setupWorkspaceContext = void 0; | ||
exports.setupWorkspaceContext = setupWorkspaceContext; | ||
exports.getNxWorkspaceFilesFromContext = getNxWorkspaceFilesFromContext; | ||
exports.globWithWorkspaceContextSync = globWithWorkspaceContextSync; | ||
exports.globWithWorkspaceContext = globWithWorkspaceContext; | ||
exports.hashWithWorkspaceContext = hashWithWorkspaceContext; | ||
exports.updateFilesInContext = updateFilesInContext; | ||
exports.getAllFileDataInContext = getAllFileDataInContext; | ||
exports.getFilesInDirectoryUsingContext = getFilesInDirectoryUsingContext; | ||
exports.updateProjectFiles = updateProjectFiles; | ||
exports.resetWorkspaceContext = resetWorkspaceContext; | ||
const perf_hooks_1 = require("perf_hooks"); | ||
@@ -16,3 +25,2 @@ const cache_directory_1 = require("./cache-directory"); | ||
} | ||
exports.setupWorkspaceContext = setupWorkspaceContext; | ||
async function getNxWorkspaceFilesFromContext(workspaceRoot, projectRootMap) { | ||
@@ -25,3 +33,2 @@ if ((0, is_on_daemon_1.isOnDaemon)() || !client_1.daemonClient.enabled()) { | ||
} | ||
exports.getNxWorkspaceFilesFromContext = getNxWorkspaceFilesFromContext; | ||
/** | ||
@@ -38,3 +45,2 @@ * Sync method to get files matching globs from workspace context. | ||
} | ||
exports.globWithWorkspaceContextSync = globWithWorkspaceContextSync; | ||
async function globWithWorkspaceContext(workspaceRoot, globs, exclude) { | ||
@@ -49,3 +55,2 @@ if ((0, is_on_daemon_1.isOnDaemon)() || !client_1.daemonClient.enabled()) { | ||
} | ||
exports.globWithWorkspaceContext = globWithWorkspaceContext; | ||
async function hashWithWorkspaceContext(workspaceRoot, globs, exclude) { | ||
@@ -58,7 +63,5 @@ if ((0, is_on_daemon_1.isOnDaemon)() || !client_1.daemonClient.enabled()) { | ||
} | ||
exports.hashWithWorkspaceContext = hashWithWorkspaceContext; | ||
function updateFilesInContext(updatedFiles, deletedFiles) { | ||
return workspaceContext?.incrementalUpdate(updatedFiles, deletedFiles); | ||
} | ||
exports.updateFilesInContext = updateFilesInContext; | ||
async function getAllFileDataInContext(workspaceRoot) { | ||
@@ -71,3 +74,2 @@ if ((0, is_on_daemon_1.isOnDaemon)() || !client_1.daemonClient.enabled()) { | ||
} | ||
exports.getAllFileDataInContext = getAllFileDataInContext; | ||
async function getFilesInDirectoryUsingContext(workspaceRoot, dir) { | ||
@@ -80,7 +82,5 @@ if ((0, is_on_daemon_1.isOnDaemon)() || !client_1.daemonClient.enabled()) { | ||
} | ||
exports.getFilesInDirectoryUsingContext = getFilesInDirectoryUsingContext; | ||
function updateProjectFiles(projectRootMappings, rustReferences, updatedFiles, deletedFiles) { | ||
return workspaceContext?.updateProjectFiles(projectRootMappings, rustReferences.projectFiles, rustReferences.globalFiles, updatedFiles, deletedFiles); | ||
} | ||
exports.updateProjectFiles = updateProjectFiles; | ||
function ensureContextAvailable(workspaceRoot) { | ||
@@ -94,2 +94,1 @@ if (!workspaceContext || workspaceContext?.workspaceRoot !== workspaceRoot) { | ||
} | ||
exports.resetWorkspaceContext = resetWorkspaceContext; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.workspaceRootInner = exports.setWorkspaceRoot = exports.workspaceRoot = void 0; | ||
exports.workspaceRoot = void 0; | ||
exports.setWorkspaceRoot = setWorkspaceRoot; | ||
exports.workspaceRootInner = workspaceRootInner; | ||
const path = require("path"); | ||
@@ -14,3 +16,2 @@ const fileutils_1 = require("./fileutils"); | ||
} | ||
exports.setWorkspaceRoot = setWorkspaceRoot; | ||
function workspaceRootInner(dir, candidateRoot) { | ||
@@ -40,2 +41,1 @@ if (process.env.NX_WORKSPACE_ROOT_PATH) | ||
} | ||
exports.workspaceRootInner = workspaceRootInner; |
Sorry, the diff of this file is too big to display
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
7161432
48932
+ Added@nrwl/tao@19.5.0-beta.1(transitive)
+ Added@nx/nx-darwin-arm64@19.5.0-beta.1(transitive)
+ Added@nx/nx-darwin-x64@19.5.0-beta.1(transitive)
+ Added@nx/nx-freebsd-x64@19.5.0-beta.1(transitive)
+ Added@nx/nx-linux-arm-gnueabihf@19.5.0-beta.1(transitive)
+ Added@nx/nx-linux-arm64-gnu@19.5.0-beta.1(transitive)
+ Added@nx/nx-linux-arm64-musl@19.5.0-beta.1(transitive)
+ Added@nx/nx-linux-x64-gnu@19.5.0-beta.1(transitive)
+ Added@nx/nx-linux-x64-musl@19.5.0-beta.1(transitive)
+ Added@nx/nx-win32-arm64-msvc@19.5.0-beta.1(transitive)
+ Added@nx/nx-win32-x64-msvc@19.5.0-beta.1(transitive)
- Removed@nrwl/tao@19.5.0-beta.0(transitive)
- Removed@nx/nx-darwin-arm64@19.5.0-beta.0(transitive)
- Removed@nx/nx-darwin-x64@19.5.0-beta.0(transitive)
- Removed@nx/nx-freebsd-x64@19.5.0-beta.0(transitive)
- Removed@nx/nx-linux-arm-gnueabihf@19.5.0-beta.0(transitive)
- Removed@nx/nx-linux-arm64-gnu@19.5.0-beta.0(transitive)
- Removed@nx/nx-linux-arm64-musl@19.5.0-beta.0(transitive)
- Removed@nx/nx-linux-x64-gnu@19.5.0-beta.0(transitive)
- Removed@nx/nx-linux-x64-musl@19.5.0-beta.0(transitive)
- Removed@nx/nx-win32-arm64-msvc@19.5.0-beta.0(transitive)
- Removed@nx/nx-win32-x64-msvc@19.5.0-beta.0(transitive)
Updated@nrwl/tao@19.5.0-beta.1