update ssh module
This commit is contained in:
parent
419db8b197
commit
9f2e629e8f
5
dist/mod_prepare/index.js
vendored
5
dist/mod_prepare/index.js
vendored
@ -11,7 +11,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|||||||
const plugins = require("./mod.plugins");
|
const plugins = require("./mod.plugins");
|
||||||
const npmci_bash_1 = require("../npmci.bash");
|
const npmci_bash_1 = require("../npmci.bash");
|
||||||
const env = require("../npmci.env");
|
const env = require("../npmci.env");
|
||||||
const sshModule = require("../npmci.ssh");
|
const npmciMods = require("../npmci.mods");
|
||||||
/**
|
/**
|
||||||
* authenticates npm with token from env var
|
* authenticates npm with token from env var
|
||||||
*/
|
*/
|
||||||
@ -58,6 +58,7 @@ let dockerGitlab = () => __awaiter(this, void 0, void 0, function* () {
|
|||||||
* prepare ssh
|
* prepare ssh
|
||||||
*/
|
*/
|
||||||
let ssh = () => __awaiter(this, void 0, void 0, function* () {
|
let ssh = () => __awaiter(this, void 0, void 0, function* () {
|
||||||
|
let sshModule = yield npmciMods.modSsh.load();
|
||||||
yield sshModule.ssh();
|
yield sshModule.ssh();
|
||||||
});
|
});
|
||||||
/**
|
/**
|
||||||
@ -78,4 +79,4 @@ exports.prepare = (serviceArg) => __awaiter(this, void 0, void 0, function* () {
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi90cy9tb2RfcHJlcGFyZS9pbmRleC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7Ozs7Ozs7O0FBQUEseUNBQXdDO0FBQ3hDLDhDQUFvQztBQUNwQyxvQ0FBbUM7QUFDbkMsMENBQXlDO0FBVXpDOztHQUVHO0FBQ0gsSUFBSSxHQUFHLEdBQUc7SUFDUixJQUFJLFdBQVcsR0FBVyxtQ0FBbUMsQ0FBQT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aiter) || function (thisArg, _arguments, P, ge
|
|||||||
});
|
});
|
||||||
};
|
};
|
||||||
Object.defineProperty(exports, "__esModule", { value: true });
|
Object.defineProperty(exports, "__esModule", { value: true });
|
||||||
const plugins = require("./npmci.plugins");
|
const plugins = require("./mod.plugins");
|
||||||
let sshRegex = /^(.*)\|(.*)\|(.*)/;
|
let sshRegex = /^(.*)\|(.*)\|(.*)/;
|
||||||
let sshInstance;
|
let sshInstance;
|
||||||
/**
|
/**
|
||||||
@ -29,7 +29,6 @@ exports.ssh = () => __awaiter(this, void 0, void 0, function* () {
|
|||||||
else {
|
else {
|
||||||
plugins.beautylog.log('In test mode, so not storing SSH keys to disk!');
|
plugins.beautylog.log('In test mode, so not storing SSH keys to disk!');
|
||||||
}
|
}
|
||||||
;
|
|
||||||
});
|
});
|
||||||
/**
|
/**
|
||||||
* gets called for each found SSH ENV Var and deploys it
|
* gets called for each found SSH ENV Var and deploys it
|
||||||
@ -46,13 +45,11 @@ let evaluateSshEnv = (sshkeyEnvVarArg) => __awaiter(this, void 0, void 0, functi
|
|||||||
plugins.beautylog.log('---> privKey defined!');
|
plugins.beautylog.log('---> privKey defined!');
|
||||||
sshKey.privKeyBase64 = resultArray[2];
|
sshKey.privKeyBase64 = resultArray[2];
|
||||||
}
|
}
|
||||||
;
|
|
||||||
if (notUndefined(resultArray[3])) {
|
if (notUndefined(resultArray[3])) {
|
||||||
'---> pubKey defined!';
|
plugins.beautylog.log('---> pubKey defined!');
|
||||||
sshKey.pubKeyBase64 = resultArray[3];
|
sshKey.pubKeyBase64 = resultArray[3];
|
||||||
}
|
}
|
||||||
;
|
|
||||||
sshInstance.addKey(sshKey);
|
sshInstance.addKey(sshKey);
|
||||||
return;
|
return;
|
||||||
});
|
});
|
||||||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibnBtY2kuc3NoLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vdHMvbnBtY2kuc3N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xDQUFBLENBQUEifQ==
|
1
dist/mod_ssh/mod.plugins.d.ts
vendored
Normal file
1
dist/mod_ssh/mod.plugins.d.ts
vendored
Normal file
@ -0,0 +1 @@
|
|||||||
|
export * from '../npmci.plugins';
|
7
dist/mod_ssh/mod.plugins.js
vendored
Normal file
7
dist/mod_ssh/mod.plugins.js
vendored
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
"use strict";
|
||||||
|
function __export(m) {
|
||||||
|
for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];
|
||||||
|
}
|
||||||
|
Object.defineProperty(exports, "__esModule", { value: true });
|
||||||
|
__export(require("../npmci.plugins"));
|
||||||
|
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibW9kLnBsdWdpbnMuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi90cy9tb2Rfc3NoL21vZC5wbHVnaW5zLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7Ozs7O0FBQUEsc0NBQWdDIn0=
|
2
dist/npmci.mods.d.ts
vendored
2
dist/npmci.mods.d.ts
vendored
@ -6,6 +6,7 @@ import * as _modInstall from './mod_install/index';
|
|||||||
import * as _modPublish from './mod_publish/index';
|
import * as _modPublish from './mod_publish/index';
|
||||||
import * as _modPurge from './mod_purge/index';
|
import * as _modPurge from './mod_purge/index';
|
||||||
import * as _modPrepare from './mod_prepare/index';
|
import * as _modPrepare from './mod_prepare/index';
|
||||||
|
import * as _modSsh from './mod_ssh/index';
|
||||||
import * as _modTrigger from './mod_trigger/index';
|
import * as _modTrigger from './mod_trigger/index';
|
||||||
import * as _modTest from './mod_test/index';
|
import * as _modTest from './mod_test/index';
|
||||||
import { LazyModule } from 'smartsystem';
|
import { LazyModule } from 'smartsystem';
|
||||||
@ -17,5 +18,6 @@ export declare let modInstall: LazyModule<typeof _modInstall>;
|
|||||||
export declare let modPublish: LazyModule<typeof _modPublish>;
|
export declare let modPublish: LazyModule<typeof _modPublish>;
|
||||||
export declare let modPurge: LazyModule<typeof _modPurge>;
|
export declare let modPurge: LazyModule<typeof _modPurge>;
|
||||||
export declare let modPrepare: LazyModule<typeof _modPrepare>;
|
export declare let modPrepare: LazyModule<typeof _modPrepare>;
|
||||||
|
export declare let modSsh: LazyModule<typeof _modSsh>;
|
||||||
export declare let modTrigger: LazyModule<typeof _modTrigger>;
|
export declare let modTrigger: LazyModule<typeof _modTrigger>;
|
||||||
export declare let modTest: LazyModule<typeof _modTest>;
|
export declare let modTest: LazyModule<typeof _modTest>;
|
||||||
|
3
dist/npmci.mods.js
vendored
3
dist/npmci.mods.js
vendored
@ -9,6 +9,7 @@ exports.modInstall = new smartsystem_1.LazyModule('./mod_install/index', __dirna
|
|||||||
exports.modPublish = new smartsystem_1.LazyModule('./mod_publish/index', __dirname);
|
exports.modPublish = new smartsystem_1.LazyModule('./mod_publish/index', __dirname);
|
||||||
exports.modPurge = new smartsystem_1.LazyModule('./mod_purge/index', __dirname);
|
exports.modPurge = new smartsystem_1.LazyModule('./mod_purge/index', __dirname);
|
||||||
exports.modPrepare = new smartsystem_1.LazyModule('./mod_prepare/index', __dirname);
|
exports.modPrepare = new smartsystem_1.LazyModule('./mod_prepare/index', __dirname);
|
||||||
|
exports.modSsh = new smartsystem_1.LazyModule('./mod_ssh/index', __dirname);
|
||||||
exports.modTrigger = new smartsystem_1.LazyModule('./mod_trigger/index', __dirname);
|
exports.modTrigger = new smartsystem_1.LazyModule('./mod_trigger/index', __dirname);
|
||||||
exports.modTest = new smartsystem_1.LazyModule('./mod_test/index', __dirname);
|
exports.modTest = new smartsystem_1.LazyModule('./mod_test/index', __dirname);
|
||||||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibnBtY2kubW9kcy5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uL3RzL25wbWNpLm1vZHMudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncy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end when it comes to handling npm packages during CI builds. It is optimized for GitLab CI
|
helps with pushing to npm registry from any CI
|
||||||
|
|
||||||
## Availabililty
|
## Availabililty
|
||||||
[![npm](https://gitzone.gitlab.io/assets/repo-button-npm.svg)](https://www.npmjs.com/package/npmci)
|
[![npm](https://gitzone.gitlab.io/assets/repo-button-npm.svg)](https://www.npmjs.com/package/npmci)
|
||||||
[![git](https://gitzone.gitlab.io/assets/repo-button-git.svg)](https://gitlab.com/gitzone/npmci)
|
[![git](https://gitzone.gitlab.io/assets/repo-button-git.svg)](https://GitLab.com/gitzone/npmci)
|
||||||
[![git](https://gitzone.gitlab.io/assets/repo-button-mirror.svg)](https://github.com/gitzone/npmci)
|
[![git](https://gitzone.gitlab.io/assets/repo-button-mirror.svg)](https://github.com/gitzone/npmci)
|
||||||
[![docs](https://gitzone.gitlab.io/assets/repo-button-docs.svg)](https://gitzone.gitlab.io/npmci/docs)
|
[![docs](https://gitzone.gitlab.io/assets/repo-button-docs.svg)](https://gitzone.gitlab.io/npmci/)
|
||||||
|
|
||||||
## Status for master
|
## Status for master
|
||||||
[![build status](https://gitlab.com/gitzone/npmci/badges/master/build.svg)](https://gitlab.com/gitzone/npmci/commits/master)
|
[![build status](https://GitLab.com/gitzone/npmci/badges/master/build.svg)](https://GitLab.com/gitzone/npmci/commits/master)
|
||||||
[![coverage report](https://gitlab.com/gitzone/npmci/badges/master/coverage.svg)](https://gitlab.com/gitzone/npmci/commits/master)
|
[![coverage report](https://GitLab.com/gitzone/npmci/badges/master/coverage.svg)](https://GitLab.com/gitzone/npmci/commits/master)
|
||||||
|
[![npm downloads per month](https://img.shields.io/npm/dm/npmci.svg)](https://www.npmjs.com/package/npmci)
|
||||||
[![Dependency Status](https://david-dm.org/gitzonetools/npmci.svg)](https://david-dm.org/gitzonetools/npmci)
|
[![Dependency Status](https://david-dm.org/gitzonetools/npmci.svg)](https://david-dm.org/gitzonetools/npmci)
|
||||||
[![bitHound Dependencies](https://www.bithound.io/github/gitzonetools/npmci/badges/dependencies.svg)](https://www.bithound.io/github/gitzonetools/npmci/master/dependencies/npm)
|
[![bitHound Dependencies](https://www.bithound.io/github/gitzonetools/npmci/badges/dependencies.svg)](https://www.bithound.io/github/gitzonetools/npmci/master/dependencies/npm)
|
||||||
[![bitHound Code](https://www.bithound.io/github/gitzonetools/npmci/badges/code.svg)](https://www.bithound.io/github/gitzonetools/npmci)
|
[![bitHound Code](https://www.bithound.io/github/gitzonetools/npmci/badges/code.svg)](https://www.bithound.io/github/gitzonetools/npmci)
|
||||||
[![TypeScript](https://img.shields.io/badge/TypeScript-2.x-blue.svg)](https://nodejs.org/dist/latest-v6.x/docs/api/)
|
[![TypeScript](https://img.shields.io/badge/TypeScript-2.x-blue.svg)](https://nodejs.org/dist/latest-v6.x/docs/api/)
|
||||||
[![node](https://img.shields.io/badge/node->=%206.x.x-blue.svg)](https://nodejs.org/dist/latest-v6.x/docs/api/)
|
[![node](https://img.shields.io/badge/node->=%206.x.x-blue.svg)](https://nodejs.org/dist/latest-v6.x/docs/api/)
|
||||||
|
[![JavaScript Style Guide](https://img.shields.io/badge/code%20style-standard-brightgreen.svg)](http://standardjs.com/)
|
||||||
|
|
||||||
## Usage
|
## Usage
|
||||||
|
Use TypeScript for best in class instellisense.
|
||||||
|
|
||||||
npmci is designed to work in docker CI environments. The following docker images come with npmci presinstalled:
|
npmci is designed to work in docker CI environments. The following docker images come with npmci presinstalled:
|
||||||
|
|
||||||
Docker Hub:
|
Docker Hub:
|
||||||
@ -87,4 +91,9 @@ setting | example | description
|
|||||||
--- | --- | ---
|
--- | --- | ---
|
||||||
globalNpmTools | "globalNpmTools": ["gitbook"] | Will look for the specified package names locally and (if not yet present) install them from npm.
|
globalNpmTools | "globalNpmTools": ["gitbook"] | Will look for the specified package names locally and (if not yet present) install them from npm.
|
||||||
|
|
||||||
[![npm](https://gitzone.gitlab.io/assets/repo-footer.svg)](https://push.rocks)
|
For further information read the linked docs at the top of this README.
|
||||||
|
|
||||||
|
> MIT licensed | **©** [Lossless GmbH](https://lossless.gmbh)
|
||||||
|
| By using this npm module you agree to our [privacy policy](https://lossless.gmbH/privacy.html)
|
||||||
|
|
||||||
|
[![repo-footer](https://gitzone.gitlab.io/assets/repo-footer.svg)](https://push.rocks)
|
||||||
|
@ -26,7 +26,7 @@
|
|||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@types/lodash": "^4.14.65",
|
"@types/lodash": "^4.14.65",
|
||||||
"@types/node": "^7.0.28",
|
"@types/node": "^7.0.29",
|
||||||
"@types/request": "0.x.x",
|
"@types/request": "0.x.x",
|
||||||
"@types/shelljs": "^0.7.2",
|
"@types/shelljs": "^0.7.2",
|
||||||
"@types/through2": "^2.0.33",
|
"@types/through2": "^2.0.33",
|
||||||
|
70
readme.md
70
readme.md
@ -21,76 +21,6 @@ helps with pushing to npm registry from any CI
|
|||||||
## Usage
|
## Usage
|
||||||
Use TypeScript for best in class instellisense.
|
Use TypeScript for best in class instellisense.
|
||||||
|
|
||||||
npmci is designed to work in docker CI environments. The following docker images come with npmci presinstalled:
|
|
||||||
|
|
||||||
Docker Hub:
|
|
||||||
|
|
||||||
* [hosttoday/ht-docker-node:npmci](https://hub.docker.com/r/hosttoday/ht-docker-node/)
|
|
||||||
has LTS node version and npmci preinstalled.
|
|
||||||
* [hosttoday/ht-docker-dbase](https://hub.docker.com/r/hosttoday/ht-docker-dbase/)
|
|
||||||
based on docker:git, can be used to build docker images in conjunction with docker:dind
|
|
||||||
|
|
||||||
npmci can be called from commandline:
|
|
||||||
```shell
|
|
||||||
# Install any node version:
|
|
||||||
npmci install lts # will install latest LTS node version and update PATH for node and npm versions
|
|
||||||
npmci install stable # will install latest stable node version and update PATH for node and npm
|
|
||||||
npmci install legacy # will install latest legacy node version and update PATH for node and npm
|
|
||||||
npmci install x.x.x # will install any specific node version.
|
|
||||||
|
|
||||||
# Install any node version, install dependencies and run test in cwd:
|
|
||||||
npmci test lts # will install latest lts node version and run "npm install" and "npm test".
|
|
||||||
npmci test stable # will install latest stable node version and run "npm install" and "npm test".
|
|
||||||
npmci test legacy # will install latest legacy node version and run "npm install" and "npm test".
|
|
||||||
npmci test x.x.x # will install any specific node version and run "npm install" and "npm test".
|
|
||||||
npmci test docker # will test any build image with tests defined in ./npmci/dockertest_1.sh to ./npmci/dockertest_100.sh
|
|
||||||
## npmci test docker will look at all Dockerfiles and look for according tags on GitLab container registry
|
|
||||||
|
|
||||||
|
|
||||||
# prepare tools
|
|
||||||
npmci prepare npm # will look for $NPMCI_TOKEN_NPM env var and create .npmrc, so npm is authenticated
|
|
||||||
npmci prepare docker # will look for $NPMCI_LOGIN_DOCKER in form username|password and authenticate docker
|
|
||||||
npmci prepare docker-gitlab # will authenticate docker for gitlab container registry
|
|
||||||
|
|
||||||
# build containers
|
|
||||||
npmci build docker # will build containers
|
|
||||||
## all Dockerfiles named Dockerfile* are picked up.
|
|
||||||
## specify tags like this Dockerfile_[tag]
|
|
||||||
## uploads all built images as [username]/[reponame]:[tag]_test to GitLab
|
|
||||||
## then test in next step with "npmci test docker"
|
|
||||||
|
|
||||||
# publish npm module
|
|
||||||
npmci publish npm # will look vor $NPMCI_TOKEN_NPM env var and push any module in cwd to npm
|
|
||||||
npmci publish docker
|
|
||||||
|
|
||||||
# trigger webhooks
|
|
||||||
npmci trigger # will look for NPMCI_TRIGGER_1 to NPMCI_TRIGGER_100 in form domain|id|token|ref|name
|
|
||||||
```
|
|
||||||
|
|
||||||
## Configuration
|
|
||||||
npmci supports the use of npmextra.
|
|
||||||
|
|
||||||
To configure npmci create a `npmextra.json` file at the root of your project
|
|
||||||
|
|
||||||
```json
|
|
||||||
{
|
|
||||||
"npmci": {
|
|
||||||
"globalNpmTools": [
|
|
||||||
"npm-check-updates",
|
|
||||||
"protractor",
|
|
||||||
"npmts",
|
|
||||||
"gitzone"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
```
|
|
||||||
|
|
||||||
**Available options**
|
|
||||||
|
|
||||||
setting | example | description
|
|
||||||
--- | --- | ---
|
|
||||||
globalNpmTools | "globalNpmTools": ["gitbook"] | Will look for the specified package names locally and (if not yet present) install them from npm.
|
|
||||||
|
|
||||||
For further information read the linked docs at the top of this README.
|
For further information read the linked docs at the top of this README.
|
||||||
|
|
||||||
> MIT licensed | **©** [Lossless GmbH](https://lossless.gmbh)
|
> MIT licensed | **©** [Lossless GmbH](https://lossless.gmbh)
|
||||||
|
@ -14,7 +14,7 @@ import '../dist/index'
|
|||||||
import NpmciBuildDocker = require('../dist/mod_docker/index')
|
import NpmciBuildDocker = require('../dist/mod_docker/index')
|
||||||
import NpmciPublish = require('../dist/mod_publish/index')
|
import NpmciPublish = require('../dist/mod_publish/index')
|
||||||
import NpmciTest = require('../dist/mod_test/index')
|
import NpmciTest = require('../dist/mod_test/index')
|
||||||
import NpmciSsh = require('../dist/npmci.ssh')
|
import NpmciSsh = require('../dist/mod_ssh/index')
|
||||||
import NpmciEnv = require('../dist/npmci.env')
|
import NpmciEnv = require('../dist/npmci.env')
|
||||||
|
|
||||||
let dockerfile1: NpmciBuildDocker.Dockerfile
|
let dockerfile1: NpmciBuildDocker.Dockerfile
|
||||||
|
@ -1,8 +1,7 @@
|
|||||||
import * as plugins from './mod.plugins'
|
import * as plugins from './mod.plugins'
|
||||||
import { bash } from '../npmci.bash'
|
import { bash } from '../npmci.bash'
|
||||||
import * as env from '../npmci.env'
|
import * as env from '../npmci.env'
|
||||||
import * as sshModule from '../npmci.ssh'
|
import * as npmciMods from '../npmci.mods'
|
||||||
|
|
||||||
|
|
||||||
// types
|
// types
|
||||||
|
|
||||||
@ -59,6 +58,7 @@ let dockerGitlab = async () => {
|
|||||||
* prepare ssh
|
* prepare ssh
|
||||||
*/
|
*/
|
||||||
let ssh = async () => {
|
let ssh = async () => {
|
||||||
|
let sshModule = await npmciMods.modSsh.load()
|
||||||
await sshModule.ssh()
|
await sshModule.ssh()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import * as plugins from './npmci.plugins'
|
import * as plugins from './mod.plugins'
|
||||||
|
|
||||||
let sshRegex = /^(.*)\|(.*)\|(.*)/
|
let sshRegex = /^(.*)\|(.*)\|(.*)/
|
||||||
let sshInstance: plugins.smartssh.SshInstance
|
let sshInstance: plugins.smartssh.SshInstance
|
||||||
@ -20,11 +20,11 @@ export let ssh = async () => {
|
|||||||
sshInstance.writeToDisk()
|
sshInstance.writeToDisk()
|
||||||
} else {
|
} else {
|
||||||
plugins.beautylog.log('In test mode, so not storing SSH keys to disk!')
|
plugins.beautylog.log('In test mode, so not storing SSH keys to disk!')
|
||||||
};
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* gets called for each found SSH ENV Var and deploys it
|
* gets called for each found SSH ENV Var and deploys it
|
||||||
*/
|
*/
|
||||||
let evaluateSshEnv = async (sshkeyEnvVarArg) => {
|
let evaluateSshEnv = async (sshkeyEnvVarArg) => {
|
||||||
let resultArray = sshRegex.exec(sshkeyEnvVarArg)
|
let resultArray = sshRegex.exec(sshkeyEnvVarArg)
|
||||||
@ -37,11 +37,11 @@ let evaluateSshEnv = async (sshkeyEnvVarArg) => {
|
|||||||
if (notUndefined(resultArray[2])) {
|
if (notUndefined(resultArray[2])) {
|
||||||
plugins.beautylog.log('---> privKey defined!')
|
plugins.beautylog.log('---> privKey defined!')
|
||||||
sshKey.privKeyBase64 = resultArray[2]
|
sshKey.privKeyBase64 = resultArray[2]
|
||||||
};
|
}
|
||||||
if (notUndefined(resultArray[3])) {
|
if (notUndefined(resultArray[3])) {
|
||||||
'---> pubKey defined!'
|
plugins.beautylog.log('---> pubKey defined!')
|
||||||
sshKey.pubKeyBase64 = resultArray[3]
|
sshKey.pubKeyBase64 = resultArray[3]
|
||||||
};
|
}
|
||||||
|
|
||||||
sshInstance.addKey(sshKey)
|
sshInstance.addKey(sshKey)
|
||||||
return
|
return
|
1
ts/mod_ssh/mod.plugins.ts
Normal file
1
ts/mod_ssh/mod.plugins.ts
Normal file
@ -0,0 +1 @@
|
|||||||
|
export * from '../npmci.plugins'
|
@ -6,6 +6,7 @@ import * as _modInstall from './mod_install/index'
|
|||||||
import * as _modPublish from './mod_publish/index'
|
import * as _modPublish from './mod_publish/index'
|
||||||
import * as _modPurge from './mod_purge/index'
|
import * as _modPurge from './mod_purge/index'
|
||||||
import * as _modPrepare from './mod_prepare/index'
|
import * as _modPrepare from './mod_prepare/index'
|
||||||
|
import * as _modSsh from './mod_ssh/index'
|
||||||
import * as _modTrigger from './mod_trigger/index'
|
import * as _modTrigger from './mod_trigger/index'
|
||||||
import * as _modTest from './mod_test/index'
|
import * as _modTest from './mod_test/index'
|
||||||
|
|
||||||
@ -19,5 +20,6 @@ export let modInstall = new LazyModule<typeof _modInstall>('./mod_install/index'
|
|||||||
export let modPublish = new LazyModule<typeof _modPublish>('./mod_publish/index', __dirname)
|
export let modPublish = new LazyModule<typeof _modPublish>('./mod_publish/index', __dirname)
|
||||||
export let modPurge = new LazyModule<typeof _modPurge>('./mod_purge/index', __dirname)
|
export let modPurge = new LazyModule<typeof _modPurge>('./mod_purge/index', __dirname)
|
||||||
export let modPrepare = new LazyModule<typeof _modPrepare>('./mod_prepare/index', __dirname)
|
export let modPrepare = new LazyModule<typeof _modPrepare>('./mod_prepare/index', __dirname)
|
||||||
|
export let modSsh = new LazyModule<typeof _modSsh>('./mod_ssh/index', __dirname)
|
||||||
export let modTrigger = new LazyModule<typeof _modTrigger>('./mod_trigger/index', __dirname)
|
export let modTrigger = new LazyModule<typeof _modTrigger>('./mod_trigger/index', __dirname)
|
||||||
export let modTest = new LazyModule<typeof _modTest>('./mod_test/index',__dirname)
|
export let modTest = new LazyModule<typeof _modTest>('./mod_test/index',__dirname)
|
||||||
|
21
yarn.lock
21
yarn.lock
@ -63,9 +63,9 @@
|
|||||||
version "2.0.29"
|
version "2.0.29"
|
||||||
resolved "https://registry.yarnpkg.com/@types/minimatch/-/minimatch-2.0.29.tgz#5002e14f75e2d71e564281df0431c8c1b4a2a36a"
|
resolved "https://registry.yarnpkg.com/@types/minimatch/-/minimatch-2.0.29.tgz#5002e14f75e2d71e564281df0431c8c1b4a2a36a"
|
||||||
|
|
||||||
"@types/node@*", "@types/node@^7.0.28":
|
"@types/node@*", "@types/node@^7.0.29":
|
||||||
version "7.0.28"
|
version "7.0.29"
|
||||||
resolved "https://registry.yarnpkg.com/@types/node/-/node-7.0.28.tgz#3a8c62b718a73bbb89ede4aba5ab12c8f822c36e"
|
resolved "https://registry.yarnpkg.com/@types/node/-/node-7.0.29.tgz#ccfcec5b7135c7caf6c4ffb8c7f33102340d99df"
|
||||||
|
|
||||||
"@types/promises-a-plus@*":
|
"@types/promises-a-plus@*":
|
||||||
version "0.0.27"
|
version "0.0.27"
|
||||||
@ -1390,12 +1390,6 @@ isstream@~0.1.2:
|
|||||||
version "0.1.2"
|
version "0.1.2"
|
||||||
resolved "https://registry.yarnpkg.com/isstream/-/isstream-0.1.2.tgz#47e63f7af55afa6f92e1500e690eb8b8529c099a"
|
resolved "https://registry.yarnpkg.com/isstream/-/isstream-0.1.2.tgz#47e63f7af55afa6f92e1500e690eb8b8529c099a"
|
||||||
|
|
||||||
jodid25519@^1.0.0:
|
|
||||||
version "1.0.2"
|
|
||||||
resolved "https://registry.yarnpkg.com/jodid25519/-/jodid25519-1.0.2.tgz#06d4912255093419477d425633606e0e90782967"
|
|
||||||
dependencies:
|
|
||||||
jsbn "~0.1.0"
|
|
||||||
|
|
||||||
js-base64@^2.1.9:
|
js-base64@^2.1.9:
|
||||||
version "2.1.9"
|
version "2.1.9"
|
||||||
resolved "https://registry.yarnpkg.com/js-base64/-/js-base64-2.1.9.tgz#f0e80ae039a4bd654b5f281fc93f04a914a7fcce"
|
resolved "https://registry.yarnpkg.com/js-base64/-/js-base64-2.1.9.tgz#f0e80ae039a4bd654b5f281fc93f04a914a7fcce"
|
||||||
@ -2211,8 +2205,8 @@ regex-cache@^0.4.2:
|
|||||||
is-primitive "^2.0.0"
|
is-primitive "^2.0.0"
|
||||||
|
|
||||||
remove-trailing-separator@^1.0.1:
|
remove-trailing-separator@^1.0.1:
|
||||||
version "1.0.1"
|
version "1.0.2"
|
||||||
resolved "https://registry.yarnpkg.com/remove-trailing-separator/-/remove-trailing-separator-1.0.1.tgz#615ebb96af559552d4bf4057c8436d486ab63cc4"
|
resolved "https://registry.yarnpkg.com/remove-trailing-separator/-/remove-trailing-separator-1.0.2.tgz#69b062d978727ad14dc6b56ba4ab772fd8d70511"
|
||||||
|
|
||||||
repeat-element@^1.1.2:
|
repeat-element@^1.1.2:
|
||||||
version "1.1.2"
|
version "1.1.2"
|
||||||
@ -2636,8 +2630,8 @@ sprintf-js@~1.0.2:
|
|||||||
resolved "https://registry.yarnpkg.com/sprintf-js/-/sprintf-js-1.0.3.tgz#04e6926f662895354f3dd015203633b857297e2c"
|
resolved "https://registry.yarnpkg.com/sprintf-js/-/sprintf-js-1.0.3.tgz#04e6926f662895354f3dd015203633b857297e2c"
|
||||||
|
|
||||||
sshpk@^1.7.0:
|
sshpk@^1.7.0:
|
||||||
version "1.13.0"
|
version "1.13.1"
|
||||||
resolved "https://registry.yarnpkg.com/sshpk/-/sshpk-1.13.0.tgz#ff2a3e4fd04497555fed97b39a0fd82fafb3a33c"
|
resolved "https://registry.yarnpkg.com/sshpk/-/sshpk-1.13.1.tgz#512df6da6287144316dc4c18fe1cf1d940739be3"
|
||||||
dependencies:
|
dependencies:
|
||||||
asn1 "~0.2.3"
|
asn1 "~0.2.3"
|
||||||
assert-plus "^1.0.0"
|
assert-plus "^1.0.0"
|
||||||
@ -2646,7 +2640,6 @@ sshpk@^1.7.0:
|
|||||||
optionalDependencies:
|
optionalDependencies:
|
||||||
bcrypt-pbkdf "^1.0.0"
|
bcrypt-pbkdf "^1.0.0"
|
||||||
ecc-jsbn "~0.1.1"
|
ecc-jsbn "~0.1.1"
|
||||||
jodid25519 "^1.0.0"
|
|
||||||
jsbn "~0.1.0"
|
jsbn "~0.1.0"
|
||||||
tweetnacl "~0.14.0"
|
tweetnacl "~0.14.0"
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user