@forge/cli

14.1.0-next.1-experimental-13c2f8d14.1.0-next.21-experimental-554d417
out/command-line/view/local-storage-view.js
−out/command-line/view/local-storage-view.jsDeleted
−79
Index: package/out/command-line/view/local-storage-view.js
===================================================================
--- package/out/command-line/view/local-storage-view.js
+++ package/out/command-line/view/local-storage-view.js
@@ -1,79 +0,0 @@
-"use strict";
-Object.defineProperty(exports, "__esModule", { value: true });
-exports.LocalStorageView = void 0;
-const cli_shared_1 = require("@forge/cli-shared");
-const text = cli_shared_1.Text.localStorage.view;
-const label = (offering) => text.labels[offering];
-class LocalStorageView {
-    ui;
-    constructor(ui) {
-        this.ui = ui;
-    }
-    started(manifest) {
-        const configured = ['kvs', 'sql'].filter((offering) => manifest.configured[offering]);
-        this.ui.info(text.title);
-        this.ui.info(text.app(manifest.appName));
-        if (!configured.length) {
-            this.ui.info(text.noServices);
-            return;
-        }
-        this.ui.info(text.running(configured.map(label)));
-        this.ui.info(text.dataPersistence);
-    }
-    status(result) {
-        this.ui.info(text.title);
-        this.ui.info(text.statusApp(result.manifest.appName));
-        for (const offering of ['kvs', 'sql']) {
-            const configured = result.manifest.configured[offering];
-            const runtime = result.runtime[offering];
-            this.ui.emptyLine();
-            this.ui.info(label(offering));
-            this.ui.info(text.configured(configured ? text.declarations[offering] : undefined));
-            this.ui.info(text.states[runtime.state]);
-            this.ui.info(text.health(runtime.healthy));
-            if (runtime.endpoint)
-                this.ui.info(text.endpoint(runtime.endpoint));
-            this.ui.info(text.dataPreserved);
-            if (!configured) {
-                this.ui.info(text.notConfigured[offering]);
-            }
-        }
-    }
-    seedHelp() {
-        for (const line of text.seedHelp) {
-            this.ui.info(line);
-        }
-    }
-    seedWarning(options) {
-        if (options.kvsPath) {
-            this.ui.warn(text.seedWarning);
-        }
-    }
-    seedResults(results) {
-        for (const result of results) {
-            if (result.ok) {
-                const count = result.offering === 'kvs' ? text.recordCount(result.records) : text.statementCount(result.statements);
-                this.ui.info(text.seedSucceeded(label(result.offering), count));
-            }
-            else {
-                this.ui.error(new Error(text.seedFailed(label(result.offering), result.error?.message)));
-            }
-        }
-    }
-    resetResults(results) {
-        for (const result of results) {
-            if (result.ok) {
-                const detail = result.removed === undefined ? '' : text.recordsRemoved(result.removed);
-                this.ui.info(text.resetSucceeded(label(result.offering), detail));
-            }
-            else {
-                this.ui.error(new Error(text.resetFailed(label(result.offering), result.error?.message)));
-            }
-        }
-    }
-    stopped() {
-        this.ui.info(text.stopped);
-    }
-}
-exports.LocalStorageView = LocalStorageView;
-//# sourceMappingURL=local-storage-view.js.map
\ No newline at end of file