@kubb/core
Advanced tools
+100
-1
@@ -5,2 +5,101 @@ import { t as __name } from "./chunk-C0LytTxp.js"; | ||
| //#region ../../internals/utils/src/url.d.ts | ||
| type URLObject = { | ||
| /** | ||
| * The resolved URL string (Express-style or template literal, depending on context). | ||
| */ | ||
| url: string; | ||
| /** | ||
| * Extracted path parameters as a key-value map, or `null` when the path has none. | ||
| */ | ||
| params: Record<string, string> | null; | ||
| }; | ||
| /** | ||
| * Supported identifier casing strategies for path parameters. | ||
| */ | ||
| type PathCasing = 'camelcase'; | ||
| type TemplateOptions = { | ||
| /** | ||
| * Literal text prepended inside the template literal, e.g. a base URL. | ||
| */ | ||
| prefix?: string | null; | ||
| /** | ||
| * Transform applied to each extracted parameter name before interpolation. | ||
| */ | ||
| replacer?: (pathParam: string) => string; | ||
| /** | ||
| * Casing strategy applied to path parameter names. | ||
| */ | ||
| casing?: PathCasing; | ||
| }; | ||
| type ObjectOptions = { | ||
| /** | ||
| * Controls whether the `url` is rendered as an Express path or a template literal. | ||
| * @default 'path' | ||
| */ | ||
| type?: 'path' | 'template'; | ||
| /** | ||
| * Transform applied to each extracted parameter name. | ||
| */ | ||
| replacer?: (pathParam: string) => string; | ||
| /** | ||
| * When `true`, the result is serialized to a string expression instead of a plain object. | ||
| */ | ||
| stringify?: boolean; | ||
| /** | ||
| * Casing strategy applied to path parameter names. | ||
| */ | ||
| casing?: PathCasing; | ||
| }; | ||
| /** | ||
| * Helpers for OpenAPI/Swagger paths, plus a thin wrapper over the native `URL`. | ||
| */ | ||
| declare class Url { | ||
| /** | ||
| * Reports whether `url` is a parseable absolute URL. Delegates to the native `URL.canParse`. | ||
| * | ||
| * @example | ||
| * Url.canParse('https://petstore.swagger.io/v2') // true | ||
| * Url.canParse('/pet/{petId}') // false | ||
| */ | ||
| static canParse(url: string, base?: string | URL): boolean; | ||
| /** | ||
| * Converts an OpenAPI/Swagger path to Express-style colon syntax. | ||
| * | ||
| * @example | ||
| * Url.toPath('/pet/{petId}') // '/pet/:petId' | ||
| */ | ||
| static toPath(path: string): string; | ||
| /** | ||
| * Converts an OpenAPI/Swagger path to a TypeScript template literal string. | ||
| * `prefix` is prepended inside the literal, `replacer` transforms each parameter name, | ||
| * and `casing` controls parameter identifier casing. | ||
| * | ||
| * @example | ||
| * Url.toTemplateString('/pet/{petId}') // '`/pet/${petId}`' | ||
| * | ||
| * @example | ||
| * Url.toTemplateString('/pet/{petId}', { prefix: 'https://api' }) // '`https://api/pet/${petId}`' | ||
| */ | ||
| static toTemplateString(path: string, { | ||
| prefix, | ||
| replacer, | ||
| casing | ||
| }?: TemplateOptions): string; | ||
| /** | ||
| * Returns the path and its extracted params as a structured `URLObject`, or as a stringified | ||
| * expression when `stringify` is set. | ||
| * | ||
| * @example | ||
| * Url.toObject('/pet/{petId}') | ||
| * // { url: '/pet/:petId', params: { petId: 'petId' } } | ||
| */ | ||
| static toObject(path: string, { | ||
| type, | ||
| replacer, | ||
| stringify, | ||
| casing | ||
| }?: ObjectOptions): URLObject | string; | ||
| } | ||
| //#endregion | ||
| //#region src/reporters/cliReporter.d.ts | ||
@@ -87,3 +186,3 @@ /** | ||
| //#endregion | ||
| export { type Adapter, type AdapterFactoryOptions, type AdapterSource, AsyncEventEmitter, type BannerMeta, BuildOutput, CLIOptions, Config, type Diagnostic, type DiagnosticByCode, type DiagnosticDoc, type DiagnosticKind, type DiagnosticLocation, type DiagnosticSeverity, Diagnostics, type Exclude, type FileProcessorHooks, 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 ParsedFile, 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, type Resolver, type ResolverContext, type ResolverFileParams, type ResolverPathParams, type SerializedDiagnostic, type Storage, type UpdateDiagnostic, UserConfig, type UserReporter, ast, cliReporter, createAdapter, createKubb, createRenderer, createReporter, createStorage, defineGenerator, defineParser, definePlugin, defineResolver, fileReporter, fsStorage, jsonReporter, logLevel, memoryStorage }; | ||
| export { type Adapter, type AdapterFactoryOptions, type AdapterSource, AsyncEventEmitter, type BannerMeta, BuildOutput, CLIOptions, Config, type Diagnostic, type DiagnosticByCode, type DiagnosticDoc, type DiagnosticKind, type DiagnosticLocation, type DiagnosticSeverity, Diagnostics, type Exclude, type FileProcessorHooks, 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 ParsedFile, 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, type Resolver, type ResolverContext, type ResolverFileParams, type ResolverPathParams, type SerializedDiagnostic, type Storage, type UpdateDiagnostic, Url, UserConfig, type UserReporter, ast, cliReporter, createAdapter, createKubb, createRenderer, createReporter, createStorage, defineGenerator, defineParser, definePlugin, defineResolver, fileReporter, fsStorage, jsonReporter, logLevel, memoryStorage }; | ||
| //# sourceMappingURL=index.d.ts.map |
+4
-4
| { | ||
| "name": "@kubb/core", | ||
| "version": "5.0.0-beta.55", | ||
| "version": "5.0.0-beta.56", | ||
| "description": "Core engine for Kubb's plugin-based code generation system. Provides the plugin driver, file manager, defineConfig, and build orchestration used by every Kubb plugin.", | ||
@@ -59,10 +59,10 @@ "keywords": [ | ||
| "dependencies": { | ||
| "@kubb/ast": "5.0.0-beta.55" | ||
| "@kubb/ast": "5.0.0-beta.56" | ||
| }, | ||
| "devDependencies": { | ||
| "@internals/utils": "0.0.0", | ||
| "@kubb/renderer-jsx": "5.0.0-beta.55" | ||
| "@kubb/renderer-jsx": "5.0.0-beta.56" | ||
| }, | ||
| "peerDependencies": { | ||
| "@kubb/renderer-jsx": "5.0.0-beta.55" | ||
| "@kubb/renderer-jsx": "5.0.0-beta.56" | ||
| }, | ||
@@ -69,0 +69,0 @@ "engines": { |
+1
-1
@@ -1,2 +0,2 @@ | ||
| export { AsyncEventEmitter } from '@internals/utils' | ||
| export { AsyncEventEmitter, Url } from '@internals/utils' | ||
| export * as ast from '@kubb/ast' | ||
@@ -3,0 +3,0 @@ export { createAdapter } from './createAdapter.ts' |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
URL strings
Supply chain riskPackage contains fragments of external URLs or IP addresses, which the package may be accessing at runtime.
Found 1 instance in 1 package
URL strings
Supply chain riskPackage contains fragments of external URLs or IP addresses, which the package may be accessing at runtime.
Found 1 instance in 1 package
1104031
0.26%16207
0.62%+ Added
+ Added
- Removed
- Removed
Updated