UNPKG

@decaf-ts/fabric-weaver

Version:
39 lines (38 loc) 1.33 kB
/** * @module fabric-cli * @description Command-line interface for Fabric setup and update operations * @summary This module provides a CLI for managing Hyperledger Fabric installations. * It exposes commands for updating the Fabric install script and setting up Fabric * components. The module uses the Commander.js library to parse command-line * arguments and execute the appropriate actions. * * Key exports: * - {@link updateFabric}: Function to update the Fabric install script * - {@link setupFabric}: Function to set up Fabric components * * @example * // Update Fabric install script * node fabric.js update * * // Setup Fabric components * node fabric.js setup --fabric-version 2.5.12 --ca-version 1.5.15 --components binary docker * * @mermaid * sequenceDiagram * participant User * participant CLI * participant UpdateFabric * participant SetupFabric * User->>CLI: Run command * CLI->>CLI: Parse arguments * alt update command * CLI->>UpdateFabric: Call updateFabric() * UpdateFabric->>UpdateFabric: Download install script * UpdateFabric->>UpdateFabric: Make script executable * else setup command * CLI->>SetupFabric: Call setupFabric(config) * SetupFabric->>SetupFabric: Install components * end * CLI->>User: Display result */ export {};