UNPKG

@hashgraph/solo

Version:

An opinionated CLI tool to deploy and manage private Hedera Networks.

34 lines 1.2 kB
// SPDX-License-Identifier: Apache-2.0 export class ClusterDeleteResponse { _rawOutput; _name; _deletedNodes = []; constructor(_rawOutput) { this._rawOutput = _rawOutput; // Extract cluster name from deletion output const nameMatch = this._rawOutput.match(/Deleting cluster "([^"]+)"/); this._name = nameMatch ? nameMatch[1] : undefined; // Extract deleted nodes if present const nodesMatch = this._rawOutput.match(/Deleted nodes: \[(.*?)]/); if (nodesMatch && nodesMatch[1]) { // Parse the JSON-like array string into actual string array try { // Remove extra quotes and split by comma const nodesList = nodesMatch[1] .split(',') .map((node) => node.trim().replace(/^"(.*)"$/, '$1')); this._deletedNodes.push(...nodesList); } catch { // If parsing fails, leave as empty array } } } get name() { return this._name; } get deletedNodes() { return this._deletedNodes; } } //# sourceMappingURL=cluster-delete-response.js.map