balena-cli 17.4.1 → 17.4.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +4 -0
- package/build/commands/{build.d.ts → build/index.d.ts} +4 -4
- package/build/commands/{build.js → build/index.js} +13 -13
- package/build/commands/build/index.js.map +1 -0
- package/build/commands/{deploy.d.ts → deploy/index.d.ts} +4 -4
- package/build/commands/{deploy.js → deploy/index.js} +14 -14
- package/build/commands/deploy/index.js.map +1 -0
- package/build/commands/{envs.d.ts → envs/index.d.ts} +1 -1
- package/build/commands/{envs.js → envs/index.js} +9 -9
- package/build/commands/envs/index.js.map +1 -0
- package/build/commands/{fleets.d.ts → fleets/index.d.ts} +1 -1
- package/build/commands/{fleets.js → fleets/index.js} +4 -4
- package/build/commands/fleets/index.js.map +1 -0
- package/build/commands/{join.d.ts → join/index.d.ts} +1 -1
- package/build/commands/{join.js → join/index.js} +7 -7
- package/build/commands/join/index.js.map +1 -0
- package/build/commands/{keys.d.ts → keys/index.d.ts} +1 -1
- package/build/commands/{keys.js → keys/index.js} +4 -4
- package/build/commands/keys/index.js.map +1 -0
- package/build/commands/{leave.d.ts → leave/index.d.ts} +1 -1
- package/build/commands/{leave.js → leave/index.js} +6 -6
- package/build/commands/leave/index.js.map +1 -0
- package/build/commands/{login.d.ts → login/index.d.ts} +1 -1
- package/build/commands/{login.js → login/index.js} +9 -9
- package/build/commands/login/index.js.map +1 -0
- package/build/commands/{logout.d.ts → logout/index.d.ts} +1 -1
- package/build/commands/{logout.js → logout/index.js} +3 -3
- package/build/commands/logout/index.js.map +1 -0
- package/build/commands/{logs.d.ts → logs/index.d.ts} +1 -1
- package/build/commands/{logs.js → logs/index.js} +10 -10
- package/build/commands/logs/index.js.map +1 -0
- package/build/commands/{note.d.ts → notes/index.d.ts} +1 -1
- package/build/commands/{note.js → notes/index.js} +5 -5
- package/build/commands/notes/index.js.map +1 -0
- package/build/commands/{orgs.d.ts → orgs/index.d.ts} +1 -1
- package/build/commands/{orgs.js → orgs/index.js} +5 -5
- package/build/commands/orgs/index.js.map +1 -0
- package/build/commands/{preload.d.ts → preload/index.d.ts} +1 -1
- package/build/commands/{preload.js → preload/index.js} +12 -12
- package/build/commands/preload/index.js.map +1 -0
- package/build/commands/{push.d.ts → push/index.d.ts} +1 -1
- package/build/commands/{push.js → push/index.js} +14 -14
- package/build/commands/push/index.js.map +1 -0
- package/build/commands/{releases.d.ts → releases/index.d.ts} +1 -1
- package/build/commands/{releases.js → releases/index.js} +7 -7
- package/build/commands/releases/index.js.map +1 -0
- package/build/commands/{scan.d.ts → scan/index.d.ts} +1 -1
- package/build/commands/{scan.js → scan/index.js} +6 -6
- package/build/commands/scan/index.js.map +1 -0
- package/build/commands/{settings.d.ts → settings/index.d.ts} +1 -1
- package/build/commands/{settings.js → settings/index.js} +4 -4
- package/build/commands/settings/index.js.map +1 -0
- package/build/commands/{ssh.d.ts → ssh/index.d.ts} +1 -1
- package/build/commands/{ssh.js → ssh/index.js} +11 -11
- package/build/commands/ssh/index.js.map +1 -0
- package/build/commands/{support.d.ts → support/index.d.ts} +1 -1
- package/build/commands/{support.js → support/index.js} +7 -7
- package/build/commands/support/index.js.map +1 -0
- package/build/commands/{tags.d.ts → tags/index.d.ts} +1 -1
- package/build/commands/{tags.js → tags/index.js} +8 -8
- package/build/commands/tags/index.js.map +1 -0
- package/build/commands/{tunnel.d.ts → tunnel/index.d.ts} +1 -1
- package/build/commands/{tunnel.js → tunnel/index.js} +8 -8
- package/build/commands/tunnel/index.js.map +1 -0
- package/build/commands/{version.d.ts → version/index.d.ts} +1 -1
- package/build/commands/{version.js → version/index.js} +4 -4
- package/build/commands/version/index.js.map +1 -0
- package/build/commands/{whoami.d.ts → whoami/index.d.ts} +1 -1
- package/build/commands/{whoami.js → whoami/index.js} +3 -3
- package/build/commands/whoami/index.js.map +1 -0
- package/lib/commands/{build.ts → build/index.ts} +15 -15
- package/lib/commands/{deploy.ts → deploy/index.ts} +16 -16
- package/lib/commands/{envs.ts → envs/index.ts} +12 -8
- package/lib/commands/{fleets.ts → fleets/index.ts} +3 -3
- package/lib/commands/{join.ts → join/index.ts} +6 -6
- package/lib/commands/{keys.ts → keys/index.ts} +3 -3
- package/lib/commands/{leave.ts → leave/index.ts} +5 -5
- package/lib/commands/{login.ts → login/index.ts} +8 -8
- package/lib/commands/{logout.ts → logout/index.ts} +2 -2
- package/lib/commands/{logs.ts → logs/index.ts} +9 -9
- package/lib/commands/{note.ts → notes/index.ts} +4 -4
- package/lib/commands/{orgs.ts → orgs/index.ts} +4 -4
- package/lib/commands/{preload.ts → preload/index.ts} +13 -11
- package/lib/commands/{push.ts → push/index.ts} +15 -13
- package/lib/commands/{releases.ts → releases/index.ts} +6 -6
- package/lib/commands/{scan.ts → scan/index.ts} +7 -5
- package/lib/commands/{settings.ts → settings/index.ts} +3 -3
- package/lib/commands/{ssh.ts → ssh/index.ts} +15 -10
- package/lib/commands/{support.ts → support/index.ts} +6 -6
- package/lib/commands/{tags.ts → tags/index.ts} +7 -7
- package/lib/commands/{tunnel.ts → tunnel/index.ts} +9 -7
- package/lib/commands/{version.ts → version/index.ts} +3 -3
- package/lib/commands/{whoami.ts → whoami/index.ts} +2 -2
- package/npm-shrinkwrap.json +2 -2
- package/oclif.manifest.json +2496 -2496
- package/package.json +2 -2
- package/build/commands/build.js.map +0 -1
- package/build/commands/deploy.js.map +0 -1
- package/build/commands/envs.js.map +0 -1
- package/build/commands/fleets.js.map +0 -1
- package/build/commands/join.js.map +0 -1
- package/build/commands/keys.js.map +0 -1
- package/build/commands/leave.js.map +0 -1
- package/build/commands/login.js.map +0 -1
- package/build/commands/logout.js.map +0 -1
- package/build/commands/logs.js.map +0 -1
- package/build/commands/note.js.map +0 -1
- package/build/commands/orgs.js.map +0 -1
- package/build/commands/preload.js.map +0 -1
- package/build/commands/push.js.map +0 -1
- package/build/commands/releases.js.map +0 -1
- package/build/commands/scan.js.map +0 -1
- package/build/commands/settings.js.map +0 -1
- package/build/commands/ssh.js.map +0 -1
- package/build/commands/support.js.map +0 -1
- package/build/commands/tags.js.map +0 -1
- package/build/commands/tunnel.js.map +0 -1
- package/build/commands/version.js.map +0 -1
- package/build/commands/whoami.js.map +0 -1
|
@@ -17,18 +17,18 @@
|
|
|
17
17
|
|
|
18
18
|
import { Flags, Args } from '@oclif/core';
|
|
19
19
|
import type { Interfaces } from '@oclif/core';
|
|
20
|
-
import Command from '
|
|
21
|
-
import * as cf from '
|
|
22
|
-
import { getBalenaSdk, stripIndent } from '
|
|
23
|
-
import { dockerignoreHelp, registrySecretsHelp } from '
|
|
20
|
+
import Command from '../../command';
|
|
21
|
+
import * as cf from '../../utils/common-flags';
|
|
22
|
+
import { getBalenaSdk, stripIndent } from '../../utils/lazy';
|
|
23
|
+
import { dockerignoreHelp, registrySecretsHelp } from '../../utils/messages';
|
|
24
24
|
import type { BalenaSDK } from 'balena-sdk';
|
|
25
|
-
import { ExpectedError, instanceOf } from '
|
|
25
|
+
import { ExpectedError, instanceOf } from '../../errors';
|
|
26
26
|
import { RegistrySecrets } from '@balena/compose/dist/multibuild';
|
|
27
|
-
import { lowercaseIfSlug } from '
|
|
27
|
+
import { lowercaseIfSlug } from '../../utils/normalization';
|
|
28
28
|
import {
|
|
29
29
|
applyReleaseTagKeysAndValues,
|
|
30
30
|
parseReleaseTagKeysAndValues,
|
|
31
|
-
} from '
|
|
31
|
+
} from '../../utils/compose_ts';
|
|
32
32
|
|
|
33
33
|
enum BuildTarget {
|
|
34
34
|
Cloud,
|
|
@@ -233,7 +233,7 @@ export default class PushCmd extends Command {
|
|
|
233
233
|
logger.logDebug(`Using build source directory: ${options.source} `);
|
|
234
234
|
|
|
235
235
|
const sdk = getBalenaSdk();
|
|
236
|
-
const { validateProjectDirectory } = await import('
|
|
236
|
+
const { validateProjectDirectory } = await import('../../utils/compose_ts');
|
|
237
237
|
const { dockerfilePath, registrySecrets } = await validateProjectDirectory(
|
|
238
238
|
sdk,
|
|
239
239
|
{
|
|
@@ -276,8 +276,8 @@ export default class PushCmd extends Command {
|
|
|
276
276
|
dockerfilePath: string,
|
|
277
277
|
registrySecrets: RegistrySecrets,
|
|
278
278
|
) {
|
|
279
|
-
const remote = await import('
|
|
280
|
-
const { getApplication } = await import('
|
|
279
|
+
const remote = await import('../../utils/remote-build');
|
|
280
|
+
const { getApplication } = await import('../../utils/sdk');
|
|
281
281
|
|
|
282
282
|
// Check for invalid options
|
|
283
283
|
const localOnlyOptions: Array<keyof FlagsDef> = [
|
|
@@ -356,7 +356,7 @@ export default class PushCmd extends Command {
|
|
|
356
356
|
'is only valid when pushing to a fleet',
|
|
357
357
|
);
|
|
358
358
|
|
|
359
|
-
const deviceDeploy = await import('
|
|
359
|
+
const deviceDeploy = await import('../../utils/device/deploy');
|
|
360
360
|
|
|
361
361
|
try {
|
|
362
362
|
await deviceDeploy.deployToDevice({
|
|
@@ -376,7 +376,7 @@ export default class PushCmd extends Command {
|
|
|
376
376
|
convertEol: !options['noconvert-eol'],
|
|
377
377
|
});
|
|
378
378
|
} catch (e) {
|
|
379
|
-
const { BuildError } = await import('
|
|
379
|
+
const { BuildError } = await import('../../utils/device/errors');
|
|
380
380
|
if (instanceOf(e, BuildError)) {
|
|
381
381
|
throw new ExpectedError(e.toString());
|
|
382
382
|
} else {
|
|
@@ -386,7 +386,9 @@ export default class PushCmd extends Command {
|
|
|
386
386
|
}
|
|
387
387
|
|
|
388
388
|
protected async getBuildTarget(appOrDevice: string): Promise<BuildTarget> {
|
|
389
|
-
const { validateLocalHostnameOrIp } = await import(
|
|
389
|
+
const { validateLocalHostnameOrIp } = await import(
|
|
390
|
+
'../../utils/validation'
|
|
391
|
+
);
|
|
390
392
|
|
|
391
393
|
return validateLocalHostnameOrIp(appOrDevice)
|
|
392
394
|
? BuildTarget.Device
|
|
@@ -16,12 +16,12 @@
|
|
|
16
16
|
*/
|
|
17
17
|
|
|
18
18
|
import { Args } from '@oclif/core';
|
|
19
|
-
import Command from '
|
|
20
|
-
import * as cf from '
|
|
21
|
-
import { getBalenaSdk, getVisuals, stripIndent } from '
|
|
22
|
-
import { applicationNameNote } from '
|
|
19
|
+
import Command from '../../command';
|
|
20
|
+
import * as cf from '../../utils/common-flags';
|
|
21
|
+
import { getBalenaSdk, getVisuals, stripIndent } from '../../utils/lazy';
|
|
22
|
+
import { applicationNameNote } from '../../utils/messages';
|
|
23
23
|
import type * as BalenaSdk from 'balena-sdk';
|
|
24
|
-
import { jsonInfo } from '
|
|
24
|
+
import { jsonInfo } from '../../utils/messages';
|
|
25
25
|
|
|
26
26
|
export default class ReleasesCmd extends Command {
|
|
27
27
|
public static description = stripIndent`
|
|
@@ -67,7 +67,7 @@ export default class ReleasesCmd extends Command {
|
|
|
67
67
|
];
|
|
68
68
|
|
|
69
69
|
const balena = getBalenaSdk();
|
|
70
|
-
const { getFleetSlug } = await import('
|
|
70
|
+
const { getFleetSlug } = await import('../../utils/sdk');
|
|
71
71
|
|
|
72
72
|
const releases = await balena.models.release.getAllByApplication(
|
|
73
73
|
await getFleetSlug(balena, params.fleet),
|
|
@@ -16,9 +16,9 @@
|
|
|
16
16
|
*/
|
|
17
17
|
|
|
18
18
|
import { Flags } from '@oclif/core';
|
|
19
|
-
import Command from '
|
|
20
|
-
import * as cf from '
|
|
21
|
-
import { getCliUx, stripIndent } from '
|
|
19
|
+
import Command from '../../command';
|
|
20
|
+
import * as cf from '../../utils/common-flags';
|
|
21
|
+
import { getCliUx, stripIndent } from '../../utils/lazy';
|
|
22
22
|
|
|
23
23
|
export default class ScanCmd extends Command {
|
|
24
24
|
public static description = stripIndent`
|
|
@@ -64,9 +64,11 @@ export default class ScanCmd extends Command {
|
|
|
64
64
|
|
|
65
65
|
public async run() {
|
|
66
66
|
const _ = await import('lodash');
|
|
67
|
-
const { discoverLocalBalenaOsDevices } = await import(
|
|
67
|
+
const { discoverLocalBalenaOsDevices } = await import(
|
|
68
|
+
'../../utils/discover'
|
|
69
|
+
);
|
|
68
70
|
const prettyjson = await import('prettyjson');
|
|
69
|
-
const dockerUtils = await import('
|
|
71
|
+
const dockerUtils = await import('../../utils/docker');
|
|
70
72
|
|
|
71
73
|
const dockerPort = 2375;
|
|
72
74
|
const dockerTimeout = 2000;
|
|
@@ -15,9 +15,9 @@
|
|
|
15
15
|
* limitations under the License.
|
|
16
16
|
*/
|
|
17
17
|
|
|
18
|
-
import Command from '
|
|
19
|
-
import * as cf from '
|
|
20
|
-
import { getBalenaSdk, stripIndent } from '
|
|
18
|
+
import Command from '../../command';
|
|
19
|
+
import * as cf from '../../utils/common-flags';
|
|
20
|
+
import { getBalenaSdk, stripIndent } from '../../utils/lazy';
|
|
21
21
|
|
|
22
22
|
export default class SettingsCmd extends Command {
|
|
23
23
|
public static description = stripIndent`
|
|
@@ -16,10 +16,13 @@
|
|
|
16
16
|
*/
|
|
17
17
|
|
|
18
18
|
import { Flags, Args } from '@oclif/core';
|
|
19
|
-
import Command from '
|
|
20
|
-
import * as cf from '
|
|
21
|
-
import { getBalenaSdk, stripIndent } from '
|
|
22
|
-
import {
|
|
19
|
+
import Command from '../../command';
|
|
20
|
+
import * as cf from '../../utils/common-flags';
|
|
21
|
+
import { getBalenaSdk, stripIndent } from '../../utils/lazy';
|
|
22
|
+
import {
|
|
23
|
+
parseAsInteger,
|
|
24
|
+
validateLocalHostnameOrIp,
|
|
25
|
+
} from '../../utils/validation';
|
|
23
26
|
|
|
24
27
|
export default class SshCmd extends Command {
|
|
25
28
|
public static description = stripIndent`
|
|
@@ -108,7 +111,7 @@ export default class SshCmd extends Command {
|
|
|
108
111
|
|
|
109
112
|
// Local connection
|
|
110
113
|
if (validateLocalHostnameOrIp(params.fleetOrDevice)) {
|
|
111
|
-
const { performLocalDeviceSSH } = await import('
|
|
114
|
+
const { performLocalDeviceSSH } = await import('../../utils/device/ssh');
|
|
112
115
|
return await performLocalDeviceSSH({
|
|
113
116
|
hostname: params.fleetOrDevice,
|
|
114
117
|
port: options.port || 'local',
|
|
@@ -119,8 +122,8 @@ export default class SshCmd extends Command {
|
|
|
119
122
|
}
|
|
120
123
|
|
|
121
124
|
// Remote connection
|
|
122
|
-
const { getProxyConfig } = await import('
|
|
123
|
-
const { getOnlineTargetDeviceUuid } = await import('
|
|
125
|
+
const { getProxyConfig } = await import('../../utils/helpers');
|
|
126
|
+
const { getOnlineTargetDeviceUuid } = await import('../../utils/patterns');
|
|
124
127
|
const sdk = getBalenaSdk();
|
|
125
128
|
|
|
126
129
|
const proxyConfig = getProxyConfig();
|
|
@@ -134,7 +137,7 @@ export default class SshCmd extends Command {
|
|
|
134
137
|
params.fleetOrDevice,
|
|
135
138
|
);
|
|
136
139
|
|
|
137
|
-
const { which } = await import('
|
|
140
|
+
const { which } = await import('../../utils/which');
|
|
138
141
|
|
|
139
142
|
const [whichProxytunnel, { username }, proxyUrl] = await Promise.all([
|
|
140
143
|
useProxy ? which('proxytunnel', false) : undefined,
|
|
@@ -185,7 +188,9 @@ export default class SshCmd extends Command {
|
|
|
185
188
|
// that we know exists and is accessible
|
|
186
189
|
let containerId: string | undefined;
|
|
187
190
|
if (params.service != null) {
|
|
188
|
-
const { getContainerIdForService } = await import(
|
|
191
|
+
const { getContainerIdForService } = await import(
|
|
192
|
+
'../../utils/device/ssh'
|
|
193
|
+
);
|
|
189
194
|
containerId = await getContainerIdForService({
|
|
190
195
|
deviceUuid,
|
|
191
196
|
hostname: `ssh.${proxyUrl}`,
|
|
@@ -202,7 +207,7 @@ export default class SshCmd extends Command {
|
|
|
202
207
|
} else {
|
|
203
208
|
accessCommand = `host ${deviceUuid}`;
|
|
204
209
|
}
|
|
205
|
-
const { runRemoteCommand } = await import('
|
|
210
|
+
const { runRemoteCommand } = await import('../../utils/ssh');
|
|
206
211
|
await runRemoteCommand({
|
|
207
212
|
cmd: accessCommand,
|
|
208
213
|
hostname: `ssh.${proxyUrl}`,
|
|
@@ -16,11 +16,11 @@
|
|
|
16
16
|
*/
|
|
17
17
|
|
|
18
18
|
import { Flags, Args } from '@oclif/core';
|
|
19
|
-
import Command from '
|
|
20
|
-
import { ExpectedError } from '
|
|
21
|
-
import * as cf from '
|
|
22
|
-
import { getBalenaSdk, getCliUx, stripIndent } from '
|
|
23
|
-
import { applicationIdInfo } from '
|
|
19
|
+
import Command from '../../command';
|
|
20
|
+
import { ExpectedError } from '../../errors';
|
|
21
|
+
import * as cf from '../../utils/common-flags';
|
|
22
|
+
import { getBalenaSdk, getCliUx, stripIndent } from '../../utils/lazy';
|
|
23
|
+
import { applicationIdInfo } from '../../utils/messages';
|
|
24
24
|
|
|
25
25
|
export default class SupportCmd extends Command {
|
|
26
26
|
public static description = stripIndent`
|
|
@@ -116,7 +116,7 @@ export default class SupportCmd extends Command {
|
|
|
116
116
|
ux.action.stop();
|
|
117
117
|
}
|
|
118
118
|
|
|
119
|
-
const { getFleetSlug } = await import('
|
|
119
|
+
const { getFleetSlug } = await import('../../utils/sdk');
|
|
120
120
|
|
|
121
121
|
// Process applications
|
|
122
122
|
for (const appName of appNames) {
|
|
@@ -15,11 +15,11 @@
|
|
|
15
15
|
* limitations under the License.
|
|
16
16
|
*/
|
|
17
17
|
|
|
18
|
-
import Command from '
|
|
19
|
-
import { ExpectedError } from '
|
|
20
|
-
import * as cf from '
|
|
21
|
-
import { getBalenaSdk, getVisuals, stripIndent } from '
|
|
22
|
-
import { applicationIdInfo } from '
|
|
18
|
+
import Command from '../../command';
|
|
19
|
+
import { ExpectedError } from '../../errors';
|
|
20
|
+
import * as cf from '../../utils/common-flags';
|
|
21
|
+
import { getBalenaSdk, getVisuals, stripIndent } from '../../utils/lazy';
|
|
22
|
+
import { applicationIdInfo } from '../../utils/messages';
|
|
23
23
|
|
|
24
24
|
export default class TagsCmd extends Command {
|
|
25
25
|
public static description = stripIndent`
|
|
@@ -71,7 +71,7 @@ export default class TagsCmd extends Command {
|
|
|
71
71
|
let tags;
|
|
72
72
|
|
|
73
73
|
if (options.fleet) {
|
|
74
|
-
const { getFleetSlug } = await import('
|
|
74
|
+
const { getFleetSlug } = await import('../../utils/sdk');
|
|
75
75
|
tags = await balena.models.application.tags.getAllByApplication(
|
|
76
76
|
await getFleetSlug(balena, options.fleet),
|
|
77
77
|
);
|
|
@@ -81,7 +81,7 @@ export default class TagsCmd extends Command {
|
|
|
81
81
|
}
|
|
82
82
|
if (options.release) {
|
|
83
83
|
const { disambiguateReleaseParam } = await import(
|
|
84
|
-
'
|
|
84
|
+
'../../utils/normalization'
|
|
85
85
|
);
|
|
86
86
|
const releaseParam = await disambiguateReleaseParam(
|
|
87
87
|
balena,
|
|
@@ -16,15 +16,15 @@
|
|
|
16
16
|
*/
|
|
17
17
|
|
|
18
18
|
import { Flags, Args } from '@oclif/core';
|
|
19
|
-
import Command from '
|
|
19
|
+
import Command from '../../command';
|
|
20
20
|
import {
|
|
21
21
|
NoPortsDefinedError,
|
|
22
22
|
InvalidPortMappingError,
|
|
23
23
|
ExpectedError,
|
|
24
|
-
} from '
|
|
25
|
-
import * as cf from '
|
|
26
|
-
import { getBalenaSdk, stripIndent } from '
|
|
27
|
-
import { lowercaseIfSlug } from '
|
|
24
|
+
} from '../../errors';
|
|
25
|
+
import * as cf from '../../utils/common-flags';
|
|
26
|
+
import { getBalenaSdk, stripIndent } from '../../utils/lazy';
|
|
27
|
+
import { lowercaseIfSlug } from '../../utils/normalization';
|
|
28
28
|
|
|
29
29
|
import type { Server, Socket } from 'net';
|
|
30
30
|
|
|
@@ -122,7 +122,7 @@ export default class TunnelCmd extends Command {
|
|
|
122
122
|
}
|
|
123
123
|
|
|
124
124
|
// Ascertain device uuid
|
|
125
|
-
const { getOnlineTargetDeviceUuid } = await import('
|
|
125
|
+
const { getOnlineTargetDeviceUuid } = await import('../../utils/patterns');
|
|
126
126
|
const uuid = await getOnlineTargetDeviceUuid(sdk, params.deviceOrFleet);
|
|
127
127
|
logger.logInfo(`Opening a tunnel to ${uuid}...`);
|
|
128
128
|
|
|
@@ -133,7 +133,9 @@ export default class TunnelCmd extends Command {
|
|
|
133
133
|
})
|
|
134
134
|
.map(async ({ localPort, localAddress, remotePort }) => {
|
|
135
135
|
try {
|
|
136
|
-
const { tunnelConnectionToDevice } = await import(
|
|
136
|
+
const { tunnelConnectionToDevice } = await import(
|
|
137
|
+
'../../utils/tunnel'
|
|
138
|
+
);
|
|
137
139
|
const handler = await tunnelConnectionToDevice(uuid, remotePort, sdk);
|
|
138
140
|
|
|
139
141
|
const { createServer } = await import('net');
|
|
@@ -16,8 +16,8 @@
|
|
|
16
16
|
*/
|
|
17
17
|
|
|
18
18
|
import { Flags } from '@oclif/core';
|
|
19
|
-
import Command from '
|
|
20
|
-
import { stripIndent } from '
|
|
19
|
+
import Command from '../../command';
|
|
20
|
+
import { stripIndent } from '../../utils/lazy';
|
|
21
21
|
|
|
22
22
|
export interface JsonVersions {
|
|
23
23
|
'balena-cli': string;
|
|
@@ -72,7 +72,7 @@ export default class VersionCmd extends Command {
|
|
|
72
72
|
public async run() {
|
|
73
73
|
const { flags: options } = await this.parse(VersionCmd);
|
|
74
74
|
const versions: JsonVersions = {
|
|
75
|
-
'balena-cli': (await import('
|
|
75
|
+
'balena-cli': (await import('../../../package.json')).version,
|
|
76
76
|
'Node.js':
|
|
77
77
|
process.version && process.version.startsWith('v')
|
|
78
78
|
? process.version.slice(1)
|
|
@@ -15,8 +15,8 @@
|
|
|
15
15
|
* limitations under the License.
|
|
16
16
|
*/
|
|
17
17
|
|
|
18
|
-
import Command from '
|
|
19
|
-
import { getBalenaSdk, getVisuals, stripIndent } from '
|
|
18
|
+
import Command from '../../command';
|
|
19
|
+
import { getBalenaSdk, getVisuals, stripIndent } from '../../utils/lazy';
|
|
20
20
|
|
|
21
21
|
export default class WhoamiCmd extends Command {
|
|
22
22
|
public static description = stripIndent`
|
package/npm-shrinkwrap.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "balena-cli",
|
|
3
|
-
"version": "17.4.
|
|
3
|
+
"version": "17.4.2",
|
|
4
4
|
"lockfileVersion": 2,
|
|
5
5
|
"requires": true,
|
|
6
6
|
"packages": {
|
|
7
7
|
"": {
|
|
8
8
|
"name": "balena-cli",
|
|
9
|
-
"version": "17.4.
|
|
9
|
+
"version": "17.4.2",
|
|
10
10
|
"hasInstallScript": true,
|
|
11
11
|
"license": "Apache-2.0",
|
|
12
12
|
"dependencies": {
|