@redocly/openapi-core
Advanced tools
Comparing version 1.7.0 to 1.8.0
# @redocly/openapi-core | ||
## 1.8.0 | ||
## 1.7.0 | ||
@@ -4,0 +6,0 @@ |
import { RegistryApi } from './registry-api'; | ||
import { RegionalToken, RegionalTokenWithValidity } from './redocly-client-types'; | ||
import type { AccessTokens, Region } from '../config/types'; | ||
export declare const TOKEN_FILENAME = ".redocly-config.json"; | ||
export declare class RedoclyClient { | ||
@@ -5,0 +6,0 @@ private accessTokens; |
@@ -12,3 +12,3 @@ "use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.isRedoclyRegistryURL = exports.RedoclyClient = void 0; | ||
exports.isRedoclyRegistryURL = exports.RedoclyClient = exports.TOKEN_FILENAME = void 0; | ||
const fs_1 = require("fs"); | ||
@@ -22,3 +22,3 @@ const path_1 = require("path"); | ||
const logger_1 = require("../logger"); | ||
const TOKEN_FILENAME = '.redocly-config.json'; | ||
exports.TOKEN_FILENAME = '.redocly-config.json'; | ||
class RedoclyClient { | ||
@@ -62,3 +62,3 @@ constructor(region) { | ||
loadTokens() { | ||
const credentialsPath = (0, path_1.resolve)((0, os_1.homedir)(), TOKEN_FILENAME); | ||
const credentialsPath = (0, path_1.resolve)((0, os_1.homedir)(), exports.TOKEN_FILENAME); | ||
const credentials = this.readCredentialsFile(credentialsPath); | ||
@@ -127,3 +127,3 @@ if ((0, utils_1.isNotEmptyObject)(credentials)) { | ||
return __awaiter(this, void 0, void 0, function* () { | ||
const credentialsPath = (0, path_1.resolve)((0, os_1.homedir)(), TOKEN_FILENAME); | ||
const credentialsPath = (0, path_1.resolve)((0, os_1.homedir)(), exports.TOKEN_FILENAME); | ||
try { | ||
@@ -142,3 +142,3 @@ yield this.verifyToken(accessToken, this.region, verbose); | ||
logout() { | ||
const credentialsPath = (0, path_1.resolve)((0, os_1.homedir)(), TOKEN_FILENAME); | ||
const credentialsPath = (0, path_1.resolve)((0, os_1.homedir)(), exports.TOKEN_FILENAME); | ||
if ((0, fs_1.existsSync)(credentialsPath)) { | ||
@@ -145,0 +145,0 @@ (0, fs_1.unlinkSync)(credentialsPath); |
{ | ||
"name": "@redocly/openapi-core", | ||
"version": "1.7.0", | ||
"version": "1.8.0", | ||
"description": "", | ||
@@ -5,0 +5,0 @@ "main": "lib/index.js", |
@@ -13,3 +13,3 @@ import { existsSync, readFileSync, writeFileSync, unlinkSync } from 'fs'; | ||
const TOKEN_FILENAME = '.redocly-config.json'; | ||
export const TOKEN_FILENAME = '.redocly-config.json'; | ||
@@ -16,0 +16,0 @@ export class RedoclyClient { |
Sorry, the diff of this file is not supported yet
2825200
48193