balena-cli 19.1.1 → 19.1.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 +5 -0
- package/build/app.js +1 -1
- package/build/app.js.map +1 -1
- package/build/commands/api-key/generate.d.ts +1 -1
- package/build/commands/api-key/generate.js +1 -2
- package/build/commands/api-key/generate.js.map +1 -1
- package/build/commands/api-key/revoke.d.ts +1 -1
- package/build/commands/api-key/revoke.js +1 -2
- package/build/commands/api-key/revoke.js.map +1 -1
- package/build/commands/api-keys/index.d.ts +1 -1
- package/build/commands/api-keys/index.js +1 -2
- package/build/commands/api-keys/index.js.map +1 -1
- package/build/commands/app/create.d.ts +1 -1
- package/build/commands/app/create.js +1 -2
- package/build/commands/app/create.js.map +1 -1
- package/build/commands/block/create.d.ts +1 -1
- package/build/commands/block/create.js +1 -2
- package/build/commands/block/create.js.map +1 -1
- package/build/commands/build/index.d.ts +1 -1
- package/build/commands/build/index.js +5 -4
- package/build/commands/build/index.js.map +1 -1
- package/build/commands/config/generate.d.ts +1 -1
- package/build/commands/config/generate.js +1 -2
- package/build/commands/config/generate.js.map +1 -1
- package/build/commands/config/inject.d.ts +1 -1
- package/build/commands/config/inject.js +1 -2
- package/build/commands/config/inject.js.map +1 -1
- package/build/commands/config/read.d.ts +1 -1
- package/build/commands/config/read.js +2 -2
- package/build/commands/config/read.js.map +1 -1
- package/build/commands/config/reconfigure.d.ts +1 -1
- package/build/commands/config/reconfigure.js +1 -2
- package/build/commands/config/reconfigure.js.map +1 -1
- package/build/commands/config/write.d.ts +1 -1
- package/build/commands/config/write.js +1 -2
- package/build/commands/config/write.js.map +1 -1
- package/build/commands/deploy/index.d.ts +1 -1
- package/build/commands/deploy/index.js +3 -3
- package/build/commands/deploy/index.js.map +1 -1
- package/build/commands/device/deactivate.d.ts +1 -1
- package/build/commands/device/deactivate.js +1 -2
- package/build/commands/device/deactivate.js.map +1 -1
- package/build/commands/device/identify.d.ts +1 -1
- package/build/commands/device/identify.js +1 -2
- package/build/commands/device/identify.js.map +1 -1
- package/build/commands/device/index.d.ts +1 -1
- package/build/commands/device/index.js +1 -2
- package/build/commands/device/index.js.map +1 -1
- package/build/commands/device/init.d.ts +1 -1
- package/build/commands/device/init.js +3 -3
- package/build/commands/device/init.js.map +1 -1
- package/build/commands/device/list.d.ts +1 -1
- package/build/commands/device/list.js +2 -2
- package/build/commands/device/list.js.map +1 -1
- package/build/commands/device/local-mode.d.ts +1 -1
- package/build/commands/device/local-mode.js +1 -2
- package/build/commands/device/local-mode.js.map +1 -1
- package/build/commands/device/move.d.ts +1 -1
- package/build/commands/device/move.js +1 -2
- package/build/commands/device/move.js.map +1 -1
- package/build/commands/device/os-update.d.ts +1 -1
- package/build/commands/device/os-update.js +1 -2
- package/build/commands/device/os-update.js.map +1 -1
- package/build/commands/device/pin.d.ts +1 -1
- package/build/commands/device/pin.js +1 -2
- package/build/commands/device/pin.js.map +1 -1
- package/build/commands/device/public-url.d.ts +1 -1
- package/build/commands/device/public-url.js +1 -2
- package/build/commands/device/public-url.js.map +1 -1
- package/build/commands/device/purge.d.ts +1 -1
- package/build/commands/device/purge.js +1 -2
- package/build/commands/device/purge.js.map +1 -1
- package/build/commands/device/reboot.d.ts +1 -1
- package/build/commands/device/reboot.js +1 -2
- package/build/commands/device/reboot.js.map +1 -1
- package/build/commands/device/register.d.ts +1 -1
- package/build/commands/device/register.js +1 -2
- package/build/commands/device/register.js.map +1 -1
- package/build/commands/device/rename.d.ts +1 -1
- package/build/commands/device/rename.js +1 -2
- package/build/commands/device/rename.js.map +1 -1
- package/build/commands/device/restart.d.ts +1 -1
- package/build/commands/device/restart.js +1 -2
- package/build/commands/device/restart.js.map +1 -1
- package/build/commands/device/rm.d.ts +1 -1
- package/build/commands/device/rm.js +1 -2
- package/build/commands/device/rm.js.map +1 -1
- package/build/commands/device/shutdown.d.ts +1 -1
- package/build/commands/device/shutdown.js +1 -2
- package/build/commands/device/shutdown.js.map +1 -1
- package/build/commands/device/start-service.d.ts +1 -1
- package/build/commands/device/start-service.js +1 -2
- package/build/commands/device/start-service.js.map +1 -1
- package/build/commands/device/stop-service.d.ts +1 -1
- package/build/commands/device/stop-service.js +1 -2
- package/build/commands/device/stop-service.js.map +1 -1
- package/build/commands/device/track-fleet.d.ts +1 -1
- package/build/commands/device/track-fleet.js +1 -2
- package/build/commands/device/track-fleet.js.map +1 -1
- package/build/commands/devices/supported.d.ts +1 -1
- package/build/commands/devices/supported.js +1 -2
- package/build/commands/devices/supported.js.map +1 -1
- package/build/commands/env/add.d.ts +1 -1
- package/build/commands/env/add.js +3 -3
- package/build/commands/env/add.js.map +1 -1
- package/build/commands/env/rename.d.ts +1 -1
- package/build/commands/env/rename.js +3 -3
- package/build/commands/env/rename.js.map +1 -1
- package/build/commands/env/rm.d.ts +1 -1
- package/build/commands/env/rm.js +3 -3
- package/build/commands/env/rm.js.map +1 -1
- package/build/commands/envs/index.d.ts +1 -1
- package/build/commands/envs/index.js +3 -3
- package/build/commands/envs/index.js.map +1 -1
- package/build/commands/fleet/create.d.ts +1 -1
- package/build/commands/fleet/create.js +1 -2
- package/build/commands/fleet/create.js.map +1 -1
- package/build/commands/fleet/index.d.ts +1 -1
- package/build/commands/fleet/index.js +1 -2
- package/build/commands/fleet/index.js.map +1 -1
- package/build/commands/fleet/pin.d.ts +1 -1
- package/build/commands/fleet/pin.js +1 -2
- package/build/commands/fleet/pin.js.map +1 -1
- package/build/commands/fleet/purge.d.ts +1 -1
- package/build/commands/fleet/purge.js +2 -2
- package/build/commands/fleet/purge.js.map +1 -1
- package/build/commands/fleet/rename.d.ts +1 -1
- package/build/commands/fleet/rename.js +1 -2
- package/build/commands/fleet/rename.js.map +1 -1
- package/build/commands/fleet/restart.d.ts +1 -1
- package/build/commands/fleet/restart.js +2 -2
- package/build/commands/fleet/restart.js.map +1 -1
- package/build/commands/fleet/rm.d.ts +1 -1
- package/build/commands/fleet/rm.js +2 -2
- package/build/commands/fleet/rm.js.map +1 -1
- package/build/commands/fleet/track-latest.d.ts +1 -1
- package/build/commands/fleet/track-latest.js +1 -2
- package/build/commands/fleet/track-latest.js.map +1 -1
- package/build/commands/fleets/index.d.ts +1 -1
- package/build/commands/fleets/index.js +2 -2
- package/build/commands/fleets/index.js.map +1 -1
- package/build/commands/internal/osinit.d.ts +1 -1
- package/build/commands/internal/osinit.js +1 -2
- package/build/commands/internal/osinit.js.map +1 -1
- package/build/commands/join/index.d.ts +1 -1
- package/build/commands/join/index.js +3 -3
- package/build/commands/join/index.js.map +1 -1
- package/build/commands/key/add.d.ts +1 -2
- package/build/commands/key/add.js +1 -6
- package/build/commands/key/add.js.map +1 -1
- package/build/commands/key/index.d.ts +1 -1
- package/build/commands/key/index.js +1 -2
- package/build/commands/key/index.js.map +1 -1
- package/build/commands/key/rm.d.ts +1 -1
- package/build/commands/key/rm.js +1 -2
- package/build/commands/key/rm.js.map +1 -1
- package/build/commands/keys/index.d.ts +1 -1
- package/build/commands/keys/index.js +2 -2
- package/build/commands/keys/index.js.map +1 -1
- package/build/commands/leave/index.d.ts +1 -1
- package/build/commands/leave/index.js +3 -3
- package/build/commands/leave/index.js.map +1 -1
- package/build/commands/local/configure.d.ts +1 -1
- package/build/commands/local/configure.js +1 -2
- package/build/commands/local/configure.js.map +1 -1
- package/build/commands/local/flash.d.ts +1 -1
- package/build/commands/local/flash.js +1 -2
- package/build/commands/local/flash.js.map +1 -1
- package/build/commands/login/index.d.ts +1 -1
- package/build/commands/login/index.js +1 -2
- package/build/commands/login/index.js.map +1 -1
- package/build/commands/logout/index.d.ts +1 -1
- package/build/commands/logout/index.js +2 -2
- package/build/commands/logout/index.js.map +1 -1
- package/build/commands/logs/index.d.ts +1 -1
- package/build/commands/logs/index.js +3 -3
- package/build/commands/logs/index.js.map +1 -1
- package/build/commands/notes/index.d.ts +1 -2
- package/build/commands/notes/index.js +4 -6
- package/build/commands/notes/index.js.map +1 -1
- package/build/commands/orgs/index.d.ts +1 -1
- package/build/commands/orgs/index.js +2 -2
- package/build/commands/orgs/index.js.map +1 -1
- package/build/commands/os/build-config.d.ts +1 -1
- package/build/commands/os/build-config.js +1 -2
- package/build/commands/os/build-config.js.map +1 -1
- package/build/commands/os/configure.d.ts +1 -1
- package/build/commands/os/configure.js +3 -3
- package/build/commands/os/configure.js.map +1 -1
- package/build/commands/os/download.d.ts +1 -1
- package/build/commands/os/download.js +3 -3
- package/build/commands/os/download.js.map +1 -1
- package/build/commands/os/initialize.d.ts +1 -1
- package/build/commands/os/initialize.js +1 -2
- package/build/commands/os/initialize.js.map +1 -1
- package/build/commands/os/versions.d.ts +1 -1
- package/build/commands/os/versions.js +1 -2
- package/build/commands/os/versions.js.map +1 -1
- package/build/commands/preload/index.d.ts +1 -1
- package/build/commands/preload/index.js +1 -2
- package/build/commands/preload/index.js.map +1 -1
- package/build/commands/push/index.d.ts +1 -1
- package/build/commands/push/index.js +5 -4
- package/build/commands/push/index.js.map +1 -1
- package/build/commands/release/finalize.d.ts +1 -1
- package/build/commands/release/finalize.js +2 -2
- package/build/commands/release/finalize.js.map +1 -1
- package/build/commands/release/index.d.ts +1 -2
- package/build/commands/release/index.js +1 -2
- package/build/commands/release/index.js.map +1 -1
- package/build/commands/release/invalidate.d.ts +1 -1
- package/build/commands/release/invalidate.js +2 -2
- package/build/commands/release/invalidate.js.map +1 -1
- package/build/commands/release/validate.d.ts +1 -1
- package/build/commands/release/validate.js +2 -2
- package/build/commands/release/validate.js.map +1 -1
- package/build/commands/releases/index.d.ts +1 -1
- package/build/commands/releases/index.js +1 -2
- package/build/commands/releases/index.js.map +1 -1
- package/build/commands/scan/index.d.ts +1 -1
- package/build/commands/scan/index.js +1 -2
- package/build/commands/scan/index.js.map +1 -1
- package/build/commands/settings/index.d.ts +1 -1
- package/build/commands/settings/index.js +2 -2
- package/build/commands/settings/index.js.map +1 -1
- package/build/commands/ssh/index.d.ts +1 -1
- package/build/commands/ssh/index.js +4 -5
- package/build/commands/ssh/index.js.map +1 -1
- package/build/commands/support/index.d.ts +1 -1
- package/build/commands/support/index.js +1 -2
- package/build/commands/support/index.js.map +1 -1
- package/build/commands/tag/rm.d.ts +1 -1
- package/build/commands/tag/rm.js +1 -2
- package/build/commands/tag/rm.js.map +1 -1
- package/build/commands/tag/set.d.ts +1 -1
- package/build/commands/tag/set.js +1 -2
- package/build/commands/tag/set.js.map +1 -1
- package/build/commands/tags/index.d.ts +1 -1
- package/build/commands/tags/index.js +2 -2
- package/build/commands/tags/index.js.map +1 -1
- package/build/commands/tunnel/index.d.ts +1 -1
- package/build/commands/tunnel/index.js +3 -3
- package/build/commands/tunnel/index.js.map +1 -1
- package/build/commands/util/available-drives.d.ts +1 -1
- package/build/commands/util/available-drives.js +2 -2
- package/build/commands/util/available-drives.js.map +1 -1
- package/build/commands/version/index.d.ts +1 -1
- package/build/commands/version/index.js +1 -2
- package/build/commands/version/index.js.map +1 -1
- package/build/commands/whoami/index.d.ts +1 -1
- package/build/commands/whoami/index.js +2 -2
- package/build/commands/whoami/index.js.map +1 -1
- package/build/hooks/{prerun/track.d.ts → prerun.d.ts} +1 -1
- package/build/hooks/prerun.js +42 -0
- package/build/hooks/prerun.js.map +1 -0
- package/build/utils/patterns.d.ts +2 -0
- package/build/utils/patterns.js +16 -0
- package/build/utils/patterns.js.map +1 -1
- package/npm-shrinkwrap.json +2 -14
- package/oclif.manifest.json +9 -332
- package/package.json +3 -4
- package/src/app.ts +1 -1
- package/src/commands/api-key/generate.ts +1 -2
- package/src/commands/api-key/revoke.ts +1 -2
- package/src/commands/api-keys/index.ts +1 -2
- package/src/commands/app/create.ts +1 -3
- package/src/commands/block/create.ts +1 -3
- package/src/commands/build/index.ts +6 -4
- package/src/commands/config/generate.ts +1 -2
- package/src/commands/config/inject.ts +1 -2
- package/src/commands/config/read.ts +1 -1
- package/src/commands/config/reconfigure.ts +1 -2
- package/src/commands/config/write.ts +1 -2
- package/src/commands/deploy/index.ts +4 -4
- package/src/commands/device/deactivate.ts +1 -2
- package/src/commands/device/identify.ts +1 -2
- package/src/commands/device/index.ts +1 -2
- package/src/commands/device/init.ts +3 -3
- package/src/commands/device/list.ts +1 -1
- package/src/commands/device/local-mode.ts +1 -2
- package/src/commands/device/move.ts +1 -2
- package/src/commands/device/os-update.ts +1 -2
- package/src/commands/device/pin.ts +1 -2
- package/src/commands/device/public-url.ts +1 -2
- package/src/commands/device/purge.ts +1 -2
- package/src/commands/device/reboot.ts +1 -2
- package/src/commands/device/register.ts +1 -2
- package/src/commands/device/rename.ts +1 -2
- package/src/commands/device/restart.ts +1 -2
- package/src/commands/device/rm.ts +1 -2
- package/src/commands/device/shutdown.ts +1 -2
- package/src/commands/device/start-service.ts +1 -2
- package/src/commands/device/stop-service.ts +1 -2
- package/src/commands/device/track-fleet.ts +1 -2
- package/src/commands/devices/supported.ts +1 -3
- package/src/commands/env/add.ts +4 -3
- package/src/commands/env/rename.ts +4 -4
- package/src/commands/env/rm.ts +4 -4
- package/src/commands/envs/index.ts +4 -3
- package/src/commands/fleet/create.ts +1 -3
- package/src/commands/fleet/index.ts +1 -3
- package/src/commands/fleet/pin.ts +1 -2
- package/src/commands/fleet/purge.ts +1 -1
- package/src/commands/fleet/rename.ts +1 -3
- package/src/commands/fleet/restart.ts +1 -1
- package/src/commands/fleet/rm.ts +1 -1
- package/src/commands/fleet/track-latest.ts +1 -2
- package/src/commands/fleets/index.ts +1 -2
- package/src/commands/internal/osinit.ts +1 -2
- package/src/commands/join/index.ts +3 -3
- package/src/commands/key/add.ts +1 -6
- package/src/commands/key/index.ts +1 -2
- package/src/commands/key/rm.ts +1 -2
- package/src/commands/keys/index.ts +1 -1
- package/src/commands/leave/index.ts +3 -3
- package/src/commands/local/configure.ts +1 -2
- package/src/commands/local/flash.ts +1 -2
- package/src/commands/login/index.ts +1 -2
- package/src/commands/logout/index.ts +1 -1
- package/src/commands/logs/index.ts +3 -3
- package/src/commands/notes/index.ts +3 -8
- package/src/commands/orgs/index.ts +1 -1
- package/src/commands/os/build-config.ts +1 -2
- package/src/commands/os/configure.ts +4 -3
- package/src/commands/os/download.ts +3 -3
- package/src/commands/os/initialize.ts +1 -2
- package/src/commands/os/versions.ts +1 -2
- package/src/commands/preload/index.ts +1 -3
- package/src/commands/push/index.ts +7 -4
- package/src/commands/release/finalize.ts +1 -1
- package/src/commands/release/index.ts +1 -2
- package/src/commands/release/invalidate.ts +1 -1
- package/src/commands/release/validate.ts +1 -1
- package/src/commands/releases/index.ts +1 -2
- package/src/commands/scan/index.ts +1 -2
- package/src/commands/settings/index.ts +1 -1
- package/src/commands/ssh/index.ts +8 -5
- package/src/commands/support/index.ts +1 -2
- package/src/commands/tag/rm.ts +1 -2
- package/src/commands/tag/set.ts +1 -2
- package/src/commands/tags/index.ts +1 -1
- package/src/commands/tunnel/index.ts +4 -3
- package/src/commands/util/available-drives.ts +1 -1
- package/src/commands/version/index.ts +1 -2
- package/src/commands/whoami/index.ts +1 -1
- package/src/hooks/prerun.ts +119 -0
- package/src/utils/patterns.ts +41 -1
- package/build/command.d.ts +0 -16
- package/build/command.js +0 -57
- package/build/command.js.map +0 -1
- package/build/hooks/prerun/track.js +0 -14
- package/build/hooks/prerun/track.js.map +0 -1
- package/src/command.ts +0 -170
- package/src/hooks/prerun/track.ts +0 -44
|
@@ -15,8 +15,7 @@
|
|
|
15
15
|
* limitations under the License.
|
|
16
16
|
*/
|
|
17
17
|
|
|
18
|
-
import { Args } from '@oclif/core';
|
|
19
|
-
import Command from '../../command';
|
|
18
|
+
import { Args, Command } from '@oclif/core';
|
|
20
19
|
import * as cf from '../../utils/common-flags';
|
|
21
20
|
import { getBalenaSdk, stripIndent } from '../../utils/lazy';
|
|
22
21
|
|
|
@@ -16,10 +16,9 @@
|
|
|
16
16
|
*/
|
|
17
17
|
|
|
18
18
|
import type * as BalenaSdk from 'balena-sdk';
|
|
19
|
-
|
|
20
|
-
import Command from '../../command';
|
|
21
19
|
import * as cf from '../../utils/common-flags';
|
|
22
20
|
import { getBalenaSdk, getVisuals, stripIndent } from '../../utils/lazy';
|
|
21
|
+
import { Command } from '@oclif/core';
|
|
23
22
|
|
|
24
23
|
interface ExtendedApplication extends ApplicationWithDeviceTypeSlug {
|
|
25
24
|
device_count: number;
|
|
@@ -15,8 +15,7 @@
|
|
|
15
15
|
* limitations under the License.
|
|
16
16
|
*/
|
|
17
17
|
|
|
18
|
-
import { Args } from '@oclif/core';
|
|
19
|
-
import Command from '../../command';
|
|
18
|
+
import { Args, Command } from '@oclif/core';
|
|
20
19
|
import { stripIndent } from '../../utils/lazy';
|
|
21
20
|
|
|
22
21
|
// 'Internal' commands are called during the execution of other commands.
|
|
@@ -15,8 +15,7 @@
|
|
|
15
15
|
* limitations under the License.
|
|
16
16
|
*/
|
|
17
17
|
|
|
18
|
-
import { Args, Flags } from '@oclif/core';
|
|
19
|
-
import Command from '../../command';
|
|
18
|
+
import { Args, Flags, Command } from '@oclif/core';
|
|
20
19
|
import * as cf from '../../utils/common-flags';
|
|
21
20
|
import { getBalenaSdk, stripIndent } from '../../utils/lazy';
|
|
22
21
|
import { applicationIdInfo } from '../../utils/messages';
|
|
@@ -77,7 +76,8 @@ export default class JoinCmd extends Command {
|
|
|
77
76
|
|
|
78
77
|
const promote = await import('../../utils/promote');
|
|
79
78
|
const sdk = getBalenaSdk();
|
|
80
|
-
const
|
|
79
|
+
const Logger = await import('../../utils/logger');
|
|
80
|
+
const logger = Logger.getLogger();
|
|
81
81
|
return promote.join(
|
|
82
82
|
logger,
|
|
83
83
|
sdk,
|
package/src/commands/key/add.ts
CHANGED
|
@@ -15,8 +15,7 @@
|
|
|
15
15
|
* limitations under the License.
|
|
16
16
|
*/
|
|
17
17
|
|
|
18
|
-
import { Args } from '@oclif/core';
|
|
19
|
-
import Command from '../../command';
|
|
18
|
+
import { Args, Command } from '@oclif/core';
|
|
20
19
|
import { ExpectedError } from '../../errors';
|
|
21
20
|
import * as cf from '../../utils/common-flags';
|
|
22
21
|
import { getBalenaSdk, stripIndent } from '../../utils/lazy';
|
|
@@ -67,8 +66,6 @@ export default class KeyAddCmd extends Command {
|
|
|
67
66
|
|
|
68
67
|
public static authenticated = true;
|
|
69
68
|
|
|
70
|
-
public static readStdin = true;
|
|
71
|
-
|
|
72
69
|
public async run() {
|
|
73
70
|
const { args: params } = await this.parse(KeyAddCmd);
|
|
74
71
|
|
|
@@ -76,8 +73,6 @@ export default class KeyAddCmd extends Command {
|
|
|
76
73
|
if (params.path != null) {
|
|
77
74
|
const { readFile } = (await import('fs')).promises;
|
|
78
75
|
key = await readFile(params.path, 'utf8');
|
|
79
|
-
} else if (this.stdin.length > 0) {
|
|
80
|
-
key = this.stdin;
|
|
81
76
|
} else {
|
|
82
77
|
throw new ExpectedError('No public key file or path provided.');
|
|
83
78
|
}
|
|
@@ -15,8 +15,7 @@
|
|
|
15
15
|
* limitations under the License.
|
|
16
16
|
*/
|
|
17
17
|
|
|
18
|
-
import { Args } from '@oclif/core';
|
|
19
|
-
import Command from '../../command';
|
|
18
|
+
import { Args, Command } from '@oclif/core';
|
|
20
19
|
import * as cf from '../../utils/common-flags';
|
|
21
20
|
import { getBalenaSdk, getVisuals, stripIndent } from '../../utils/lazy';
|
|
22
21
|
import { parseAsInteger } from '../../utils/validation';
|
package/src/commands/key/rm.ts
CHANGED
|
@@ -15,8 +15,7 @@
|
|
|
15
15
|
* limitations under the License.
|
|
16
16
|
*/
|
|
17
17
|
|
|
18
|
-
import { Args } from '@oclif/core';
|
|
19
|
-
import Command from '../../command';
|
|
18
|
+
import { Args, Command } from '@oclif/core';
|
|
20
19
|
import * as cf from '../../utils/common-flags';
|
|
21
20
|
import { getBalenaSdk, stripIndent } from '../../utils/lazy';
|
|
22
21
|
import { parseAsInteger } from '../../utils/validation';
|
|
@@ -15,8 +15,7 @@
|
|
|
15
15
|
* limitations under the License.
|
|
16
16
|
*/
|
|
17
17
|
|
|
18
|
-
import { Args } from '@oclif/core';
|
|
19
|
-
import Command from '../../command';
|
|
18
|
+
import { Args, Command } from '@oclif/core';
|
|
20
19
|
import * as cf from '../../utils/common-flags';
|
|
21
20
|
import { stripIndent } from '../../utils/lazy';
|
|
22
21
|
import { parseAsLocalHostnameOrIp } from '../../utils/validation';
|
|
@@ -61,7 +60,8 @@ export default class LeaveCmd extends Command {
|
|
|
61
60
|
const { args: params } = await this.parse(LeaveCmd);
|
|
62
61
|
|
|
63
62
|
const promote = await import('../../utils/promote');
|
|
64
|
-
const
|
|
63
|
+
const Logger = await import('../../utils/logger');
|
|
64
|
+
const logger = Logger.getLogger();
|
|
65
65
|
return promote.leave(logger, params.deviceIpOrHostname);
|
|
66
66
|
}
|
|
67
67
|
}
|
|
@@ -15,9 +15,8 @@
|
|
|
15
15
|
* limitations under the License.
|
|
16
16
|
*/
|
|
17
17
|
|
|
18
|
-
import { Args } from '@oclif/core';
|
|
18
|
+
import { Args, Command } from '@oclif/core';
|
|
19
19
|
import { promisify } from 'util';
|
|
20
|
-
import Command from '../../command';
|
|
21
20
|
import * as cf from '../../utils/common-flags';
|
|
22
21
|
import { stripIndent } from '../../utils/lazy';
|
|
23
22
|
|
|
@@ -15,9 +15,8 @@
|
|
|
15
15
|
* limitations under the License.
|
|
16
16
|
*/
|
|
17
17
|
|
|
18
|
-
import { Args } from '@oclif/core';
|
|
18
|
+
import { Args, Command } from '@oclif/core';
|
|
19
19
|
import type { BlockDevice } from 'etcher-sdk/build/source-destination';
|
|
20
|
-
import Command from '../../command';
|
|
21
20
|
import { ExpectedError } from '../../errors';
|
|
22
21
|
import * as cf from '../../utils/common-flags';
|
|
23
22
|
import { getChalk, getVisuals, stripIndent } from '../../utils/lazy';
|
|
@@ -15,8 +15,7 @@
|
|
|
15
15
|
* limitations under the License.
|
|
16
16
|
*/
|
|
17
17
|
|
|
18
|
-
import { Flags, Args } from '@oclif/core';
|
|
19
|
-
import Command from '../../command';
|
|
18
|
+
import { Flags, Args, Command } from '@oclif/core';
|
|
20
19
|
import * as cf from '../../utils/common-flags';
|
|
21
20
|
import { getBalenaSdk, stripIndent, getCliForm } from '../../utils/lazy';
|
|
22
21
|
import { ExpectedError } from '../../errors';
|
|
@@ -15,8 +15,7 @@
|
|
|
15
15
|
* limitations under the License.
|
|
16
16
|
*/
|
|
17
17
|
|
|
18
|
-
import { Flags, Args } from '@oclif/core';
|
|
19
|
-
import Command from '../../command';
|
|
18
|
+
import { Flags, Args, Command } from '@oclif/core';
|
|
20
19
|
import * as cf from '../../utils/common-flags';
|
|
21
20
|
import { getBalenaSdk, stripIndent } from '../../utils/lazy';
|
|
22
21
|
import type { LogMessage } from 'balena-sdk';
|
|
@@ -151,8 +150,9 @@ export default class LogsCmd extends Command {
|
|
|
151
150
|
maxAttempts: 1 + (options['max-retry'] ?? MAX_RETRY),
|
|
152
151
|
});
|
|
153
152
|
} else {
|
|
153
|
+
const { checkLoggedIn } = await import('../../utils/patterns');
|
|
154
154
|
// Logs from cloud
|
|
155
|
-
await
|
|
155
|
+
await checkLoggedIn();
|
|
156
156
|
if (options.tail) {
|
|
157
157
|
const logStream = await balena.logs.subscribe(params.device, {
|
|
158
158
|
count: 100,
|
|
@@ -15,8 +15,7 @@
|
|
|
15
15
|
* limitations under the License.
|
|
16
16
|
*/
|
|
17
17
|
|
|
18
|
-
import { Flags, Args } from '@oclif/core';
|
|
19
|
-
import Command from '../../command';
|
|
18
|
+
import { Flags, Args, Command } from '@oclif/core';
|
|
20
19
|
import { ExpectedError } from '../../errors';
|
|
21
20
|
import * as cf from '../../utils/common-flags';
|
|
22
21
|
import { getBalenaSdk, stripIndent } from '../../utils/lazy';
|
|
@@ -53,14 +52,10 @@ export default class NoteCmd extends Command {
|
|
|
53
52
|
|
|
54
53
|
public static authenticated = true;
|
|
55
54
|
|
|
56
|
-
public static readStdin = true;
|
|
57
|
-
|
|
58
55
|
public async run() {
|
|
59
56
|
const { args: params, flags: options } = await this.parse(NoteCmd);
|
|
60
57
|
|
|
61
|
-
params.note
|
|
62
|
-
|
|
63
|
-
if (params.note.length === 0) {
|
|
58
|
+
if (params.note?.length === 0) {
|
|
64
59
|
throw new ExpectedError('Missing note content');
|
|
65
60
|
}
|
|
66
61
|
|
|
@@ -73,6 +68,6 @@ export default class NoteCmd extends Command {
|
|
|
73
68
|
|
|
74
69
|
const balena = getBalenaSdk();
|
|
75
70
|
|
|
76
|
-
return balena.models.device.setNote(options.device, params.note);
|
|
71
|
+
return balena.models.device.setNote(options.device, params.note ?? '');
|
|
77
72
|
}
|
|
78
73
|
}
|
|
@@ -15,8 +15,7 @@
|
|
|
15
15
|
* limitations under the License.
|
|
16
16
|
*/
|
|
17
17
|
|
|
18
|
-
import { Flags, Args } from '@oclif/core';
|
|
19
|
-
import Command from '../../command';
|
|
18
|
+
import { Flags, Args, Command } from '@oclif/core';
|
|
20
19
|
import * as cf from '../../utils/common-flags';
|
|
21
20
|
import { getCliForm, stripIndent } from '../../utils/lazy';
|
|
22
21
|
import * as _ from 'lodash';
|
|
@@ -15,12 +15,11 @@
|
|
|
15
15
|
* limitations under the License.
|
|
16
16
|
*/
|
|
17
17
|
|
|
18
|
-
import { Flags, Args } from '@oclif/core';
|
|
18
|
+
import { Flags, Args, Command } from '@oclif/core';
|
|
19
19
|
import type { Interfaces } from '@oclif/core';
|
|
20
20
|
import type * as BalenaSdk from 'balena-sdk';
|
|
21
21
|
import { promisify } from 'util';
|
|
22
22
|
import * as _ from 'lodash';
|
|
23
|
-
import Command from '../../command';
|
|
24
23
|
import { ExpectedError } from '../../errors';
|
|
25
24
|
import * as cf from '../../utils/common-flags';
|
|
26
25
|
import { getBalenaSdk, stripIndent, getCliForm } from '../../utils/lazy';
|
|
@@ -319,7 +318,9 @@ async function validateOptions(options: FlagsDef) {
|
|
|
319
318
|
);
|
|
320
319
|
}
|
|
321
320
|
|
|
322
|
-
await
|
|
321
|
+
const { checkLoggedIn } = await import('../../utils/patterns');
|
|
322
|
+
|
|
323
|
+
await checkLoggedIn();
|
|
323
324
|
}
|
|
324
325
|
|
|
325
326
|
/**
|
|
@@ -15,8 +15,7 @@
|
|
|
15
15
|
* limitations under the License.
|
|
16
16
|
*/
|
|
17
17
|
|
|
18
|
-
import { Flags, Args } from '@oclif/core';
|
|
19
|
-
import Command from '../../command';
|
|
18
|
+
import { Flags, Args, Command } from '@oclif/core';
|
|
20
19
|
import * as cf from '../../utils/common-flags';
|
|
21
20
|
import { stripIndent } from '../../utils/lazy';
|
|
22
21
|
|
|
@@ -90,7 +89,8 @@ export default class OsDownloadCmd extends Command {
|
|
|
90
89
|
const { isESR } = await import('../../utils/image-manager');
|
|
91
90
|
if (options.version === 'menu-esr' || isESR(options.version)) {
|
|
92
91
|
try {
|
|
93
|
-
await
|
|
92
|
+
const { checkLoggedIn } = await import('../../utils/patterns');
|
|
93
|
+
await checkLoggedIn();
|
|
94
94
|
} catch (e) {
|
|
95
95
|
const { ExpectedError, NotLoggedInError } = await import(
|
|
96
96
|
'../../errors'
|
|
@@ -15,8 +15,7 @@
|
|
|
15
15
|
* limitations under the License.
|
|
16
16
|
*/
|
|
17
17
|
|
|
18
|
-
import { Args } from '@oclif/core';
|
|
19
|
-
import Command from '../../command';
|
|
18
|
+
import { Args, Command } from '@oclif/core';
|
|
20
19
|
import * as cf from '../../utils/common-flags';
|
|
21
20
|
import { getCliForm, stripIndent } from '../../utils/lazy';
|
|
22
21
|
|
|
@@ -15,8 +15,7 @@
|
|
|
15
15
|
* limitations under the License.
|
|
16
16
|
*/
|
|
17
17
|
|
|
18
|
-
import { Flags, Args } from '@oclif/core';
|
|
19
|
-
import Command from '../../command';
|
|
18
|
+
import { Flags, Args, Command } from '@oclif/core';
|
|
20
19
|
import * as cf from '../../utils/common-flags';
|
|
21
20
|
import { stripIndent } from '../../utils/lazy';
|
|
22
21
|
|
|
@@ -15,7 +15,6 @@
|
|
|
15
15
|
* limitations under the License.
|
|
16
16
|
*/
|
|
17
17
|
|
|
18
|
-
import Command from '../../command';
|
|
19
18
|
import { ExpectedError } from '../../errors';
|
|
20
19
|
import * as cf from '../../utils/common-flags';
|
|
21
20
|
import {
|
|
@@ -27,8 +26,7 @@ import {
|
|
|
27
26
|
import { applicationIdInfo } from '../../utils/messages';
|
|
28
27
|
import { dockerConnectionCliFlags } from '../../utils/docker';
|
|
29
28
|
import { parseAsInteger } from '../../utils/validation';
|
|
30
|
-
|
|
31
|
-
import { Flags, Args } from '@oclif/core';
|
|
29
|
+
import { Flags, Args, Command } from '@oclif/core';
|
|
32
30
|
import * as _ from 'lodash';
|
|
33
31
|
import type {
|
|
34
32
|
Application,
|
|
@@ -15,9 +15,8 @@
|
|
|
15
15
|
* limitations under the License.
|
|
16
16
|
*/
|
|
17
17
|
|
|
18
|
-
import { Flags, Args } from '@oclif/core';
|
|
18
|
+
import { Flags, Args, Command } from '@oclif/core';
|
|
19
19
|
import type { Interfaces } from '@oclif/core';
|
|
20
|
-
import Command from '../../command';
|
|
21
20
|
import * as cf from '../../utils/common-flags';
|
|
22
21
|
import { getBalenaSdk, stripIndent } from '../../utils/lazy';
|
|
23
22
|
import { dockerignoreHelp, registrySecretsHelp } from '../../utils/messages';
|
|
@@ -227,7 +226,9 @@ export default class PushCmd extends Command {
|
|
|
227
226
|
public async run() {
|
|
228
227
|
const { args: params, flags: options } = await this.parse(PushCmd);
|
|
229
228
|
|
|
230
|
-
const
|
|
229
|
+
const Logger = await import('../../utils/logger');
|
|
230
|
+
|
|
231
|
+
const logger = Logger.getLogger();
|
|
231
232
|
logger.logDebug(`Using build source directory: ${options.source} `);
|
|
232
233
|
|
|
233
234
|
const sdk = getBalenaSdk();
|
|
@@ -294,7 +295,9 @@ export default class PushCmd extends Command {
|
|
|
294
295
|
options['release-tag'] ?? [],
|
|
295
296
|
);
|
|
296
297
|
|
|
297
|
-
await
|
|
298
|
+
const { checkLoggedIn } = await import('../../utils/patterns');
|
|
299
|
+
|
|
300
|
+
await checkLoggedIn();
|
|
298
301
|
const [token, baseUrl] = await Promise.all([
|
|
299
302
|
sdk.auth.getToken(),
|
|
300
303
|
sdk.settings.get('balenaUrl'),
|
|
@@ -15,8 +15,8 @@
|
|
|
15
15
|
* limitations under the License.
|
|
16
16
|
*/
|
|
17
17
|
|
|
18
|
+
import { Command } from '@oclif/core';
|
|
18
19
|
import { commitOrIdArg } from '.';
|
|
19
|
-
import Command from '../../command';
|
|
20
20
|
import * as cf from '../../utils/common-flags';
|
|
21
21
|
import { getBalenaSdk, stripIndent } from '../../utils/lazy';
|
|
22
22
|
|
|
@@ -15,8 +15,7 @@
|
|
|
15
15
|
* limitations under the License.
|
|
16
16
|
*/
|
|
17
17
|
|
|
18
|
-
import { Flags, Args, type Interfaces } from '@oclif/core';
|
|
19
|
-
import Command from '../../command';
|
|
18
|
+
import { Flags, Args, type Interfaces, Command } from '@oclif/core';
|
|
20
19
|
import * as cf from '../../utils/common-flags';
|
|
21
20
|
import { getBalenaSdk, getVisuals, stripIndent } from '../../utils/lazy';
|
|
22
21
|
import type * as BalenaSdk from 'balena-sdk';
|
|
@@ -15,8 +15,8 @@
|
|
|
15
15
|
* limitations under the License.
|
|
16
16
|
*/
|
|
17
17
|
|
|
18
|
+
import { Command } from '@oclif/core';
|
|
18
19
|
import { commitOrIdArg } from '.';
|
|
19
|
-
import Command from '../../command';
|
|
20
20
|
import * as cf from '../../utils/common-flags';
|
|
21
21
|
import { getBalenaSdk, stripIndent } from '../../utils/lazy';
|
|
22
22
|
|
|
@@ -15,8 +15,8 @@
|
|
|
15
15
|
* limitations under the License.
|
|
16
16
|
*/
|
|
17
17
|
|
|
18
|
+
import { Command } from '@oclif/core';
|
|
18
19
|
import { commitOrIdArg } from '.';
|
|
19
|
-
import Command from '../../command';
|
|
20
20
|
import * as cf from '../../utils/common-flags';
|
|
21
21
|
import { getBalenaSdk, stripIndent } from '../../utils/lazy';
|
|
22
22
|
|
|
@@ -15,8 +15,7 @@
|
|
|
15
15
|
* limitations under the License.
|
|
16
16
|
*/
|
|
17
17
|
|
|
18
|
-
import { Args } from '@oclif/core';
|
|
19
|
-
import Command from '../../command';
|
|
18
|
+
import { Args, Command } from '@oclif/core';
|
|
20
19
|
import * as cf from '../../utils/common-flags';
|
|
21
20
|
import { getBalenaSdk, getVisuals, stripIndent } from '../../utils/lazy';
|
|
22
21
|
import { applicationNameNote } from '../../utils/messages';
|
|
@@ -15,8 +15,7 @@
|
|
|
15
15
|
* limitations under the License.
|
|
16
16
|
*/
|
|
17
17
|
|
|
18
|
-
import { Flags } from '@oclif/core';
|
|
19
|
-
import Command from '../../command';
|
|
18
|
+
import { Flags, Command } from '@oclif/core';
|
|
20
19
|
import * as cf from '../../utils/common-flags';
|
|
21
20
|
import { getCliUx, stripIndent } from '../../utils/lazy';
|
|
22
21
|
|
|
@@ -15,8 +15,7 @@
|
|
|
15
15
|
* limitations under the License.
|
|
16
16
|
*/
|
|
17
17
|
|
|
18
|
-
import { Flags, Args } from '@oclif/core';
|
|
19
|
-
import Command from '../../command';
|
|
18
|
+
import { Flags, Args, Command } from '@oclif/core';
|
|
20
19
|
import * as cf from '../../utils/common-flags';
|
|
21
20
|
import { getBalenaSdk, stripIndent } from '../../utils/lazy';
|
|
22
21
|
import {
|
|
@@ -121,15 +120,19 @@ export default class SshCmd extends Command {
|
|
|
121
120
|
|
|
122
121
|
// Remote connection
|
|
123
122
|
const { getProxyConfig } = await import('../../utils/helpers');
|
|
124
|
-
const {
|
|
123
|
+
const {
|
|
124
|
+
getOnlineTargetDeviceUuid,
|
|
125
|
+
checkLoggedIn,
|
|
126
|
+
checkNotUsingOfflineMode,
|
|
127
|
+
} = await import('../../utils/patterns');
|
|
125
128
|
const sdk = getBalenaSdk();
|
|
126
129
|
|
|
127
130
|
const proxyConfig = getProxyConfig();
|
|
128
131
|
const useProxy = !!proxyConfig && !options.noproxy;
|
|
129
132
|
|
|
130
133
|
// this will be a tunnelled SSH connection...
|
|
131
|
-
await
|
|
132
|
-
await
|
|
134
|
+
await checkNotUsingOfflineMode();
|
|
135
|
+
await checkLoggedIn();
|
|
133
136
|
const deviceUuid = await getOnlineTargetDeviceUuid(
|
|
134
137
|
sdk,
|
|
135
138
|
params.fleetOrDevice,
|
|
@@ -15,8 +15,7 @@
|
|
|
15
15
|
* limitations under the License.
|
|
16
16
|
*/
|
|
17
17
|
|
|
18
|
-
import { Flags, Args } from '@oclif/core';
|
|
19
|
-
import Command from '../../command';
|
|
18
|
+
import { Flags, Args, Command } from '@oclif/core';
|
|
20
19
|
import { ExpectedError } from '../../errors';
|
|
21
20
|
import * as cf from '../../utils/common-flags';
|
|
22
21
|
import { getBalenaSdk, getCliUx, stripIndent } from '../../utils/lazy';
|
package/src/commands/tag/rm.ts
CHANGED
|
@@ -15,8 +15,7 @@
|
|
|
15
15
|
* limitations under the License.
|
|
16
16
|
*/
|
|
17
17
|
|
|
18
|
-
import { Args } from '@oclif/core';
|
|
19
|
-
import Command from '../../command';
|
|
18
|
+
import { Args, Command } from '@oclif/core';
|
|
20
19
|
import * as cf from '../../utils/common-flags';
|
|
21
20
|
import { getBalenaSdk, stripIndent } from '../../utils/lazy';
|
|
22
21
|
import { applicationIdInfo } from '../../utils/messages';
|
package/src/commands/tag/set.ts
CHANGED
|
@@ -15,8 +15,7 @@
|
|
|
15
15
|
* limitations under the License.
|
|
16
16
|
*/
|
|
17
17
|
|
|
18
|
-
import { Args } from '@oclif/core';
|
|
19
|
-
import Command from '../../command';
|
|
18
|
+
import { Args, Command } from '@oclif/core';
|
|
20
19
|
import * as cf from '../../utils/common-flags';
|
|
21
20
|
import { getBalenaSdk, stripIndent } from '../../utils/lazy';
|
|
22
21
|
import { applicationIdInfo } from '../../utils/messages';
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
* limitations under the License.
|
|
16
16
|
*/
|
|
17
17
|
|
|
18
|
-
import Command from '
|
|
18
|
+
import { Command } from '@oclif/core';
|
|
19
19
|
import { ExpectedError } from '../../errors';
|
|
20
20
|
import * as cf from '../../utils/common-flags';
|
|
21
21
|
import { getBalenaSdk, getVisuals, stripIndent } from '../../utils/lazy';
|
|
@@ -15,8 +15,7 @@
|
|
|
15
15
|
* limitations under the License.
|
|
16
16
|
*/
|
|
17
17
|
|
|
18
|
-
import { Flags, Args } from '@oclif/core';
|
|
19
|
-
import Command from '../../command';
|
|
18
|
+
import { Flags, Args, Command } from '@oclif/core';
|
|
20
19
|
import {
|
|
21
20
|
NoPortsDefinedError,
|
|
22
21
|
InvalidPortMappingError,
|
|
@@ -94,7 +93,9 @@ export default class TunnelCmd extends Command {
|
|
|
94
93
|
public async run() {
|
|
95
94
|
const { args: params, flags: options } = await this.parse(TunnelCmd);
|
|
96
95
|
|
|
97
|
-
const
|
|
96
|
+
const Logger = await import('../../utils/logger');
|
|
97
|
+
|
|
98
|
+
const logger = Logger.getLogger();
|
|
98
99
|
const sdk = getBalenaSdk();
|
|
99
100
|
|
|
100
101
|
const logConnection = (
|
|
@@ -15,8 +15,7 @@
|
|
|
15
15
|
* limitations under the License.
|
|
16
16
|
*/
|
|
17
17
|
|
|
18
|
-
import { Flags } from '@oclif/core';
|
|
19
|
-
import Command from '../../command';
|
|
18
|
+
import { Flags, Command } from '@oclif/core';
|
|
20
19
|
import { stripIndent } from '../../utils/lazy';
|
|
21
20
|
|
|
22
21
|
export interface JsonVersions {
|