Skip to content

Commit

Permalink
chore: fix prettier
Browse files Browse the repository at this point in the history
  • Loading branch information
RomanHotsiy committed Aug 21, 2022
1 parent e3cec8b commit 8033549
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions packages/core/src/redocly/registry-api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,8 @@ import { DEFAULT_REGION, DOMAINS } from '../config/config';
import { isNotEmptyObject } from '../utils';
const version = require('../../package.json').version;

export const currentCommand = typeof process !== 'undefined' ? process.env?.REDOCLY_CLI_COMMAND || '' : '';

import type { AccessTokens, Region } from '../config/types';
export const currentCommand =
typeof process !== 'undefined' ? process.env?.REDOCLY_CLI_COMMAND || '' : '';

export class RegistryApi {
constructor(private accessTokens: AccessTokens, private region: Region) {}
Expand All @@ -33,7 +32,7 @@ export class RegistryApi {
private async request(path = '', options: RequestInit = {}, region?: Region) {
const headers = Object.assign({}, options.headers || {}, {
'x-redocly-cli-version': version,
'user-agent': `redocly-cli / ${version} ${currentCommand}`
'user-agent': `redocly-cli / ${version} ${currentCommand}`,
});

if (!headers.hasOwnProperty('authorization')) {
Expand Down

0 comments on commit 8033549

Please sign in to comment.