or run

tessl search
Log in

Version

Files

tile.json

task.mdevals/scenario-7/

Nx Workspace Inspector

A command-line tool that inspects an Nx workspace and provides detailed project information in a structured format.

Capabilities

Project Information Retrieval

Build a CLI tool that retrieves and displays detailed information about a specific project in an Nx workspace. The tool should accept a project name as input and output comprehensive project details.

  • Given a project name "my-app", the tool displays the project's configuration including name, root directory, source root, and project type @test
  • Given a project name that doesn't exist, the tool displays a clear error message indicating the project was not found @test

Target Information Display

The tool should be able to show information about specific build targets within a project.

  • Given a project name "my-app" and target name "build", the tool displays the target's executor, options, and configurations @test
  • Given a valid project name but invalid target name, the tool displays an error message indicating the target doesn't exist @test

Workspace Projects Listing

The tool should provide functionality to list all projects in the workspace with optional filtering.

  • The tool can list all projects in the workspace showing their names and types @test
  • The tool can filter projects by type (e.g., only applications or only libraries) @test

Implementation

@generates

API

/**
 * Retrieves detailed configuration for a specific project
 *
 * @param {string} projectName - The name of the project to inspect
 * @returns {Promise<Object>} Project configuration object
 * @throws {Error} If project is not found
 */
async function getProjectConfiguration(projectName) {}

/**
 * Retrieves information about a specific target within a project
 *
 * @param {string} projectName - The name of the project
 * @param {string} targetName - The name of the target (e.g., 'build', 'test')
 * @returns {Promise<Object>} Target configuration object
 * @throws {Error} If project or target is not found
 */
async function getTargetConfiguration(projectName, targetName) {}

/**
 * Lists all projects in the workspace with optional filtering
 *
 * @param {Object} options - Filtering options
 * @param {string} [options.type] - Filter by project type ('application' or 'library')
 * @returns {Promise<Array>} Array of project objects with name and type
 */
async function listProjects(options = {}) {}

module.exports = {
  getProjectConfiguration,
  getTargetConfiguration,
  listProjects
};

Dependencies { .dependencies }

nx { .dependency }

Provides workspace inspection and project graph APIs for querying Nx workspace configuration and structure.

@satisfied-by