balena device tunnel

Change-type: patch
This commit is contained in:
myarmolinsky 2024-11-05 08:04:38 -05:00
parent ef6d37f073
commit ed1946ec36
2 changed files with 2 additions and 15 deletions

View File

@ -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);

View File

@ -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 {}
/**