UNPKG

motionlink-cli

Version:

Making it easy to use Notion as a Content Management system for personal websites, portfolios, blogs, business homepages, and other kinds of static websites.

29 lines 977 B
"use strict"; var __importDefault = (this && this.__importDefault) || function (mod) { return (mod && mod.__esModule) ? mod : { "default": mod }; }; Object.defineProperty(exports, "__esModule", { value: true }); const simple_git_1 = __importDefault(require("simple-git")); class GitService { /** * Returns the git remote url for the given folder. * * Yields empty string if non exists. */ async findGitRemoteUrl(path) { var _a; const res = await (0, simple_git_1.default)({ baseDir: path, }).getConfig('remote.origin.url'); return (_a = res.value) !== null && _a !== void 0 ? _a : ''; } static get instance() { var _a; return (_a = this._instance) !== null && _a !== void 0 ? _a : (this._instance = new GitService()); } static setMockedInstance(instance) { this._instance = instance; } } exports.default = GitService; //# sourceMappingURL=git_service.js.map