From 8b5ebe0645c516220fb18c11e2e779387ab5d612 Mon Sep 17 00:00:00 2001 From: Cameron Diver Date: Mon, 10 Jun 2019 11:07:51 +0100 Subject: [PATCH] Pin prettier and add formatting changes Signed-off-by: Cameron Diver --- automation/capitanodoc/utils.ts | 4 +++- lib/actions/push.ts | 4 +++- lib/actions/ssh.ts | 8 ++++++-- lib/actions/tunnel.ts | 4 +++- lib/app-common.ts | 4 +++- lib/app.ts | 4 +++- lib/utils/compose_ts.ts | 8 ++++++-- lib/utils/helpers.ts | 8 ++++++-- lib/utils/remote-build.ts | 4 +++- package.json | 2 +- 10 files changed, 37 insertions(+), 13 deletions(-) diff --git a/automation/capitanodoc/utils.ts b/automation/capitanodoc/utils.ts index bab22b00..2eca5c7b 100644 --- a/automation/capitanodoc/utils.ts +++ b/automation/capitanodoc/utils.ts @@ -137,7 +137,9 @@ export class MarkdownFileParser { } else { reject( new Error( - `Markdown section not found: title="${title}" file="${this.mdFilePath}"`, + `Markdown section not found: title="${title}" file="${ + this.mdFilePath + }"`, ), ); } diff --git a/lib/actions/push.ts b/lib/actions/push.ts index 1a78b8b3..3157d82b 100644 --- a/lib/actions/push.ts +++ b/lib/actions/push.ts @@ -88,7 +88,9 @@ async function getAppOwner(sdk: BalenaSDK, appName: string) { }); const selected = await selectFromList( - `${entries.length} applications found with that name, please select the application you would like to push to`, + `${ + entries.length + } applications found with that name, please select the application you would like to push to`, entries, ); diff --git a/lib/actions/ssh.ts b/lib/actions/ssh.ts index d02e71cb..0df7f878 100644 --- a/lib/actions/ssh.ts +++ b/lib/actions/ssh.ts @@ -58,13 +58,17 @@ async function getContainerId( }); if (request.status !== 200) { throw new Error( - `There was an error connecting to device ${uuid}, HTTP response code: ${request.status}.`, + `There was an error connecting to device ${uuid}, HTTP response code: ${ + request.status + }.`, ); } const body = request.body; if (body.status !== 'success') { throw new Error( - `There was an error communicating with device ${uuid}.\n\tError: ${body.message}`, + `There was an error communicating with device ${uuid}.\n\tError: ${ + body.message + }`, ); } containerId = body.services[serviceName]; diff --git a/lib/actions/tunnel.ts b/lib/actions/tunnel.ts index 83af475a..e89f21a7 100644 --- a/lib/actions/tunnel.ts +++ b/lib/actions/tunnel.ts @@ -201,7 +201,9 @@ export const tunnel: CommandDefinition = { ) .then(() => { logger.logInfo( - ` - tunnelling ${localAddress}:${localPort} to ${device.uuid}:${remotePort}`, + ` - tunnelling ${localAddress}:${localPort} to ${ + device.uuid + }:${remotePort}`, ); return true; diff --git a/lib/app-common.ts b/lib/app-common.ts index 052f0730..a3589c4d 100644 --- a/lib/app-common.ts +++ b/lib/app-common.ts @@ -45,7 +45,9 @@ function checkNodeVersion() { const { stripIndent } = require('common-tags'); console.warn(stripIndent` ------------------------------------------------------------------------------ - Warning: Node version "${process.version}" does not match required versions "${validNodeVersions}". + Warning: Node version "${ + process.version + }" does not match required versions "${validNodeVersions}". This may cause unexpected behaviour. To upgrade Node, visit: https://nodejs.org/en/download/ ------------------------------------------------------------------------------ diff --git a/lib/app.ts b/lib/app.ts index f5a4f9a0..6353aca8 100644 --- a/lib/app.ts +++ b/lib/app.ts @@ -25,7 +25,9 @@ import { exitWithExpectedError } from './utils/patterns'; function routeCliFramework(argv: string[]): void { if (process.env.DEBUG) { console.log( - `Debug: original argv0="${process.argv0}" argv=[${argv}] length=${argv.length}`, + `Debug: original argv0="${process.argv0}" argv=[${argv}] length=${ + argv.length + }`, ); } const cmdSlice = argv.slice(2); diff --git a/lib/utils/compose_ts.ts b/lib/utils/compose_ts.ts index b20b5d48..d25d67ef 100644 --- a/lib/utils/compose_ts.ts +++ b/lib/utils/compose_ts.ts @@ -51,7 +51,9 @@ export async function parseRegistrySecrets( return registrySecrets; } catch (error) { return exitWithExpectedError( - `Error validating registry secrets file "${secretsFilename}":\n${error.message}`, + `Error validating registry secrets file "${secretsFilename}":\n${ + error.message + }`, ); } } @@ -142,7 +144,9 @@ async function performResolution( buildTask.buildStream = clonedStream; if (!buildTask.external && !buildTask.resolved) { throw new Error( - `Project type for service "${buildTask.serviceName}" could not be determined. Missing a Dockerfile?`, + `Project type for service "${ + buildTask.serviceName + }" could not be determined. Missing a Dockerfile?`, ); } return buildTask; diff --git a/lib/utils/helpers.ts b/lib/utils/helpers.ts index 40300e2d..beab4ba5 100644 --- a/lib/utils/helpers.ts +++ b/lib/utils/helpers.ts @@ -45,9 +45,13 @@ export function stateToString(state: OperationState) { switch (state.operation.command) { case 'copy': - return `${result} ${state.operation.from.path} -> ${state.operation.to.path}`; + return `${result} ${state.operation.from.path} -> ${ + state.operation.to.path + }`; case 'replace': - return `${result} ${state.operation.file.path}, ${state.operation.copy} -> ${state.operation.replace}`; + return `${result} ${state.operation.file.path}, ${ + state.operation.copy + } -> ${state.operation.replace}`; case 'run-script': return `${result} ${state.operation.script}`; default: diff --git a/lib/utils/remote-build.ts b/lib/utils/remote-build.ts index fd233c11..4e8f9057 100644 --- a/lib/utils/remote-build.ts +++ b/lib/utils/remote-build.ts @@ -279,7 +279,9 @@ function createRemoteBuildRequest( if (response.statusCode >= 100 && response.statusCode < 400) { if (DEBUG_MODE) { console.log( - `[debug] received HTTP ${response.statusCode} ${response.statusMessage}`, + `[debug] received HTTP ${response.statusCode} ${ + response.statusMessage + }`, ); } } else { diff --git a/package.json b/package.json index 418ada47..56207bde 100644 --- a/package.json +++ b/package.json @@ -106,7 +106,7 @@ "gulp-shell": "^0.5.2", "mochainon": "^2.0.0", "pkg": "~4.3.8", - "prettier": "^1.17.0", + "prettier": "1.17.0", "publish-release": "^1.6.0", "resin-lint": "^3.0.1", "rewire": "^3.0.2",