mirror of
https://github.com/balena-io/balena-cli.git
synced 2024-12-18 13:26:24 +00:00
balena device tunnel
Change-type: patch
This commit is contained in:
parent
ef6d37f073
commit
ed1946ec36
@ -16,11 +16,7 @@
|
||||
*/
|
||||
|
||||
import { Flags, Args, Command } from '@oclif/core';
|
||||
import {
|
||||
NoPortsDefinedError,
|
||||
InvalidPortMappingError,
|
||||
ExpectedError,
|
||||
} from '../../errors';
|
||||
import { InvalidPortMappingError, ExpectedError } from '../../errors';
|
||||
import { getBalenaSdk, stripIndent } from '../../utils/lazy';
|
||||
import { lowercaseIfSlug } from '../../utils/normalization';
|
||||
|
||||
@ -85,6 +81,7 @@ export default class DeviceTunnelCmd extends Command {
|
||||
'port mapping in the format <remotePort>[:[localIP:]localPort]',
|
||||
char: 'p',
|
||||
multiple: true,
|
||||
required: true,
|
||||
}),
|
||||
};
|
||||
|
||||
@ -117,10 +114,6 @@ export default class DeviceTunnelCmd extends Command {
|
||||
}
|
||||
};
|
||||
|
||||
if (options.port === undefined) {
|
||||
throw new NoPortsDefinedError();
|
||||
}
|
||||
|
||||
// Ascertain device uuid
|
||||
const { getOnlineTargetDeviceUuid } = await import('../../utils/patterns');
|
||||
const uuid = await getOnlineTargetDeviceUuid(sdk, params.deviceOrFleet);
|
||||
|
@ -39,12 +39,6 @@ export class InvalidPortMappingError extends ExpectedError {
|
||||
}
|
||||
}
|
||||
|
||||
export class NoPortsDefinedError extends ExpectedError {
|
||||
constructor() {
|
||||
super('No ports have been provided.');
|
||||
}
|
||||
}
|
||||
|
||||
export class SIGINTError extends ExpectedError {}
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user