@kubb/core 5.0.0-beta.84 → 5.0.0-beta.85
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-DuaXn2bT.d.ts → Diagnostics-PnPLU3kj.d.ts} +314 -402
- package/dist/index.cjs +729 -973
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +4 -93
- package/dist/index.js +690 -934
- package/dist/index.js.map +1 -1
- package/dist/mocks.cjs +7 -14
- package/dist/mocks.cjs.map +1 -1
- package/dist/mocks.d.ts +1 -1
- package/dist/mocks.js +3 -10
- package/dist/mocks.js.map +1 -1
- package/dist/{memoryStorage-BjUIqpYE.js → usingCtx-BABTfo1g.js} +160 -480
- package/dist/usingCtx-BABTfo1g.js.map +1 -0
- package/dist/{memoryStorage-DQ6qXJ8o.cjs → usingCtx-fxRpJw0P.cjs} +159 -521
- package/dist/usingCtx-fxRpJw0P.cjs.map +1 -0
- package/package.json +2 -2
- package/dist/memoryStorage-BjUIqpYE.js.map +0 -1
- package/dist/memoryStorage-DQ6qXJ8o.cjs.map +0 -1
package/dist/index.d.ts
CHANGED
|
@@ -1,97 +1,6 @@
|
|
|
1
1
|
import { t as __name } from "./rolldown-runtime-C0LytTxp.js";
|
|
2
|
-
import { $ as
|
|
2
|
+
import { $ as Include, A as KubbHookStartContext, At as ReporterName, B as Kubb, C as KubbFilesProcessingEndContext, Ct as RendererFactory, D as KubbGenerationStartContext, Dt as GenerationResult, E as KubbGenerationEndContext, Et as createStorage, F as KubbSuccessContext, Ft as AdapterFactoryOptions, G as KubbDriver, H as Generator, I as KubbWarnContext, It as AdapterSource, J as Parser, K as FileManagerHooks, L as PossibleConfig, Lt as createAdapter, M as KubbInfoContext, Mt as createReporter, N as KubbLifecycleStartContext, Nt as logLevel, O as KubbHookEndContext, Ot as Reporter, P as KubbPluginsEndContext, Pt as Adapter, Q as Group, R as UserConfig, S as KubbFileProcessingUpdate, St as Renderer, T as KubbFilesProcessingUpdateContext, Tt as Storage, U as GeneratorContext, V as createKubb, W as defineGenerator, X as Exclude, Y as defineParser, Z as Filter, _ as InputPath, _t as ResolverDefault, a as DiagnosticLocation, at as OutputMode, b as KubbDiagnosticContext, bt as ResolverPathParams, c as PerformanceDiagnostic, ct as Plugin, d as SerializedDiagnostic, dt as BannerMeta, et as KubbPluginEndContext, f as UpdateDiagnostic, ft as ResolveBannerContext, g as InputData, gt as ResolverContext, h as Config, ht as Resolver, i as DiagnosticKind, it as Output, j as KubbHooks, jt as UserReporter, k as KubbHookLineContext, kt as ReporterContext, l as ProblemCode, lt as PluginFactoryOptions, m as CLIOptions, mt as ResolveOptionsContext, n as DiagnosticByCode, nt as KubbPluginStartContext, o as DiagnosticSeverity, ot as OutputOptions, p as BuildOutput, pt as ResolveBannerFile, q as AsyncEventEmitter, r as DiagnosticDoc, rt as NormalizedPlugin, s as Diagnostics, st as Override, t as Diagnostic, tt as KubbPluginSetupContext, u as ProblemDiagnostic, ut as definePlugin, v as KubbBuildEndContext, vt as ResolverFileParams, w as KubbFilesProcessingStartContext, wt as createRenderer, x as KubbErrorContext, xt as createResolver, y as KubbBuildStartContext, yt as ResolverOverride, z as CreateKubbOptions } from "./Diagnostics-PnPLU3kj.js";
|
|
3
3
|
|
|
4
|
-
//#region ../../internals/utils/src/url.d.ts
|
|
5
|
-
type URLObject = {
|
|
6
|
-
/**
|
|
7
|
-
* The resolved URL string (Express-style or template literal, depending on context).
|
|
8
|
-
*/
|
|
9
|
-
url: string;
|
|
10
|
-
/**
|
|
11
|
-
* Extracted path parameters as a key-value map, or `null` when the path has none.
|
|
12
|
-
*/
|
|
13
|
-
params: Record<string, string> | null;
|
|
14
|
-
};
|
|
15
|
-
/**
|
|
16
|
-
* Supported identifier casing strategies for path parameters.
|
|
17
|
-
*/
|
|
18
|
-
type PathCasing = 'camelcase';
|
|
19
|
-
type TemplateOptions = {
|
|
20
|
-
/**
|
|
21
|
-
* Literal text prepended inside the template literal, e.g. a base URL.
|
|
22
|
-
*/
|
|
23
|
-
prefix?: string | null;
|
|
24
|
-
/**
|
|
25
|
-
* Transform applied to each extracted parameter name before interpolation.
|
|
26
|
-
*/
|
|
27
|
-
replacer?: (pathParam: string) => string;
|
|
28
|
-
/**
|
|
29
|
-
* Casing strategy applied to path parameter names.
|
|
30
|
-
*/
|
|
31
|
-
casing?: PathCasing;
|
|
32
|
-
};
|
|
33
|
-
type ObjectOptions = {
|
|
34
|
-
/**
|
|
35
|
-
* Controls whether the `url` is rendered as an Express path or a template literal.
|
|
36
|
-
* @default 'path'
|
|
37
|
-
*/
|
|
38
|
-
type?: 'path' | 'template';
|
|
39
|
-
/**
|
|
40
|
-
* Transform applied to each extracted parameter name.
|
|
41
|
-
*/
|
|
42
|
-
replacer?: (pathParam: string) => string;
|
|
43
|
-
/**
|
|
44
|
-
* When `true`, the result is serialized to a string expression instead of a plain object.
|
|
45
|
-
*/
|
|
46
|
-
stringify?: boolean;
|
|
47
|
-
/**
|
|
48
|
-
* Casing strategy applied to path parameter names.
|
|
49
|
-
*/
|
|
50
|
-
casing?: PathCasing;
|
|
51
|
-
};
|
|
52
|
-
/**
|
|
53
|
-
* Helpers for OpenAPI/Swagger paths, plus a thin wrapper over the native `URL`.
|
|
54
|
-
*/
|
|
55
|
-
declare class Url {
|
|
56
|
-
/**
|
|
57
|
-
* Converts an OpenAPI/Swagger path to Express-style colon syntax.
|
|
58
|
-
*
|
|
59
|
-
* @example
|
|
60
|
-
* Url.toPath('/pet/{petId}') // '/pet/:petId'
|
|
61
|
-
*/
|
|
62
|
-
static toPath(path: string): string;
|
|
63
|
-
/**
|
|
64
|
-
* Converts an OpenAPI/Swagger path to a TypeScript template literal string.
|
|
65
|
-
* `prefix` is prepended inside the literal, `replacer` transforms each parameter name,
|
|
66
|
-
* and `casing` controls parameter identifier casing.
|
|
67
|
-
*
|
|
68
|
-
* @example
|
|
69
|
-
* Url.toTemplateString('/pet/{petId}') // '`/pet/${petId}`'
|
|
70
|
-
*
|
|
71
|
-
* @example
|
|
72
|
-
* Url.toTemplateString('/pet/{petId}', { prefix: 'https://api' }) // '`https://api/pet/${petId}`'
|
|
73
|
-
*/
|
|
74
|
-
static toTemplateString(path: string, {
|
|
75
|
-
prefix,
|
|
76
|
-
replacer,
|
|
77
|
-
casing
|
|
78
|
-
}?: TemplateOptions): string;
|
|
79
|
-
/**
|
|
80
|
-
* Returns the path and its extracted params as a structured `URLObject`, or as a stringified
|
|
81
|
-
* expression when `stringify` is set.
|
|
82
|
-
*
|
|
83
|
-
* @example
|
|
84
|
-
* Url.toObject('/pet/{petId}')
|
|
85
|
-
* // { url: '/pet/:petId', params: { petId: 'petId' } }
|
|
86
|
-
*/
|
|
87
|
-
static toObject(path: string, {
|
|
88
|
-
type,
|
|
89
|
-
replacer,
|
|
90
|
-
stringify,
|
|
91
|
-
casing
|
|
92
|
-
}?: ObjectOptions): URLObject | string;
|
|
93
|
-
}
|
|
94
|
-
//#endregion
|
|
95
4
|
//#region src/reporters/cliReporter.d.ts
|
|
96
5
|
/**
|
|
97
6
|
* The default `cli` reporter. Renders the {@link Report} for each config as it finishes, independent
|
|
@@ -135,6 +44,8 @@ declare const jsonReporter: Reporter;
|
|
|
135
44
|
* - the write is skipped when the file content is already identical
|
|
136
45
|
* - missing parent directories are created automatically
|
|
137
46
|
* - Bun's native file API is used when running under Bun
|
|
47
|
+
* - concurrent `setItem` calls are capped at {@link WRITE_CONCURRENCY} in flight, so a caller
|
|
48
|
+
* can fire every file's write without pacing itself
|
|
138
49
|
*
|
|
139
50
|
* @example
|
|
140
51
|
* ```ts
|
|
@@ -172,5 +83,5 @@ declare const fsStorage: (options?: Record<string, never> | undefined) => Storag
|
|
|
172
83
|
*/
|
|
173
84
|
declare const memoryStorage: (options?: Record<string, never> | undefined) => Storage;
|
|
174
85
|
//#endregion
|
|
175
|
-
export { type Adapter, type AdapterFactoryOptions, type AdapterSource, AsyncEventEmitter, type BannerMeta, BuildOutput, CLIOptions, Config, type CreateKubbOptions, type Diagnostic, type DiagnosticByCode, type DiagnosticDoc, type DiagnosticKind, type DiagnosticLocation, type DiagnosticSeverity, Diagnostics, type Exclude, type
|
|
86
|
+
export { type Adapter, type AdapterFactoryOptions, type AdapterSource, AsyncEventEmitter, type BannerMeta, BuildOutput, CLIOptions, Config, type CreateKubbOptions, type Diagnostic, type DiagnosticByCode, type DiagnosticDoc, type DiagnosticKind, type DiagnosticLocation, type DiagnosticSeverity, Diagnostics, type Exclude, type FileManagerHooks, type Filter, type GenerationResult, type Generator, type GeneratorContext, type Group, type Include, InputData, InputPath, type Kubb, KubbBuildEndContext, KubbBuildStartContext, KubbDiagnosticContext, KubbDriver, KubbErrorContext, KubbFileProcessingUpdate, KubbFilesProcessingEndContext, KubbFilesProcessingStartContext, KubbFilesProcessingUpdateContext, KubbGenerationEndContext, KubbGenerationStartContext, KubbHookEndContext, KubbHookLineContext, KubbHookStartContext, KubbHooks, KubbInfoContext, KubbLifecycleStartContext, type KubbPluginEndContext, type KubbPluginSetupContext, type KubbPluginStartContext, KubbPluginsEndContext, KubbSuccessContext, KubbWarnContext, type NormalizedPlugin, type Output, type OutputMode, type OutputOptions, type Override, type Parser, type PerformanceDiagnostic, type Plugin, type PluginFactoryOptions, PossibleConfig, type ProblemCode, type ProblemDiagnostic, type Renderer, type RendererFactory, type Reporter, type ReporterContext, type ReporterName, type ResolveBannerContext, type ResolveBannerFile, type ResolveOptionsContext, Resolver, type ResolverContext, type ResolverDefault, type ResolverFileParams, type ResolverOverride, type ResolverPathParams, type SerializedDiagnostic, type Storage, type UpdateDiagnostic, UserConfig, type UserReporter, cliReporter, createAdapter, createKubb, createRenderer, createReporter, createResolver, createStorage, defineGenerator, defineParser, definePlugin, fileReporter, fsStorage, jsonReporter, logLevel, memoryStorage };
|
|
176
87
|
//# sourceMappingURL=index.d.ts.map
|