-
Notifications
You must be signed in to change notification settings - Fork 214
chore: export config constants and refactor exports #2308
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -5,4 +5,3 @@ export * from './builtIn.js'; | |
| export * from './load.js'; | ||
| export * from './utils.js'; | ||
| export * from './config-resolvers.js'; | ||
| export * from './constants.js'; | ||
|
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Exporting it explicitly in the index file: https://github.com/Redocly/redocly-cli/pull/2308/files#diff-9a4ceebe7c6f86856371906c3f061d3b56b7457022b05179884a113e7ced67e8R42 |
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,6 +1,4 @@ | ||
| export { | ||
|
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Mostly moving exports around. No real changes here. |
||
| type CollectFn, | ||
| type Exact, | ||
| keysOf, | ||
| readFileFromUrl, | ||
| slash, | ||
|
|
@@ -13,6 +11,8 @@ export { | |
| isEmptyObject, | ||
| isNotEmptyArray, | ||
| isNotEmptyObject, | ||
| type CollectFn, | ||
| type Exact, | ||
| } from './utils.js'; | ||
| export { dequal } from './utils/dequal.js'; | ||
| export { Oas3_1Types } from './types/oas3_1.js'; | ||
|
|
@@ -22,75 +22,33 @@ export { Oas2Types } from './types/oas2.js'; | |
| export { AsyncApi2Types } from './types/asyncapi2.js'; | ||
| export { AsyncApi3Types } from './types/asyncapi3.js'; | ||
| export { ConfigTypes, createConfigTypes } from './types/redocly-yaml.js'; | ||
|
|
||
| export type { | ||
| Oas3Definition, | ||
| Oas3_1Definition, | ||
| Oas3Components, | ||
| Oas3_1Components, | ||
| Oas3PathItem, | ||
| Oas3Paths, | ||
| Oas3ComponentName, | ||
| Oas3Schema, | ||
| Oas3_1Schema, | ||
| Oas3Tag, | ||
| Referenced, | ||
| OasRef, | ||
| Oas3Parameter, | ||
| Oas3Server, | ||
| Oas3Operation, | ||
| Oas3Responses, | ||
| ApiKeyAuth, | ||
| HttpAuth, | ||
| BasicAuth, | ||
| BearerAuth, | ||
| DigestAuth, | ||
| MutualTLSAuth, | ||
| OAuth2Auth, | ||
| OpenIDAuth, | ||
| Oas3SecurityScheme, | ||
| Oas3SecurityRequirement, | ||
| } from './typings/openapi.js'; | ||
| export type { Oas2Definition } from './typings/swagger.js'; | ||
| export type { Async3Definition } from './typings/asyncapi3.js'; | ||
| export type { Async2Definition } from './typings/asyncapi.js'; | ||
| export type { | ||
| ArazzoDefinition, | ||
| ExtendedOperation, | ||
| ExtendedSecurity, | ||
| ResolvedSecurity, | ||
| } from './typings/arazzo.js'; | ||
| export type { StatsAccumulator, StatsName } from './typings/common.js'; | ||
| export { type NormalizedNodeType, type NodeType, normalizeTypes } from './types/index.js'; | ||
| export { normalizeTypes, type NormalizedNodeType, type NodeType } from './types/index.js'; | ||
| export { Stats } from './rules/other/stats.js'; | ||
|
|
||
| export { | ||
| loadConfig, | ||
| createConfig, | ||
| findConfig, | ||
| resolvePlugins, | ||
| ConfigValidationError, | ||
| Config, // FIXME: export it as a type | ||
| type RawUniversalConfig, | ||
| type RawUniversalApiConfig, | ||
| type ResolvedConfig, | ||
| type ResolvedApiConfig, | ||
| type Plugin, | ||
| type RuleConfig, | ||
| Config, // FIXME: export it as a type | ||
| IGNORE_FILE, | ||
| loadConfig, | ||
| findConfig, | ||
| CONFIG_FILE_NAME, | ||
| type RuleSeverity, | ||
| createConfig, | ||
| ConfigValidationError, | ||
| resolvePlugins, | ||
| } from './config/index.js'; | ||
|
|
||
| export * from './config/constants.js'; | ||
| export { | ||
| type ResolvedRefMap, | ||
| Source, | ||
| BaseResolver, | ||
| Document, | ||
| resolveDocument, | ||
| ResolveError, | ||
| YamlParseError, | ||
| resolveDocument, | ||
| makeDocumentFromString, | ||
| type ResolvedRefMap, | ||
| } from './resolve.js'; | ||
| export { parseYaml, stringifyYaml } from './js-yaml/index.js'; | ||
| export { | ||
|
|
@@ -101,11 +59,11 @@ export { | |
| type Location, | ||
| } from './ref-utils.js'; | ||
| export { | ||
| type SpecMajorVersion, | ||
| getMajorSpecVersion, | ||
| type SpecVersion, | ||
| detectSpec, | ||
| getMajorSpecVersion, | ||
| getTypes, | ||
| type SpecVersion, | ||
| type SpecMajorVersion, | ||
| } from './oas-types.js'; | ||
| export { | ||
| normalizeVisitors, | ||
|
|
@@ -134,31 +92,66 @@ export { | |
| type Arazzo1Preprocessor, | ||
| type Overlay1Preprocessor, | ||
| } from './visitors.js'; | ||
|
|
||
| export { | ||
| WalkContext, | ||
| walkDocument, | ||
| NormalizedProblem, | ||
| ProblemSeverity, | ||
| LineColLocationObject, | ||
| LocationObject, | ||
| Loc, | ||
| walkDocument, | ||
| type UserContext, | ||
| } from './walk.js'; | ||
|
|
||
| export { getAstNodeByPointer, getLineColLocation, getCodeframe } from './format/codeframes.js'; | ||
| export { formatProblems, OutputFormat, getTotals, Totals } from './format/format.js'; | ||
| export { formatProblems, getTotals, type OutputFormat, type Totals } from './format/format.js'; | ||
| export { lint, lint as validate, lintDocument, lintFromString, lintConfig } from './lint.js'; | ||
| export { | ||
| type BundleResult, | ||
| bundle, | ||
| bundleDocument, | ||
| mapTypeToComponent, | ||
| bundleFromString, | ||
| type BundleResult, | ||
| } from './bundle.js'; | ||
|
|
||
| export { type Assertions, type Assertion } from './rules/common/assertions/index.js'; | ||
|
|
||
| export { logger, type LoggerInterface } from './logger.js'; | ||
| export { HandledError } from './utils/error.js'; | ||
| export { isBrowser } from './env.js'; | ||
|
|
||
| export type { | ||
| Oas3Definition, | ||
| Oas3_1Definition, | ||
| Oas3Components, | ||
| Oas3_1Components, | ||
| Oas3PathItem, | ||
| Oas3Paths, | ||
| Oas3ComponentName, | ||
| Oas3Schema, | ||
| Oas3_1Schema, | ||
| Oas3Tag, | ||
| Referenced, | ||
| OasRef, | ||
| Oas3Parameter, | ||
| Oas3Server, | ||
| Oas3Operation, | ||
| Oas3Responses, | ||
| ApiKeyAuth, | ||
| HttpAuth, | ||
| BasicAuth, | ||
| BearerAuth, | ||
| DigestAuth, | ||
| MutualTLSAuth, | ||
| OAuth2Auth, | ||
| OpenIDAuth, | ||
| Oas3SecurityScheme, | ||
| Oas3SecurityRequirement, | ||
| } from './typings/openapi.js'; | ||
| export type { Oas2Definition } from './typings/swagger.js'; | ||
| export type { Async3Definition } from './typings/asyncapi3.js'; | ||
| export type { Async2Definition } from './typings/asyncapi.js'; | ||
| export type { | ||
| ArazzoDefinition, | ||
| ExtendedOperation, | ||
| ExtendedSecurity, | ||
| ResolvedSecurity, | ||
| } from './typings/arazzo.js'; | ||
| export type { StatsAccumulator, StatsName } from './typings/common.js'; | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It wasn't needed at all.