mirror of
https://github.com/balena-io/balena-cli.git
synced 2025-04-08 03:44:13 +00:00
does not work
This commit is contained in:
parent
5e5b3a2635
commit
6059f60bbd
@ -9,7 +9,6 @@ module.exports = {
|
||||
// to avoid the `warning Forbidden non-null assertion @typescript-eslint/no-non-null-assertion`
|
||||
'@typescript-eslint/no-non-null-assertion': 'off',
|
||||
'@typescript-eslint/no-shadow': 'off',
|
||||
'@typescript-eslint/no-var-requires': 'off',
|
||||
'no-restricted-imports': [
|
||||
'error',
|
||||
{
|
@ -1,4 +1,4 @@
|
||||
const commonConfig = require('./.mocharc.js');
|
||||
import commonConfig from './.mocharc.js';
|
||||
|
||||
module.exports = {
|
||||
...commonConfig,
|
||||
|
@ -21,7 +21,7 @@ import { run as oclifRun } from '@oclif/core';
|
||||
import archiver from 'archiver';
|
||||
import Bluebird from 'bluebird';
|
||||
import { exec, execFile } from 'child_process';
|
||||
import * as filehound from 'filehound';
|
||||
import filehound from 'filehound';
|
||||
import type { Stats } from 'fs';
|
||||
import * as fs from 'fs-extra';
|
||||
import klaw from 'klaw';
|
||||
@ -31,7 +31,7 @@ import * as semver from 'semver';
|
||||
import { promisify } from 'util';
|
||||
import { notarize } from '@electron/notarize';
|
||||
|
||||
import { stripIndent } from '../build/utils/lazy';
|
||||
import { stripIndent } from '../lib/utils/lazy';
|
||||
import {
|
||||
diffLines,
|
||||
loadPackageJson,
|
||||
@ -39,6 +39,7 @@ import {
|
||||
StdOutTap,
|
||||
whichSpawn,
|
||||
} from './utils';
|
||||
import { filterCliOutputForTests, monochrome } from '../tests/helpers';
|
||||
|
||||
const execFileAsync = promisify(execFile);
|
||||
const execAsync = promisify(exec);
|
||||
@ -87,7 +88,6 @@ export const finalReleaseAssets: { [platform: string]: string[] } = {
|
||||
* Throw an error if the diff is not empty.
|
||||
*/
|
||||
async function diffPkgOutput(pkgOut: string) {
|
||||
const { monochrome } = await import('../tests/helpers.js');
|
||||
const relSavedPath = path.join(
|
||||
'tests',
|
||||
'test-data',
|
||||
@ -263,7 +263,6 @@ async function testPkg() {
|
||||
'version',
|
||||
'-j',
|
||||
]);
|
||||
const { filterCliOutputForTests } = await import('../tests/helpers.js');
|
||||
const filtered = filterCliOutputForTests({
|
||||
err: stderr.split(/\r?\n/),
|
||||
out: stdout.split(/\r?\n/),
|
||||
@ -570,6 +569,8 @@ export async function testShrinkwrap(): Promise<void> {
|
||||
console.error(`[debug] platform=${process.platform}`);
|
||||
}
|
||||
if (process.platform !== 'win32') {
|
||||
await whichSpawn(path.resolve(__dirname, 'test-lock-deduplicated.sh'));
|
||||
await whichSpawn(
|
||||
path.resolve(import.meta.dirname, 'test-lock-deduplicated.sh'),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
@ -144,7 +144,7 @@ capitanoDoc.categories.forEach((category) => {
|
||||
* for the documentation web page.
|
||||
*/
|
||||
export async function getCapitanoDoc(): Promise<typeof capitanoDoc> {
|
||||
const readmePath = path.join(__dirname, '..', '..', 'README.md');
|
||||
const readmePath = path.join(import.meta.dirname, '..', '..', 'README.md');
|
||||
const mdParser = new MarkdownFileParser(readmePath);
|
||||
const sections: string[] = await Promise.all([
|
||||
mdParser.getSectionOfTitle('About').then((sectionLines: string) => {
|
||||
|
@ -19,6 +19,8 @@ import { getCapitanoDoc } from './capitanodoc';
|
||||
import type { Category, Document, OclifCommand } from './doc-types';
|
||||
import * as markdown from './markdown';
|
||||
import { stripIndent } from '../../lib/utils/lazy';
|
||||
import { createRequire } from 'node:module';
|
||||
const require = createRequire(import.meta.url);
|
||||
|
||||
/**
|
||||
* Generates the markdown document (as a string) for the CLI documentation
|
||||
|
@ -16,7 +16,7 @@
|
||||
*/
|
||||
import { Parser } from '@oclif/core';
|
||||
import * as ent from 'ent';
|
||||
import * as _ from 'lodash';
|
||||
import _ from 'lodash';
|
||||
|
||||
import { getManualSortCompareFunction } from '../../lib/utils/helpers';
|
||||
import { capitanoizeOclifUsage } from '../../lib/utils/oclif-utils';
|
||||
|
@ -17,12 +17,12 @@
|
||||
|
||||
// eslint-disable-next-line no-restricted-imports
|
||||
import { stripIndent } from 'common-tags';
|
||||
import * as _ from 'lodash';
|
||||
import _ from 'lodash';
|
||||
import { promises as fs } from 'fs';
|
||||
import * as path from 'path';
|
||||
import { simpleGit } from 'simple-git';
|
||||
|
||||
const ROOT = path.normalize(path.join(__dirname, '..'));
|
||||
const ROOT = path.normalize(path.join(import.meta.dirname, '..'));
|
||||
|
||||
/**
|
||||
* Compare the timestamp of balena-cli.md with the timestamp of staged files,
|
||||
|
@ -1,5 +1,6 @@
|
||||
#!/usr/bin/env node
|
||||
'use strict';
|
||||
import { execSync } from 'child_process';
|
||||
|
||||
/**
|
||||
* Check that semver v1 is greater than or equal to semver v2.
|
||||
@ -36,7 +37,6 @@ function semverGte(v1, v2) {
|
||||
}
|
||||
|
||||
function checkNpmVersion() {
|
||||
const execSync = require('child_process').execSync;
|
||||
const npmVersion = execSync('npm --version').toString().trim();
|
||||
const requiredVersion = '6.9.0';
|
||||
if (!semverGte(npmVersion, requiredVersion)) {
|
||||
|
@ -15,20 +15,17 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import * as _ from 'lodash';
|
||||
import _ from 'lodash';
|
||||
import * as semver from 'semver';
|
||||
import { Octokit as OctokitLib } from '@octokit/rest';
|
||||
import OctoKitPluginThrottling from '@octokit/plugin-throttling';
|
||||
import parse from 'parse-link-header';
|
||||
|
||||
const { GITHUB_TOKEN } = process.env;
|
||||
|
||||
/** Return a cached Octokit instance, creating a new one as needed. */
|
||||
const getOctokit = _.once(function () {
|
||||
const Octokit = (
|
||||
require('@octokit/rest') as typeof import('@octokit/rest')
|
||||
).Octokit.plugin(
|
||||
(
|
||||
require('@octokit/plugin-throttling') as typeof import('@octokit/plugin-throttling')
|
||||
).throttling,
|
||||
);
|
||||
const Octokit = OctokitLib.plugin(OctoKitPluginThrottling.throttling);
|
||||
return new Octokit({
|
||||
auth: GITHUB_TOKEN,
|
||||
throttle: {
|
||||
@ -73,8 +70,7 @@ function getPageNumbers(
|
||||
if (!response.headers.link) {
|
||||
return res;
|
||||
}
|
||||
const parse =
|
||||
require('parse-link-header') as typeof import('parse-link-header');
|
||||
|
||||
const parsed = parse(response.headers.link);
|
||||
if (parsed == null) {
|
||||
throw new Error(`Failed to parse link header: '${response.headers.link}'`);
|
||||
|
@ -15,7 +15,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import * as _ from 'lodash';
|
||||
import _ from 'lodash';
|
||||
|
||||
import {
|
||||
buildOclifInstaller,
|
||||
@ -24,7 +24,7 @@ import {
|
||||
signFilesForNotarization,
|
||||
testShrinkwrap,
|
||||
} from './build-bin';
|
||||
import { updateDescriptionOfReleasesAffectedByIssue1359 } from './deploy-bin';
|
||||
import { updateDescriptionOfReleasesAffectedByIssue1359 } from './deploy-bin.js';
|
||||
|
||||
// DEBUG set to falsy for negative values else is truthy
|
||||
process.env.DEBUG = ['0', 'no', 'false', '', undefined].includes(
|
||||
|
@ -54,7 +54,10 @@ interface Upstream {
|
||||
|
||||
const getUpstreams = async () => {
|
||||
const fs = await import('fs');
|
||||
const repoYaml = fs.readFileSync(__dirname + '/../repo.yml', 'utf8');
|
||||
const repoYaml = fs.readFileSync(
|
||||
import.meta.dirname + '/../repo.yml',
|
||||
'utf8',
|
||||
);
|
||||
|
||||
const yaml = await import('js-yaml');
|
||||
const { upstream } = yaml.load(repoYaml) as {
|
||||
|
@ -17,8 +17,9 @@
|
||||
|
||||
import { spawn } from 'child_process';
|
||||
import * as path from 'path';
|
||||
import { diffTrimmedLines } from 'diff';
|
||||
|
||||
export const ROOT = path.join(__dirname, '..');
|
||||
export const ROOT = path.join(import.meta.dirname, '..');
|
||||
|
||||
/** Tap and buffer this process' stdout and stderr */
|
||||
export class StdOutTap {
|
||||
@ -64,7 +65,6 @@ export class StdOutTap {
|
||||
* https://www.npmjs.com/package/diff
|
||||
*/
|
||||
export function diffLines(str1: string, str2: string): string {
|
||||
const { diffTrimmedLines } = require('diff');
|
||||
const diffObjs = diffTrimmedLines(str1, str2);
|
||||
const prefix = (chunk: string, char: string) =>
|
||||
chunk
|
||||
|
61
bin/dev.js
61
bin/dev.js
@ -1,4 +1,4 @@
|
||||
#!/usr/bin/env node
|
||||
#!/usr/bin/env -S node --loader ts-node/esm --no-warnings=ExperimentalWarning
|
||||
|
||||
// ****************************************************************************
|
||||
// THIS IS FOR DEV PURPOSES ONLY AND WILL NOT BE PART OF THE PUBLISHED PACKAGE
|
||||
@ -25,8 +25,9 @@ process.env.UV_THREADPOOL_SIZE = '64';
|
||||
// is to use `balena-dev` without `fast-boot`. See also notes in
|
||||
// `CONTRIBUTING.md`.
|
||||
|
||||
const path = require('path');
|
||||
const rootDir = path.join(__dirname, '..');
|
||||
import * as path from 'path';
|
||||
import * as fs from 'fs';
|
||||
const rootDir = path.join(import.meta.dirname, '..');
|
||||
|
||||
// Allow balena-dev to work with oclif by temporarily
|
||||
// pointing oclif config options to lib/ instead of build/
|
||||
@ -46,42 +47,44 @@ process.on('SIGINT', function () {
|
||||
});
|
||||
|
||||
// Set the desired es version for downstream modules that support it
|
||||
require('@balena/es-version').set('es2018');
|
||||
(await import('@balena/es-version')).set('es2018');
|
||||
|
||||
// Note: before ts-node v6.0.0, 'transpile-only' (no type checking) was the
|
||||
// default option. We upgraded ts-node and found that adding 'transpile-only'
|
||||
// was necessary to avoid a mysterious 'null' error message. On the plus side,
|
||||
// it is supposed to run faster. We still benefit from type checking when
|
||||
// running 'npm run build'.
|
||||
require('ts-node').register({
|
||||
project: path.join(rootDir, 'tsconfig.json'),
|
||||
transpileOnly: true,
|
||||
// (await import('ts-node')).register({
|
||||
// project: path.join(rootDir, 'tsconfig.json'),
|
||||
// transpileOnly: true,
|
||||
// });
|
||||
(await import('../lib/app.js')).run(undefined, {
|
||||
dir: import.meta.url,
|
||||
development: true,
|
||||
});
|
||||
require('../lib/app').run(undefined, { dir: __dirname, development: true });
|
||||
|
||||
// Modify package.json oclif paths from build/ -> lib/, or vice versa
|
||||
function modifyOclifPaths(revert) {
|
||||
const fs = require('fs');
|
||||
const packageJsonPath = path.join(rootDir, 'package.json');
|
||||
// function modifyOclifPaths(revert) {
|
||||
// const packageJsonPath = path.join(rootDir, 'package.json');
|
||||
|
||||
const packageJson = fs.readFileSync(packageJsonPath, 'utf8');
|
||||
const packageObj = JSON.parse(packageJson);
|
||||
// const packageJson = fs.readFileSync(packageJsonPath, 'utf8');
|
||||
// const packageObj = JSON.parse(packageJson);
|
||||
|
||||
if (!packageObj.oclif) {
|
||||
return;
|
||||
}
|
||||
// if (!packageObj.oclif) {
|
||||
// return;
|
||||
// }
|
||||
|
||||
let oclifSectionText = JSON.stringify(packageObj.oclif);
|
||||
if (!revert) {
|
||||
oclifSectionText = oclifSectionText.replace(/\/build\//g, '/lib/');
|
||||
} else {
|
||||
oclifSectionText = oclifSectionText.replace(/\/lib\//g, '/build/');
|
||||
}
|
||||
// let oclifSectionText = JSON.stringify(packageObj.oclif);
|
||||
// if (!revert) {
|
||||
// oclifSectionText = oclifSectionText.replace(/\/build\//g, '/lib/');
|
||||
// } else {
|
||||
// oclifSectionText = oclifSectionText.replace(/\/lib\//g, '/build/');
|
||||
// }
|
||||
|
||||
packageObj.oclif = JSON.parse(oclifSectionText);
|
||||
fs.writeFileSync(
|
||||
packageJsonPath,
|
||||
`${JSON.stringify(packageObj, null, 2)}\n`,
|
||||
'utf8',
|
||||
);
|
||||
}
|
||||
// packageObj.oclif = JSON.parse(oclifSectionText);
|
||||
// fs.writeFileSync(
|
||||
// packageJsonPath,
|
||||
// `${JSON.stringify(packageObj, null, 2)}\n`,
|
||||
// 'utf8',
|
||||
// );
|
||||
// }
|
||||
|
13
bin/run.js
13
bin/run.js
@ -1,21 +1,20 @@
|
||||
#!/usr/bin/env node
|
||||
#!/usr/bin/env -S node --loader ts-node/esm --no-warnings=ExperimentalWarning
|
||||
|
||||
// We boost the threadpool size as ext2fs can deadlock with some
|
||||
// operations otherwise, if the pool runs out.
|
||||
process.env.UV_THREADPOOL_SIZE = '64';
|
||||
|
||||
// Disable oclif registering ts-node
|
||||
process.env.OCLIF_TS_NODE = 0;
|
||||
|
||||
async function run() {
|
||||
// Use fast-boot to cache require lookups, speeding up startup
|
||||
await require('../build/fast-boot').start();
|
||||
await (await import('../build/lib/fast-boot.js')).start();
|
||||
|
||||
// Set the desired es version for downstream modules that support it
|
||||
require('@balena/es-version').set('es2018');
|
||||
(await import('@balena/es-version')).set('es2018');
|
||||
|
||||
// Run the CLI
|
||||
await require('../build/app').run(undefined, { dir: __dirname });
|
||||
await (
|
||||
await import('../build/lib/app.js')
|
||||
).run(undefined, { dir: import.meta.url });
|
||||
}
|
||||
|
||||
run();
|
||||
|
@ -15,9 +15,9 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
const path = require('path');
|
||||
const rootDir = path.join(__dirname, '..');
|
||||
const fs = require('fs');
|
||||
import path from 'path';
|
||||
const rootDir = path.join(import.meta.dirname, '..');
|
||||
import fs from 'fs';
|
||||
const manifestFile = 'oclif.manifest.json';
|
||||
|
||||
commandsFilePath = path.join(rootDir, manifestFile);
|
||||
@ -47,8 +47,8 @@ for (const key of Object.keys(commandsJson.commands).sort()) {
|
||||
const mainCommandsStr = mainCommands.join(' ');
|
||||
|
||||
// GENERATE BASH COMPLETION FILE
|
||||
bashFilePathIn = path.join(__dirname, '/templates/bash.template');
|
||||
bashFilePathOut = path.join(__dirname, 'balena-completion.bash');
|
||||
bashFilePathIn = path.join(import.meta.dirname, '/templates/bash.template');
|
||||
bashFilePathOut = path.join(import.meta.dirname, 'balena-completion.bash');
|
||||
|
||||
try {
|
||||
fs.unlinkSync(bashFilePathOut);
|
||||
@ -109,8 +109,8 @@ fs.readFile(bashFilePathIn, 'utf8', function (err, data) {
|
||||
});
|
||||
|
||||
// GENERATE ZSH COMPLETION FILE
|
||||
zshFilePathIn = path.join(__dirname, '/templates/zsh.template');
|
||||
zshFilePathOut = path.join(__dirname, '_balena');
|
||||
zshFilePathIn = path.join(import.meta.dirname, '/templates/zsh.template');
|
||||
zshFilePathOut = path.join(import.meta.dirname, '_balena');
|
||||
|
||||
try {
|
||||
fs.unlinkSync(zshFilePathOut);
|
||||
|
16
lib/app.ts
16
lib/app.ts
@ -15,17 +15,20 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import * as packageJSON from '../package.json';
|
||||
import type { AppOptions } from './preparser';
|
||||
import packageJSON from '../package.json' with { type: 'json' };
|
||||
import type { AppOptions } from './preparser.js';
|
||||
import {
|
||||
checkDeletedCommand,
|
||||
preparseArgs,
|
||||
unsupportedFlag,
|
||||
} from './preparser';
|
||||
import { CliSettings } from './utils/bootstrap';
|
||||
import { onceAsync } from './utils/lazy';
|
||||
} from './preparser.js';
|
||||
import { CliSettings } from './utils/bootstrap.js';
|
||||
import { onceAsync } from './utils/lazy.js';
|
||||
import { run as mainRun, settings } from '@oclif/core';
|
||||
|
||||
import { createRequire } from 'node:module';
|
||||
const require = createRequire(import.meta.url);
|
||||
|
||||
/**
|
||||
* Sentry.io setup
|
||||
* @see https://docs.sentry.io/error-reporting/quickstart/?platform=node
|
||||
@ -164,6 +167,7 @@ export async function run(cliArgs = process.argv, options: AppOptions) {
|
||||
const { setOfflineModeEnvVars, normalizeEnvVars, pkgExec } = await import(
|
||||
'./utils/bootstrap.js'
|
||||
);
|
||||
|
||||
setOfflineModeEnvVars();
|
||||
normalizeEnvVars();
|
||||
|
||||
@ -176,7 +180,7 @@ export async function run(cliArgs = process.argv, options: AppOptions) {
|
||||
await init();
|
||||
|
||||
// Look for commands that have been removed and if so, exit with a notice
|
||||
checkDeletedCommand(cliArgs.slice(2));
|
||||
await checkDeletedCommand(cliArgs.slice(2));
|
||||
|
||||
const args = await preparseArgs(cliArgs);
|
||||
await oclifRun(args, options);
|
||||
|
@ -14,8 +14,8 @@ See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
import { getBalenaSdk } from '../utils/lazy';
|
||||
import { LoginServer } from './server';
|
||||
import { getBalenaSdk } from '../utils/lazy.js';
|
||||
import { LoginServer } from './server.js';
|
||||
|
||||
/**
|
||||
* @module auth
|
||||
|
@ -20,8 +20,8 @@ import express from 'express';
|
||||
import type { Socket } from 'net';
|
||||
import * as path from 'path';
|
||||
|
||||
import * as utils from './utils';
|
||||
import { ExpectedError } from '../errors';
|
||||
import * as utils from './utils.js';
|
||||
import { ExpectedError } from '../errors.js';
|
||||
|
||||
export class LoginServer extends EventEmitter {
|
||||
protected expressApp: express.Express;
|
||||
@ -56,7 +56,7 @@ export class LoginServer extends EventEmitter {
|
||||
);
|
||||
|
||||
app.set('view engine', 'ejs');
|
||||
app.set('views', path.join(__dirname, 'pages'));
|
||||
app.set('views', path.join(import.meta.dirname, 'pages'));
|
||||
|
||||
this.server = await new Promise<import('net').Server>((resolve, reject) => {
|
||||
const callback = (err: Error) => {
|
||||
|
@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
import { getBalenaSdk } from '../utils/lazy';
|
||||
import { getBalenaSdk } from '../utils/lazy.js';
|
||||
|
||||
/**
|
||||
* Get dashboard CLI login URL
|
||||
|
@ -19,9 +19,9 @@ import { Command } from '@oclif/core';
|
||||
import {
|
||||
InsufficientPrivilegesError,
|
||||
NotAvailableInOfflineModeError,
|
||||
} from './errors';
|
||||
import { stripIndent } from './utils/lazy';
|
||||
import * as output from './framework/output';
|
||||
} from './errors.js';
|
||||
import { stripIndent } from './utils/lazy.js';
|
||||
import * as output from './framework/output.js';
|
||||
|
||||
export default abstract class BalenaCommand extends Command {
|
||||
/**
|
||||
@ -147,8 +147,8 @@ export default abstract class BalenaCommand extends Command {
|
||||
* Get a logger instance.
|
||||
*/
|
||||
protected static async getLogger() {
|
||||
const { default: logger } = await import('./utils/logger.js');
|
||||
return logger.getLogger();
|
||||
const { default: Logger } = await import('./utils/logger.js');
|
||||
return Logger.getLogger();
|
||||
}
|
||||
|
||||
protected async init() {
|
||||
|
@ -16,10 +16,10 @@
|
||||
*/
|
||||
|
||||
import { Args } from '@oclif/core';
|
||||
import Command from '../../command';
|
||||
import { ExpectedError } from '../../errors';
|
||||
import * as cf from '../../utils/common-flags';
|
||||
import { getBalenaSdk, stripIndent } from '../../utils/lazy';
|
||||
import Command from '../../command.js';
|
||||
import { ExpectedError } from '../../errors.js';
|
||||
import * as cf from '../../utils/common-flags.js';
|
||||
import { getBalenaSdk, stripIndent } from '../../utils/lazy.js';
|
||||
|
||||
export default class GenerateCmd extends Command {
|
||||
public static description = stripIndent`
|
||||
|
@ -16,9 +16,9 @@
|
||||
*/
|
||||
|
||||
import { Args } from '@oclif/core';
|
||||
import Command from '../../command';
|
||||
import * as cf from '../../utils/common-flags';
|
||||
import { getBalenaSdk, stripIndent } from '../../utils/lazy';
|
||||
import Command from '../../command.js';
|
||||
import * as cf from '../../utils/common-flags.js';
|
||||
import { getBalenaSdk, stripIndent } from '../../utils/lazy.js';
|
||||
|
||||
export default class RevokeCmd extends Command {
|
||||
public static description = stripIndent`
|
||||
|
@ -16,9 +16,9 @@
|
||||
*/
|
||||
|
||||
import { Flags } from '@oclif/core';
|
||||
import Command from '../../command';
|
||||
import * as cf from '../../utils/common-flags';
|
||||
import { getBalenaSdk, getVisuals, stripIndent } from '../../utils/lazy';
|
||||
import Command from '../../command.js';
|
||||
import * as cf from '../../utils/common-flags.js';
|
||||
import { getBalenaSdk, getVisuals, stripIndent } from '../../utils/lazy.js';
|
||||
|
||||
export default class ApiKeysCmd extends Command {
|
||||
public static description = stripIndent`
|
||||
|
@ -17,9 +17,9 @@
|
||||
|
||||
import { Flags, Args } from '@oclif/core';
|
||||
|
||||
import Command from '../../command';
|
||||
import * as cf from '../../utils/common-flags';
|
||||
import { stripIndent } from '../../utils/lazy';
|
||||
import Command from '../../command.js';
|
||||
import * as cf from '../../utils/common-flags.js';
|
||||
import { stripIndent } from '../../utils/lazy.js';
|
||||
|
||||
export default class AppCreateCmd extends Command {
|
||||
public static description = stripIndent`
|
||||
|
@ -17,9 +17,9 @@
|
||||
|
||||
import { Flags, Args } from '@oclif/core';
|
||||
|
||||
import Command from '../../command';
|
||||
import * as cf from '../../utils/common-flags';
|
||||
import { stripIndent } from '../../utils/lazy';
|
||||
import Command from '../../command.js';
|
||||
import * as cf from '../../utils/common-flags.js';
|
||||
import { stripIndent } from '../../utils/lazy.js';
|
||||
|
||||
export default class BlockCreateCmd extends Command {
|
||||
public static description = stripIndent`
|
||||
|
@ -16,10 +16,10 @@
|
||||
*/
|
||||
|
||||
import { Args, Flags } from '@oclif/core';
|
||||
import Command from '../../command';
|
||||
import { getBalenaSdk } from '../../utils/lazy';
|
||||
import * as cf from '../../utils/common-flags';
|
||||
import * as compose from '../../utils/compose';
|
||||
import Command from '../../command.js';
|
||||
import { getBalenaSdk } from '../../utils/lazy.js';
|
||||
import * as cf from '../../utils/common-flags.js';
|
||||
import * as compose from '../../utils/compose.js';
|
||||
import type {
|
||||
ApplicationType,
|
||||
BalenaSDK,
|
||||
@ -31,11 +31,14 @@ import {
|
||||
buildArgDeprecation,
|
||||
dockerignoreHelp,
|
||||
registrySecretsHelp,
|
||||
} from '../../utils/messages';
|
||||
import type { ComposeCliFlags, ComposeOpts } from '../../utils/compose-types';
|
||||
import { buildProject, composeCliFlags } from '../../utils/compose_ts';
|
||||
import type { BuildOpts, DockerCliFlags } from '../../utils/docker';
|
||||
import { dockerCliFlags } from '../../utils/docker';
|
||||
} from '../../utils/messages.js';
|
||||
import type {
|
||||
ComposeCliFlags,
|
||||
ComposeOpts,
|
||||
} from '../../utils/compose-types.js';
|
||||
import { buildProject, composeCliFlags } from '../../utils/compose_ts.js';
|
||||
import type { BuildOpts, DockerCliFlags } from '../../utils/docker.js';
|
||||
import { dockerCliFlags } from '../../utils/docker.js';
|
||||
import type Dockerode from 'dockerode';
|
||||
|
||||
// TODO: For this special one we can't use Interfaces.InferredFlags/InferredArgs
|
||||
@ -260,7 +263,7 @@ ${dockerignoreHelp}
|
||||
*/
|
||||
protected async buildProject(
|
||||
docker: import('dockerode'),
|
||||
logger: import('../../utils/logger'),
|
||||
logger: import('../../utils/logger.js').default,
|
||||
composeOpts: ComposeOpts,
|
||||
opts: {
|
||||
appType?: Pick<ApplicationType, 'supports_multicontainer'>;
|
||||
|
@ -17,14 +17,14 @@
|
||||
|
||||
import { Flags } from '@oclif/core';
|
||||
import type { Interfaces } from '@oclif/core';
|
||||
import Command from '../../command';
|
||||
import * as cf from '../../utils/common-flags';
|
||||
import { getBalenaSdk, getCliForm, stripIndent } from '../../utils/lazy';
|
||||
import Command from '../../command.js';
|
||||
import * as cf from '../../utils/common-flags.js';
|
||||
import { getBalenaSdk, getCliForm, stripIndent } from '../../utils/lazy.js';
|
||||
import {
|
||||
applicationIdInfo,
|
||||
devModeInfo,
|
||||
secureBootInfo,
|
||||
} from '../../utils/messages';
|
||||
} from '../../utils/messages.js';
|
||||
import type { BalenaSDK, PineDeferred } from 'balena-sdk';
|
||||
|
||||
export default class ConfigGenerateCmd extends Command {
|
||||
|
@ -16,9 +16,9 @@
|
||||
*/
|
||||
|
||||
import { Args } from '@oclif/core';
|
||||
import Command from '../../command';
|
||||
import * as cf from '../../utils/common-flags';
|
||||
import { getVisuals, stripIndent } from '../../utils/lazy';
|
||||
import Command from '../../command.js';
|
||||
import * as cf from '../../utils/common-flags.js';
|
||||
import { getVisuals, stripIndent } from '../../utils/lazy.js';
|
||||
|
||||
export default class ConfigInjectCmd extends Command {
|
||||
public static description = stripIndent`
|
||||
|
@ -15,9 +15,9 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import Command from '../../command';
|
||||
import * as cf from '../../utils/common-flags';
|
||||
import { getVisuals, stripIndent } from '../../utils/lazy';
|
||||
import Command from '../../command.js';
|
||||
import * as cf from '../../utils/common-flags.js';
|
||||
import { getVisuals, stripIndent } from '../../utils/lazy.js';
|
||||
|
||||
export default class ConfigReadCmd extends Command {
|
||||
public static description = stripIndent`
|
||||
|
@ -16,9 +16,9 @@
|
||||
*/
|
||||
|
||||
import { Flags } from '@oclif/core';
|
||||
import Command from '../../command';
|
||||
import * as cf from '../../utils/common-flags';
|
||||
import { getVisuals, stripIndent } from '../../utils/lazy';
|
||||
import Command from '../../command.js';
|
||||
import * as cf from '../../utils/common-flags.js';
|
||||
import { getVisuals, stripIndent } from '../../utils/lazy.js';
|
||||
|
||||
export default class ConfigReconfigureCmd extends Command {
|
||||
public static description = stripIndent`
|
||||
|
@ -16,9 +16,11 @@
|
||||
*/
|
||||
|
||||
import { Args } from '@oclif/core';
|
||||
import Command from '../../command';
|
||||
import * as cf from '../../utils/common-flags';
|
||||
import { getVisuals, stripIndent } from '../../utils/lazy';
|
||||
import Command from '../../command.js';
|
||||
import * as cf from '../../utils/common-flags.js';
|
||||
import { getVisuals, stripIndent } from '../../utils/lazy.js';
|
||||
import { createRequire } from 'node:module';
|
||||
const require = createRequire(import.meta.url);
|
||||
|
||||
export default class ConfigWriteCmd extends Command {
|
||||
public static description = stripIndent`
|
||||
|
@ -16,34 +16,36 @@
|
||||
*/
|
||||
|
||||
import { Args, Flags } from '@oclif/core';
|
||||
import type { ImageDescriptor } from '@balena/compose/dist/parse';
|
||||
import type { parse } from '@balena/compose';
|
||||
|
||||
import Command from '../../command';
|
||||
import { ExpectedError } from '../../errors';
|
||||
import { getBalenaSdk, getChalk, stripIndent } from '../../utils/lazy';
|
||||
import Command from '../../command.js';
|
||||
import { ExpectedError } from '../../errors.js';
|
||||
import { getBalenaSdk, getChalk, stripIndent } from '../../utils/lazy.js';
|
||||
import {
|
||||
dockerignoreHelp,
|
||||
registrySecretsHelp,
|
||||
buildArgDeprecation,
|
||||
} from '../../utils/messages';
|
||||
import * as ca from '../../utils/common-args';
|
||||
import * as compose from '../../utils/compose';
|
||||
} from '../../utils/messages.js';
|
||||
import * as ca from '../../utils/common-args.js';
|
||||
import * as compose from '../../utils/compose.js';
|
||||
import type {
|
||||
BuiltImage,
|
||||
ComposeCliFlags,
|
||||
ComposeOpts,
|
||||
Release as ComposeReleaseInfo,
|
||||
} from '../../utils/compose-types';
|
||||
import type { BuildOpts, DockerCliFlags } from '../../utils/docker';
|
||||
} from '../../utils/compose-types.js';
|
||||
import type { BuildOpts, DockerCliFlags } from '../../utils/docker.js';
|
||||
import {
|
||||
applyReleaseTagKeysAndValues,
|
||||
buildProject,
|
||||
composeCliFlags,
|
||||
isBuildConfig,
|
||||
parseReleaseTagKeysAndValues,
|
||||
} from '../../utils/compose_ts';
|
||||
import { dockerCliFlags } from '../../utils/docker';
|
||||
} from '../../utils/compose_ts.js';
|
||||
import { dockerCliFlags } from '../../utils/docker.js';
|
||||
import type { ApplicationType, DeviceType, Release } from 'balena-sdk';
|
||||
import { createRequire } from 'node:module';
|
||||
const require = createRequire(import.meta.url);
|
||||
|
||||
interface ApplicationWithArch {
|
||||
id: number;
|
||||
@ -232,7 +234,7 @@ ${dockerignoreHelp}
|
||||
|
||||
async deployProject(
|
||||
docker: import('dockerode'),
|
||||
logger: import('../../utils/logger'),
|
||||
logger: import('../../utils/logger.js').default,
|
||||
composeOpts: ComposeOpts,
|
||||
opts: {
|
||||
app: ApplicationWithArch; // the application instance to deploy to
|
||||
@ -270,7 +272,7 @@ ${dockerignoreHelp}
|
||||
|
||||
// find which services use images that already exist locally
|
||||
let servicesToSkip: string[] = await Promise.all(
|
||||
project.descriptors.map(async function (d: ImageDescriptor) {
|
||||
project.descriptors.map(async function (d: parse.ImageDescriptor) {
|
||||
// unconditionally build (or pull) if explicitly requested
|
||||
if (opts.shouldPerformBuild) {
|
||||
return '';
|
||||
@ -320,8 +322,9 @@ ${dockerignoreHelp}
|
||||
});
|
||||
builtImagesByService = _.keyBy(builtImages, 'serviceName');
|
||||
}
|
||||
|
||||
const images: BuiltImage[] = project.descriptors.map(
|
||||
(d) =>
|
||||
(d: parse.ImageDescriptor) =>
|
||||
builtImagesByService[d.serviceName] ?? {
|
||||
serviceName: d.serviceName,
|
||||
name: (isBuildConfig(d.image) ? d.image.tag : d.image) || '',
|
||||
@ -364,6 +367,7 @@ ${dockerignoreHelp}
|
||||
$select: ['commit'],
|
||||
});
|
||||
} else {
|
||||
// @ts-expect-error CHECK ESM
|
||||
release = await $deployProject(
|
||||
docker,
|
||||
sdk,
|
||||
|
@ -16,9 +16,9 @@
|
||||
*/
|
||||
|
||||
import { Args } from '@oclif/core';
|
||||
import Command from '../../command';
|
||||
import * as cf from '../../utils/common-flags';
|
||||
import { getBalenaSdk, stripIndent } from '../../utils/lazy';
|
||||
import Command from '../../command.js';
|
||||
import * as cf from '../../utils/common-flags.js';
|
||||
import { getBalenaSdk, stripIndent } from '../../utils/lazy.js';
|
||||
|
||||
export default class DeviceDeactivateCmd extends Command {
|
||||
public static description = stripIndent`
|
||||
|
@ -16,10 +16,10 @@
|
||||
*/
|
||||
|
||||
import { Args } from '@oclif/core';
|
||||
import Command from '../../command';
|
||||
import * as cf from '../../utils/common-flags';
|
||||
import { getBalenaSdk, stripIndent } from '../../utils/lazy';
|
||||
import { ExpectedError } from '../../errors';
|
||||
import Command from '../../command.js';
|
||||
import * as cf from '../../utils/common-flags.js';
|
||||
import { getBalenaSdk, stripIndent } from '../../utils/lazy.js';
|
||||
import { ExpectedError } from '../../errors.js';
|
||||
|
||||
export default class DeviceIdentifyCmd extends Command {
|
||||
public static description = stripIndent`
|
||||
|
@ -16,11 +16,11 @@
|
||||
*/
|
||||
|
||||
import { Flags, Args } from '@oclif/core';
|
||||
import Command from '../../command';
|
||||
import * as cf from '../../utils/common-flags';
|
||||
import { expandForAppName } from '../../utils/helpers';
|
||||
import { getBalenaSdk, getVisuals, stripIndent } from '../../utils/lazy';
|
||||
import { jsonInfo } from '../../utils/messages';
|
||||
import Command from '../../command.js';
|
||||
import * as cf from '../../utils/common-flags.js';
|
||||
import { expandForAppName } from '../../utils/helpers.js';
|
||||
import { getBalenaSdk, getVisuals, stripIndent } from '../../utils/lazy.js';
|
||||
import { jsonInfo } from '../../utils/messages.js';
|
||||
|
||||
import type { Application, Release } from 'balena-sdk';
|
||||
|
||||
|
@ -16,11 +16,11 @@
|
||||
*/
|
||||
|
||||
import { Flags } from '@oclif/core';
|
||||
import Command from '../../command';
|
||||
import * as cf from '../../utils/common-flags';
|
||||
import { getBalenaSdk, stripIndent } from '../../utils/lazy';
|
||||
import { applicationIdInfo } from '../../utils/messages';
|
||||
import { runCommand } from '../../utils/helpers';
|
||||
import Command from '../../command.js';
|
||||
import * as cf from '../../utils/common-flags.js';
|
||||
import { getBalenaSdk, stripIndent } from '../../utils/lazy.js';
|
||||
import { applicationIdInfo } from '../../utils/messages.js';
|
||||
import { runCommand } from '../../utils/helpers.js';
|
||||
|
||||
interface FlagsDef {
|
||||
fleet?: string;
|
||||
|
@ -16,9 +16,9 @@
|
||||
*/
|
||||
|
||||
import { Flags, Args } from '@oclif/core';
|
||||
import Command from '../../command';
|
||||
import * as cf from '../../utils/common-flags';
|
||||
import { getBalenaSdk, stripIndent } from '../../utils/lazy';
|
||||
import Command from '../../command.js';
|
||||
import * as cf from '../../utils/common-flags.js';
|
||||
import { getBalenaSdk, stripIndent } from '../../utils/lazy.js';
|
||||
|
||||
export default class DeviceLocalModeCmd extends Command {
|
||||
public static description = stripIndent`
|
||||
|
@ -22,11 +22,11 @@ import type {
|
||||
PineOptions,
|
||||
PineTypedResult,
|
||||
} from 'balena-sdk';
|
||||
import Command from '../../command';
|
||||
import * as cf from '../../utils/common-flags';
|
||||
import { ExpectedError } from '../../errors';
|
||||
import { getBalenaSdk, stripIndent } from '../../utils/lazy';
|
||||
import { applicationIdInfo } from '../../utils/messages';
|
||||
import Command from '../../command.js';
|
||||
import * as cf from '../../utils/common-flags.js';
|
||||
import { ExpectedError } from '../../errors.js';
|
||||
import { getBalenaSdk, stripIndent } from '../../utils/lazy.js';
|
||||
import { applicationIdInfo } from '../../utils/messages.js';
|
||||
|
||||
export default class DeviceMoveCmd extends Command {
|
||||
public static description = stripIndent`
|
||||
|
@ -16,11 +16,11 @@
|
||||
*/
|
||||
|
||||
import { Flags, Args } from '@oclif/core';
|
||||
import Command from '../../command';
|
||||
import * as cf from '../../utils/common-flags';
|
||||
import { getBalenaSdk, stripIndent, getCliForm } from '../../utils/lazy';
|
||||
import Command from '../../command.js';
|
||||
import * as cf from '../../utils/common-flags.js';
|
||||
import { getBalenaSdk, stripIndent, getCliForm } from '../../utils/lazy.js';
|
||||
import type { Device } from 'balena-sdk';
|
||||
import { ExpectedError } from '../../errors';
|
||||
import { ExpectedError } from '../../errors.js';
|
||||
|
||||
export default class DeviceOsUpdateCmd extends Command {
|
||||
public static description = stripIndent`
|
||||
|
@ -16,10 +16,10 @@
|
||||
*/
|
||||
|
||||
import { Args } from '@oclif/core';
|
||||
import Command from '../../command';
|
||||
import * as cf from '../../utils/common-flags';
|
||||
import { getBalenaSdk, stripIndent } from '../../utils/lazy';
|
||||
import { getExpandedProp } from '../../utils/pine';
|
||||
import Command from '../../command.js';
|
||||
import * as cf from '../../utils/common-flags.js';
|
||||
import { getBalenaSdk, stripIndent } from '../../utils/lazy.js';
|
||||
import { getExpandedProp } from '../../utils/pine.js';
|
||||
|
||||
export default class DevicePinCmd extends Command {
|
||||
public static description = stripIndent`
|
||||
|
@ -16,10 +16,10 @@
|
||||
*/
|
||||
|
||||
import { Flags, Args } from '@oclif/core';
|
||||
import Command from '../../command';
|
||||
import { ExpectedError } from '../../errors';
|
||||
import * as cf from '../../utils/common-flags';
|
||||
import { getBalenaSdk, stripIndent } from '../../utils/lazy';
|
||||
import Command from '../../command.js';
|
||||
import { ExpectedError } from '../../errors.js';
|
||||
import * as cf from '../../utils/common-flags.js';
|
||||
import { getBalenaSdk, stripIndent } from '../../utils/lazy.js';
|
||||
|
||||
export default class DevicePublicUrlCmd extends Command {
|
||||
public static description = stripIndent`
|
||||
|
@ -16,9 +16,9 @@
|
||||
*/
|
||||
|
||||
import { Args } from '@oclif/core';
|
||||
import Command from '../../command';
|
||||
import * as cf from '../../utils/common-flags';
|
||||
import { getBalenaSdk, getCliUx, stripIndent } from '../../utils/lazy';
|
||||
import Command from '../../command.js';
|
||||
import * as cf from '../../utils/common-flags.js';
|
||||
import { getBalenaSdk, getCliUx, stripIndent } from '../../utils/lazy.js';
|
||||
|
||||
export default class DevicePurgeCmd extends Command {
|
||||
public static description = stripIndent`
|
||||
|
@ -16,9 +16,9 @@
|
||||
*/
|
||||
|
||||
import { Args } from '@oclif/core';
|
||||
import Command from '../../command';
|
||||
import * as cf from '../../utils/common-flags';
|
||||
import { getBalenaSdk, stripIndent } from '../../utils/lazy';
|
||||
import Command from '../../command.js';
|
||||
import * as cf from '../../utils/common-flags.js';
|
||||
import { getBalenaSdk, stripIndent } from '../../utils/lazy.js';
|
||||
|
||||
export default class DeviceRebootCmd extends Command {
|
||||
public static description = stripIndent`
|
||||
|
@ -16,11 +16,11 @@
|
||||
*/
|
||||
|
||||
import { Flags } from '@oclif/core';
|
||||
import Command from '../../command';
|
||||
import * as cf from '../../utils/common-flags';
|
||||
import * as ca from '../../utils/common-args';
|
||||
import { getBalenaSdk, stripIndent } from '../../utils/lazy';
|
||||
import { applicationIdInfo } from '../../utils/messages';
|
||||
import Command from '../../command.js';
|
||||
import * as cf from '../../utils/common-flags.js';
|
||||
import * as ca from '../../utils/common-args.js';
|
||||
import { getBalenaSdk, stripIndent } from '../../utils/lazy.js';
|
||||
import { applicationIdInfo } from '../../utils/messages.js';
|
||||
|
||||
export default class DeviceRegisterCmd extends Command {
|
||||
public static description = stripIndent`
|
||||
|
@ -16,9 +16,9 @@
|
||||
*/
|
||||
|
||||
import { Args } from '@oclif/core';
|
||||
import Command from '../../command';
|
||||
import * as cf from '../../utils/common-flags';
|
||||
import { getBalenaSdk, stripIndent, getCliForm } from '../../utils/lazy';
|
||||
import Command from '../../command.js';
|
||||
import * as cf from '../../utils/common-flags.js';
|
||||
import { getBalenaSdk, stripIndent, getCliForm } from '../../utils/lazy.js';
|
||||
|
||||
export default class DeviceRenameCmd extends Command {
|
||||
public static description = stripIndent`
|
||||
|
@ -16,9 +16,9 @@
|
||||
*/
|
||||
|
||||
import { Flags, Args } from '@oclif/core';
|
||||
import Command from '../../command';
|
||||
import * as cf from '../../utils/common-flags';
|
||||
import { getBalenaSdk, getCliUx, stripIndent } from '../../utils/lazy';
|
||||
import Command from '../../command.js';
|
||||
import * as cf from '../../utils/common-flags.js';
|
||||
import { getBalenaSdk, getCliUx, stripIndent } from '../../utils/lazy.js';
|
||||
import type {
|
||||
BalenaSDK,
|
||||
DeviceWithServiceDetails,
|
||||
|
@ -16,9 +16,9 @@
|
||||
*/
|
||||
|
||||
import { Args } from '@oclif/core';
|
||||
import Command from '../../command';
|
||||
import * as cf from '../../utils/common-flags';
|
||||
import { getBalenaSdk, stripIndent } from '../../utils/lazy';
|
||||
import Command from '../../command.js';
|
||||
import * as cf from '../../utils/common-flags.js';
|
||||
import { getBalenaSdk, stripIndent } from '../../utils/lazy.js';
|
||||
|
||||
export default class DeviceRmCmd extends Command {
|
||||
public static description = stripIndent`
|
||||
|
@ -16,10 +16,10 @@
|
||||
*/
|
||||
|
||||
import { Args } from '@oclif/core';
|
||||
import Command from '../../command';
|
||||
import * as cf from '../../utils/common-flags';
|
||||
import { getBalenaSdk, stripIndent } from '../../utils/lazy';
|
||||
import { ExpectedError } from '../../errors';
|
||||
import Command from '../../command.js';
|
||||
import * as cf from '../../utils/common-flags.js';
|
||||
import { getBalenaSdk, stripIndent } from '../../utils/lazy.js';
|
||||
import { ExpectedError } from '../../errors.js';
|
||||
|
||||
export default class DeviceShutdownCmd extends Command {
|
||||
public static description = stripIndent`
|
||||
|
@ -16,9 +16,9 @@
|
||||
*/
|
||||
|
||||
import { Args } from '@oclif/core';
|
||||
import Command from '../../command';
|
||||
import * as cf from '../../utils/common-flags';
|
||||
import { getBalenaSdk, getCliUx, stripIndent } from '../../utils/lazy';
|
||||
import Command from '../../command.js';
|
||||
import * as cf from '../../utils/common-flags.js';
|
||||
import { getBalenaSdk, getCliUx, stripIndent } from '../../utils/lazy.js';
|
||||
import type { BalenaSDK } from 'balena-sdk';
|
||||
|
||||
export default class DeviceStartServiceCmd extends Command {
|
||||
|
@ -16,9 +16,9 @@
|
||||
*/
|
||||
|
||||
import { Args } from '@oclif/core';
|
||||
import Command from '../../command';
|
||||
import * as cf from '../../utils/common-flags';
|
||||
import { getBalenaSdk, getCliUx, stripIndent } from '../../utils/lazy';
|
||||
import Command from '../../command.js';
|
||||
import * as cf from '../../utils/common-flags.js';
|
||||
import { getBalenaSdk, getCliUx, stripIndent } from '../../utils/lazy.js';
|
||||
import type { BalenaSDK } from 'balena-sdk';
|
||||
|
||||
export default class DeviceStopServiceCmd extends Command {
|
||||
|
@ -16,9 +16,9 @@
|
||||
*/
|
||||
|
||||
import { Args } from '@oclif/core';
|
||||
import Command from '../../command';
|
||||
import * as cf from '../../utils/common-flags';
|
||||
import { getBalenaSdk, stripIndent } from '../../utils/lazy';
|
||||
import Command from '../../command.js';
|
||||
import * as cf from '../../utils/common-flags.js';
|
||||
import { getBalenaSdk, stripIndent } from '../../utils/lazy.js';
|
||||
|
||||
export default class DeviceTrackFleetCmd extends Command {
|
||||
public static description = stripIndent`
|
||||
|
@ -15,11 +15,11 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import Command from '../../command';
|
||||
import * as cf from '../../utils/common-flags';
|
||||
import { expandForAppName } from '../../utils/helpers';
|
||||
import { getBalenaSdk, getVisuals, stripIndent } from '../../utils/lazy';
|
||||
import { applicationIdInfo, jsonInfo } from '../../utils/messages';
|
||||
import Command from '../../command.js';
|
||||
import * as cf from '../../utils/common-flags.js';
|
||||
import { expandForAppName } from '../../utils/helpers.js';
|
||||
import { getBalenaSdk, getVisuals, stripIndent } from '../../utils/lazy.js';
|
||||
import { applicationIdInfo, jsonInfo } from '../../utils/messages.js';
|
||||
|
||||
import type { Device, PineOptions } from 'balena-sdk';
|
||||
|
||||
|
@ -16,12 +16,12 @@
|
||||
*/
|
||||
import { Flags } from '@oclif/core';
|
||||
import type * as BalenaSdk from 'balena-sdk';
|
||||
import * as _ from 'lodash';
|
||||
import Command from '../../command';
|
||||
import _ from 'lodash';
|
||||
import Command from '../../command.js';
|
||||
|
||||
import * as cf from '../../utils/common-flags';
|
||||
import { getBalenaSdk, getVisuals, stripIndent } from '../../utils/lazy';
|
||||
import { CommandHelp } from '../../utils/oclif-utils';
|
||||
import * as cf from '../../utils/common-flags.js';
|
||||
import { getBalenaSdk, getVisuals, stripIndent } from '../../utils/lazy.js';
|
||||
import { CommandHelp } from '../../utils/oclif-utils.js';
|
||||
|
||||
export default class DevicesSupportedCmd extends Command {
|
||||
public static description = stripIndent`
|
||||
|
10
lib/commands/env/add.ts
vendored
10
lib/commands/env/add.ts
vendored
@ -17,11 +17,11 @@
|
||||
|
||||
import { Args } from '@oclif/core';
|
||||
import type * as BalenaSdk from 'balena-sdk';
|
||||
import Command from '../../command';
|
||||
import { ExpectedError } from '../../errors';
|
||||
import * as cf from '../../utils/common-flags';
|
||||
import { getBalenaSdk, stripIndent } from '../../utils/lazy';
|
||||
import { applicationIdInfo } from '../../utils/messages';
|
||||
import Command from '../../command.js';
|
||||
import { ExpectedError } from '../../errors.js';
|
||||
import * as cf from '../../utils/common-flags.js';
|
||||
import { getBalenaSdk, stripIndent } from '../../utils/lazy.js';
|
||||
import { applicationIdInfo } from '../../utils/messages.js';
|
||||
|
||||
interface FlagsDef {
|
||||
fleet?: string;
|
||||
|
10
lib/commands/env/rename.ts
vendored
10
lib/commands/env/rename.ts
vendored
@ -15,12 +15,12 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
import { Args } from '@oclif/core';
|
||||
import Command from '../../command';
|
||||
import Command from '../../command.js';
|
||||
|
||||
import * as cf from '../../utils/common-flags';
|
||||
import * as ec from '../../utils/env-common';
|
||||
import { getBalenaSdk, stripIndent } from '../../utils/lazy';
|
||||
import { parseAsInteger } from '../../utils/validation';
|
||||
import * as cf from '../../utils/common-flags.js';
|
||||
import * as ec from '../../utils/env-common.js';
|
||||
import { getBalenaSdk, stripIndent } from '../../utils/lazy.js';
|
||||
import { parseAsInteger } from '../../utils/validation.js';
|
||||
|
||||
export default class EnvRenameCmd extends Command {
|
||||
public static description = stripIndent`
|
||||
|
8
lib/commands/env/rm.ts
vendored
8
lib/commands/env/rm.ts
vendored
@ -16,11 +16,11 @@
|
||||
*/
|
||||
|
||||
import { Flags, Args } from '@oclif/core';
|
||||
import Command from '../../command';
|
||||
import Command from '../../command.js';
|
||||
|
||||
import * as ec from '../../utils/env-common';
|
||||
import { getBalenaSdk, stripIndent } from '../../utils/lazy';
|
||||
import { parseAsInteger } from '../../utils/validation';
|
||||
import * as ec from '../../utils/env-common.js';
|
||||
import { getBalenaSdk, stripIndent } from '../../utils/lazy.js';
|
||||
import { parseAsInteger } from '../../utils/validation.js';
|
||||
|
||||
export default class EnvRmCmd extends Command {
|
||||
public static description = stripIndent`
|
||||
|
@ -17,12 +17,12 @@
|
||||
import { Flags } from '@oclif/core';
|
||||
import type { Interfaces } from '@oclif/core';
|
||||
import type * as SDK from 'balena-sdk';
|
||||
import * as _ from 'lodash';
|
||||
import Command from '../../command';
|
||||
import { ExpectedError } from '../../errors';
|
||||
import * as cf from '../../utils/common-flags';
|
||||
import { getBalenaSdk, getVisuals, stripIndent } from '../../utils/lazy';
|
||||
import { applicationIdInfo } from '../../utils/messages';
|
||||
import _ from 'lodash';
|
||||
import Command from '../../command.js';
|
||||
import { ExpectedError } from '../../errors.js';
|
||||
import * as cf from '../../utils/common-flags.js';
|
||||
import { getBalenaSdk, getVisuals, stripIndent } from '../../utils/lazy.js';
|
||||
import { applicationIdInfo } from '../../utils/messages.js';
|
||||
|
||||
type FlagsDef = Interfaces.InferredFlags<typeof EnvsCmd.flags>;
|
||||
|
||||
|
@ -17,9 +17,9 @@
|
||||
|
||||
import { Flags, Args } from '@oclif/core';
|
||||
|
||||
import Command from '../../command';
|
||||
import * as cf from '../../utils/common-flags';
|
||||
import { stripIndent } from '../../utils/lazy';
|
||||
import Command from '../../command.js';
|
||||
import * as cf from '../../utils/common-flags.js';
|
||||
import { stripIndent } from '../../utils/lazy.js';
|
||||
|
||||
export default class FleetCreateCmd extends Command {
|
||||
public static description = stripIndent`
|
||||
|
@ -17,11 +17,11 @@
|
||||
|
||||
import { Flags } from '@oclif/core';
|
||||
|
||||
import Command from '../../command';
|
||||
import * as cf from '../../utils/common-flags';
|
||||
import * as ca from '../../utils/common-args';
|
||||
import { getBalenaSdk, stripIndent } from '../../utils/lazy';
|
||||
import { applicationIdInfo } from '../../utils/messages';
|
||||
import Command from '../../command.js';
|
||||
import * as cf from '../../utils/common-flags.js';
|
||||
import * as ca from '../../utils/common-args.js';
|
||||
import { getBalenaSdk, stripIndent } from '../../utils/lazy.js';
|
||||
import { applicationIdInfo } from '../../utils/messages.js';
|
||||
|
||||
export default class FleetCmd extends Command {
|
||||
public static description = stripIndent`
|
||||
|
@ -16,10 +16,10 @@
|
||||
*/
|
||||
|
||||
import { Args } from '@oclif/core';
|
||||
import Command from '../../command';
|
||||
import * as cf from '../../utils/common-flags';
|
||||
import { getBalenaSdk, stripIndent } from '../../utils/lazy';
|
||||
import { getExpandedProp } from '../../utils/pine';
|
||||
import Command from '../../command.js';
|
||||
import * as cf from '../../utils/common-flags.js';
|
||||
import { getBalenaSdk, stripIndent } from '../../utils/lazy.js';
|
||||
import { getExpandedProp } from '../../utils/pine.js';
|
||||
|
||||
export default class FleetPinCmd extends Command {
|
||||
public static description = stripIndent`
|
||||
|
@ -15,11 +15,11 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import Command from '../../command';
|
||||
import * as cf from '../../utils/common-flags';
|
||||
import * as ca from '../../utils/common-args';
|
||||
import { getBalenaSdk, stripIndent } from '../../utils/lazy';
|
||||
import { applicationIdInfo } from '../../utils/messages';
|
||||
import Command from '../../command.js';
|
||||
import * as cf from '../../utils/common-flags.js';
|
||||
import * as ca from '../../utils/common-args.js';
|
||||
import { getBalenaSdk, stripIndent } from '../../utils/lazy.js';
|
||||
import { applicationIdInfo } from '../../utils/messages.js';
|
||||
|
||||
export default class FleetPurgeCmd extends Command {
|
||||
public static description = stripIndent`
|
||||
|
@ -17,11 +17,11 @@
|
||||
|
||||
import { Args } from '@oclif/core';
|
||||
|
||||
import Command from '../../command';
|
||||
import * as cf from '../../utils/common-flags';
|
||||
import * as ca from '../../utils/common-args';
|
||||
import { getBalenaSdk, stripIndent, getCliForm } from '../../utils/lazy';
|
||||
import { applicationIdInfo } from '../../utils/messages';
|
||||
import Command from '../../command.js';
|
||||
import * as cf from '../../utils/common-flags.js';
|
||||
import * as ca from '../../utils/common-args.js';
|
||||
import { getBalenaSdk, stripIndent, getCliForm } from '../../utils/lazy.js';
|
||||
import { applicationIdInfo } from '../../utils/messages.js';
|
||||
|
||||
export default class FleetRenameCmd extends Command {
|
||||
public static description = stripIndent`
|
||||
|
@ -15,11 +15,11 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import Command from '../../command';
|
||||
import * as cf from '../../utils/common-flags';
|
||||
import * as ca from '../../utils/common-args';
|
||||
import { getBalenaSdk, stripIndent } from '../../utils/lazy';
|
||||
import { applicationIdInfo } from '../../utils/messages';
|
||||
import Command from '../../command.js';
|
||||
import * as cf from '../../utils/common-flags.js';
|
||||
import * as ca from '../../utils/common-args.js';
|
||||
import { getBalenaSdk, stripIndent } from '../../utils/lazy.js';
|
||||
import { applicationIdInfo } from '../../utils/messages.js';
|
||||
|
||||
export default class FleetRestartCmd extends Command {
|
||||
public static description = stripIndent`
|
||||
|
@ -15,11 +15,11 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import Command from '../../command';
|
||||
import * as cf from '../../utils/common-flags';
|
||||
import * as ca from '../../utils/common-args';
|
||||
import { getBalenaSdk, stripIndent } from '../../utils/lazy';
|
||||
import { applicationIdInfo } from '../../utils/messages';
|
||||
import Command from '../../command.js';
|
||||
import * as cf from '../../utils/common-flags.js';
|
||||
import * as ca from '../../utils/common-args.js';
|
||||
import { getBalenaSdk, stripIndent } from '../../utils/lazy.js';
|
||||
import { applicationIdInfo } from '../../utils/messages.js';
|
||||
|
||||
export default class FleetRmCmd extends Command {
|
||||
public static description = stripIndent`
|
||||
|
@ -16,9 +16,9 @@
|
||||
*/
|
||||
|
||||
import { Args } from '@oclif/core';
|
||||
import Command from '../../command';
|
||||
import * as cf from '../../utils/common-flags';
|
||||
import { getBalenaSdk, stripIndent } from '../../utils/lazy';
|
||||
import Command from '../../command.js';
|
||||
import * as cf from '../../utils/common-flags.js';
|
||||
import { getBalenaSdk, stripIndent } from '../../utils/lazy.js';
|
||||
|
||||
export default class FleetTrackLatestCmd extends Command {
|
||||
public static description = stripIndent`
|
||||
|
@ -17,9 +17,9 @@
|
||||
|
||||
import type * as BalenaSdk from 'balena-sdk';
|
||||
|
||||
import Command from '../../command';
|
||||
import * as cf from '../../utils/common-flags';
|
||||
import { getBalenaSdk, stripIndent } from '../../utils/lazy';
|
||||
import Command from '../../command.js';
|
||||
import * as cf from '../../utils/common-flags.js';
|
||||
import { getBalenaSdk, stripIndent } from '../../utils/lazy.js';
|
||||
|
||||
interface ExtendedApplication extends ApplicationWithDeviceTypeSlug {
|
||||
device_count: number;
|
||||
|
@ -16,9 +16,9 @@
|
||||
*/
|
||||
|
||||
import { Args } from '@oclif/core';
|
||||
import Command from '../../command';
|
||||
import { stripIndent } from '../../utils/lazy';
|
||||
import { CommandHelp } from '../../utils/oclif-utils';
|
||||
import Command from '../../command.js';
|
||||
import { stripIndent } from '../../utils/lazy.js';
|
||||
import { CommandHelp } from '../../utils/oclif-utils.js';
|
||||
|
||||
// 'Internal' commands are called during the execution of other commands.
|
||||
// `osinit` is called during `os initialize`
|
||||
|
@ -16,11 +16,11 @@
|
||||
*/
|
||||
|
||||
import { Args, Flags } from '@oclif/core';
|
||||
import Command from '../../command';
|
||||
import * as cf from '../../utils/common-flags';
|
||||
import { getBalenaSdk, stripIndent } from '../../utils/lazy';
|
||||
import { applicationIdInfo } from '../../utils/messages';
|
||||
import { parseAsLocalHostnameOrIp } from '../../utils/validation';
|
||||
import Command from '../../command.js';
|
||||
import * as cf from '../../utils/common-flags.js';
|
||||
import { getBalenaSdk, stripIndent } from '../../utils/lazy.js';
|
||||
import { applicationIdInfo } from '../../utils/messages.js';
|
||||
import { parseAsLocalHostnameOrIp } from '../../utils/validation.js';
|
||||
|
||||
export default class JoinCmd extends Command {
|
||||
public static description = stripIndent`
|
||||
|
@ -16,10 +16,10 @@
|
||||
*/
|
||||
|
||||
import { Args } from '@oclif/core';
|
||||
import Command from '../../command';
|
||||
import { ExpectedError } from '../../errors';
|
||||
import * as cf from '../../utils/common-flags';
|
||||
import { getBalenaSdk, stripIndent } from '../../utils/lazy';
|
||||
import Command from '../../command.js';
|
||||
import { ExpectedError } from '../../errors.js';
|
||||
import * as cf from '../../utils/common-flags.js';
|
||||
import { getBalenaSdk, stripIndent } from '../../utils/lazy.js';
|
||||
|
||||
export default class KeyAddCmd extends Command {
|
||||
public static description = stripIndent`
|
||||
|
@ -16,10 +16,10 @@
|
||||
*/
|
||||
|
||||
import { Args } from '@oclif/core';
|
||||
import Command from '../../command';
|
||||
import * as cf from '../../utils/common-flags';
|
||||
import { getBalenaSdk, getVisuals, stripIndent } from '../../utils/lazy';
|
||||
import { parseAsInteger } from '../../utils/validation';
|
||||
import Command from '../../command.js';
|
||||
import * as cf from '../../utils/common-flags.js';
|
||||
import { getBalenaSdk, getVisuals, stripIndent } from '../../utils/lazy.js';
|
||||
import { parseAsInteger } from '../../utils/validation.js';
|
||||
|
||||
export default class KeyCmd extends Command {
|
||||
public static description = stripIndent`
|
||||
|
@ -16,10 +16,10 @@
|
||||
*/
|
||||
|
||||
import { Args } from '@oclif/core';
|
||||
import Command from '../../command';
|
||||
import * as cf from '../../utils/common-flags';
|
||||
import { getBalenaSdk, stripIndent } from '../../utils/lazy';
|
||||
import { parseAsInteger } from '../../utils/validation';
|
||||
import Command from '../../command.js';
|
||||
import * as cf from '../../utils/common-flags.js';
|
||||
import { getBalenaSdk, stripIndent } from '../../utils/lazy.js';
|
||||
import { parseAsInteger } from '../../utils/validation.js';
|
||||
|
||||
export default class KeyRmCmd extends Command {
|
||||
public static description = stripIndent`
|
||||
|
@ -15,9 +15,9 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import Command from '../../command';
|
||||
import * as cf from '../../utils/common-flags';
|
||||
import { getBalenaSdk, getVisuals, stripIndent } from '../../utils/lazy';
|
||||
import Command from '../../command.js';
|
||||
import * as cf from '../../utils/common-flags.js';
|
||||
import { getBalenaSdk, getVisuals, stripIndent } from '../../utils/lazy.js';
|
||||
|
||||
export default class KeysCmd extends Command {
|
||||
public static description = stripIndent`
|
||||
|
@ -16,10 +16,10 @@
|
||||
*/
|
||||
|
||||
import { Args } from '@oclif/core';
|
||||
import Command from '../../command';
|
||||
import * as cf from '../../utils/common-flags';
|
||||
import { stripIndent } from '../../utils/lazy';
|
||||
import { parseAsLocalHostnameOrIp } from '../../utils/validation';
|
||||
import Command from '../../command.js';
|
||||
import * as cf from '../../utils/common-flags.js';
|
||||
import { stripIndent } from '../../utils/lazy.js';
|
||||
import { parseAsLocalHostnameOrIp } from '../../utils/validation.js';
|
||||
|
||||
export default class LeaveCmd extends Command {
|
||||
public static description = stripIndent`
|
||||
|
@ -17,9 +17,9 @@
|
||||
|
||||
import { Args } from '@oclif/core';
|
||||
import { promisify } from 'util';
|
||||
import Command from '../../command';
|
||||
import * as cf from '../../utils/common-flags';
|
||||
import { stripIndent } from '../../utils/lazy';
|
||||
import Command from '../../command.js';
|
||||
import * as cf from '../../utils/common-flags.js';
|
||||
import { stripIndent } from '../../utils/lazy.js';
|
||||
|
||||
export default class LocalConfigureCmd extends Command {
|
||||
public static description = stripIndent`
|
||||
|
@ -17,10 +17,10 @@
|
||||
|
||||
import { Args } from '@oclif/core';
|
||||
import type { BlockDevice } from 'etcher-sdk/build/source-destination';
|
||||
import Command from '../../command';
|
||||
import { ExpectedError } from '../../errors';
|
||||
import * as cf from '../../utils/common-flags';
|
||||
import { getChalk, getVisuals, stripIndent } from '../../utils/lazy';
|
||||
import Command from '../../command.js';
|
||||
import { ExpectedError } from '../../errors.js';
|
||||
import * as cf from '../../utils/common-flags.js';
|
||||
import { getChalk, getVisuals, stripIndent } from '../../utils/lazy.js';
|
||||
|
||||
export default class LocalFlashCmd extends Command {
|
||||
public static description = stripIndent`
|
||||
|
@ -16,10 +16,10 @@
|
||||
*/
|
||||
|
||||
import { Flags, Args } from '@oclif/core';
|
||||
import Command from '../../command';
|
||||
import * as cf from '../../utils/common-flags';
|
||||
import { getBalenaSdk, stripIndent, getCliForm } from '../../utils/lazy';
|
||||
import { ExpectedError } from '../../errors';
|
||||
import Command from '../../command.js';
|
||||
import * as cf from '../../utils/common-flags.js';
|
||||
import { getBalenaSdk, stripIndent, getCliForm } from '../../utils/lazy.js';
|
||||
import { ExpectedError } from '../../errors.js';
|
||||
import type { WhoamiResult } from 'balena-sdk';
|
||||
|
||||
interface FlagsDef {
|
||||
|
@ -15,8 +15,8 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import Command from '../../command';
|
||||
import { getBalenaSdk, stripIndent } from '../../utils/lazy';
|
||||
import Command from '../../command.js';
|
||||
import { getBalenaSdk, stripIndent } from '../../utils/lazy.js';
|
||||
|
||||
export default class LogoutCmd extends Command {
|
||||
public static description = stripIndent`
|
||||
|
@ -16,9 +16,9 @@
|
||||
*/
|
||||
|
||||
import { Flags, Args } from '@oclif/core';
|
||||
import Command from '../../command';
|
||||
import * as cf from '../../utils/common-flags';
|
||||
import { getBalenaSdk, stripIndent } from '../../utils/lazy';
|
||||
import Command from '../../command.js';
|
||||
import * as cf from '../../utils/common-flags.js';
|
||||
import { getBalenaSdk, stripIndent } from '../../utils/lazy.js';
|
||||
import type { LogMessage } from 'balena-sdk';
|
||||
|
||||
const MAX_RETRY = 1000;
|
||||
@ -104,7 +104,6 @@ export default class LogsCmd extends Command {
|
||||
'../../utils/validation.js'
|
||||
);
|
||||
const { default: Logger } = await import('../../utils/logger.js');
|
||||
|
||||
const logger = Logger.getLogger();
|
||||
|
||||
const displayCloudLog = async (line: LogMessage) => {
|
||||
|
@ -16,10 +16,10 @@
|
||||
*/
|
||||
|
||||
import { Flags, Args } from '@oclif/core';
|
||||
import Command from '../../command';
|
||||
import { ExpectedError } from '../../errors';
|
||||
import * as cf from '../../utils/common-flags';
|
||||
import { getBalenaSdk, stripIndent } from '../../utils/lazy';
|
||||
import Command from '../../command.js';
|
||||
import { ExpectedError } from '../../errors.js';
|
||||
import * as cf from '../../utils/common-flags.js';
|
||||
import { getBalenaSdk, stripIndent } from '../../utils/lazy.js';
|
||||
|
||||
export default class NoteCmd extends Command {
|
||||
public static description = stripIndent`
|
||||
|
@ -15,9 +15,9 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import Command from '../../command';
|
||||
import * as cf from '../../utils/common-flags';
|
||||
import { getBalenaSdk, getVisuals, stripIndent } from '../../utils/lazy';
|
||||
import Command from '../../command.js';
|
||||
import * as cf from '../../utils/common-flags.js';
|
||||
import { getBalenaSdk, getVisuals, stripIndent } from '../../utils/lazy.js';
|
||||
|
||||
export default class OrgsCmd extends Command {
|
||||
public static description = stripIndent`
|
||||
|
@ -16,10 +16,10 @@
|
||||
*/
|
||||
|
||||
import { Flags, Args } from '@oclif/core';
|
||||
import Command from '../../command';
|
||||
import * as cf from '../../utils/common-flags';
|
||||
import { getCliForm, stripIndent } from '../../utils/lazy';
|
||||
import * as _ from 'lodash';
|
||||
import Command from '../../command.js';
|
||||
import * as cf from '../../utils/common-flags.js';
|
||||
import { getCliForm, stripIndent } from '../../utils/lazy.js';
|
||||
import _ from 'lodash';
|
||||
import type { DeviceTypeJson } from 'balena-sdk';
|
||||
|
||||
export default class OsBuildConfigCmd extends Command {
|
||||
|
@ -19,16 +19,16 @@ import { Flags, Args } from '@oclif/core';
|
||||
import type { Interfaces } from '@oclif/core';
|
||||
import type * as BalenaSdk from 'balena-sdk';
|
||||
import { promisify } from 'util';
|
||||
import * as _ from 'lodash';
|
||||
import Command from '../../command';
|
||||
import { ExpectedError } from '../../errors';
|
||||
import * as cf from '../../utils/common-flags';
|
||||
import { getBalenaSdk, stripIndent, getCliForm } from '../../utils/lazy';
|
||||
import _ from 'lodash';
|
||||
import Command from '../../command.js';
|
||||
import { ExpectedError } from '../../errors.js';
|
||||
import * as cf from '../../utils/common-flags.js';
|
||||
import { getBalenaSdk, stripIndent, getCliForm } from '../../utils/lazy.js';
|
||||
import {
|
||||
applicationIdInfo,
|
||||
devModeInfo,
|
||||
secureBootInfo,
|
||||
} from '../../utils/messages';
|
||||
} from '../../utils/messages.js';
|
||||
|
||||
const CONNECTIONS_FOLDER = '/system-connections';
|
||||
|
||||
@ -205,7 +205,7 @@ export default class OsConfigureCmd extends Command {
|
||||
deviceTypeSlug,
|
||||
);
|
||||
|
||||
let configJson: import('../../utils/config').ImgConfig | undefined;
|
||||
let configJson: import('../../utils/config.js').ImgConfig | undefined;
|
||||
if (options.config) {
|
||||
const rawConfig = await fs.readFile(options.config, 'utf8');
|
||||
configJson = JSON.parse(rawConfig);
|
||||
@ -394,7 +394,7 @@ async function checkDeviceTypeCompatibility(
|
||||
async function askQuestionsForDeviceType(
|
||||
deviceType: BalenaSdk.DeviceTypeJson.DeviceType,
|
||||
options: FlagsDef,
|
||||
configJson?: import('../../utils/config').ImgConfig,
|
||||
configJson?: import('../../utils/config.js').ImgConfig,
|
||||
): Promise<Answers> {
|
||||
const answerSources: any[] = [
|
||||
{
|
||||
|
@ -16,9 +16,9 @@
|
||||
*/
|
||||
|
||||
import { Flags, Args } from '@oclif/core';
|
||||
import Command from '../../command';
|
||||
import * as cf from '../../utils/common-flags';
|
||||
import { stripIndent } from '../../utils/lazy';
|
||||
import Command from '../../command.js';
|
||||
import * as cf from '../../utils/common-flags.js';
|
||||
import { stripIndent } from '../../utils/lazy.js';
|
||||
|
||||
export default class OsDownloadCmd extends Command {
|
||||
public static description = stripIndent`
|
||||
|
@ -16,9 +16,9 @@
|
||||
*/
|
||||
|
||||
import { Args } from '@oclif/core';
|
||||
import Command from '../../command';
|
||||
import * as cf from '../../utils/common-flags';
|
||||
import { getCliForm, stripIndent } from '../../utils/lazy';
|
||||
import Command from '../../command.js';
|
||||
import * as cf from '../../utils/common-flags.js';
|
||||
import { getCliForm, stripIndent } from '../../utils/lazy.js';
|
||||
|
||||
const INIT_WARNING_MESSAGE = `
|
||||
|
||||
|
@ -16,9 +16,9 @@
|
||||
*/
|
||||
|
||||
import { Flags, Args } from '@oclif/core';
|
||||
import Command from '../../command';
|
||||
import * as cf from '../../utils/common-flags';
|
||||
import { stripIndent } from '../../utils/lazy';
|
||||
import Command from '../../command.js';
|
||||
import * as cf from '../../utils/common-flags.js';
|
||||
import { stripIndent } from '../../utils/lazy.js';
|
||||
|
||||
export default class OsVersionsCmd extends Command {
|
||||
public static description = stripIndent`
|
||||
|
@ -15,21 +15,21 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import Command from '../../command';
|
||||
import { ExpectedError } from '../../errors';
|
||||
import * as cf from '../../utils/common-flags';
|
||||
import Command from '../../command.js';
|
||||
import { ExpectedError } from '../../errors.js';
|
||||
import * as cf from '../../utils/common-flags.js';
|
||||
import {
|
||||
getBalenaSdk,
|
||||
getCliForm,
|
||||
getVisuals,
|
||||
stripIndent,
|
||||
} from '../../utils/lazy';
|
||||
import { applicationIdInfo } from '../../utils/messages';
|
||||
import { dockerConnectionCliFlags } from '../../utils/docker';
|
||||
import { parseAsInteger } from '../../utils/validation';
|
||||
} from '../../utils/lazy.js';
|
||||
import { applicationIdInfo } from '../../utils/messages.js';
|
||||
import { dockerConnectionCliFlags } from '../../utils/docker.js';
|
||||
import { parseAsInteger } from '../../utils/validation.js';
|
||||
|
||||
import { Flags, Args } from '@oclif/core';
|
||||
import * as _ from 'lodash';
|
||||
import _ from 'lodash';
|
||||
import type {
|
||||
Application,
|
||||
BalenaSDK,
|
||||
|
@ -17,18 +17,18 @@
|
||||
|
||||
import { Flags, Args } from '@oclif/core';
|
||||
import type { Interfaces } from '@oclif/core';
|
||||
import Command from '../../command';
|
||||
import * as cf from '../../utils/common-flags';
|
||||
import { getBalenaSdk, stripIndent } from '../../utils/lazy';
|
||||
import { dockerignoreHelp, registrySecretsHelp } from '../../utils/messages';
|
||||
import Command from '../../command.js';
|
||||
import * as cf from '../../utils/common-flags.js';
|
||||
import { getBalenaSdk, stripIndent } from '../../utils/lazy.js';
|
||||
import { dockerignoreHelp, registrySecretsHelp } from '../../utils/messages.js';
|
||||
import type { BalenaSDK } from 'balena-sdk';
|
||||
import { ExpectedError, instanceOf } from '../../errors';
|
||||
import { ExpectedError, instanceOf } from '../../errors.js';
|
||||
import type { RegistrySecrets } from '@balena/compose/dist/multibuild';
|
||||
import { lowercaseIfSlug } from '../../utils/normalization';
|
||||
import { lowercaseIfSlug } from '../../utils/normalization.js';
|
||||
import {
|
||||
applyReleaseTagKeysAndValues,
|
||||
parseReleaseTagKeysAndValues,
|
||||
} from '../../utils/compose_ts';
|
||||
} from '../../utils/compose_ts.js';
|
||||
|
||||
enum BuildTarget {
|
||||
Cloud,
|
||||
|
@ -15,10 +15,10 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { commitOrIdArg } from '.';
|
||||
import Command from '../../command';
|
||||
import * as cf from '../../utils/common-flags';
|
||||
import { getBalenaSdk, stripIndent } from '../../utils/lazy';
|
||||
import { commitOrIdArg } from './index.js';
|
||||
import Command from '../../command.js';
|
||||
import * as cf from '../../utils/common-flags.js';
|
||||
import { getBalenaSdk, stripIndent } from '../../utils/lazy.js';
|
||||
|
||||
export default class ReleaseFinalizeCmd extends Command {
|
||||
public static description = stripIndent`
|
||||
|
@ -16,13 +16,13 @@
|
||||
*/
|
||||
|
||||
import { Flags, Args, type Interfaces } from '@oclif/core';
|
||||
import Command from '../../command';
|
||||
import * as cf from '../../utils/common-flags';
|
||||
import { getBalenaSdk, getVisuals, stripIndent } from '../../utils/lazy';
|
||||
import Command from '../../command.js';
|
||||
import * as cf from '../../utils/common-flags.js';
|
||||
import { getBalenaSdk, getVisuals, stripIndent } from '../../utils/lazy.js';
|
||||
import type * as BalenaSdk from 'balena-sdk';
|
||||
import jsyaml = require('js-yaml');
|
||||
import { tryAsInteger } from '../../utils/validation';
|
||||
import { jsonInfo } from '../../utils/messages';
|
||||
import jsyaml from 'js-yaml';
|
||||
import { tryAsInteger } from '../../utils/validation.js';
|
||||
import { jsonInfo } from '../../utils/messages.js';
|
||||
|
||||
export const commitOrIdArg = Args.custom({
|
||||
parse: async (commitOrId: string) => tryAsInteger(commitOrId),
|
||||
|
@ -15,10 +15,10 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { commitOrIdArg } from '.';
|
||||
import Command from '../../command';
|
||||
import * as cf from '../../utils/common-flags';
|
||||
import { getBalenaSdk, stripIndent } from '../../utils/lazy';
|
||||
import { commitOrIdArg } from './index.js';
|
||||
import Command from '../../command.js';
|
||||
import * as cf from '../../utils/common-flags.js';
|
||||
import { getBalenaSdk, stripIndent } from '../../utils/lazy.js';
|
||||
|
||||
export default class ReleaseInvalidateCmd extends Command {
|
||||
public static description = stripIndent`
|
||||
|
@ -15,10 +15,10 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { commitOrIdArg } from '.';
|
||||
import Command from '../../command';
|
||||
import * as cf from '../../utils/common-flags';
|
||||
import { getBalenaSdk, stripIndent } from '../../utils/lazy';
|
||||
import { commitOrIdArg } from './index.js';
|
||||
import Command from '../../command.js';
|
||||
import * as cf from '../../utils/common-flags.js';
|
||||
import { getBalenaSdk, stripIndent } from '../../utils/lazy.js';
|
||||
|
||||
export default class ReleaseValidateCmd extends Command {
|
||||
public static description = stripIndent`
|
||||
|
@ -16,12 +16,12 @@
|
||||
*/
|
||||
|
||||
import { Args } from '@oclif/core';
|
||||
import Command from '../../command';
|
||||
import * as cf from '../../utils/common-flags';
|
||||
import { getBalenaSdk, getVisuals, stripIndent } from '../../utils/lazy';
|
||||
import { applicationNameNote } from '../../utils/messages';
|
||||
import Command from '../../command.js';
|
||||
import * as cf from '../../utils/common-flags.js';
|
||||
import { getBalenaSdk, getVisuals, stripIndent } from '../../utils/lazy.js';
|
||||
import { applicationNameNote } from '../../utils/messages.js';
|
||||
import type * as BalenaSdk from 'balena-sdk';
|
||||
import { jsonInfo } from '../../utils/messages';
|
||||
import { jsonInfo } from '../../utils/messages.js';
|
||||
|
||||
export default class ReleasesCmd extends Command {
|
||||
public static description = stripIndent`
|
||||
|
@ -16,9 +16,9 @@
|
||||
*/
|
||||
|
||||
import { Flags } from '@oclif/core';
|
||||
import Command from '../../command';
|
||||
import * as cf from '../../utils/common-flags';
|
||||
import { getCliUx, stripIndent } from '../../utils/lazy';
|
||||
import Command from '../../command.js';
|
||||
import * as cf from '../../utils/common-flags.js';
|
||||
import { getCliUx, stripIndent } from '../../utils/lazy.js';
|
||||
|
||||
export default class ScanCmd extends Command {
|
||||
public static description = stripIndent`
|
||||
|
@ -15,9 +15,9 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import Command from '../../command';
|
||||
import * as cf from '../../utils/common-flags';
|
||||
import { getBalenaSdk, stripIndent } from '../../utils/lazy';
|
||||
import Command from '../../command.js';
|
||||
import * as cf from '../../utils/common-flags.js';
|
||||
import { getBalenaSdk, stripIndent } from '../../utils/lazy.js';
|
||||
|
||||
export default class SettingsCmd extends Command {
|
||||
public static description = stripIndent`
|
||||
|
@ -16,13 +16,13 @@
|
||||
*/
|
||||
|
||||
import { Flags, Args } from '@oclif/core';
|
||||
import Command from '../../command';
|
||||
import * as cf from '../../utils/common-flags';
|
||||
import { getBalenaSdk, stripIndent } from '../../utils/lazy';
|
||||
import Command from '../../command.js';
|
||||
import * as cf from '../../utils/common-flags.js';
|
||||
import { getBalenaSdk, stripIndent } from '../../utils/lazy.js';
|
||||
import {
|
||||
parseAsInteger,
|
||||
validateLocalHostnameOrIp,
|
||||
} from '../../utils/validation';
|
||||
} from '../../utils/validation.js';
|
||||
|
||||
export default class SshCmd extends Command {
|
||||
public static description = stripIndent`
|
||||
|
@ -16,11 +16,11 @@
|
||||
*/
|
||||
|
||||
import { Flags, Args } from '@oclif/core';
|
||||
import Command from '../../command';
|
||||
import { ExpectedError } from '../../errors';
|
||||
import * as cf from '../../utils/common-flags';
|
||||
import { getBalenaSdk, getCliUx, stripIndent } from '../../utils/lazy';
|
||||
import { applicationIdInfo } from '../../utils/messages';
|
||||
import Command from '../../command.js';
|
||||
import { ExpectedError } from '../../errors.js';
|
||||
import * as cf from '../../utils/common-flags.js';
|
||||
import { getBalenaSdk, getCliUx, stripIndent } from '../../utils/lazy.js';
|
||||
import { applicationIdInfo } from '../../utils/messages.js';
|
||||
|
||||
export default class SupportCmd extends Command {
|
||||
public static description = stripIndent`
|
||||
|
@ -16,10 +16,10 @@
|
||||
*/
|
||||
|
||||
import { Args } from '@oclif/core';
|
||||
import Command from '../../command';
|
||||
import * as cf from '../../utils/common-flags';
|
||||
import { getBalenaSdk, stripIndent } from '../../utils/lazy';
|
||||
import { applicationIdInfo } from '../../utils/messages';
|
||||
import Command from '../../command.js';
|
||||
import * as cf from '../../utils/common-flags.js';
|
||||
import { getBalenaSdk, stripIndent } from '../../utils/lazy.js';
|
||||
import { applicationIdInfo } from '../../utils/messages.js';
|
||||
|
||||
export default class TagRmCmd extends Command {
|
||||
public static description = stripIndent`
|
||||
|
@ -16,10 +16,10 @@
|
||||
*/
|
||||
|
||||
import { Args } from '@oclif/core';
|
||||
import Command from '../../command';
|
||||
import * as cf from '../../utils/common-flags';
|
||||
import { getBalenaSdk, stripIndent } from '../../utils/lazy';
|
||||
import { applicationIdInfo } from '../../utils/messages';
|
||||
import Command from '../../command.js';
|
||||
import * as cf from '../../utils/common-flags.js';
|
||||
import { getBalenaSdk, stripIndent } from '../../utils/lazy.js';
|
||||
import { applicationIdInfo } from '../../utils/messages.js';
|
||||
|
||||
export default class TagSetCmd extends Command {
|
||||
public static description = stripIndent`
|
||||
|
@ -15,11 +15,11 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import Command from '../../command';
|
||||
import { ExpectedError } from '../../errors';
|
||||
import * as cf from '../../utils/common-flags';
|
||||
import { getBalenaSdk, getVisuals, stripIndent } from '../../utils/lazy';
|
||||
import { applicationIdInfo } from '../../utils/messages';
|
||||
import Command from '../../command.js';
|
||||
import { ExpectedError } from '../../errors.js';
|
||||
import * as cf from '../../utils/common-flags.js';
|
||||
import { getBalenaSdk, getVisuals, stripIndent } from '../../utils/lazy.js';
|
||||
import { applicationIdInfo } from '../../utils/messages.js';
|
||||
|
||||
export default class TagsCmd extends Command {
|
||||
public static description = stripIndent`
|
||||
|
@ -16,15 +16,15 @@
|
||||
*/
|
||||
|
||||
import { Flags, Args } from '@oclif/core';
|
||||
import Command from '../../command';
|
||||
import Command from '../../command.js';
|
||||
import {
|
||||
NoPortsDefinedError,
|
||||
InvalidPortMappingError,
|
||||
ExpectedError,
|
||||
} from '../../errors';
|
||||
import * as cf from '../../utils/common-flags';
|
||||
import { getBalenaSdk, stripIndent } from '../../utils/lazy';
|
||||
import { lowercaseIfSlug } from '../../utils/normalization';
|
||||
} from '../../errors.js';
|
||||
import * as cf from '../../utils/common-flags.js';
|
||||
import { getBalenaSdk, stripIndent } from '../../utils/lazy.js';
|
||||
import { lowercaseIfSlug } from '../../utils/normalization.js';
|
||||
|
||||
import type { Server, Socket } from 'net';
|
||||
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user