UNPKG

zcatalyst-cli

Version:

Command Line Tool for CATALYST

36 lines (35 loc) 1.76 kB
'use strict'; var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } return new (P || (P = Promise))(function (resolve, reject) { function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } step((generator = generator.apply(thisArg, _arguments || [])).next()); }); }; var __importDefault = (this && this.__importDefault) || function (mod) { return (mod && mod.__esModule) ? mod : { "default": mod }; }; Object.defineProperty(exports, "__esModule", { value: true }); exports.getData = exports.sourceId = void 0; const runtime_store_1 = __importDefault(require("../runtime-store")); const js_1 = require("../util_modules/js"); exports.sourceId = 'NULL'; function getData() { return __awaiter(this, void 0, void 0, function* () { const repoName = js_1.JS.randomString(5); const displayName = runtime_store_1.default.get('user.Display_Name'); return { archive_url: `https://api.github.com/repos/${displayName}/${repoName}/`, full_name: `${displayName}/${repoName}`, clone_url: `https://github.com/${displayName}/${repoName}.git`, name: `${repoName}`, created_at: Date.now(), deployment_status: 'none', default_branch: 'master', id: js_1.JS.randomNumber(15) }; }); } exports.getData = getData;