UNPKG

@hashgraph/solo

Version:

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

34 lines 1.49 kB
// SPDX-License-Identifier: Apache-2.0 var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) { var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; return c > 3 && r && Object.defineProperty(target, key, r), r; }; import { injectable } from 'tsyringe-neo'; /** * Tracks whether the current execution is running inside a one-shot * command (deploy or destroy). When active, sub-commands skip their * own lease management because the parent one-shot command holds a * single lease for the entire operation. */ let OneShotState = class OneShotState { _active = false; /** Returns true when execution is inside a one-shot command. */ isActive() { return this._active; } /** Mark one-shot mode as active. Called by one-shot deploy/destroy init. */ activate() { this._active = true; } /** Mark one-shot mode as inactive. Called in one-shot finally blocks. */ deactivate() { this._active = false; } }; OneShotState = __decorate([ injectable() ], OneShotState); export { OneShotState }; //# sourceMappingURL=one-shot-state.js.map