"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.getWorkspacePath = exports.readWorkspaceConfiguration = exports.isStandaloneProject = exports.updateWorkspaceConfiguration = void 0;
const nx_json_1 = require("./nx-json");
/**
 * Update general workspace configuration such as the default project or cli settings.
 *
 * This does _not_ update projects configuration, use {@link updateProjectConfiguration} or {@link addProjectConfiguration} instead.
 *
 * @deprecated use updateNxJson
 */
function updateWorkspaceConfiguration(tree, workspaceConfig) {
    const { 
    // Nx Json Properties
    cli, defaultProject, generators, implicitDependencies, plugins, pluginsConfig, npmScope, namedInputs, targetDefaults, targetDependencies, workspaceLayout, tasksRunnerOptions, affected, extends: ext, } = workspaceConfig;
    const nxJson = {
        implicitDependencies,
        plugins,
        pluginsConfig,
        npmScope,
        namedInputs,
        targetDefaults,
        targetDependencies,
        workspaceLayout,
        tasksRunnerOptions,
        affected,
        cli,
        generators,
        defaultProject,
        extends: ext,
    };
    (0, nx_json_1.updateNxJson)(tree, nxJson);
}
exports.updateWorkspaceConfiguration = updateWorkspaceConfiguration;
/**
 * Returns if a project has a standalone configuration (project.json).
 *
 * @param tree - the file system tree
 * @param project - the project name
 *
 * @deprecated non-standalone projects were deprecated
 */
function isStandaloneProject(tree, project) {
    return true;
}
exports.isStandaloneProject = isStandaloneProject;
/**
 * Read general workspace configuration such as the default project or cli settings
 *
 * This does _not_ provide projects configuration, use {@link readProjectConfiguration} instead.
 * @deprecated use readNxJson
 */
function readWorkspaceConfiguration(tree) {
    return (0, nx_json_1.readNxJson)(tree);
}
exports.readWorkspaceConfiguration = readWorkspaceConfiguration;
/**
 * @deprecated all projects are configured using project.json
 */
function getWorkspacePath(tree) {
    if (tree.exists('workspace.json'))
        return 'workspace.json';
    if (tree.exists('angular.json'))
        return 'angular.json';
    return null;
}
exports.getWorkspacePath = getWorkspacePath;
//# sourceMappingURL=deprecated.js.map