mirror of
https://github.com/Redocly/redoc.git
synced 2025-08-07 13:44:54 +03:00
chore: changed the way of creating core Config for bundling definition
This commit is contained in:
parent
c015bfd977
commit
817ce3ae68
12
package-lock.json
generated
12
package-lock.json
generated
|
@ -1222,9 +1222,9 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"@redocly/openapi-core": {
|
"@redocly/openapi-core": {
|
||||||
"version": "1.0.0-beta.41",
|
"version": "1.0.0-beta.42",
|
||||||
"resolved": "https://registry.npmjs.org/@redocly/openapi-core/-/openapi-core-1.0.0-beta.41.tgz",
|
"resolved": "https://registry.npmjs.org/@redocly/openapi-core/-/openapi-core-1.0.0-beta.42.tgz",
|
||||||
"integrity": "sha512-jNQY1xVG6+S2XcxvlJhrDWbhyc5Yuh8R9ntduab5CtH1+ReSGmkGB+QhwkZ+ZO1E1le3kUR6cWJXM/loc2uW3A==",
|
"integrity": "sha512-DKy/eJNAoN94TmZSVnkn4f4IDasmFUZqSSRRBX6eU//2MSMazY0u3XaFY7Bis28uCxJhwBVcDpT/qMwiX2PI1Q==",
|
||||||
"requires": {
|
"requires": {
|
||||||
"@redocly/ajv": "^6.12.3",
|
"@redocly/ajv": "^6.12.3",
|
||||||
"@types/node": "^14.11.8",
|
"@types/node": "^14.11.8",
|
||||||
|
@ -2596,9 +2596,9 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"balanced-match": {
|
"balanced-match": {
|
||||||
"version": "1.0.1",
|
"version": "1.0.2",
|
||||||
"resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.1.tgz",
|
"resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz",
|
||||||
"integrity": "sha512-qyTw2VPYRg31SlVU5WDdvCSyMTJ3YSP4Kz2CidWZFPFawCiHJdCyKyZeXIGMJ5ebMQYXEI56kDR8tcnDkbZstg=="
|
"integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw=="
|
||||||
},
|
},
|
||||||
"base": {
|
"base": {
|
||||||
"version": "0.11.2",
|
"version": "0.11.2",
|
||||||
|
|
|
@ -134,7 +134,7 @@
|
||||||
"styled-components": "^4.1.1 || ^5.1.1"
|
"styled-components": "^4.1.1 || ^5.1.1"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@redocly/openapi-core": "^1.0.0-beta.41",
|
"@redocly/openapi-core": "^1.0.0-beta.42",
|
||||||
"@redocly/react-dropdown-aria": "^2.0.11",
|
"@redocly/react-dropdown-aria": "^2.0.11",
|
||||||
"@types/node": "^13.11.1",
|
"@types/node": "^13.11.1",
|
||||||
"classnames": "^2.2.6",
|
"classnames": "^2.2.6",
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
import * as classnames from 'classnames';
|
import { default as classnames } from 'classnames';
|
||||||
import { darken } from 'polished';
|
import { darken } from 'polished';
|
||||||
|
|
||||||
import { deprecatedCss, ShelfIcon } from '../../common-elements';
|
import { deprecatedCss, ShelfIcon } from '../../common-elements';
|
||||||
|
|
|
@ -1,11 +1,12 @@
|
||||||
/* tslint:disable-next-line:no-implicit-dependencies */
|
/* tslint:disable-next-line:no-implicit-dependencies */
|
||||||
import { convertObj } from 'swagger2openapi';
|
import { convertObj } from 'swagger2openapi';
|
||||||
import { OpenAPISpec } from '../types';
|
import { OpenAPISpec } from '../types';
|
||||||
import { Source, Document, bundle, loadConfig } from '@redocly/openapi-core';
|
import { Source, Document, bundle, Config, RawConfig } from '@redocly/openapi-core';
|
||||||
|
|
||||||
export async function loadAndBundleSpec(specUrlOrObject: object | string): Promise<OpenAPISpec> {
|
export async function loadAndBundleSpec(specUrlOrObject: object | string): Promise<OpenAPISpec> {
|
||||||
const isNode = typeof process !== 'undefined' && process.versions != null && process.versions.node != null;
|
const isNode = typeof process !== 'undefined' && process.versions != null && process.versions.node != null;
|
||||||
const config = await loadConfig();
|
const rawConfig: RawConfig = {};
|
||||||
|
const config = new Config(rawConfig);
|
||||||
const bundleOpts = {
|
const bundleOpts = {
|
||||||
config,
|
config,
|
||||||
base: isNode ? process.cwd() : window.location.href
|
base: isNode ? process.cwd() : window.location.href
|
||||||
|
|
Loading…
Reference in New Issue
Block a user