sublime_node_tools 0.0.4

Node.js bindings for Sublime Workspace CLI Tools via napi-rs
Documentation
//! Status command implementation for Node.js bindings.
//!
//! # What
//!
//! This module implements the `status` NAPI function that retrieves
//! information about the current workspace state, including package
//! information, git status, and configuration details.
//!
//! # How
//!
//! The function:
//! 1. Validates the input parameters (root path)
//! 2. Calls `execute_status` from `sublime_cli_tools`
//! 3. Captures the JSON output
//! 4. Returns a `JsonResponse<StatusData>`
//!
//! # Why
//!
//! The status command is a fundamental operation for workspace management,
//! providing a quick overview of the workspace state. It's often the first
//! command users run to understand their workspace.
//!
//! # Examples
//!
//! ```typescript
//! import { status } from '@websublime/workspace-tools';
//!
//! const result = await status({ root: '.' });
//! if (result.success) {
//!   console.log(`Repository: ${result.data.repository}`);
//!   console.log(`Package Manager: ${result.data.packageManager}`);
//!   console.log(`Branch: ${result.data.branch}`);
//!   console.log(`Packages: ${result.data.packages.length}`);
//! }
//! ```

// TODO: will be implemented on story 3.2 - Status Command
//
// Implementation outline:
//
// #[napi]
// pub async fn status(params: StatusParams) -> JsonResponse<StatusData> {
//     // 1. Validate parameters
//     if let Err(e) = validate_root(&params.root) {
//         return JsonResponse::from_error_info(e);
//     }
//
//     // 2. Create Output with JSON format for capturing
//     // 3. Call execute_status from CLI
//     // 4. Parse JSON response
//     // 5. Return JsonResponse::success(data) or JsonResponse::error(msg)
// }