diff --git a/dist/config.js b/dist/config.js index 985260c..9029beb 100644 --- a/dist/config.js +++ b/dist/config.js @@ -3,7 +3,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) { return (mod && mod.__esModule) ? mod : { "default": mod }; }; Object.defineProperty(exports, "__esModule", { value: true }); -exports.getConfiguration = exports.storeConfigurationFile = exports.checkLocalFileConfiguration = exports.initPaths = exports.setPublicUrlEnabled = exports.setCustomPorts = exports.setPorts = exports.setServiceUrl = exports.PUBLIC_URL_ENABLED = exports.CUSTOM_PORTS = exports.PORTS = exports.SERVICE_URL = exports.CONFIG_FILE = exports.REQUEST_TIMEOUT = void 0; +exports.getConfiguration = exports.storeConfigurationFile = exports.checkLocalFileConfiguration = exports.initPaths = exports.setIsRemoteContainer = exports.setPublicUrlEnabled = exports.setCustomPorts = exports.setPorts = exports.setPrimaryHostProcess = exports.setServiceUrl = exports.IS_REMOTE_CONTAINER = exports.PRIMARY_HOST_PROCESS = exports.PUBLIC_URL_ENABLED = exports.CUSTOM_PORTS = exports.PORTS = exports.SERVICE_URL = exports.CONFIG_FILE = exports.REQUEST_TIMEOUT = void 0; const fs_extra_1 = require("fs-extra"); const js_yaml_1 = __importDefault(require("js-yaml")); const utils_1 = require("./utils"); @@ -18,11 +18,17 @@ exports.SERVICE_URL = process.env.DAPPSTARTER_SERVICE_URL || exports.PORTS = [5000, 5001, 5002, 8080, 8899, 8900, 12537]; exports.CUSTOM_PORTS = false; exports.PUBLIC_URL_ENABLED = true; +exports.PRIMARY_HOST_PROCESS = false; +exports.IS_REMOTE_CONTAINER = false; function setServiceUrl(url) { process.env.DAPPSTARTER_SERVICE_URL = url; exports.SERVICE_URL = url; } exports.setServiceUrl = setServiceUrl; +function setPrimaryHostProcess(isPrimary) { + exports.PRIMARY_HOST_PROCESS = isPrimary; +} +exports.setPrimaryHostProcess = setPrimaryHostProcess; function setPorts(ports) { exports.PORTS = ports; exports.CUSTOM_PORTS = true; @@ -36,6 +42,10 @@ function setPublicUrlEnabled(value) { exports.PUBLIC_URL_ENABLED = value; } exports.setPublicUrlEnabled = setPublicUrlEnabled; +function setIsRemoteContainer(isRemote) { + exports.IS_REMOTE_CONTAINER = isRemote; +} +exports.setIsRemoteContainer = setIsRemoteContainer; function initPaths(inputDirectory) { const folderPath = inputDirectory || process.cwd(); const rootFolderName = (0, path_1.basename)(folderPath); diff --git a/dist/config.js.map b/dist/config.js.map index 464a1b8..6a2b79d 100644 --- a/dist/config.js.map +++ b/dist/config.js.map @@ -1 +1 @@ -{"version":3,"file":"config.js","sourceRoot":"","sources":["../src/config.ts"],"names":[],"mappings":";;;;;;AAAA,uCAAqE;AACrE,sDAA2B;AAC3B,mCAA8B;AAC9B,kDAA0B;AAE1B,2BAA6B;AAC7B,+BAAsC;AACtC,8DAA+B;AAElB,QAAA,eAAe,GAAW,EAAE,GAAG,IAAI,CAAC;AACpC,QAAA,WAAW,GAAG,aAAa,CAAC;AAC9B,QAAA,WAAW,GACrB,OAAO,CAAC,GAAG,CAAC,uBAAuB;IACnC,yCAAyC,CAAC;AAEhC,QAAA,KAAK,GAAG,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,KAAK,CAAC,CAAC;AACpD,QAAA,YAAY,GAAG,KAAK,CAAC;AACrB,QAAA,kBAAkB,GAAG,IAAI,CAAC;AAErC,SAAgB,aAAa,CAAC,GAAW;IACxC,OAAO,CAAC,GAAG,CAAC,uBAAuB,GAAG,GAAG,CAAC;IAC1C,mBAAW,GAAG,GAAG,CAAC;AACnB,CAAC;AAHD,sCAGC;AAED,SAAgB,QAAQ,CAAC,KAAe;IACvC,aAAK,GAAG,KAAK,CAAC;IACd,oBAAY,GAAG,IAAI,CAAC;AACrB,CAAC;AAHD,4BAGC;AAED,SAAgB,cAAc,CAAC,KAAc;IAC5C,oBAAY,GAAG,KAAK,CAAC;AACtB,CAAC;AAFD,wCAEC;AAED,SAAgB,mBAAmB,CAAC,KAAc;IACjD,0B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AAC,eAAK,CAAC,UAAU,CAAC,qCAAqC,GAAG,QAAQ,CAAC,CAAC,CAAC;AACzE,CAAC;AAND,wDAMC;AACM,KAAK,UAAU,gBAAgB,CACrC,QAAgB;IAEhB,MAAM,EAAE,UAAU,EAAE,GAAG,MAAM,IAAA,mBAAQ,EAAC,IAAA,WAAI,EAAC,QAAQ,EAAE,aAAa,CAAC,CAAC,CAAC;IACrE,MAAM,UAAU,GAAG,MAAM,IAAA,mBAAQ,EAAC,IAAA,WAAI,EAAC,QAAQ,EAAE,YAAY,CAAC,EAAE,MAAM,CAAC,CAAC;IACxE,MAAM,SAAS,GAAG,MAAM,IAAA,mBAAQ,EAAC,IAAA,WAAI,EAAC,QAAQ,EAAE,WAAW,CAAC,EAAE,MAAM,CAAC,CAAC;IACtE,OAAO;QACN,UAAU;QACV,UAAU;QACV,SAAS;KACT,CAAC;AACH,CAAC;AAXD,4CAWC"} \ No newline at end of file diff --git a/dist/develop.js b/dist/develop.js index 8ca0e7c..91484d7 100644 --- a/dist/develop.js +++ b/dist/develop.js @@ -23,8 +23,10 @@ var __importDefault = (this && this.__importDefault) || function (mod) { }; Object.defineProperty(exports, "__esModule", { value: true }); const path_1 = require("path"); +const events_1 = require("events"); const fs_extra_1 = require("fs-extra"); const chalk_1 = __importDefault(require("chalk")); +const Discovery = require('@decentology/node-discover'); const rxjs_1 = require("rxjs"); const operators_1 = require("rxjs/operators"); const auth_1 = __importStar(require("./auth")); @@ -38,9 +40,11 @@ const utils_1 = require("./utils"); const unison_1 = require("./unison"); const config_1 = require("./config"); const uuid_1 = require("uuid"); +const RemoteHostForwardingEV = new events_1.EventEmitter(); async function developAction(command) { const inputDirectory = (0, utils_1.optionSearch)(command, 'inputDirectory'); const { configFilePath, folderPath, homeConfigDir, projectName } = (0, config_1.initPaths)(inputDirectory); + startDiscovery(); if (!(await (0, auth_1.isAuthenticated)())) { await (0, auth_1.default)(); } @@ -94,7 +98,7 @@ async function initialize({ homeConfigDir, folderPath, projectName, authKey, con return; } await pingProject(projectName, authKey, sessionId); - console.log(chalk_1.default.green('[DAPPSTARTER] Connected to dappstarter service')); + console.log(chalk_1.default.green('[DAPPSTARTER] Connected to DappStarter service')); (0, utils_1.log)(chalk_1.default.green(`Startup time: ${(0, humanize_duration_2.default)(new Date().getTime() - startTime)}`)); await (0, ssh_1.remoteConnect)(projectUrl, privateKey); } @@ -106,17 +110,27 @@ async function reconnect({ projectName, authKey, homeConfigDir, folderPath, }) { const { publicKey, privateKey, projectUrl } = await (0, config_1.getConfiguration)(homeConfigDir); const manifest = await checkForManifest(folderPath); const sessionId = (0, uuid_1.v4)(); + (0, config_1.setIsRemoteContainer)(true); await createRemoteContainer(projectName, publicKey, authKey, manifest, sessionId); if (!(await (0, ssh_1.isSshOpen)(projectUrl))) { return; } + async function connectedResources(silent = false) { + if (config_1.PRIMARY_HOST_PROCESS) { + await (0, unison_1.syncFilesToRemote)(homeConfigDir, folderPath, remoteFolderPath, (0, path_1.join)(homeConfigDir, 'privatekey')); + const validPorts = await (0, ssh_1.forwardPorts)(config_1.PORTS, projectUrl, privateKey, silent); + if (!validPorts) { + return false; + } + } + return true; + } const remoteFolderPath = `ssh://dappstarter@${projectUrl}:22//app`; - await (0, unison_1.syncFilesToRemote)(homeConfigDir, folderPath, remoteFolderPath, (0, path_1.join)(homeConfigDir, 'privatekey')); - const validPorts = await (0, ssh_1.forwardPorts)(config_1.PORTS, projectUrl, privateKey); - if (!validPorts) { + RemoteHostForwardingEV.on('check', connectedResources.bind(null, true)); + if (!(await connectedResources())) { return; } - console.log(chalk_1.default.green('[DAPPSTARTER] Reconnected to dappstarter service')); + console.log(chalk_1.default.green('[DAPPSTARTER] Reconnected to DappStarter service')); await pingProject(projectName, authKey, sessionId); await (0, ssh_1.remoteConnect)(projectUrl, privateKey); // Close process to shutdown all open ports @@ -150,7 +164,8 @@ async function createRemoteContainer(projectName, publicKey, authKey, manifest, clearInterval(timer); spinner.stopAndPersist({ symbol: emoji.get('heavy_check_mark'), - text: spinner.text + chalk_1.default.green(`Container created: ${body.projectUrl}`), + text: spinner.text + + chalk_1.default.green(`Container created: ${body.projectUrl.replace('.ssh', '')}`), }); return body; } @@ -202,4 +217,11 @@ async function checkForManifest(folderPath) { } return null; } +function startDiscovery() { + const discovery = new Discovery({ key: 'dappstarter' }); + discovery.on('promotion', () => { + (0, config_1.setPrimaryHostProcess)(true); + RemoteHostForwardingEV.emit('check'); + }); +} //# sourceMappingURL=develop.js.map \ No newline at end of file diff --git a/dist/develop.js.map b/dist/develop.js.map index e4a157e..7541063 100644 --- a/dist/develop.js.map +++ b/dist/develop.js.map @@ -1 +1 @@ -{"version":3,"file":"develop.js","sourceRoot":"","sources":["../src/develop.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AAAA,+BAA4B;AAC5B,uCAA2D;AAC3D,kDAA0B;AAC1B,+BAAkE;AAClE,8CAOwB;AACxB,+CAAoE;AACpE,8CAAsB;AACtB,+BAA2E;AAC3E,8CAAsB;AACtB,kDAAoC;AACpC,0EAA0C;AAC1C,0EAAiD;AACjD,mCAA4C;AAC5C,qCAA6C;AAC7C,qCASkB;AAElB,+BAA0B;AAEX,KAAK,UAAU,aAAa,CAAC,OAAgB;IAC3D,MAAM,cAAc,GAAG,IAAA,oBAAY,EAAS,OAAO,EAAE,gBAAgB,CAAC,CAAC;IACvE,MAAM,EAAE,cAAc,EAAE,UAAU,EAAE,aAAa,EAAE,WAAW,EAAE,GAC/D,IAAA,kBAAS,EAAC,cAAc,CAAC,CAAC;IAC3B,IAAI,CAAC,CAAC,MAAM,IAAA,sBAAe,GAAE,CAAC,EAAE;QAC/B,MAAM,IAAA,cAAW,GAAE,CAAC;KACpB;IACD,MAAM,OAAO,GAAG,MAAM,IAAA,mBAAY,GAAE,CAAC;IAErC,MAAM,IAAA,oCAA2B,EAAC,UAAU,CAAC,CAAC;IAC9C,IAAI,CAAC,CAAC,MAAM,IAAA,qBAAU,EAAC,cAAc,CAAC,CAAC,EAAE;Q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I,EAAE;gBACL,WAAW;gBACX,SAAS;aACT;SACD,CACD,CAAC;IACH,CAAC,CAAC,CAAC,IAAI,CAAC,IAAA,sBAAU,EAAC,CAAC,GAAG,EAAE,EAAE,CAAC,YAAK,CAAC,CAAC,CACnC,EACD,IAAA,oBAAQ,EAAC,CAAC,CAAC,CACX,CACD,CAAC,OAAO,EAAE,CAAC;AACb,CAAC;AAED,KAAK,UAAU,gBAAgB,CAAC,UAAkB;IACjD,MAAM,IAAI,GAAG,IAAA,WAAI,EAAC,UAAU,EAAE,eAAe,CAAC,CAAC;IAC/C,IAAI,MAAM,IAAA,qBAAU,EAAC,IAAI,CAAC,EAAE;QAC3B,OAAO,MAAM,IAAA,mBAAQ,EAAC,IAAI,CAAC,CAAC;KAC5B;IACD,OAAO,IAAI,CAAC;AACb,CAAC;AAED,SAAS,cAAc;IACtB,MAAM,SAAS,GAAG,IAAI,SAAS,CAAC,EAAE,GAAG,EAAE,aAAa,EAAE,CAAC,CAAC;IACxD,SAAS,CAAC,EAAE,CAAC,WAAW,EAAE,GAAG,EAAE;QAC9B,IAAA,8BAAqB,EAAC,IAAI,CAAC,CAAC;QAC5B,sBAAsB,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;IACtC,CAAC,CAAC,CAAC;AACJ,CAAC"} \ No newline at end of file diff --git a/dist/docker.js.map b/dist/docker.js.map index 644c41c..008aab9 100644 --- a/dist/docker.js.map +++ b/dist/docker.js.map @@ -1 +1 @@ -{"version":3,"file":"docker.js","sourceRoot":"","sources":["../src/docker.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAAA,mDAA6C;AAC7C,uCAA4D;AAC5D,+BAA4B;AAC5B,qCAAiC;AACjC,8CAAgC;AAChC,oEAA2C;AAC3C,kDAA0B;AAEnB,KAAK,UAAU,mBAAmB,CACxC,SAAiB,EACjB,WAAmB,EACnB,aAAqB;IAErB,IAAI,MAAM,GAAG,kBAAkB,CAAC;IAChC,MAAM,CAAC,QAAQ,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AK,EAAE,CAAC;gBACtB,OAAO,CAAC,IAAI,CAAC,CAAC;YACf,CAAC,CAAC,CAAC;SACH;aAAM;YACN,OAAO,CAAC,GAAG,CAAC,eAAK,CAAC,GAAG,CAAC,iCAAiC,CAAC,CAAC,CAAC;YAC1D,OAAO,CAAC,KAAK,CAAC,CAAC;SACf;IACF,CAAC,CAAC,CAAC;AACJ,CAAC;AAjDD,wCAiDC;AAEM,KAAK,UAAU,aAAa,CAAC,SAAiB;IACpD,MAAM,IAAA,qBAAI,EAAC;QACV,GAAG,EAAE,SAAS;KACd,CAAC,CAAC;AACJ,CAAC;AAJD,sCAIC;AAED,MAAM,kBAAkB,GAAG;IAC1B,OAAO,EAAE,KAAK;IACd,QAAQ,EAAE;QACT,WAAW,EAAE;YACZ,IAAI,EAAE,aAAa;YACnB,MAAM,EAAE,QAAQ;SAChB;KACD;IACD,QAAQ,EAAE;QACT,WAAW,EAAE;YACZ,KAAK,EAAE,wCAAwC;YAC/C,MAAM,EAAE,CAAC,6BAA6B,CAAC;YACvC,cAAc,EAAE,EAAE;YAClB,QAAQ,EAAE,EAAE;YACZ,GAAG,EAAE,IAAI;YACT,WAAW,EAAE,CAAC,WAAW,EAAE,WAAW,CAAC;YACvC,KAAK,EAAE,EAAc;YACrB,QAAQ,EAAE,CAAC,aAAa,CAAC;YACzB,OAAO,EAAE,EAAc;SACvB;KACD;CACD,CAAC"} \ No newline at end of file diff --git a/dist/main.js b/dist/main.js index d20764f..5f3da26 100644 --- a/dist/main.js +++ b/dist/main.js @@ -5,6 +5,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) { }; Object.defineProperty(exports, "__esModule", { value: true }); require('dotenv').config(); +const version = require('../package.json').version; const commander_1 = require("commander"); const auth_1 = __importDefault(require("./auth")); const develop_1 = __importDefault(require("./develop")); @@ -38,15 +39,15 @@ program // .enablePositionalOptions(true) .storeOptionsAsProperties(true) .option('-e, --env ', 'Override environment setting.') - .option('--debug', 'Emits debug progress for each command'); + .option('--debug', 'Emits debug progress for each command') + .description('Full-Stack Blockchain App Mojo!') + .version(version); program.on('option:env', (env) => { (0, env_1.setEnv)(env); }); process.on('option:debug', (debug) => { (0, utils_1.setLogLevel)(true); }); -program.version('1.0.0'); -program.description('Full-Stack Blockchain App Mojo!'); program .command('login') .description('Authenticate with the Decentology service. Used for service connections and containers') diff --git a/dist/main.js.map b/dist/main.js.map index 2ff9244..245c084 100644 --- a/dist/main.js.map +++ b/dist/main.js.map @@ -1 +1 @@ -{"version":3,"file":"main.js","sourceRoot":"","sources":["../src/main.ts"],"names":[],"mappings":";;;;;;AACA,OAAO,CAAC,QAAQ,CAAC,CAAC,MAAM,EAAE,CAAC;AAC3B,yCAAiE;AACjE,kDAAiC;AACjC,wDAAsC;AACtC,+BAA+B;AAC/B,mCAAsC;AACtC,sDAAmC;AACnC,+DAK+B;AAC/B,IAAI,KAAK,GAAG;IACX,KAAK,EAAE,EAAE;CACT,CAAC;AACF,OAAO,CAAC,EAAE,CAAC,mBAAmB,EAAE,CAAC,GAAQ,EAAE,EAAE;IAC5C,IAAI,GAAG,CAAC,IAAI,KAAK,YAAY,EAAE;QAC9B,sCAAsC;QACtC,OAAO;KACP;SAAM,IAAI,GAAG,CAAC,OAAO,CAAC,QAAQ,CAAC,uCAAuC,CAAC,EAAE;QACzE,yCAAyC;QACzC,OAAO;KACP;SAAM,IAAI,GAAG,CAAC,OAAO,CAAC,QAAQ,CAAC,mBAAmB,CAAC,EAAE;QACrD,gDAAgD;QAChD,OAAO;KACP;SAAM;QACN,OAAO,CAAC,GAAG,CAAC,oCAAoC,EAAE,GAAG,CAAC,CAAC;KACvD;IACD,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AACjB,CAAC,CAAC,CAAC;AAEH,MAAM,OAAO,GAAG,IAAI,mBAAO,EAAE,CAAC;AAC9B,OAAO;IACN,iCAAiC;KAChC,wBAAwB,CAAC,IAAI,CAAC;KAC9B,MAAM,CAAC,yBAAyB,EAAE,+BAA+B,CA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AC,CAAC;AAEtB,YAAY;KACV,OAAO,CAAC,MAAM,CAAC;KACf,WAAW,CAAC,mCAAmC,CAAC;KAChD,MAAM,CAAC,qCAAe,CAAC,CAAC;AAE1B,OAAO;KACL,OAAO,CAAC,QAAQ,CAAC;KACjB,WAAW,CAAC,qCAAqC,CAAC;KAClD,MAAM,CACN,yBAAyB,EACzB,8CAA8C,CAC9C;KACA,MAAM,CACN,qBAAqB,EACrB,8DAA8D,CAC9D;KACA,MAAM,CACN,2BAA2B,EAC3B,kDAAkD,CAClD;KACA,MAAM,CACN,oBAAoB,EACpB,qDAAqD,CACrD;KACA,MAAM,CAAC,gBAAW,CAAC,IAAI,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC,CAAC;AAExC,IAAI,OAAO,CAAC,KAAK,CAAC,KAAK,EAAE;IACxB,OAAO,CAAC,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;CAC5B;KAAM;IACN,OAAO,CAAC,KAAK,CAAC,EAAE,CAAC,UAAU,EAAE;QAC5B,IAAI,KAAK,GAAG,IAAI,CAAC,IAAI,EAAE,CAAC;QACxB,IAAI,KAAK,KAAK,IAAI,EAAE;YACnB,KAAK,CAAC,KAAK,IAAI,KAAK,CAAC;SACrB;IACF,CAAC,CAAC,CAAC;IACH,OAAO,CAAC,KAAK,CAAC,EAAE,CAAC,KAAK,EAAE,GAAG,EAAE,CAAC,OAAO,CAAC,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC;CAC3D"} \ No newline at end of file +{"version":3,"file":"main.js","sourceRoot":"","sources":["../src/main.ts"],"names":[],"mappings":";;;;;;AACA,OAAO,CAAC,QAAQ,CAAC,CAAC,MAAM,EAAE,CAAC;AAC3B,MAAM,OAAO,GAAG,OAAO,CAAC,iBAAiB,CAAC,CAAC,OAAO,CAAC;AACnD,yCAAiE;AACjE,kDAAiC;AACjC,wDAAsC;AACtC,+BAA+B;AAC/B,mCAAsC;AACtC,sDAAmC;AACnC,+DAK+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AC,CAAC;CAC5B;KAAM;IACN,OAAO,CAAC,KAAK,CAAC,EAAE,CAAC,UAAU,EAAE;QAC5B,IAAI,KAAK,GAAG,IAAI,CAAC,IAAI,EAAE,CAAC;QACxB,IAAI,KAAK,KAAK,IAAI,EAAE;YACnB,KAAK,CAAC,KAAK,IAAI,KAAK,CAAC;SACrB;IACF,CAAC,CAAC,CAAC;IACH,OAAO,CAAC,KAAK,CAAC,EAAE,CAAC,KAAK,EAAE,GAAG,EAAE,CAAC,OAAO,CAAC,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC;CAC3D"} \ No newline at end of file diff --git a/dist/service.js.map b/dist/service.js.map index e48da1d..432e64b 100644 --- a/dist/service.js.map +++ b/dist/service.js.map @@ -1 +1 @@ -{"version":3,"file":"service.js","sourceRoot":"","sources":["../src/service.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAAA,4DAAgD;AAChD,kDAA0B;AAC1B,kDAAoC;AACpC,8CAAsB;AACtB,sDAA6B;AAC7B,qCAAuC;AAEvC,MAAM,OAAO,GAAG,CAAC,OAAe,EAAE,EAAE;IACnC,OAAO,IAAA,aAAG,EAAC,OAAO,CAAC,CAAC,KAAK,EAAE,CAAC;AAC7B,CAAC,CAAC;AAEK,MAAM,WAAW,GAAG,KAAK,IAAI,EAAE;IACrC,MAAM,YAAY,GAAG,eAAK,CAAC,GAAG,CAC7B,GAAG,KAAK,CAAC,GAAG,CAAC,GAAG,CAAC,wCAAwC,CACzD,CAAC;IACF,MAAM,OAAO,GAAG,OAAO,CAAC,sBAAsB,CAAC,CAAC;IAChD,IAAI;QACH,MAAM,IAAI,GAAG,MAAM,IAAA,oBAAK,EAAC,GAAG,oBAAW,WAAW,CAAC,CAAC;QAEpD,IAAI,IAAI,CAAC,EAAE,EAAE;YACZ,MAAM,IAAI,GAAG,MAAM,IAAI,CAAC,IAAI,EAAE,CAAC;YAC/B,OAAO,IAAI,CAAC;SACZ;QACD,OAAO,C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CAAC,cAAc,CAAC;gBACtB,MAAM,EAAE,KAAK,CAAC,GAAG,CAAC,KAAK,CAAC;gBACxB,IAAI,EAAE,OAAO,CAAC,IAAI,GAAG,eAAK,CAAC,KAAK,CAAC,QAAQ,CAAC;aAC1C,CAAC,CAAC;YACH,OAAO,IAAI,CAAC;SACZ;QACD,OAAO,CAAC,KAAK,CAAC,YAAY,CAAC,CAAC;KAC5B;IAAC,OAAO,KAAK,EAAE;QACf,IAAI,OAAO,CAAC,GAAG,CAAC,iBAAiB,KAAK,MAAM,EAAE;YAC7C,OAAO,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;SACrB;QACD,OAAO,CAAC,cAAc,CAAC;YACtB,MAAM,EAAE,eAAK,CAAC,GAAG,CAAC,KAAK,CAAC,GAAG,CAAC,wBAAwB,CAAC,CAAC;YACtD,IAAI,EAAE,OAAO,CAAC,IAAI,GAAG,GAAG,GAAG,YAAY;SACvC,CAAC,CAAC;KACH;YAAS;QACT,OAAO,CAAC,IAAI,EAAE,CAAC;KACf;AACF,CAAC,CAAC;AApDW,QAAA,cAAc,kBAoDzB"} \ No newline at end of file diff --git a/dist/ssh.js b/dist/ssh.js index 6c48196..fd3d34d 100644 --- a/dist/ssh.js +++ b/dist/ssh.js @@ -28,7 +28,7 @@ const fs_extra_1 = require("fs-extra"); const path_1 = require("path"); const keypair_1 = __importDefault(require("keypair")); const node_forge_1 = __importDefault(require("node-forge")); -const node_ssh_forward_1 = require("node-ssh-forward"); +const node_ssh_forward_1 = require("@decentology/node-ssh-forward"); const ssh2_1 = require("ssh2"); const ora_1 = __importDefault(require("ora")); const emoji = __importStar(require("node-emoji")); @@ -102,7 +102,7 @@ async function isSshOpen(projectUrl) { } else { spinner.stopAndPersist({ - symbol: emoji.get('cross_mark'), + symbol: emoji.get('x'), text: spinner.text + chalk_1.default.red('Not Connected'), }); } @@ -116,59 +116,65 @@ async function checkPortIsAvailable(port) { } return { port, valid: true }; } -async function forwardPorts(ports, host, privateKey) { - let portStatus = await Promise.all(ports.map(async (port) => { +async function forwardPorts(ports, host, privateKey, silent = false) { + const spinner = (0, ora_1.default)(`Forwarding ports: `); + if (!silent) { + process.stdin.pause(); + spinner.start(); + } + const portNumbers = ports.map((port) => { if (typeof port === 'number') { - return checkPortIsAvailable(port); - } - else { - return checkPortIsAvailable(port.localPort); + return port; } + return port.localPort; + }); + const portTextPrefix = 'Forwarding ports: '; + let portText = portTextPrefix + portNumbers.map((x) => chalk_1.default.gray(x)).join(','); + let portStatus = await Promise.all(portNumbers.map(async (port) => { + return checkPortIsAvailable(port); })); const arePortsAvailable = portStatus.every((x) => x.valid === true); if (arePortsAvailable) { - for (const port of ports) { - let connection; - if (typeof port === 'number') { - connection = await forwardRemotePort({ - port, - host, - privateKey, - }); - if (connection == null) { - console.log(chalk_1.default.red(`Failed to forward port ${port}`)); - process.exit(1); - } - } - else { - connection = await forwardRemotePort({ - port: port.localPort, - host, - privateKey, - remotePort: port.remotePort || port.localPort, - }); - } + await Promise.all(portNumbers.map(async (port) => { + portText = portText.replace(port.toString(), chalk_1.default.yellow(port.toString())); + spinner.text = portText; + const connection = await forwardRemotePort({ + port, + host, + privateKey, + }); if (connection == null) { console.log(chalk_1.default.red(`Failed to forward port ${port}`)); process.exit(1); } + portText = portText.replace(port.toString(), chalk_1.default.green(port.toString())); + spinner.text = portText; + })); + if (!silent) { + spinner.stopAndPersist({ + symbol: emoji.get('heavy_check_mark'), + text: portText, + }); } - return true; - } - else if (portStatus.every((x) => x.valid === false)) { - // Every port used. Likely connected to another terminal session. + process.stdin.resume(); return true; } portStatus .filter((x) => !x.valid) .forEach((port) => { - console.log(chalk_1.default.red(`Port ${port.port} is already in use.`)); + portText = portText.replace(port.port.toString(), chalk_1.default.red(port.port.toString())); }); + if (!silent) { + spinner.stopAndPersist({ + symbol: emoji.get('x'), + text: portText, + }); + } + process.stdin.resume(); return false; } exports.forwardPorts = forwardPorts; async function forwardRemotePort({ port, remotePort, host, privateKey, }) { - let spinner = (0, ora_1.default)(`Fowarding port ${port} `).start(); try { const connection = await (0, attempt_1.retry)(async (context) => { return await (0, promise_timeout_1.timeout)(new Promise(async (resolve, reject) => { @@ -230,15 +236,9 @@ async function forwardRemotePort({ port, remotePort, host, privateKey, }) { // console.log('Attempting to reconnect', context.attemptNum); }, }); - spinner.clear(); - spinner.stopAndPersist({ - symbol: emoji.get('heavy_check_mark'), - text: `Port ${port} forwarded to ${host}`, - }); return connection; } catch (error) { - spinner.fail('SSH connection error'); console.error(`[SSH] ${error.message}`); return null; } diff --git a/dist/ssh.js.map b/dist/ssh.js.map index 336772c..cc63abe 100644 --- a/dist/ssh.js.map +++ b/dist/ssh.js.map @@ -1 +1 @@ -{"version":3,"file":"ssh.js","sourceRoot":"","sources":["../src/ssh.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAAA,2CAAsC;AACtC,uCAA+C;AAC/C,+BAA4B;AAC5B,sDAA8B;AAC9B,4DAA+B;AAC/B,uDAAiD;AACjD,+BAA0C;AAC1C,8CAAsB;AACtB,kDAAoC;AACpC,+BASc;AACd,+CAA0C;AAC1C,qDAA0C;AAC1C,gEAAuC;AACvC,kDAA0B;AAC1B,0EAAiD;AACjD,wDAA+B;AAC/B,mCAA8B;AAEvB,KAAK,UAAU,aAAa,CAClC,UAAkB,EAClB,UAAkB;IAElB,OAAO,IAAI,OAAO,CAAC,KAAK,EAAE,OAAO,EAAE,EAAE;QACpC,MAAM,IAAI,GAAG,IAAI,aAAM,EAAE,CAAC;QAC1B,IAAI,CAAC,EAAE,CAAC,OAAO,EAAE,KAAK,IAAI,EAAE;YAC3B,iFAAiF;YACjF,OAAO,CAAC,GAAG,CAAC,eAAK,CAAC,MAAM,CAAC,uBAAuB,CAAC,CAAC,CAAC;YACnD,+CAA+C;QAChD,CAAC,CAAC,CAAC;QACH,IAAI,CAAC,EAAE,CAAC,OAAO,EAAE;YAChB,IAAI,CAAC,KAAK,CACT;gBACC,IAAI,EAAE,OAAO,CAAC,GAA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C;AAbD,oCAaC;AAEM,KAAK,UAAU,UAAU,CAAC,aAAqB;IACrD,MAAM,EAAE,aAAa,EAAE,cAAc,EAAE,GAAG,YAAY,EAAE,CAAC;IACzD,MAAM,IAAA,oBAAS,EAAC,IAAA,WAAI,EAAC,aAAa,EAAE,WAAW,CAAC,EAAE,aAAa,EAAE;QAChE,IAAI,EAAE,KAAK;KACX,CAAC,CAAC;IACH,MAAM,IAAA,oBAAS,EAAC,IAAA,WAAI,EAAC,aAAa,EAAE,YAAY,CAAC,EAAE,cAAc,EAAE;QAClE,IAAI,EAAE,KAAK;KACX,CAAC,CAAC;IAEH,OAAO;QACN,UAAU,EAAE,cAAc;QAC1B,SAAS,EAAE,aAAa;KACxB,CAAC;AACH,CAAC;AAbD,gCAaC"} \ No newline at end of file diff --git a/package.json b/package.json index 18491db..ad2674d 100755 --- a/package.json +++ b/package.json @@ -20,6 +20,8 @@ "compile-devops": "pkg dist/main.js" }, "dependencies": { + "@decentology/node-discover": "decentology/node-discover#decentology", + "@decentology/node-ssh-forward": "decentology/node-ssh-forward#decentology", "@lifeomic/attempt": "^3.0.0", "@types/humanize-duration": "^3.25.1", "@types/promise-timeout": "^1.3.0", @@ -46,7 +48,6 @@ "node-fetch": "^2.6.1", "node-forge": "^0.10.0", "node-pty": "^0.10.1", - "node-ssh-forward": "decentology/node-ssh-forward#master", "open": "^8.2.1", "ora": "^5.0.0", "polly-js": "^1.8.2", diff --git a/src/config.ts b/src/config.ts index 4ad34fa..e9a104a 100644 --- a/src/config.ts +++ b/src/config.ts @@ -6,22 +6,27 @@ import { DevelopConfig, DevelopConfigBase } from './types'; import { homedir } from 'os'; import { basename, join } from 'path'; import hash from 'string-hash'; - export const REQUEST_TIMEOUT: number = 10 * 1000; export const CONFIG_FILE = 'config.json'; export let SERVICE_URL = - process.env.DAPPSTARTER_SERVICE_URL || - 'https://dappstarter-api.decentology.com'; +process.env.DAPPSTARTER_SERVICE_URL || +'https://dappstarter-api.decentology.com'; export let PORTS = [5000, 5001, 5002, 8080, 8899, 8900, 12537]; export let CUSTOM_PORTS = false; export let PUBLIC_URL_ENABLED = true; +export let PRIMARY_HOST_PROCESS = false; +export let IS_REMOTE_CONTAINER = false; export function setServiceUrl(url: string) { process.env.DAPPSTARTER_SERVICE_URL = url; SERVICE_URL = url; } +export function setPrimaryHostProcess(isPrimary: boolean) { + PRIMARY_HOST_PROCESS = isPrimary; +} + export function setPorts(ports: number[]) { PORTS = ports; CUSTOM_PORTS = true; @@ -35,6 +40,10 @@ export function setPublicUrlEnabled(value: boolean) { PUBLIC_URL_ENABLED = value; } +export function setIsRemoteContainer(isRemote: boolean) { + IS_REMOTE_CONTAINER = isRemote; +} + export function initPaths(inputDirectory: string) { const folderPath = inputDirectory || process.cwd(); const rootFolderName = basename(folderPath); diff --git a/src/develop.ts b/src/develop.ts index 58e16c6..a27fd25 100755 --- a/src/develop.ts +++ b/src/develop.ts @@ -1,6 +1,8 @@ import { join } from 'path'; +import { EventEmitter } from 'events'; import { ensureDir, readJSON, pathExists } from 'fs-extra'; import chalk from 'chalk'; +const Discovery = require('@decentology/node-discover'); import { connectable, defer, EMPTY, interval, timer } from 'rxjs'; import { catchError, @@ -28,14 +30,19 @@ import { PUBLIC_URL_ENABLED, SERVICE_URL, CUSTOM_PORTS, + setPrimaryHostProcess, + PRIMARY_HOST_PROCESS, + setIsRemoteContainer, } from './config'; import { Command } from 'commander'; import { v4 } from 'uuid'; +const RemoteHostForwardingEV = new EventEmitter(); export default async function developAction(command: Command): Promise { const inputDirectory = optionSearch(command, 'inputDirectory'); const { configFilePath, folderPath, homeConfigDir, projectName } = initPaths(inputDirectory); + startDiscovery(); if (!(await isAuthenticated())) { await loginDialog(); } @@ -120,7 +127,7 @@ async function initialize({ await pingProject(projectName, authKey, sessionId); console.log( - chalk.green('[DAPPSTARTER] Connected to dappstarter service') + chalk.green('[DAPPSTARTER] Connected to DappStarter service') ); log( chalk.green( @@ -152,6 +159,7 @@ async function reconnect({ ); const manifest = await checkForManifest(folderPath); const sessionId = v4(); + setIsRemoteContainer(true); await createRemoteContainer( projectName, publicKey, @@ -162,21 +170,33 @@ async function reconnect({ if (!(await isSshOpen(projectUrl))) { return; } + async function connectedResources(silent: boolean = false) { + if (PRIMARY_HOST_PROCESS) { + await syncFilesToRemote( + homeConfigDir, + folderPath, + remoteFolderPath, + join(homeConfigDir, 'privatekey') + ); + const validPorts = await forwardPorts( + PORTS, + projectUrl, + privateKey, + silent + ); + if (!validPorts) { + return false; + } + } + return true; + } const remoteFolderPath = `ssh://dappstarter@${projectUrl}:22//app`; - await syncFilesToRemote( - homeConfigDir, - folderPath, - remoteFolderPath, - join(homeConfigDir, 'privatekey') - ); - - const validPorts = await forwardPorts(PORTS, projectUrl, privateKey); - if (!validPorts) { + RemoteHostForwardingEV.on('check', connectedResources.bind(null, true)); + if (!(await connectedResources())) { return; } - console.log( - chalk.green('[DAPPSTARTER] Reconnected to dappstarter service') + chalk.green('[DAPPSTARTER] Reconnected to DappStarter service') ); await pingProject(projectName, authKey, sessionId); @@ -320,3 +340,11 @@ async function checkForManifest(folderPath: string) { } return null; } + +function startDiscovery() { + const discovery = new Discovery({ key: 'dappstarter' }); + discovery.on('promotion', () => { + setPrimaryHostProcess(true); + RemoteHostForwardingEV.emit('check'); + }); +} diff --git a/src/docker.ts b/src/docker.ts index 6a12bb4..2c65a5a 100644 --- a/src/docker.ts +++ b/src/docker.ts @@ -1,5 +1,5 @@ import { down, upAll } from 'docker-compose'; -import { ensureDir, pathExists, writeJSON } from 'fs-extra'; +import { ensureDir, writeJSON } from 'fs-extra'; import { join } from 'path'; import { PORTS } from './config'; import * as pty from 'node-pty'; diff --git a/src/main.ts b/src/main.ts index 6bb75b1..fcf19d4 100755 --- a/src/main.ts +++ b/src/main.ts @@ -1,5 +1,6 @@ #!/usr/bin/env node require('dotenv').config(); +const version = require('../package.json').version; import { Command, createCommand, createOption } from 'commander'; import loginDialog from './auth'; import developAction from './develop'; @@ -36,7 +37,9 @@ program // .enablePositionalOptions(true) .storeOptionsAsProperties(true) .option('-e, --env ', 'Override environment setting.') - .option('--debug', 'Emits debug progress for each command'); + .option('--debug', 'Emits debug progress for each command') + .description('Full-Stack Blockchain App Mojo!') + .version(version) program.on('option:env', (env) => { setEnv(env); @@ -44,8 +47,6 @@ program.on('option:env', (env) => { process.on('option:debug', (debug) => { setLogLevel(true); }); -program.version('1.0.0'); -program.description('Full-Stack Blockchain App Mojo!'); program .command('login') diff --git a/src/service.ts b/src/service.ts index a98db50..dc27990 100755 --- a/src/service.ts +++ b/src/service.ts @@ -1,4 +1,4 @@ -import fetch, { HeadersInit } from 'node-fetch'; +import fetch from 'node-fetch'; import chalk from 'chalk'; import * as emoji from 'node-emoji'; import ora from 'ora'; diff --git a/src/ssh.ts b/src/ssh.ts index b6378be..b1f533d 100755 --- a/src/ssh.ts +++ b/src/ssh.ts @@ -1,10 +1,10 @@ import { lookup } from 'dns/promises'; -import { readJson, writeFile } from 'fs-extra'; +import { writeFile } from 'fs-extra'; import { join } from 'path'; import keypair from 'keypair'; import forge from 'node-forge'; -import { SSHConnection } from 'node-ssh-forward'; -import { Client, Connection } from 'ssh2'; +import { SSHConnection } from '@decentology/node-ssh-forward'; +import { Client } from 'ssh2'; import ora from 'ora'; import * as emoji from 'node-emoji'; import { @@ -117,7 +117,7 @@ export async function isSshOpen(projectUrl: string): Promise { }); } else { spinner.stopAndPersist({ - symbol: emoji.get('cross_mark'), + symbol: emoji.get('x'), text: spinner.text + chalk.red('Not Connected'), }); } @@ -136,25 +136,42 @@ async function checkPortIsAvailable(port: number) { export async function forwardPorts( ports: (number | { localPort: number; remotePort?: number })[], host: string, - privateKey: string + privateKey: string, + silent: boolean = false ) { + const spinner = ora(`Forwarding ports: `); + if (!silent) { + process.stdin.pause(); + spinner.start(); + } + + const portNumbers = ports.map((port) => { + if (typeof port === 'number') { + return port; + } + return port.localPort; + }); + const portTextPrefix = 'Forwarding ports: '; + let portText = + portTextPrefix + portNumbers.map((x) => chalk.gray(x)).join(','); + let portStatus = await Promise.all( - ports.map(async (port) => { - if (typeof port === 'number') { - return checkPortIsAvailable(port); - } else { - return checkPortIsAvailable(port.localPort); - } + portNumbers.map(async (port) => { + return checkPortIsAvailable(port); }) ); const arePortsAvailable = portStatus.every((x) => x.valid === true); if (arePortsAvailable) { - for (const port of ports) { - let connection; - if (typeof port === 'number') { - connection = await forwardRemotePort({ + await Promise.all( + portNumbers.map(async (port) => { + portText = portText.replace( + port.toString(), + chalk.yellow(port.toString()) + ); + spinner.text = portText; + const connection = await forwardRemotePort({ port, host, privateKey, @@ -163,32 +180,41 @@ export async function forwardPorts( console.log(chalk.red(`Failed to forward port ${port}`)); process.exit(1); } - } else { - connection = await forwardRemotePort({ - port: port.localPort, - host, - privateKey, - remotePort: port.remotePort || port.localPort, - }); - } - if (connection == null) { - console.log(chalk.red(`Failed to forward port ${port}`)); - process.exit(1); - } + portText = portText.replace( + port.toString(), + chalk.green(port.toString()) + ); + spinner.text = portText; + }) + ); + + if (!silent) { + spinner.stopAndPersist({ + symbol: emoji.get('heavy_check_mark'), + text: portText, + }); } - - return true; - } else if (portStatus.every((x) => x.valid === false)) { - // Every port used. Likely connected to another terminal session. + + process.stdin.resume(); return true; } portStatus .filter((x) => !x.valid) .forEach((port) => { - console.log(chalk.red(`Port ${port.port} is already in use.`)); + portText = portText.replace( + port.port.toString(), + chalk.red(port.port.toString()) + ); }); + if (!silent) { + spinner.stopAndPersist({ + symbol: emoji.get('x'), + text: portText, + }); + } + process.stdin.resume(); return false; } @@ -203,7 +229,6 @@ export async function forwardRemotePort({ host: string; privateKey: string; }): Promise { - let spinner = ora(`Fowarding port ${port} `).start(); try { const connection = await retry( async (context) => { @@ -227,12 +252,12 @@ export async function forwardRemotePort({ keepaliveInterval: 5000, }); - await connection.forward({ - fromPort: port, - toPort: remotePort || port, - }); - - // This isn't being used. Keeping here as reminder how to handle reconnect with updating console.log + await connection.forward({ + fromPort: port, + toPort: remotePort || port, + }); + + // This isn't being used. Keeping here as reminder how to handle reconnect with updating console.log async function reconnect() { process.stdin.pause(); console.log( @@ -249,7 +274,6 @@ export async function forwardRemotePort({ process.stdin.resume(); } - return resolve(connection); } catch (error) { reject(error); @@ -280,15 +304,8 @@ export async function forwardRemotePort({ }, } ); - - spinner.clear(); - spinner.stopAndPersist({ - symbol: emoji.get('heavy_check_mark'), - text: `Port ${port} forwarded to ${host}`, - }); return connection as SSHConnection; } catch (error) { - spinner.fail('SSH connection error'); console.error(`[SSH] ${error.message}`); return null; } diff --git a/yarn.lock b/yarn.lock index 08ac26b..5b19d7e 100644 --- a/yarn.lock +++ b/yarn.lock @@ -21,6 +21,19 @@ lodash "^4.17.19" to-fast-properties "^2.0.0" +"@decentology/node-discover@decentology/node-discover#decentology": + version "1.2.0" + resolved "https://codeload.github.com/decentology/node-discover/tar.gz/ae95eeea62831464c80bf679daff930826b08f21" + dependencies: + uuid "^8.3.1" + +"@decentology/node-ssh-forward@decentology/node-ssh-forward#decentology": + version "0.7.2" + resolved "https://codeload.github.com/decentology/node-ssh-forward/tar.gz/5cc22fa80629a843ea89933dd1126f180bd7a891" + dependencies: + debug "^4.1.1" + ssh2 "^1.4.0" + "@hapi/hoek@^9.0.0": version "9.2.0" resolved "https://registry.yarnpkg.com/@hapi/hoek/-/hoek-9.2.0.tgz#f3933a44e365864f4dad5db94158106d511e8131" @@ -119,9 +132,9 @@ integrity sha512-ugsxEJfsCuqMLSuCD4PIJkp5Uk2z6TCMRCgYVuhRo5cYQY3+1xXTQkSlPtkpGHuvWMjS2KTeVQXxkXRACMbM6A== "@types/fs-extra@^9.0.11": - version "9.0.12" - resolved "https://registry.yarnpkg.com/@types/fs-extra/-/fs-extra-9.0.12.tgz#9b8f27973df8a7a3920e8461517ebf8a7d4fdfaf" - integrity sha512-I+bsBr67CurCGnSenZZ7v94gd3tc3+Aj2taxMT4yu4ABLuOgOjeFxX3dokG24ztSRg5tnT00sL8BszO7gSMoIw== + version "9.0.13" + resolved "https://registry.yarnpkg.com/@types/fs-extra/-/fs-extra-9.0.13.tgz#7594fbae04fe7f1918ce8b3d213f74ff44ac1f45" + integrity sha512-nEnwB++1u5lVDM2UI4c1+5R+FYaKfaAzS4OococimjVm3nQw3TuzH5UNsocrcTBbhnerblyHj4A49qXbIiZdpA== dependencies: "@types/node" "*" @@ -144,9 +157,9 @@ integrity sha512-WZU/4bb+lvzyDmZzjJtp++9mfKy6B3lH6gGISgkcz6SU8hMILKRM0vi08TxIsb0dQB4Gzo68MWLmctu6xqUi9g== "@types/inquirer@^8.1.1": - version "8.1.1" - resolved "https://registry.yarnpkg.com/@types/inquirer/-/inquirer-8.1.1.tgz#885e39b53ed3fe3ea48de416aaeeb02e8253e1f7" - integrity sha512-01diGjEMJjyTCOXwlnhEQcNH8LYRzy3zpqk19WxKBKmV1nt9yAmpNNS577OWAVhekAesULxIkG1PwsCvjqWYKA== + version "8.1.2" + resolved "https://registry.yarnpkg.com/@types/inquirer/-/inquirer-8.1.2.tgz#48be1d741fa39ade7ce099dbdb8a077eee8f5090" + integrity sha512-TYNYd9YEb1SdEo71AJ2sSYSS22gYiLV1/UzDjGY51Tx0LuVSbY3ftFR+eOP8qjowFKvDUnC2jmQP3hLulg6y6Q== dependencies: "@types/through" "*" rxjs "^7.2.0" @@ -192,16 +205,16 @@ form-data "^3.0.0" "@types/node-forge@^0.10.0": - version "0.10.4" - resolved "https://registry.yarnpkg.com/@types/node-forge/-/node-forge-0.10.4.tgz#f30025cc2da0177393b9deaefbf3b9edd55b807b" - integrity sha512-RpP7JCxlPA32n8FE0kjOpCsCrsX6VjiD0fjOCo4NwIn8IdcicHi4B2e+votWuOpOmwzUjMwRLqVIF95epGd5nA== + version "0.10.5" + resolved "https://registry.yarnpkg.com/@types/node-forge/-/node-forge-0.10.5.tgz#f79925c88202817a7ec0958c3a9d3a915d362b4f" + integrity sha512-P+Q+MPSDr0RgIzv5h0gJuJDCm1e4RaSu/EMJZTUS4ZzboWH2uX/T7TiqAAcEFTHzCKtgMRqCgTVTX9SD72fMTQ== dependencies: "@types/node" "*" "@types/node@*": - version "16.9.4" - resolved "https://registry.yarnpkg.com/@types/node/-/node-16.9.4.tgz#a12f0ee7847cf17a97f6fdf1093cb7a9af23cca4" - integrity sha512-KDazLNYAGIuJugdbULwFZULF9qQ13yNWEBFnfVpqlpgAAo6H/qnM9RjBgh0A0kmHf3XxAKLdN5mTIng9iUvVLA== + version "16.9.6" + resolved "https://registry.yarnpkg.com/@types/node/-/node-16.9.6.tgz#040a64d7faf9e5d9e940357125f0963012e66f04" + integrity sha512-YHUZhBOMTM3mjFkXVcK+WwAcYmyhe1wL4lfqNtzI0b3qAy7yuSetnM7QJazgE5PFmgVTNGiLOgRFfJMqW7XpSQ== "@types/promise-timeout@^1.3.0": version "1.3.0" @@ -943,9 +956,9 @@ glob-parent@^5.1.2: is-glob "^4.0.1" glob@^7.0.0, glob@^7.1.3: - version "7.1.7" - resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.7.tgz#3b193e9233f01d42d0b3f78294bbeeb418f94a90" - integrity sha512-OvD9ENzPLbegENnYP5UUfJIirTg4+XwMWGaQfQTY0JenxNvvIKP3U3/tAQSPIu/lHxXYSZmpXlUHeqAIdKzBLQ== + version "7.2.0" + resolved "https://registry.yarnpkg.com/glob/-/glob-7.2.0.tgz#d15535af7732e02e948f4c41628bd910293f6023" + integrity sha512-lmLf6gtyrPq8tTjSmrO94wBeQbFR3HbLHbuyD69wuyQkImp2hWqMGB47OX65FBkPffO641IP9jWa1z4ivqG26Q== dependencies: fs.realpath "^1.0.0" inflight "^1.0.4" @@ -1405,9 +1418,11 @@ node-emoji@^1.10.0: lodash "^4.17.21" node-fetch@^2.6.1: - version "2.6.2" - resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-2.6.2.tgz#986996818b73785e47b1965cc34eb093a1d464d0" - integrity sha512-aLoxToI6RfZ+0NOjmWAgn9+LEd30YCkJKFSyWacNZdEKTit/ZMcKjGkTRo8uWEsnIb/hfKecNPEbln02PdWbcA== + version "2.6.5" + resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-2.6.5.tgz#42735537d7f080a7e5f78b6c549b7146be1742fd" + integrity sha512-mmlIVHJEu5rnIxgEgez6b9GgWXbkZj5YZ7fx+2r94a2E+Uirsp6HsPTPlomfdHtpt/B0cdKviwkoaM6pyvUOpQ== + dependencies: + whatwg-url "^5.0.0" node-forge@^0.10.0: version "0.10.0" @@ -1421,13 +1436,6 @@ node-pty@^0.10.1: dependencies: nan "^2.14.0" -node-ssh-forward@decentology/node-ssh-forward#master: - version "0.7.2" - resolved "https://codeload.github.com/decentology/node-ssh-forward/tar.gz/1b5226a08fb3e1a9ad648325ae5dbf382228494c" - dependencies: - debug "^4.1.1" - ssh2 "^1.4.0" - nodeify-ts@1.0.6: version "1.0.6" resolved "https://registry.yarnpkg.com/nodeify-ts/-/nodeify-ts-1.0.6.tgz#ceef172c4fad1a45a1ae60a31c7e295150b5e221" @@ -2023,6 +2031,11 @@ to-regex-range@^5.0.1: dependencies: is-number "^7.0.0" +tr46@~0.0.3: + version "0.0.3" + resolved "https://registry.yarnpkg.com/tr46/-/tr46-0.0.3.tgz#8184fd347dac9cdc185992f3a6622e14b9d9ab6a" + integrity sha1-gYT9NH2snNwYWZLzpmIuFLnZq2o= + "traverse@>=0.3.0 <0.4": version "0.3.9" resolved "https://registry.yarnpkg.com/traverse/-/traverse-0.3.9.tgz#717b8f220cc0bb7b44e40514c22b2e8bbc70d8b9" @@ -2096,7 +2109,7 @@ util-deprecate@^1.0.1, util-deprecate@~1.0.1: resolved "https://registry.yarnpkg.com/util-deprecate/-/util-deprecate-1.0.2.tgz#450d4dc9fa70de732762fbd2d4a28981419a0ccf" integrity sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8= -uuid@^8.3.2: +uuid@^8.3.1, uuid@^8.3.2: version "8.3.2" resolved "https://registry.yarnpkg.com/uuid/-/uuid-8.3.2.tgz#80d5b5ced271bb9af6c445f21a1a04c606cefbe2" integrity sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg== @@ -2119,6 +2132,19 @@ wcwidth@^1.0.1: dependencies: defaults "^1.0.3" +webidl-conversions@^3.0.0: + version "3.0.1" + resolved "https://registry.yarnpkg.com/webidl-conversions/-/webidl-conversions-3.0.1.tgz#24534275e2a7bc6be7bc86611cc16ae0a5654871" + integrity sha1-JFNCdeKnvGvnvIZhHMFq4KVlSHE= + +whatwg-url@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/whatwg-url/-/whatwg-url-5.0.0.tgz#966454e8765462e37644d3626f6742ce8b70965d" + integrity sha1-lmRU6HZUYuN2RNNib2dCzotwll0= + dependencies: + tr46 "~0.0.3" + webidl-conversions "^3.0.0" + which-pm-runs@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/which-pm-runs/-/which-pm-runs-1.0.0.tgz#670b3afbc552e0b55df6b7780ca74615f23ad1cb"