fix(core): update
This commit is contained in:
parent
52af1d5188
commit
9eb232da39
21614
package-lock.json
generated
21614
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
22
package.json
22
package.json
@ -24,30 +24,30 @@
|
||||
},
|
||||
"homepage": "https://gitlab.com/gitzone/npmci#README",
|
||||
"devDependencies": {
|
||||
"@gitzone/tsbuild": "^2.1.25",
|
||||
"@gitzone/tsrun": "^1.2.12",
|
||||
"@gitzone/tstest": "^1.0.54",
|
||||
"@gitzone/tsbuild": "^2.1.28",
|
||||
"@gitzone/tsrun": "^1.2.18",
|
||||
"@gitzone/tstest": "^1.0.59",
|
||||
"@pushrocks/tapbundle": "^3.2.14",
|
||||
"@types/node": "^15.0.3",
|
||||
"@types/node": "^16.11.1",
|
||||
"tslint": "^6.1.3",
|
||||
"tslint-config-prettier": "^1.18.0"
|
||||
},
|
||||
"dependencies": {
|
||||
"@apiglobal/typedrequest": "^1.0.56",
|
||||
"@pushrocks/lik": "^4.0.20",
|
||||
"@apiglobal/typedrequest": "^1.0.58",
|
||||
"@pushrocks/lik": "^5.0.0",
|
||||
"@pushrocks/npmextra": "^3.0.9",
|
||||
"@pushrocks/projectinfo": "^4.0.5",
|
||||
"@pushrocks/qenv": "^4.0.10",
|
||||
"@pushrocks/smartanalytics": "^2.0.15",
|
||||
"@pushrocks/smartcli": "^3.0.14",
|
||||
"@pushrocks/smartdelay": "^2.0.10",
|
||||
"@pushrocks/smartdelay": "^2.0.13",
|
||||
"@pushrocks/smartfile": "^8.0.10",
|
||||
"@pushrocks/smartlog": "^2.0.39",
|
||||
"@pushrocks/smartlog": "^2.0.44",
|
||||
"@pushrocks/smartlog-destination-local": "^8.0.8",
|
||||
"@pushrocks/smartparam": "^1.1.6",
|
||||
"@pushrocks/smartpromise": "^3.1.5",
|
||||
"@pushrocks/smartrequest": "^1.1.51",
|
||||
"@pushrocks/smartshell": "^2.0.26",
|
||||
"@pushrocks/smartpromise": "^3.1.6",
|
||||
"@pushrocks/smartrequest": "^1.1.52",
|
||||
"@pushrocks/smartshell": "^2.0.28",
|
||||
"@pushrocks/smartsocket": "^1.2.8",
|
||||
"@pushrocks/smartssh": "^1.2.3",
|
||||
"@pushrocks/smartstring": "^3.0.24",
|
||||
|
@ -21,7 +21,7 @@ export class NpmciDockerManager {
|
||||
* handle cli input
|
||||
* @param argvArg
|
||||
*/
|
||||
public handleCli = async (argvArg) => {
|
||||
public handleCli = async (argvArg: any) => {
|
||||
if (argvArg._.length >= 2) {
|
||||
const action: string = argvArg._[1];
|
||||
switch (action) {
|
||||
@ -93,7 +93,7 @@ export class NpmciDockerManager {
|
||||
await plugins.smartparam.forEachMinimatch(
|
||||
process.env,
|
||||
'NPMCI_LOGIN_DOCKER*',
|
||||
async (envString) => {
|
||||
async (envString: string) => {
|
||||
this.npmciRegistryStorage.addRegistry(DockerRegistry.fromEnvString(envString));
|
||||
}
|
||||
);
|
||||
@ -104,7 +104,7 @@ export class NpmciDockerManager {
|
||||
* pushes an image towards a registry
|
||||
* @param argvArg
|
||||
*/
|
||||
public push = async (argvArg) => {
|
||||
public push = async (argvArg: any) => {
|
||||
await this.prepare();
|
||||
let dockerRegistryUrls: string[] = [];
|
||||
|
||||
@ -134,7 +134,7 @@ export class NpmciDockerManager {
|
||||
const dockerfileArray = await Dockerfile.readDockerfiles(this)
|
||||
.then(Dockerfile.sortDockerfiles)
|
||||
.then(Dockerfile.mapDockerfiles);
|
||||
const dockerRegistryToPushTo = this.npmciRegistryStorage.getRegistryByUrl(dockerRegistryUrl);
|
||||
const dockerRegistryToPushTo = await this.npmciRegistryStorage.getRegistryByUrl(dockerRegistryUrl);
|
||||
if (!dockerRegistryToPushTo) {
|
||||
logger.log(
|
||||
'error',
|
||||
@ -151,14 +151,14 @@ export class NpmciDockerManager {
|
||||
/**
|
||||
* pulls an image
|
||||
*/
|
||||
public pull = async (argvArg) => {
|
||||
public pull = async (argvArg: any) => {
|
||||
await this.prepare();
|
||||
const registryUrlArg = argvArg._[2];
|
||||
let suffix = null;
|
||||
if (argvArg._.length >= 4) {
|
||||
suffix = argvArg._[3];
|
||||
}
|
||||
const localDockerRegistry = this.npmciRegistryStorage.getRegistryByUrl(registryUrlArg);
|
||||
const localDockerRegistry = await this.npmciRegistryStorage.getRegistryByUrl(registryUrlArg);
|
||||
const dockerfileArray = await Dockerfile.readDockerfiles(this)
|
||||
.then(Dockerfile.sortDockerfiles)
|
||||
.then(Dockerfile.mapDockerfiles);
|
||||
|
@ -15,7 +15,7 @@ export class RegistryStorage {
|
||||
}
|
||||
|
||||
getRegistryByUrl(registryUrlArg: string) {
|
||||
return this.objectMap.find((registryArg) => {
|
||||
return this.objectMap.findSync((registryArg) => {
|
||||
return registryArg.registryUrl === registryUrlArg;
|
||||
});
|
||||
}
|
||||
|
@ -14,7 +14,7 @@ export class NpmciGitManager {
|
||||
* handle cli input
|
||||
* @param argvArg
|
||||
*/
|
||||
public handleCli = async (argvArg) => {
|
||||
public handleCli = async (argvArg: any) => {
|
||||
if (argvArg._.length >= 2) {
|
||||
const action: string = argvArg._[1];
|
||||
switch (action) {
|
||||
|
@ -16,7 +16,7 @@ export class NpmciNodeJsManager {
|
||||
* handle cli input
|
||||
* @param argvArg
|
||||
*/
|
||||
public async handleCli(argvArg) {
|
||||
public async handleCli(argvArg: any) {
|
||||
if (argvArg._.length >= 3) {
|
||||
const action: string = argvArg._[1];
|
||||
switch (action) {
|
||||
@ -40,15 +40,15 @@ export class NpmciNodeJsManager {
|
||||
* Install a specific version of node
|
||||
* @param versionArg
|
||||
*/
|
||||
public async install(versionArg) {
|
||||
public async install(versionArg: any) {
|
||||
logger.log('info', `now installing node version ${versionArg}`);
|
||||
let version: string;
|
||||
if (versionArg === 'stable') {
|
||||
version = '12';
|
||||
version = '16';
|
||||
} else if (versionArg === 'lts') {
|
||||
version = '10';
|
||||
version = '14';
|
||||
} else if (versionArg === 'legacy') {
|
||||
version = '8';
|
||||
version = '12';
|
||||
} else {
|
||||
version = versionArg;
|
||||
}
|
||||
|
@ -8,7 +8,7 @@ import { Npmci } from '../npmci.classes.npmci';
|
||||
export class NpmciNpmManager {
|
||||
public npmciRef: Npmci;
|
||||
|
||||
constructor(npmciRefArg) {
|
||||
constructor(npmciRefArg: Npmci) {
|
||||
this.npmciRef = npmciRefArg;
|
||||
}
|
||||
|
||||
@ -16,7 +16,7 @@ export class NpmciNpmManager {
|
||||
* handle cli input
|
||||
* @param argvArg
|
||||
*/
|
||||
public async handleCli(argvArg) {
|
||||
public async handleCli(argvArg: any) {
|
||||
if (argvArg._.length >= 2) {
|
||||
const action: string = argvArg._[1];
|
||||
switch (action) {
|
||||
@ -54,7 +54,7 @@ export class NpmciNpmManager {
|
||||
public async prepare() {
|
||||
const config = this.npmciRef.npmciConfig.getConfig();
|
||||
let npmrcFileString: string = '';
|
||||
await plugins.smartparam.forEachMinimatch(process.env, 'NPMCI_TOKEN_NPM*', (npmEnvArg) => {
|
||||
await plugins.smartparam.forEachMinimatch(process.env, 'NPMCI_TOKEN_NPM*', (npmEnvArg: string) => {
|
||||
const npmRegistryUrl = npmEnvArg.split('|')[0];
|
||||
let npmToken = npmEnvArg.split('|')[1];
|
||||
if (npmEnvArg.split('|')[2] && npmEnvArg.split('|')[2] === 'plain') {
|
||||
@ -95,7 +95,7 @@ export class NpmciNpmManager {
|
||||
let publishVerdaccioAsWell = false;
|
||||
const config = this.npmciRef.npmciConfig.getConfig();
|
||||
const availableRegistries: string[] = [];
|
||||
await plugins.smartparam.forEachMinimatch(process.env, 'NPMCI_TOKEN_NPM*', (npmEnvArg) => {
|
||||
await plugins.smartparam.forEachMinimatch(process.env, 'NPMCI_TOKEN_NPM*', (npmEnvArg: string) => {
|
||||
availableRegistries.push(npmEnvArg.split('|')[0]);
|
||||
});
|
||||
|
||||
|
@ -2,7 +2,7 @@ import { logger } from '../npmci.logging';
|
||||
import * as plugins from './mod.plugins';
|
||||
let sshInstance: plugins.smartssh.SshInstance;
|
||||
|
||||
export let handleCli = async (argvArg) => {
|
||||
export let handleCli = async (argvArg: any) => {
|
||||
if (argvArg._.length >= 2) {
|
||||
const action: string = argvArg._[1];
|
||||
switch (action) {
|
||||
|
Loading…
Reference in New Issue
Block a user