UNPKG

@tririga/tri-pull

Version:

A tool for pulling the UX view source files from the TRIRIGA server.

52 lines (47 loc) 1.13 kB
"use strict"; const utils = require("./utils.js"); const TriWebSignon = require("./server/tri-web-signon.js"); const TriPullService = require("./service/tri-pull-service.js"); class TriPull { constructor( user, password, target, basicuser, basicpassword, view, dir, polymerVersion, webapp, maxConcurrentOperations ) { this.user = user; this.password = password; this.target = utils.stripTrailingSlash(target); this.basicuser = basicuser; this.basicpassword = basicpassword; this.view = view; this.dir = utils.stripTrailingSlash(dir); this.polymerVersion = polymerVersion; this.webapp = webapp; this.webSignonAPI = new TriWebSignon( target, user, password, basicuser, basicpassword ); this.pullService = new TriPullService(target, maxConcurrentOperations); } async run() { await this.webSignonAPI.login(); await this.pullService.pullView( this.view, this.dir, this.polymerVersion, this.webapp ); return this.webSignonAPI.logout(); } } module.exports = TriPull;