From 7b73bb9df0ef892ab92516ff3c33ed5e3534d705 Mon Sep 17 00:00:00 2001 From: Julien Fontanet Date: Thu, 23 Dec 2021 12:06:11 +0100 Subject: [PATCH] chore: format with Prettier --- .github/ISSUE_TEMPLATE/bug_report.md | 11 ++--- @xen-orchestra/proxy/src/app/mixins/api.mjs | 42 +++++++++---------- .../src/vmdk-to-vhd.integ.spec.js | 6 ++- 3 files changed, 32 insertions(+), 27 deletions(-) diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md index ce7fcc5a0..074660b53 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.md +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -4,7 +4,6 @@ about: Create a report to help us improve title: '' labels: 'status: triaging :triangular_flag_on_post:, type: bug :bug:' assignees: '' - --- **Describe the bug** @@ -12,6 +11,7 @@ A clear and concise description of what the bug is. **To Reproduce** Steps to reproduce the behavior: + 1. Go to '...' 2. Click on '....' 3. Scroll down to '....' @@ -24,10 +24,11 @@ A clear and concise description of what you expected to happen. If applicable, add screenshots to help explain your problem. **Desktop (please complete the following information):** - - Node: [e.g. 16.12.1] - - xo-server: [e.g. 5.82.3] - - xo-web: [e.g. 5.87.0] - - hypervisor: [e.g. XCP-ng 8.2.0] + +- Node: [e.g. 16.12.1] +- xo-server: [e.g. 5.82.3] +- xo-web: [e.g. 5.87.0] +- hypervisor: [e.g. XCP-ng 8.2.0] **Additional context** Add any other context about the problem here. diff --git a/@xen-orchestra/proxy/src/app/mixins/api.mjs b/@xen-orchestra/proxy/src/app/mixins/api.mjs index e4250c3d6..6937156ba 100644 --- a/@xen-orchestra/proxy/src/app/mixins/api.mjs +++ b/@xen-orchestra/proxy/src/app/mixins/api.mjs @@ -14,7 +14,7 @@ import { createLogger } from '@xen-orchestra/log' const { debug, warn } = createLogger('xo:proxy:api') -const ndJsonStream = asyncIteratorToStream(async function*(responseId, iterable) { +const ndJsonStream = asyncIteratorToStream(async function* (responseId, iterable) { try { let cursor, iterator try { @@ -52,7 +52,7 @@ export default class Api { ctx.req.setTimeout(0) const profile = await app.authentication.findProfile({ - authenticationToken: ctx.cookies.get('authenticationToken') + authenticationToken: ctx.cookies.get('authenticationToken'), }) if (profile === undefined) { ctx.status = 401 @@ -123,7 +123,7 @@ export default class Api { this.addMethods({ system: { getMethodsInfo: [ - function*() { + function* () { const methods = this._methods for (const name in methods) { const { description, params = {} } = methods[name] @@ -131,25 +131,25 @@ export default class Api { } }.bind(this), { - description: 'returns the signatures of all available API methods' - } + description: 'returns the signatures of all available API methods', + }, ], getServerVersion: [ () => appVersion, { - description: 'returns the version of xo-server' - } + description: 'returns the version of xo-server', + }, ], listMethods: [ - function*() { + function* () { const methods = this._methods for (const name in methods) { yield name } }.bind(this), { - description: 'returns the name of all available API methods' - } + description: 'returns the name of all available API methods', + }, ], methodSignature: [ ({ method: name }) => { @@ -164,14 +164,14 @@ export default class Api { { description: 'returns the signature of an API method', params: { - method: { type: 'string' } - } - } - ] + method: { type: 'string' }, + }, + }, + ], }, test: { range: [ - function*({ start = 0, stop, step }) { + function* ({ start = 0, stop, step }) { if (step === undefined) { step = start > stop ? -1 : 1 } @@ -189,11 +189,11 @@ export default class Api { params: { start: { optional: true, type: 'number' }, step: { optional: true, type: 'number' }, - stop: { type: 'number' } - } - } - ] - } + stop: { type: 'number' }, + }, + }, + ], + }, }) } @@ -220,7 +220,7 @@ export default class Api { return required }), - type: 'object' + type: 'object', }) const m = params => { diff --git a/packages/xo-vmdk-to-vhd/src/vmdk-to-vhd.integ.spec.js b/packages/xo-vmdk-to-vhd/src/vmdk-to-vhd.integ.spec.js index bb04d7669..55ca4fd0a 100644 --- a/packages/xo-vmdk-to-vhd/src/vmdk-to-vhd.integ.spec.js +++ b/packages/xo-vmdk-to-vhd/src/vmdk-to-vhd.integ.spec.js @@ -61,7 +61,11 @@ test('VMDK to VHD can convert a random data file with VMDKDirectParser', async ( }) const result = await readVmdkGrainTable(createFileAccessor(vmdkFileName)) const pipe = ( - await vmdkToVhd(createReadStream(vmdkFileName), bufferToArray(result.grainLogicalAddressList), bufferToArray(result.grainFileOffsetList)) + await vmdkToVhd( + createReadStream(vmdkFileName), + bufferToArray(result.grainLogicalAddressList), + bufferToArray(result.grainFileOffsetList) + ) ).pipe(createWriteStream(vhdFileName)) await fromEvent(pipe, 'finish') await execa('vhd-util', ['check', '-p', '-b', '-t', '-n', vhdFileName])