UNPKG

decova-gotcha

Version:

It's my personal trial for automating daunting tasks

52 lines 2.32 kB
"use strict"; 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; }; var __metadata = (this && this.__metadata) || function (k, v) { if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v); }; var __param = (this && this.__param) || function (paramIndex, decorator) { return function (target, key) { decorator(target, key, paramIndex); } }; Object.defineProperty(exports, "__esModule", { value: true }); exports.DecovaSettings = void 0; const decova_json_1 = require("decova-json"); const tsyringe_1 = require("tsyringe"); const TerminalAgent_1 = require("../../../external-sheet/TerminalAgent"); const PathMan_1 = require("../PathMan"); let DecovaSettings = class DecovaSettings { constructor(srv_PathMan) { this.srv_PathMan = srv_PathMan; this.nodeProjectsContainers = []; } LoadOfCurrentWorkspace() { const file = this.srv_PathMan.GotchaLocalRepo_DecovaSettingsFile; if (file.Exists() == false) { return null; } else { try { return decova_json_1.Json.Load(file.FullName); } catch (err) { TerminalAgent_1.TerminalAgent.ShowError(`Failed to load [${file.FullName}]`); return null; } } } EnsureInCurrentWorkspace() { let decovaSettings = this.LoadOfCurrentWorkspace(); if (!decovaSettings) { } } }; DecovaSettings = __decorate([ (0, tsyringe_1.singleton)(), __param(0, (0, tsyringe_1.inject)(PathMan_1.PathMan)), __metadata("design:paramtypes", [PathMan_1.PathMan]) ], DecovaSettings); exports.DecovaSettings = DecovaSettings; //# sourceMappingURL=DecovaSettings.js.map