@kubb/core 5.0.0-beta.74 → 5.0.0-beta.76
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{diagnostics-uXrHtPzQ.d.ts → diagnostics-CQYd4UQZ.d.ts} +4 -18
- package/dist/index.cjs +3 -13
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +1 -9
- package/dist/index.js +4 -14
- package/dist/index.js.map +1 -1
- package/dist/{memoryStorage-CfycFGzX.cjs → memoryStorage-Bk7RHgGj.cjs} +1 -22
- package/dist/memoryStorage-Bk7RHgGj.cjs.map +1 -0
- package/dist/{memoryStorage-B4VTTIpQ.js → memoryStorage-Dow5-isU.js} +1 -22
- package/dist/memoryStorage-Dow5-isU.js.map +1 -0
- package/dist/mocks.cjs +1 -1
- package/dist/mocks.d.ts +1 -1
- package/dist/mocks.js +1 -1
- package/package.json +4 -4
- package/dist/memoryStorage-B4VTTIpQ.js.map +0 -1
- package/dist/memoryStorage-CfycFGzX.cjs.map +0 -1
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { t as __name } from "./rolldown-runtime-C0LytTxp.js";
|
|
2
|
-
import { $ as KubbPluginSetupContext, A as KubbHookStartContext, At as Adapter, B as ParsedFile, C as KubbFilesProcessingEndContext, Ct as GenerationResult, D as KubbGenerationStartContext, Dt as UserReporter, E as KubbGenerationEndContext, Et as ReporterName, F as KubbSuccessContext, G as Generator, H as createKubb, I as KubbWarnContext, J as KubbDriver, K as GeneratorContext, L as PossibleConfig, M as KubbInfoContext, Mt as AdapterSource, N as KubbLifecycleStartContext, Nt as createAdapter, O as KubbHookEndContext, Ot as createReporter, P as KubbPluginsEndContext, Pt as AsyncEventEmitter, Q as KubbPluginEndContext, R as UserConfig, S as KubbFileProcessingUpdate, St as createStorage, T as KubbFilesProcessingUpdateContext, Tt as ReporterContext, U as Parser, V as Kubb, W as defineParser, X as Group, Y as Exclude, Z as Include, _ as InputPath, _t as defineResolver, a as DiagnosticLocation, at as Override, b as KubbDiagnosticContext, bt as createRenderer, c as PerformanceDiagnostic, ct as definePlugin, d as SerializedDiagnostic, dt as ResolveBannerFile, et as KubbPluginStartContext, f as UpdateDiagnostic, ft as ResolveOptionsContext, g as InputData, gt as ResolverPathParams, h as Config, ht as ResolverFileParams, i as DiagnosticKind, it as OutputOptions, j as KubbHooks, jt as AdapterFactoryOptions, k as KubbHookLineContext, kt as logLevel, l as ProblemCode, lt as BannerMeta, m as CLIOptions, mt as ResolverContext, n as DiagnosticByCode, nt as Output, o as DiagnosticSeverity, ot as Plugin, p as BuildOutput, pt as Resolver, q as defineGenerator, r as DiagnosticDoc, rt as OutputMode, s as Diagnostics, st as PluginFactoryOptions, t as Diagnostic, tt as NormalizedPlugin, u as ProblemDiagnostic, ut as ResolveBannerContext, v as KubbBuildEndContext, vt as Renderer, w as KubbFilesProcessingStartContext, wt as Reporter, x as KubbErrorContext, xt as Storage, y as KubbBuildStartContext, yt as RendererFactory, z as FileProcessorHooks } from "./diagnostics-
|
|
2
|
+
import { $ as KubbPluginSetupContext, A as KubbHookStartContext, At as Adapter, B as ParsedFile, C as KubbFilesProcessingEndContext, Ct as GenerationResult, D as KubbGenerationStartContext, Dt as UserReporter, E as KubbGenerationEndContext, Et as ReporterName, F as KubbSuccessContext, G as Generator, H as createKubb, I as KubbWarnContext, J as KubbDriver, K as GeneratorContext, L as PossibleConfig, M as KubbInfoContext, Mt as AdapterSource, N as KubbLifecycleStartContext, Nt as createAdapter, O as KubbHookEndContext, Ot as createReporter, P as KubbPluginsEndContext, Pt as AsyncEventEmitter, Q as KubbPluginEndContext, R as UserConfig, S as KubbFileProcessingUpdate, St as createStorage, T as KubbFilesProcessingUpdateContext, Tt as ReporterContext, U as Parser, V as Kubb, W as defineParser, X as Group, Y as Exclude, Z as Include, _ as InputPath, _t as defineResolver, a as DiagnosticLocation, at as Override, b as KubbDiagnosticContext, bt as createRenderer, c as PerformanceDiagnostic, ct as definePlugin, d as SerializedDiagnostic, dt as ResolveBannerFile, et as KubbPluginStartContext, f as UpdateDiagnostic, ft as ResolveOptionsContext, g as InputData, gt as ResolverPathParams, h as Config, ht as ResolverFileParams, i as DiagnosticKind, it as OutputOptions, j as KubbHooks, jt as AdapterFactoryOptions, k as KubbHookLineContext, kt as logLevel, l as ProblemCode, lt as BannerMeta, m as CLIOptions, mt as ResolverContext, n as DiagnosticByCode, nt as Output, o as DiagnosticSeverity, ot as Plugin, p as BuildOutput, pt as Resolver, q as defineGenerator, r as DiagnosticDoc, rt as OutputMode, s as Diagnostics, st as PluginFactoryOptions, t as Diagnostic, tt as NormalizedPlugin, u as ProblemDiagnostic, ut as ResolveBannerContext, v as KubbBuildEndContext, vt as Renderer, w as KubbFilesProcessingStartContext, wt as Reporter, x as KubbErrorContext, xt as Storage, y as KubbBuildStartContext, yt as RendererFactory, z as FileProcessorHooks } from "./diagnostics-CQYd4UQZ.js";
|
|
3
3
|
import { ast } from "@kubb/ast";
|
|
4
4
|
|
|
5
5
|
//#region ../../internals/utils/src/url.d.ts
|
|
@@ -54,14 +54,6 @@ type ObjectOptions = {
|
|
|
54
54
|
* Helpers for OpenAPI/Swagger paths, plus a thin wrapper over the native `URL`.
|
|
55
55
|
*/
|
|
56
56
|
declare class Url {
|
|
57
|
-
/**
|
|
58
|
-
* Reports whether `url` is a parseable absolute URL. Delegates to the native `URL.canParse`.
|
|
59
|
-
*
|
|
60
|
-
* @example
|
|
61
|
-
* Url.canParse('https://petstore.swagger.io/v2') // true
|
|
62
|
-
* Url.canParse('/pet/{petId}') // false
|
|
63
|
-
*/
|
|
64
|
-
static canParse(url: string, base?: string | URL): boolean;
|
|
65
57
|
/**
|
|
66
58
|
* Converts an OpenAPI/Swagger path to Express-style colon syntax.
|
|
67
59
|
*
|
package/dist/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import "./rolldown-runtime-C0LytTxp.js";
|
|
2
|
-
import { _ as getErrorMessage, a as createStorage, c as clean, d as write, f as runtime, g as BuildError, h as AsyncEventEmitter, i as FileManager, l as toFilePath, m as pascalCase, n as _usingCtx, o as OPERATION_FILTER_TYPES, p as camelCase, r as FileProcessor, s as diagnosticCode, t as memoryStorage, u as toPosixPath } from "./memoryStorage-
|
|
3
|
-
import { hash } from "node:crypto";
|
|
2
|
+
import { _ as getErrorMessage, a as createStorage, c as clean, d as write, f as runtime, g as BuildError, h as AsyncEventEmitter, i as FileManager, l as toFilePath, m as pascalCase, n as _usingCtx, o as OPERATION_FILTER_TYPES, p as camelCase, r as FileProcessor, s as diagnosticCode, t as memoryStorage, u as toPosixPath } from "./memoryStorage-Dow5-isU.js";
|
|
4
3
|
import { stripVTControlCharacters, styleText } from "node:util";
|
|
4
|
+
import { hash } from "node:crypto";
|
|
5
5
|
import { access, glob, readFile, rm } from "node:fs/promises";
|
|
6
6
|
import path, { join, relative, resolve } from "node:path";
|
|
7
7
|
import { ast, ast as ast$1, composeMacros, operationDef, schemaDef, transform } from "@kubb/ast";
|
|
@@ -300,16 +300,6 @@ function toParamsObject(path, { replacer, casing } = {}) {
|
|
|
300
300
|
* Helpers for OpenAPI/Swagger paths, plus a thin wrapper over the native `URL`.
|
|
301
301
|
*/
|
|
302
302
|
var Url = class Url {
|
|
303
|
-
/**
|
|
304
|
-
* Reports whether `url` is a parseable absolute URL. Delegates to the native `URL.canParse`.
|
|
305
|
-
*
|
|
306
|
-
* @example
|
|
307
|
-
* Url.canParse('https://petstore.swagger.io/v2') // true
|
|
308
|
-
* Url.canParse('/pet/{petId}') // false
|
|
309
|
-
*/
|
|
310
|
-
static canParse(url, base) {
|
|
311
|
-
return URL.canParse(url, base);
|
|
312
|
-
}
|
|
313
303
|
/**
|
|
314
304
|
* Converts an OpenAPI/Swagger path to Express-style colon syntax.
|
|
315
305
|
*
|
|
@@ -404,7 +394,7 @@ function createAdapter(build) {
|
|
|
404
394
|
/**
|
|
405
395
|
* Docs major version, derived from the package version so the link tracks the published major.
|
|
406
396
|
*/
|
|
407
|
-
const docsMajor = "5.0.0-beta.
|
|
397
|
+
const docsMajor = "5.0.0-beta.76".split(".")[0] ?? "5";
|
|
408
398
|
/**
|
|
409
399
|
* Narrows a {@link Diagnostic} to the variant for `code`, or `null` when it does not match.
|
|
410
400
|
*
|
|
@@ -2094,7 +2084,7 @@ function inputToAdapterSource(config) {
|
|
|
2094
2084
|
type: "data",
|
|
2095
2085
|
data: input.data
|
|
2096
2086
|
};
|
|
2097
|
-
if (
|
|
2087
|
+
if (URL.canParse(input.path)) return {
|
|
2098
2088
|
type: "path",
|
|
2099
2089
|
path: input.path
|
|
2100
2090
|
};
|