@kubb/core 4.18.4 → 4.19.0

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.
@@ -81,7 +81,7 @@ declare class PluginManager {
81
81
  parameters: PluginParameter<H>;
82
82
  }): Array<ReturnType<ParseResult<H>>> | null;
83
83
  /**
84
- * First non-null result stops and will return it's value.
84
+ * Returns the first non-null result.
85
85
  */
86
86
  hookFirst<H extends PluginLifecycleHooks>({
87
87
  hookName,
@@ -93,7 +93,7 @@ declare class PluginManager {
93
93
  skipped?: ReadonlySet<Plugin> | null;
94
94
  }): Promise<SafeParseResult<H>>;
95
95
  /**
96
- * First non-null result stops and will return it's value.
96
+ * Returns the first non-null result.
97
97
  */
98
98
  hookFirstSync<H extends PluginLifecycleHooks>({
99
99
  hookName,
@@ -105,15 +105,15 @@ declare class PluginManager {
105
105
  skipped?: ReadonlySet<Plugin> | null;
106
106
  }): SafeParseResult<H>;
107
107
  /**
108
- * Run all plugins in parallel(order will be based on `this.plugin` and if `pre` or `post` is set).
108
+ * Runs all plugins in parallel based on `this.plugin` order and `pre`/`post` settings.
109
109
  */
110
- hookParallel<H extends PluginLifecycleHooks, TOuput = void>({
110
+ hookParallel<H extends PluginLifecycleHooks, TOutput = void>({
111
111
  hookName,
112
112
  parameters
113
113
  }: {
114
114
  hookName: H;
115
115
  parameters?: Parameters<RequiredPluginLifecycle[H]> | undefined;
116
- }): Promise<Awaited<TOuput>[]>;
116
+ }): Promise<Awaited<TOutput>[]>;
117
117
  /**
118
118
  * Chains plugins
119
119
  */
@@ -411,7 +411,7 @@ type Config<TInput = Input> = {
411
411
  input: TInput;
412
412
  output: {
413
413
  /**
414
- * The path where all generated files will be exported.
414
+ * The path where all generated files receives exported.
415
415
  * This can be an absolute path or a path relative to the specified root option.
416
416
  */
417
417
  path: string;
@@ -426,41 +426,39 @@ type Config<TInput = Input> = {
426
426
  write?: boolean;
427
427
  /**
428
428
  * Specifies the formatting tool to be used.
429
- * @default prettier
430
- *
431
- * Possible values:
432
- * - 'auto': Automatically detects and uses biome or prettier (in that order of preference).
433
- * - 'prettier': Uses Prettier for code formatting.
434
- * - 'biome': Uses Biome for code formatting.
435
- *
429
+ * - 'auto' automatically detects and uses biome or prettier (in that order of preference).
430
+ * - 'prettier' uses Prettier for code formatting.
431
+ * - 'biome' uses Biome for code formatting.
432
+ * - 'oxfmt' uses Oxfmt for code formatting.
433
+ * - false disables code formatting.
434
+ * @default 'prettier'
436
435
  */
437
436
  format?: 'auto' | 'prettier' | 'biome' | 'oxfmt' | false;
438
437
  /**
439
438
  * Specifies the linter that should be used to analyze the code.
440
- * The accepted values indicate different linting tools.
441
- *
442
- * Possible values:
443
- * - 'auto': Automatically detects and uses biome, oxlint, or eslint (in that order of preference).
444
- * - 'eslint': Represents the use of ESLint, a widely used JavaScript linter.
445
- * - 'biome': Represents the Biome linter, a modern tool for code scanning.
446
- * - 'oxlint': Represents the Oxlint tool for linting purposes.
447
- *
439
+ * - 'auto' automatically detects and uses biome, oxlint, or eslint (in that order of preference).
440
+ * - 'eslint' uses ESLint for linting.
441
+ * - 'biome' uses Biome for linting.
442
+ * - 'oxlint' uses Oxlint for linting.
443
+ * - false disables linting.
444
+ * @default 'auto'
448
445
  */
449
446
  lint?: 'auto' | 'eslint' | 'biome' | 'oxlint' | false;
450
447
  /**
451
- * Override the extension to the generated imports and exports, by default each plugin will add an extension
448
+ * Overrides the extension for generated imports and exports. By default, each plugin adds an extension.
452
449
  * @default { '.ts': '.ts'}
453
450
  */
454
451
  extension?: Record<KubbFile.Extname, KubbFile.Extname | ''>;
455
452
  /**
456
- * Specify how `index.ts` files should be created. You can also disable the generation of barrel files here. While each plugin has its own `barrelType` option, this setting controls the creation of the root barrel file, such as` src/gen/index.ts`.
453
+ * Configures how `index.ts` files are created, including disabling barrel file generation. Each plugin has its own `barrelType` option; this setting controls the root barrel file (e.g., `src/gen/index.ts`).
457
454
  * @default 'named'
458
455
  */
459
456
  barrelType?: Exclude<BarrelType, 'propagate'> | false;
460
457
  /**
461
- * Add a default banner to the beginning of every generated file. This makes it clear that the file was generated by Kubb.
462
- * - 'simple': will only add banner with link to Kubb
463
- * - 'full': will add source, title, description and the OpenAPI version used
458
+ * Adds a default banner to the start of every generated file indicating it was generated by Kubb.
459
+ * - 'simple' adds banner with link to Kubb.
460
+ * - 'full' adds source, title, description, and OpenAPI version.
461
+ * - false disables banner generation.
464
462
  * @default 'simple'
465
463
  */
466
464
  defaultBanner?: 'simple' | 'full' | false;
@@ -473,17 +471,17 @@ type Config<TInput = Input> = {
473
471
  override?: boolean;
474
472
  };
475
473
  /**
476
- * An array of Kubb plugins that will be used in the generation.
474
+ * An array of Kubb plugins that used in the generation.
477
475
  * Each plugin may include additional configurable options(defined in the plugin itself).
478
- * If a plugin depends on another plugin, an error will be returned if the required dependency is missing. See pre for more details.
476
+ * If a plugin depends on another plugin, an error is returned if the required dependency is missing. See pre for more details.
479
477
  */
480
478
  plugins?: Array<Plugin>;
481
479
  /**
482
- * Hooks that will be called when a specific action is triggered in Kubb.
480
+ * Hooks triggered when a specific action occurs in Kubb.
483
481
  */
484
482
  hooks?: {
485
483
  /**
486
- * Hook that will be triggered at the end of all executions.
484
+ * Hook that triggers at the end of all executions.
487
485
  * Useful for running Prettier or ESLint to format/lint your code.
488
486
  */
489
487
  done?: string | Array<string>;
@@ -512,7 +510,7 @@ TContext = any,
512
510
  TResolvePathOptions extends object = object> = {
513
511
  name: TName;
514
512
  /**
515
- * Same behaviour like what has been done with `QueryKey` in `@tanstack/react-query`
513
+ * Same behavior like what has been done with `QueryKey` in `@tanstack/react-query`
516
514
  */
517
515
  key: PluginKey<TName | string>;
518
516
  options: TOptions;
@@ -534,12 +532,12 @@ type UserPlugin<TOptions extends PluginFactoryOptions = PluginFactoryOptions> =
534
532
  */
535
533
  options: TOptions['resolvedOptions'];
536
534
  /**
537
- * Specifies the preceding plugins for the current plugin. You can pass an array of preceding plugin names, and the current plugin will be executed after these plugins.
535
+ * Specifies the preceding plugins for the current plugin. You can pass an array of preceding plugin names, and the current plugin is executed after these plugins.
538
536
  * Can be used to validate dependent plugins.
539
537
  */
540
538
  pre?: Array<string>;
541
539
  /**
542
- * Specifies the succeeding plugins for the current plugin. You can pass an array of succeeding plugin names, and the current plugin will be executed before these plugins.
540
+ * Specifies the succeeding plugins for the current plugin. You can pass an array of succeeding plugin names, and the current plugin is executed before these plugins.
543
541
  */
544
542
  post?: Array<string>;
545
543
  inject?: (this: PluginContext<TOptions>, context: PluginContext<TOptions>) => TOptions['context'];
@@ -558,12 +556,12 @@ type Plugin<TOptions extends PluginFactoryOptions = PluginFactoryOptions> = {
558
556
  */
559
557
  key: TOptions['key'];
560
558
  /**
561
- * Specifies the preceding plugins for the current plugin. You can pass an array of preceding plugin names, and the current plugin will be executed after these plugins.
559
+ * Specifies the preceding plugins for the current plugin. You can pass an array of preceding plugin names, and the current plugin is executed after these plugins.
562
560
  * Can be used to validate dependent plugins.
563
561
  */
564
562
  pre?: Array<string>;
565
563
  /**
566
- * Specifies the succeeding plugins for the current plugin. You can pass an array of succeeding plugin names, and the current plugin will be executed before these plugins.
564
+ * Specifies the succeeding plugins for the current plugin. You can pass an array of succeeding plugin names, and the current plugin is executed before these plugins.
567
565
  */
568
566
  post?: Array<string>;
569
567
  /**
@@ -613,10 +611,12 @@ type ResolveNameParams = {
613
611
  name: string;
614
612
  pluginKey?: Plugin['key'];
615
613
  /**
616
- * `file` will be used to customize the name of the created file(use of camelCase)
617
- * `function` can be used to customize the exported functions(use of camelCase)
618
- * `type` is a special type for TypeScript(use of PascalCase)
619
- * `const` can be used for variables(use of camelCase)
614
+ * Specifies the type of entity being named.
615
+ * - 'file' customizes the name of the created file (uses camelCase).
616
+ * - 'function' customizes the exported function names (uses camelCase).
617
+ * - 'type' customizes TypeScript types (uses PascalCase).
618
+ * - 'const' customizes variable names (uses camelCase).
619
+ * @default undefined
620
620
  */
621
621
  type?: 'file' | 'function' | 'type' | 'const';
622
622
  };
@@ -671,11 +671,14 @@ type GroupContext = {
671
671
  };
672
672
  type Group = {
673
673
  /**
674
- * Define a type where to group the files on
674
+ * Defines the type where to group the files.
675
+ * - 'tag' groups files by OpenAPI tags.
676
+ * - 'path' groups files by OpenAPI paths.
677
+ * @default undefined
675
678
  */
676
679
  type: 'tag' | 'path';
677
680
  /**
678
- * Return the name of a group based on the group name, this will be used for the file and name generation
681
+ * Return the name of a group based on the group name, this used for the file and name generation
679
682
  */
680
683
  name?: (context: GroupContext) => string;
681
684
  };
@@ -705,4 +708,4 @@ type Logger<TOptions extends LoggerOptions = LoggerOptions> = {
705
708
  type UserLogger<TOptions extends LoggerOptions = LoggerOptions> = Omit<Logger<TOptions>, 'logLevel'>;
706
709
  //#endregion
707
710
  export { AsyncEventEmitter as A, UserLogger as C, KubbEvents as D, PossiblePromise as E, PluginManager as O, UserConfig as S, UserPluginWithLifeCycle as T, PluginLifecycleHooks as _, InputData as a, ResolveNameParams as b, Logger as c, Output as d, Plugin as f, PluginLifecycle as g, PluginKey as h, Group as i, getMode as k, LoggerContext as l, PluginFactoryOptions as m, Config as n, InputPath as o, PluginContext as p, GetPluginFactoryOptions as r, LogLevel as s, BarrelType as t, LoggerOptions as u, PluginParameter as v, UserPlugin as w, ResolvePathParams as x, PluginWithLifeCycle as y };
708
- //# sourceMappingURL=types-Ctvjzlmw.d.cts.map
711
+ //# sourceMappingURL=types-BGowkYLs.d.cts.map
@@ -81,7 +81,7 @@ declare class PluginManager {
81
81
  parameters: PluginParameter<H>;
82
82
  }): Array<ReturnType<ParseResult<H>>> | null;
83
83
  /**
84
- * First non-null result stops and will return it's value.
84
+ * Returns the first non-null result.
85
85
  */
86
86
  hookFirst<H extends PluginLifecycleHooks>({
87
87
  hookName,
@@ -93,7 +93,7 @@ declare class PluginManager {
93
93
  skipped?: ReadonlySet<Plugin> | null;
94
94
  }): Promise<SafeParseResult<H>>;
95
95
  /**
96
- * First non-null result stops and will return it's value.
96
+ * Returns the first non-null result.
97
97
  */
98
98
  hookFirstSync<H extends PluginLifecycleHooks>({
99
99
  hookName,
@@ -105,15 +105,15 @@ declare class PluginManager {
105
105
  skipped?: ReadonlySet<Plugin> | null;
106
106
  }): SafeParseResult<H>;
107
107
  /**
108
- * Run all plugins in parallel(order will be based on `this.plugin` and if `pre` or `post` is set).
108
+ * Runs all plugins in parallel based on `this.plugin` order and `pre`/`post` settings.
109
109
  */
110
- hookParallel<H extends PluginLifecycleHooks, TOuput = void>({
110
+ hookParallel<H extends PluginLifecycleHooks, TOutput = void>({
111
111
  hookName,
112
112
  parameters
113
113
  }: {
114
114
  hookName: H;
115
115
  parameters?: Parameters<RequiredPluginLifecycle[H]> | undefined;
116
- }): Promise<Awaited<TOuput>[]>;
116
+ }): Promise<Awaited<TOutput>[]>;
117
117
  /**
118
118
  * Chains plugins
119
119
  */
@@ -411,7 +411,7 @@ type Config<TInput = Input> = {
411
411
  input: TInput;
412
412
  output: {
413
413
  /**
414
- * The path where all generated files will be exported.
414
+ * The path where all generated files receives exported.
415
415
  * This can be an absolute path or a path relative to the specified root option.
416
416
  */
417
417
  path: string;
@@ -426,41 +426,39 @@ type Config<TInput = Input> = {
426
426
  write?: boolean;
427
427
  /**
428
428
  * Specifies the formatting tool to be used.
429
- * @default prettier
430
- *
431
- * Possible values:
432
- * - 'auto': Automatically detects and uses biome or prettier (in that order of preference).
433
- * - 'prettier': Uses Prettier for code formatting.
434
- * - 'biome': Uses Biome for code formatting.
435
- *
429
+ * - 'auto' automatically detects and uses biome or prettier (in that order of preference).
430
+ * - 'prettier' uses Prettier for code formatting.
431
+ * - 'biome' uses Biome for code formatting.
432
+ * - 'oxfmt' uses Oxfmt for code formatting.
433
+ * - false disables code formatting.
434
+ * @default 'prettier'
436
435
  */
437
436
  format?: 'auto' | 'prettier' | 'biome' | 'oxfmt' | false;
438
437
  /**
439
438
  * Specifies the linter that should be used to analyze the code.
440
- * The accepted values indicate different linting tools.
441
- *
442
- * Possible values:
443
- * - 'auto': Automatically detects and uses biome, oxlint, or eslint (in that order of preference).
444
- * - 'eslint': Represents the use of ESLint, a widely used JavaScript linter.
445
- * - 'biome': Represents the Biome linter, a modern tool for code scanning.
446
- * - 'oxlint': Represents the Oxlint tool for linting purposes.
447
- *
439
+ * - 'auto' automatically detects and uses biome, oxlint, or eslint (in that order of preference).
440
+ * - 'eslint' uses ESLint for linting.
441
+ * - 'biome' uses Biome for linting.
442
+ * - 'oxlint' uses Oxlint for linting.
443
+ * - false disables linting.
444
+ * @default 'auto'
448
445
  */
449
446
  lint?: 'auto' | 'eslint' | 'biome' | 'oxlint' | false;
450
447
  /**
451
- * Override the extension to the generated imports and exports, by default each plugin will add an extension
448
+ * Overrides the extension for generated imports and exports. By default, each plugin adds an extension.
452
449
  * @default { '.ts': '.ts'}
453
450
  */
454
451
  extension?: Record<KubbFile.Extname, KubbFile.Extname | ''>;
455
452
  /**
456
- * Specify how `index.ts` files should be created. You can also disable the generation of barrel files here. While each plugin has its own `barrelType` option, this setting controls the creation of the root barrel file, such as` src/gen/index.ts`.
453
+ * Configures how `index.ts` files are created, including disabling barrel file generation. Each plugin has its own `barrelType` option; this setting controls the root barrel file (e.g., `src/gen/index.ts`).
457
454
  * @default 'named'
458
455
  */
459
456
  barrelType?: Exclude<BarrelType, 'propagate'> | false;
460
457
  /**
461
- * Add a default banner to the beginning of every generated file. This makes it clear that the file was generated by Kubb.
462
- * - 'simple': will only add banner with link to Kubb
463
- * - 'full': will add source, title, description and the OpenAPI version used
458
+ * Adds a default banner to the start of every generated file indicating it was generated by Kubb.
459
+ * - 'simple' adds banner with link to Kubb.
460
+ * - 'full' adds source, title, description, and OpenAPI version.
461
+ * - false disables banner generation.
464
462
  * @default 'simple'
465
463
  */
466
464
  defaultBanner?: 'simple' | 'full' | false;
@@ -473,17 +471,17 @@ type Config<TInput = Input> = {
473
471
  override?: boolean;
474
472
  };
475
473
  /**
476
- * An array of Kubb plugins that will be used in the generation.
474
+ * An array of Kubb plugins that used in the generation.
477
475
  * Each plugin may include additional configurable options(defined in the plugin itself).
478
- * If a plugin depends on another plugin, an error will be returned if the required dependency is missing. See pre for more details.
476
+ * If a plugin depends on another plugin, an error is returned if the required dependency is missing. See pre for more details.
479
477
  */
480
478
  plugins?: Array<Plugin>;
481
479
  /**
482
- * Hooks that will be called when a specific action is triggered in Kubb.
480
+ * Hooks triggered when a specific action occurs in Kubb.
483
481
  */
484
482
  hooks?: {
485
483
  /**
486
- * Hook that will be triggered at the end of all executions.
484
+ * Hook that triggers at the end of all executions.
487
485
  * Useful for running Prettier or ESLint to format/lint your code.
488
486
  */
489
487
  done?: string | Array<string>;
@@ -512,7 +510,7 @@ TContext = any,
512
510
  TResolvePathOptions extends object = object> = {
513
511
  name: TName;
514
512
  /**
515
- * Same behaviour like what has been done with `QueryKey` in `@tanstack/react-query`
513
+ * Same behavior like what has been done with `QueryKey` in `@tanstack/react-query`
516
514
  */
517
515
  key: PluginKey<TName | string>;
518
516
  options: TOptions;
@@ -534,12 +532,12 @@ type UserPlugin<TOptions extends PluginFactoryOptions = PluginFactoryOptions> =
534
532
  */
535
533
  options: TOptions['resolvedOptions'];
536
534
  /**
537
- * Specifies the preceding plugins for the current plugin. You can pass an array of preceding plugin names, and the current plugin will be executed after these plugins.
535
+ * Specifies the preceding plugins for the current plugin. You can pass an array of preceding plugin names, and the current plugin is executed after these plugins.
538
536
  * Can be used to validate dependent plugins.
539
537
  */
540
538
  pre?: Array<string>;
541
539
  /**
542
- * Specifies the succeeding plugins for the current plugin. You can pass an array of succeeding plugin names, and the current plugin will be executed before these plugins.
540
+ * Specifies the succeeding plugins for the current plugin. You can pass an array of succeeding plugin names, and the current plugin is executed before these plugins.
543
541
  */
544
542
  post?: Array<string>;
545
543
  inject?: (this: PluginContext<TOptions>, context: PluginContext<TOptions>) => TOptions['context'];
@@ -558,12 +556,12 @@ type Plugin<TOptions extends PluginFactoryOptions = PluginFactoryOptions> = {
558
556
  */
559
557
  key: TOptions['key'];
560
558
  /**
561
- * Specifies the preceding plugins for the current plugin. You can pass an array of preceding plugin names, and the current plugin will be executed after these plugins.
559
+ * Specifies the preceding plugins for the current plugin. You can pass an array of preceding plugin names, and the current plugin is executed after these plugins.
562
560
  * Can be used to validate dependent plugins.
563
561
  */
564
562
  pre?: Array<string>;
565
563
  /**
566
- * Specifies the succeeding plugins for the current plugin. You can pass an array of succeeding plugin names, and the current plugin will be executed before these plugins.
564
+ * Specifies the succeeding plugins for the current plugin. You can pass an array of succeeding plugin names, and the current plugin is executed before these plugins.
567
565
  */
568
566
  post?: Array<string>;
569
567
  /**
@@ -613,10 +611,12 @@ type ResolveNameParams = {
613
611
  name: string;
614
612
  pluginKey?: Plugin['key'];
615
613
  /**
616
- * `file` will be used to customize the name of the created file(use of camelCase)
617
- * `function` can be used to customize the exported functions(use of camelCase)
618
- * `type` is a special type for TypeScript(use of PascalCase)
619
- * `const` can be used for variables(use of camelCase)
614
+ * Specifies the type of entity being named.
615
+ * - 'file' customizes the name of the created file (uses camelCase).
616
+ * - 'function' customizes the exported function names (uses camelCase).
617
+ * - 'type' customizes TypeScript types (uses PascalCase).
618
+ * - 'const' customizes variable names (uses camelCase).
619
+ * @default undefined
620
620
  */
621
621
  type?: 'file' | 'function' | 'type' | 'const';
622
622
  };
@@ -671,11 +671,14 @@ type GroupContext = {
671
671
  };
672
672
  type Group = {
673
673
  /**
674
- * Define a type where to group the files on
674
+ * Defines the type where to group the files.
675
+ * - 'tag' groups files by OpenAPI tags.
676
+ * - 'path' groups files by OpenAPI paths.
677
+ * @default undefined
675
678
  */
676
679
  type: 'tag' | 'path';
677
680
  /**
678
- * Return the name of a group based on the group name, this will be used for the file and name generation
681
+ * Return the name of a group based on the group name, this used for the file and name generation
679
682
  */
680
683
  name?: (context: GroupContext) => string;
681
684
  };
@@ -705,4 +708,4 @@ type Logger<TOptions extends LoggerOptions = LoggerOptions> = {
705
708
  type UserLogger<TOptions extends LoggerOptions = LoggerOptions> = Omit<Logger<TOptions>, 'logLevel'>;
706
709
  //#endregion
707
710
  export { AsyncEventEmitter as A, UserLogger as C, KubbEvents as D, PossiblePromise as E, PluginManager as O, UserConfig as S, UserPluginWithLifeCycle as T, PluginLifecycleHooks as _, InputData as a, ResolveNameParams as b, Logger as c, Output as d, Plugin as f, PluginLifecycle as g, PluginKey as h, Group as i, getMode as k, LoggerContext as l, PluginFactoryOptions as m, Config as n, InputPath as o, PluginContext as p, GetPluginFactoryOptions as r, LogLevel as s, BarrelType as t, LoggerOptions as u, PluginParameter as v, UserPlugin as w, ResolvePathParams as x, PluginWithLifeCycle as y };
708
- //# sourceMappingURL=types-HnfIY5rU.d.ts.map
711
+ //# sourceMappingURL=types-C9WcJ0d5.d.ts.map
package/dist/utils.cjs CHANGED
@@ -1,5 +1,5 @@
1
1
  const require_chunk = require('./chunk-C1_xRkKa.cjs');
2
- const require_getBarrelFiles = require('./getBarrelFiles-BI0KYIQA.cjs');
2
+ const require_getBarrelFiles = require('./getBarrelFiles-p2qZTkRB.cjs');
3
3
  const require_transformers = require('./transformers-Bwrz5_qV.cjs');
4
4
  let node_path = require("node:path");
5
5
  node_path = require_chunk.__toESM(node_path);
@@ -1 +1 @@
1
- {"version":3,"file":"utils.cjs","names":["#buffer","#items","#orderItems","#addParams","camelCase","item","path","timeout"],"sources":["../src/utils/buildJSDoc.ts","../src/utils/Cache.ts","../src/utils/FunctionParams.ts","../src/utils/getNestedAccessor.ts","../src/utils/promise.ts","../src/utils/renderTemplate.ts","../src/utils/resolveModuleSource.ts","../src/utils/timeout.ts"],"sourcesContent":["/**\n * Builds a JSDoc comment block with custom indentation.\n * @param comments - Array of comment strings to include in the JSDoc block\n * @param options - Configuration options for formatting\n * @returns Formatted JSDoc string or fallback string if no comments\n */\nexport function buildJSDoc(\n comments: Array<string>,\n options: {\n /**\n * String to use for indenting each line of the JSDoc comment\n * @default ' * ' (3 spaces + asterisk + space)\n */\n indent?: string\n /**\n * String to append after the closing JSDoc tag\n * @default '\\n ' (newline + 2 spaces)\n */\n suffix?: string\n /**\n * String to return when there are no comments\n * @default ' ' (2 spaces)\n */\n fallback?: string\n } = {},\n): string {\n const { indent = ' * ', suffix = '\\n ', fallback = ' ' } = options\n\n if (comments.length === 0) {\n return fallback\n }\n\n return `/**\\n${comments.map((c) => `${indent}${c}`).join('\\n')}\\n */${suffix}`\n}\n","export class Cache<T> {\n #buffer = new Map<string, T>()\n\n async get(key: string): Promise<T | null> {\n return this.#buffer.get(key) ?? null\n }\n\n async set(key: string, value: T): Promise<void> {\n this.#buffer.set(key, value)\n }\n\n async delete(key: string): Promise<void> {\n this.#buffer.delete(key)\n }\n\n async clear(): Promise<void> {\n this.#buffer.clear()\n }\n\n async keys(): Promise<string[]> {\n return [...this.#buffer.keys()]\n }\n\n async values(): Promise<T[]> {\n return [...this.#buffer.values()]\n }\n\n async flush(): Promise<void> {\n // No-op for base cache\n }\n}\n","import { orderBy } from 'natural-orderby'\n\nimport { camelCase } from '../transformers/casing.ts'\n\ntype FunctionParamsASTWithoutType = {\n name?: string\n type?: string\n /**\n * @default true\n */\n required?: boolean\n /**\n * @default true\n */\n enabled?: boolean\n default?: string\n}\n\ntype FunctionParamsASTWithType = {\n name?: never\n type: string\n /**\n * @default true\n */\n required?: boolean\n /**\n * @default true\n */\n enabled?: boolean\n default?: string\n}\n/**\n * @deprecated\n */\nexport type FunctionParamsAST = FunctionParamsASTWithoutType | FunctionParamsASTWithType\n\n/**\n * @deprecated\n */\nexport class FunctionParams {\n #items: Array<FunctionParamsAST | FunctionParamsAST[]> = []\n constructor() {\n return this\n }\n\n get items(): FunctionParamsAST[] {\n return this.#items.flat()\n }\n\n add(item: FunctionParamsAST | Array<FunctionParamsAST | FunctionParamsAST[] | undefined> | undefined): FunctionParams {\n if (!item) {\n return this\n }\n\n if (Array.isArray(item)) {\n item.filter(Boolean).forEach((it) => {\n this.#items.push(it)\n })\n return this\n }\n this.#items.push(item)\n\n return this\n }\n static #orderItems(items: Array<FunctionParamsAST | FunctionParamsAST[]>) {\n return orderBy(\n items.filter(Boolean),\n [\n (v) => {\n if (Array.isArray(v)) {\n return undefined\n }\n return !v.default\n },\n (v) => {\n if (Array.isArray(v)) {\n return undefined\n }\n return v.required ?? true\n },\n ],\n ['desc', 'desc'],\n )\n }\n\n static #addParams(acc: string[], item: FunctionParamsAST) {\n const { enabled = true, name, type, required = true, ...rest } = item\n\n if (!enabled) {\n return acc\n }\n\n if (!name) {\n // when name is not se we will use TypeScript generics\n acc.push(`${type}${rest.default ? ` = ${rest.default}` : ''}`)\n\n return acc\n }\n // TODO check whey we still need the camelcase here\n const parameterName = name.startsWith('{') ? name : camelCase(name)\n\n if (type) {\n if (required) {\n acc.push(`${parameterName}: ${type}${rest.default ? ` = ${rest.default}` : ''}`)\n } else {\n acc.push(`${parameterName}?: ${type}`)\n }\n } else {\n acc.push(`${parameterName}`)\n }\n\n return acc\n }\n\n static toObject(items: FunctionParamsAST[]): FunctionParamsAST {\n let type: string[] = []\n let name: string[] = []\n\n const enabled = items.every((item) => item.enabled) ? items.at(0)?.enabled : true\n const required = items.every((item) => item.required) ?? true\n\n items.forEach((item) => {\n name = FunctionParams.#addParams(name, { ...item, type: undefined })\n if (items.some((item) => item.type)) {\n type = FunctionParams.#addParams(type, item)\n }\n })\n\n return {\n name: `{ ${name.join(', ')} }`,\n type: type.length ? `{ ${type.join('; ')} }` : undefined,\n enabled,\n required,\n }\n }\n\n toObject(): FunctionParamsAST {\n const items = FunctionParams.#orderItems(this.#items).flat()\n\n return FunctionParams.toObject(items)\n }\n\n static toString(items: (FunctionParamsAST | FunctionParamsAST[])[]): string {\n const sortedData = FunctionParams.#orderItems(items)\n\n return sortedData\n .reduce((acc, item) => {\n if (Array.isArray(item)) {\n if (item.length <= 0) {\n return acc\n }\n const subItems = FunctionParams.#orderItems(item) as FunctionParamsAST[]\n const objectItem = FunctionParams.toObject(subItems)\n\n return FunctionParams.#addParams(acc, objectItem)\n }\n\n return FunctionParams.#addParams(acc, item)\n }, [] as string[])\n .join(', ')\n }\n\n toString(): string {\n const items = FunctionParams.#orderItems(this.#items)\n\n return FunctionParams.toString(items)\n }\n}\n","/**\n * Converts a param path (string with dot notation or array of strings) to a JavaScript accessor expression.\n * @param param - The param path, e.g., 'pagination.next.id' or ['pagination', 'next', 'id']\n * @param accessor - The base accessor, e.g., 'lastPage' or 'firstPage'\n * @returns A JavaScript accessor expression, e.g., \"lastPage?.['pagination']?.['next']?.['id']\", or undefined if param is empty\n *\n * @example\n * ```ts\n * getNestedAccessor('pagination.next.id', 'lastPage')\n * // returns: \"lastPage?.['pagination']?.['next']?.['id']\"\n *\n * getNestedAccessor(['pagination', 'next', 'id'], 'lastPage')\n * // returns: \"lastPage?.['pagination']?.['next']?.['id']\"\n *\n * getNestedAccessor('', 'lastPage')\n * // returns: undefined\n * ```\n */\nexport function getNestedAccessor(param: string | string[], accessor: string): string | undefined {\n const parts = Array.isArray(param) ? param : param.split('.')\n if (parts.length === 0 || (parts.length === 1 && parts[0] === '')) {\n return undefined\n }\n return parts.reduce((acc, part) => `${acc}?.['${part}']`, accessor)\n}\n","import type { PossiblePromise } from './types.ts'\n\nexport function isPromise<T>(result: PossiblePromise<T>): result is Promise<T> {\n return !!result && typeof (result as Promise<unknown>)?.then === 'function'\n}\n\nexport function isPromiseFulfilledResult<T = unknown>(result: PromiseSettledResult<unknown>): result is PromiseFulfilledResult<T> {\n return result.status === 'fulfilled'\n}\n\nexport function isPromiseRejectedResult<T>(result: PromiseSettledResult<unknown>): result is Omit<PromiseRejectedResult, 'reason'> & { reason: T } {\n return result.status === 'rejected'\n}\n","export function renderTemplate<TData extends Record<string, unknown> = Record<string, unknown>>(template: string, data: TData | undefined = undefined): string {\n if (!data || !Object.keys(data).length) {\n return template.replace(/{{(.*?)}}/g, '')\n }\n\n const matches = template.match(/{{(.*?)}}/g)\n\n return (\n matches?.reduce((prev, curr) => {\n const index = curr.split(/{{|}}/).filter(Boolean)[0]?.trim()\n if (index === undefined) {\n return prev\n }\n const value = data[index]\n\n if (value === undefined) {\n return prev\n }\n\n return prev\n .replace(curr, () => {\n if (typeof value === 'boolean') {\n return `${value.toString()}` || 'false'\n }\n\n return (value as string) || ''\n })\n .trim()\n }, template) || ''\n )\n}\n","import { readFileSync } from 'node:fs'\nimport path from 'node:path'\nimport { fileURLToPath } from 'node:url'\nimport createJiti from 'jiti'\n\nexport function resolveModuleSource(pkgName: string) {\n const parentURL = import.meta.url\n const jiti = createJiti(parentURL)\n\n const resolved = jiti.esmResolve(pkgName, parentURL)\n const filePath = resolved.startsWith('file:') ? fileURLToPath(resolved) : resolved\n const source = readFileSync(filePath, { encoding: 'utf-8' })\n const ext = path.extname(filePath)\n return { path: filePath, source, ext } as const\n}\n","export async function timeout(ms: number): Promise<unknown> {\n return new Promise((resolve) => {\n const timeout = setTimeout(() => {\n resolve(timeout)\n }, ms)\n }).then((timeout) => {\n clearTimeout(timeout as NodeJS.Timeout)\n\n return true\n })\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;AAMA,SAAgB,WACd,UACA,UAgBI,EAAE,EACE;CACR,MAAM,EAAE,SAAS,SAAS,SAAS,QAAQ,WAAW,SAAS;AAE/D,KAAI,SAAS,WAAW,EACtB,QAAO;AAGT,QAAO,QAAQ,SAAS,KAAK,MAAM,GAAG,SAAS,IAAI,CAAC,KAAK,KAAK,CAAC,SAAS;;;;;AChC1E,IAAa,QAAb,MAAsB;CACpB,0BAAU,IAAI,KAAgB;CAE9B,MAAM,IAAI,KAAgC;AACxC,SAAO,MAAKA,OAAQ,IAAI,IAAI,IAAI;;CAGlC,MAAM,IAAI,KAAa,OAAyB;AAC9C,QAAKA,OAAQ,IAAI,KAAK,MAAM;;CAG9B,MAAM,OAAO,KAA4B;AACvC,QAAKA,OAAQ,OAAO,IAAI;;CAG1B,MAAM,QAAuB;AAC3B,QAAKA,OAAQ,OAAO;;CAGtB,MAAM,OAA0B;AAC9B,SAAO,CAAC,GAAG,MAAKA,OAAQ,MAAM,CAAC;;CAGjC,MAAM,SAAuB;AAC3B,SAAO,CAAC,GAAG,MAAKA,OAAQ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","#items","#orderItems","#addParams","camelCase","item","path","timeout"],"sources":["../src/utils/buildJSDoc.ts","../src/utils/Cache.ts","../src/utils/FunctionParams.ts","../src/utils/getNestedAccessor.ts","../src/utils/promise.ts","../src/utils/renderTemplate.ts","../src/utils/resolveModuleSource.ts","../src/utils/timeout.ts"],"sourcesContent":["/**\n * Builds a JSDoc comment block with custom indentation.\n * @param comments - Array of comment strings to include in the JSDoc block\n * @param options - Configuration options for formatting\n * @returns Formatted JSDoc string or fallback string if no comments\n */\nexport function buildJSDoc(\n comments: Array<string>,\n options: {\n /**\n * String to use for indenting each line of the JSDoc comment\n * @default ' * ' (3 spaces + asterisk + space)\n */\n indent?: string\n /**\n * String to append after the closing JSDoc tag\n * @default '\\n ' (newline + 2 spaces)\n */\n suffix?: string\n /**\n * String to return when there are no comments\n * @default ' ' (2 spaces)\n */\n fallback?: string\n } = {},\n): string {\n const { indent = ' * ', suffix = '\\n ', fallback = ' ' } = options\n\n if (comments.length === 0) {\n return fallback\n }\n\n return `/**\\n${comments.map((c) => `${indent}${c}`).join('\\n')}\\n */${suffix}`\n}\n","export class Cache<T> {\n #buffer = new Map<string, T>()\n\n async get(key: string): Promise<T | null> {\n return this.#buffer.get(key) ?? null\n }\n\n async set(key: string, value: T): Promise<void> {\n this.#buffer.set(key, value)\n }\n\n async delete(key: string): Promise<void> {\n this.#buffer.delete(key)\n }\n\n async clear(): Promise<void> {\n this.#buffer.clear()\n }\n\n async keys(): Promise<string[]> {\n return [...this.#buffer.keys()]\n }\n\n async values(): Promise<T[]> {\n return [...this.#buffer.values()]\n }\n\n async flush(): Promise<void> {\n // No-op for base cache\n }\n}\n","import { orderBy } from 'natural-orderby'\n\nimport { camelCase } from '../transformers/casing.ts'\n\ntype FunctionParamsASTWithoutType = {\n name?: string\n type?: string\n /**\n * @default true\n */\n required?: boolean\n /**\n * @default true\n */\n enabled?: boolean\n default?: string\n}\n\ntype FunctionParamsASTWithType = {\n name?: never\n type: string\n /**\n * @default true\n */\n required?: boolean\n /**\n * @default true\n */\n enabled?: boolean\n default?: string\n}\n/**\n * @deprecated\n */\nexport type FunctionParamsAST = FunctionParamsASTWithoutType | FunctionParamsASTWithType\n\n/**\n * @deprecated\n */\nexport class FunctionParams {\n #items: Array<FunctionParamsAST | FunctionParamsAST[]> = []\n constructor() {\n return this\n }\n\n get items(): FunctionParamsAST[] {\n return this.#items.flat()\n }\n\n add(item: FunctionParamsAST | Array<FunctionParamsAST | FunctionParamsAST[] | undefined> | undefined): FunctionParams {\n if (!item) {\n return this\n }\n\n if (Array.isArray(item)) {\n item.filter(Boolean).forEach((it) => {\n this.#items.push(it)\n })\n return this\n }\n this.#items.push(item)\n\n return this\n }\n static #orderItems(items: Array<FunctionParamsAST | FunctionParamsAST[]>) {\n return orderBy(\n items.filter(Boolean),\n [\n (v) => {\n if (Array.isArray(v)) {\n return undefined\n }\n return !v.default\n },\n (v) => {\n if (Array.isArray(v)) {\n return undefined\n }\n return v.required ?? true\n },\n ],\n ['desc', 'desc'],\n )\n }\n\n static #addParams(acc: string[], item: FunctionParamsAST) {\n const { enabled = true, name, type, required = true, ...rest } = item\n\n if (!enabled) {\n return acc\n }\n\n if (!name) {\n // when name is not se we uses TypeScript generics\n acc.push(`${type}${rest.default ? ` = ${rest.default}` : ''}`)\n\n return acc\n }\n // TODO check whey we still need the camelcase here\n const parameterName = name.startsWith('{') ? name : camelCase(name)\n\n if (type) {\n if (required) {\n acc.push(`${parameterName}: ${type}${rest.default ? ` = ${rest.default}` : ''}`)\n } else {\n acc.push(`${parameterName}?: ${type}`)\n }\n } else {\n acc.push(`${parameterName}`)\n }\n\n return acc\n }\n\n static toObject(items: FunctionParamsAST[]): FunctionParamsAST {\n let type: string[] = []\n let name: string[] = []\n\n const enabled = items.every((item) => item.enabled) ? items.at(0)?.enabled : true\n const required = items.every((item) => item.required) ?? true\n\n items.forEach((item) => {\n name = FunctionParams.#addParams(name, { ...item, type: undefined })\n if (items.some((item) => item.type)) {\n type = FunctionParams.#addParams(type, item)\n }\n })\n\n return {\n name: `{ ${name.join(', ')} }`,\n type: type.length ? `{ ${type.join('; ')} }` : undefined,\n enabled,\n required,\n }\n }\n\n toObject(): FunctionParamsAST {\n const items = FunctionParams.#orderItems(this.#items).flat()\n\n return FunctionParams.toObject(items)\n }\n\n static toString(items: (FunctionParamsAST | FunctionParamsAST[])[]): string {\n const sortedData = FunctionParams.#orderItems(items)\n\n return sortedData\n .reduce((acc, item) => {\n if (Array.isArray(item)) {\n if (item.length <= 0) {\n return acc\n }\n const subItems = FunctionParams.#orderItems(item) as FunctionParamsAST[]\n const objectItem = FunctionParams.toObject(subItems)\n\n return FunctionParams.#addParams(acc, objectItem)\n }\n\n return FunctionParams.#addParams(acc, item)\n }, [] as string[])\n .join(', ')\n }\n\n toString(): string {\n const items = FunctionParams.#orderItems(this.#items)\n\n return FunctionParams.toString(items)\n }\n}\n","/**\n * Converts a param path (string with dot notation or array of strings) to a JavaScript accessor expression.\n * @param param - The param path, e.g., 'pagination.next.id' or ['pagination', 'next', 'id']\n * @param accessor - The base accessor, e.g., 'lastPage' or 'firstPage'\n * @returns A JavaScript accessor expression, e.g., \"lastPage?.['pagination']?.['next']?.['id']\", or undefined if param is empty\n *\n * @example\n * ```ts\n * getNestedAccessor('pagination.next.id', 'lastPage')\n * // returns: \"lastPage?.['pagination']?.['next']?.['id']\"\n *\n * getNestedAccessor(['pagination', 'next', 'id'], 'lastPage')\n * // returns: \"lastPage?.['pagination']?.['next']?.['id']\"\n *\n * getNestedAccessor('', 'lastPage')\n * // returns: undefined\n * ```\n */\nexport function getNestedAccessor(param: string | string[], accessor: string): string | undefined {\n const parts = Array.isArray(param) ? param : param.split('.')\n if (parts.length === 0 || (parts.length === 1 && parts[0] === '')) {\n return undefined\n }\n return parts.reduce((acc, part) => `${acc}?.['${part}']`, accessor)\n}\n","import type { PossiblePromise } from './types.ts'\n\nexport function isPromise<T>(result: PossiblePromise<T>): result is Promise<T> {\n return !!result && typeof (result as Promise<unknown>)?.then === 'function'\n}\n\nexport function isPromiseFulfilledResult<T = unknown>(result: PromiseSettledResult<unknown>): result is PromiseFulfilledResult<T> {\n return result.status === 'fulfilled'\n}\n\nexport function isPromiseRejectedResult<T>(result: PromiseSettledResult<unknown>): result is Omit<PromiseRejectedResult, 'reason'> & { reason: T } {\n return result.status === 'rejected'\n}\n","export function renderTemplate<TData extends Record<string, unknown> = Record<string, unknown>>(template: string, data: TData | undefined = undefined): string {\n if (!data || !Object.keys(data).length) {\n return template.replace(/{{(.*?)}}/g, '')\n }\n\n const matches = template.match(/{{(.*?)}}/g)\n\n return (\n matches?.reduce((prev, curr) => {\n const index = curr.split(/{{|}}/).filter(Boolean)[0]?.trim()\n if (index === undefined) {\n return prev\n }\n const value = data[index]\n\n if (value === undefined) {\n return prev\n }\n\n return prev\n .replace(curr, () => {\n if (typeof value === 'boolean') {\n return `${value.toString()}` || 'false'\n }\n\n return (value as string) || ''\n })\n .trim()\n }, template) || ''\n )\n}\n","import { readFileSync } from 'node:fs'\nimport path from 'node:path'\nimport { fileURLToPath } from 'node:url'\nimport createJiti from 'jiti'\n\nexport function resolveModuleSource(pkgName: string) {\n const parentURL = import.meta.url\n const jiti = createJiti(parentURL)\n\n const resolved = jiti.esmResolve(pkgName, parentURL)\n const filePath = resolved.startsWith('file:') ? fileURLToPath(resolved) : resolved\n const source = readFileSync(filePath, { encoding: 'utf-8' })\n const ext = path.extname(filePath)\n return { path: filePath, source, ext } as const\n}\n","export async function timeout(ms: number): Promise<unknown> {\n return new Promise((resolve) => {\n const timeout = setTimeout(() => {\n resolve(timeout)\n }, ms)\n }).then((timeout) => {\n clearTimeout(timeout as NodeJS.Timeout)\n\n return true\n })\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;AAMA,SAAgB,WACd,UACA,UAgBI,EAAE,EACE;CACR,MAAM,EAAE,SAAS,SAAS,SAAS,QAAQ,WAAW,SAAS;AAE/D,KAAI,SAAS,WAAW,EACtB,QAAO;AAGT,QAAO,QAAQ,SAAS,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R,SAAS,IAAI;;;;;ACvBpB,SAAgB,oBAAoB,SAAiB;CACnD,MAAM;CAGN,MAAM,6BAFkB,UAAU,CAEZ,WAAW,SAAS,UAAU;CACpD,MAAM,WAAW,SAAS,WAAW,QAAQ,+BAAiB,SAAS,GAAG;AAG1E,QAAO;EAAE,MAAM;EAAU,kCAFG,UAAU,EAAE,UAAU,SAAS,CAAC;EAE3B,KADrBK,kBAAK,QAAQ,SAAS;EACI;;;;;ACbxC,eAAsB,QAAQ,IAA8B;AAC1D,QAAO,IAAI,SAAS,YAAY;EAC9B,MAAMC,YAAU,iBAAiB;AAC/B,WAAQA,UAAQ;KACf,GAAG;GACN,CAAC,MAAM,cAAY;AACnB,eAAaA,UAA0B;AAEvC,SAAO;GACP"}
package/dist/utils.d.cts CHANGED
@@ -1,6 +1,6 @@
1
1
  import { t as __name } from "./chunk-DlpkT3g-.cjs";
2
- import { A as AsyncEventEmitter, E as PossiblePromise } from "./types-Ctvjzlmw.cjs";
3
- import { n as getBarrelFiles } from "./getBarrelFiles-xpPeawGS.cjs";
2
+ import { A as AsyncEventEmitter, E as PossiblePromise } from "./types-BGowkYLs.cjs";
3
+ import { n as getBarrelFiles } from "./getBarrelFiles-CKYSnWw5.cjs";
4
4
 
5
5
  //#region src/utils/buildJSDoc.d.ts
6
6
 
package/dist/utils.d.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  import { t as __name } from "./chunk-iVr_oF3V.js";
2
- import { A as AsyncEventEmitter, E as PossiblePromise } from "./types-HnfIY5rU.js";
3
- import { n as getBarrelFiles } from "./getBarrelFiles-BP1vIdIB.js";
2
+ import { A as AsyncEventEmitter, E as PossiblePromise } from "./types-C9WcJ0d5.js";
3
+ import { n as getBarrelFiles } from "./getBarrelFiles-JXr05jng.js";
4
4
 
5
5
  //#region src/utils/buildJSDoc.d.ts
6
6
 
package/dist/utils.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import { t as __name } from "./chunk-iVr_oF3V.js";
2
- import { a as getElapsedMs, i as formatMs, l as getUniqueName, n as URLPath, o as AsyncEventEmitter, r as formatHrtime, t as getBarrelFiles, u as setUniqueName } from "./getBarrelFiles-DqGGy0LT.js";
2
+ import { a as getElapsedMs, i as formatMs, l as getUniqueName, n as URLPath, o as AsyncEventEmitter, r as formatHrtime, t as getBarrelFiles, u as setUniqueName } from "./getBarrelFiles-DRCrJddy.js";
3
3
  import { m as camelCase } from "./transformers-CqOjKLQD.js";
4
4
  import path from "node:path";
5
5
  import { orderBy } from "natural-orderby";
package/dist/utils.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"utils.js","names":["#buffer","#items","#orderItems","#addParams","item","timeout"],"sources":["../src/utils/buildJSDoc.ts","../src/utils/Cache.ts","../src/utils/FunctionParams.ts","../src/utils/getNestedAccessor.ts","../src/utils/promise.ts","../src/utils/renderTemplate.ts","../src/utils/resolveModuleSource.ts","../src/utils/timeout.ts"],"sourcesContent":["/**\n * Builds a JSDoc comment block with custom indentation.\n * @param comments - Array of comment strings to include in the JSDoc block\n * @param options - Configuration options for formatting\n * @returns Formatted JSDoc string or fallback string if no comments\n */\nexport function buildJSDoc(\n comments: Array<string>,\n options: {\n /**\n * String to use for indenting each line of the JSDoc comment\n * @default ' * ' (3 spaces + asterisk + space)\n */\n indent?: string\n /**\n * String to append after the closing JSDoc tag\n * @default '\\n ' (newline + 2 spaces)\n */\n suffix?: string\n /**\n * String to return when there are no comments\n * @default ' ' (2 spaces)\n */\n fallback?: string\n } = {},\n): string {\n const { indent = ' * ', suffix = '\\n ', fallback = ' ' } = options\n\n if (comments.length === 0) {\n return fallback\n }\n\n return `/**\\n${comments.map((c) => `${indent}${c}`).join('\\n')}\\n */${suffix}`\n}\n","export class Cache<T> {\n #buffer = new Map<string, T>()\n\n async get(key: string): Promise<T | null> {\n return this.#buffer.get(key) ?? null\n }\n\n async set(key: string, value: T): Promise<void> {\n this.#buffer.set(key, value)\n }\n\n async delete(key: string): Promise<void> {\n this.#buffer.delete(key)\n }\n\n async clear(): Promise<void> {\n this.#buffer.clear()\n }\n\n async keys(): Promise<string[]> {\n return [...this.#buffer.keys()]\n }\n\n async values(): Promise<T[]> {\n return [...this.#buffer.values()]\n }\n\n async flush(): Promise<void> {\n // No-op for base cache\n }\n}\n","import { orderBy } from 'natural-orderby'\n\nimport { camelCase } from '../transformers/casing.ts'\n\ntype FunctionParamsASTWithoutType = {\n name?: string\n type?: string\n /**\n * @default true\n */\n required?: boolean\n /**\n * @default true\n */\n enabled?: boolean\n default?: string\n}\n\ntype FunctionParamsASTWithType = {\n name?: never\n type: string\n /**\n * @default true\n */\n required?: boolean\n /**\n * @default true\n */\n enabled?: boolean\n default?: string\n}\n/**\n * @deprecated\n */\nexport type FunctionParamsAST = FunctionParamsASTWithoutType | FunctionParamsASTWithType\n\n/**\n * @deprecated\n */\nexport class FunctionParams {\n #items: Array<FunctionParamsAST | FunctionParamsAST[]> = []\n constructor() {\n return this\n }\n\n get items(): FunctionParamsAST[] {\n return this.#items.flat()\n }\n\n add(item: FunctionParamsAST | Array<FunctionParamsAST | FunctionParamsAST[] | undefined> | undefined): FunctionParams {\n if (!item) {\n return this\n }\n\n if (Array.isArray(item)) {\n item.filter(Boolean).forEach((it) => {\n this.#items.push(it)\n })\n return this\n }\n this.#items.push(item)\n\n return this\n }\n static #orderItems(items: Array<FunctionParamsAST | FunctionParamsAST[]>) {\n return orderBy(\n items.filter(Boolean),\n [\n (v) => {\n if (Array.isArray(v)) {\n return undefined\n }\n return !v.default\n },\n (v) => {\n if (Array.isArray(v)) {\n return undefined\n }\n return v.required ?? true\n },\n ],\n ['desc', 'desc'],\n )\n }\n\n static #addParams(acc: string[], item: FunctionParamsAST) {\n const { enabled = true, name, type, required = true, ...rest } = item\n\n if (!enabled) {\n return acc\n }\n\n if (!name) {\n // when name is not se we will use TypeScript generics\n acc.push(`${type}${rest.default ? ` = ${rest.default}` : ''}`)\n\n return acc\n }\n // TODO check whey we still need the camelcase here\n const parameterName = name.startsWith('{') ? name : camelCase(name)\n\n if (type) {\n if (required) {\n acc.push(`${parameterName}: ${type}${rest.default ? ` = ${rest.default}` : ''}`)\n } else {\n acc.push(`${parameterName}?: ${type}`)\n }\n } else {\n acc.push(`${parameterName}`)\n }\n\n return acc\n }\n\n static toObject(items: FunctionParamsAST[]): FunctionParamsAST {\n let type: string[] = []\n let name: string[] = []\n\n const enabled = items.every((item) => item.enabled) ? items.at(0)?.enabled : true\n const required = items.every((item) => item.required) ?? true\n\n items.forEach((item) => {\n name = FunctionParams.#addParams(name, { ...item, type: undefined })\n if (items.some((item) => item.type)) {\n type = FunctionParams.#addParams(type, item)\n }\n })\n\n return {\n name: `{ ${name.join(', ')} }`,\n type: type.length ? `{ ${type.join('; ')} }` : undefined,\n enabled,\n required,\n }\n }\n\n toObject(): FunctionParamsAST {\n const items = FunctionParams.#orderItems(this.#items).flat()\n\n return FunctionParams.toObject(items)\n }\n\n static toString(items: (FunctionParamsAST | FunctionParamsAST[])[]): string {\n const sortedData = FunctionParams.#orderItems(items)\n\n return sortedData\n .reduce((acc, item) => {\n if (Array.isArray(item)) {\n if (item.length <= 0) {\n return acc\n }\n const subItems = FunctionParams.#orderItems(item) as FunctionParamsAST[]\n const objectItem = FunctionParams.toObject(subItems)\n\n return FunctionParams.#addParams(acc, objectItem)\n }\n\n return FunctionParams.#addParams(acc, item)\n }, [] as string[])\n .join(', ')\n }\n\n toString(): string {\n const items = FunctionParams.#orderItems(this.#items)\n\n return FunctionParams.toString(items)\n }\n}\n","/**\n * Converts a param path (string with dot notation or array of strings) to a JavaScript accessor expression.\n * @param param - The param path, e.g., 'pagination.next.id' or ['pagination', 'next', 'id']\n * @param accessor - The base accessor, e.g., 'lastPage' or 'firstPage'\n * @returns A JavaScript accessor expression, e.g., \"lastPage?.['pagination']?.['next']?.['id']\", or undefined if param is empty\n *\n * @example\n * ```ts\n * getNestedAccessor('pagination.next.id', 'lastPage')\n * // returns: \"lastPage?.['pagination']?.['next']?.['id']\"\n *\n * getNestedAccessor(['pagination', 'next', 'id'], 'lastPage')\n * // returns: \"lastPage?.['pagination']?.['next']?.['id']\"\n *\n * getNestedAccessor('', 'lastPage')\n * // returns: undefined\n * ```\n */\nexport function getNestedAccessor(param: string | string[], accessor: string): string | undefined {\n const parts = Array.isArray(param) ? param : param.split('.')\n if (parts.length === 0 || (parts.length === 1 && parts[0] === '')) {\n return undefined\n }\n return parts.reduce((acc, part) => `${acc}?.['${part}']`, accessor)\n}\n","import type { PossiblePromise } from './types.ts'\n\nexport function isPromise<T>(result: PossiblePromise<T>): result is Promise<T> {\n return !!result && typeof (result as Promise<unknown>)?.then === 'function'\n}\n\nexport function isPromiseFulfilledResult<T = unknown>(result: PromiseSettledResult<unknown>): result is PromiseFulfilledResult<T> {\n return result.status === 'fulfilled'\n}\n\nexport function isPromiseRejectedResult<T>(result: PromiseSettledResult<unknown>): result is Omit<PromiseRejectedResult, 'reason'> & { reason: T } {\n return result.status === 'rejected'\n}\n","export function renderTemplate<TData extends Record<string, unknown> = Record<string, unknown>>(template: string, data: TData | undefined = undefined): string {\n if (!data || !Object.keys(data).length) {\n return template.replace(/{{(.*?)}}/g, '')\n }\n\n const matches = template.match(/{{(.*?)}}/g)\n\n return (\n matches?.reduce((prev, curr) => {\n const index = curr.split(/{{|}}/).filter(Boolean)[0]?.trim()\n if (index === undefined) {\n return prev\n }\n const value = data[index]\n\n if (value === undefined) {\n return prev\n }\n\n return prev\n .replace(curr, () => {\n if (typeof value === 'boolean') {\n return `${value.toString()}` || 'false'\n }\n\n return (value as string) || ''\n })\n .trim()\n }, template) || ''\n )\n}\n","import { readFileSync } from 'node:fs'\nimport path from 'node:path'\nimport { fileURLToPath } from 'node:url'\nimport createJiti from 'jiti'\n\nexport function resolveModuleSource(pkgName: string) {\n const parentURL = import.meta.url\n const jiti = createJiti(parentURL)\n\n const resolved = jiti.esmResolve(pkgName, parentURL)\n const filePath = resolved.startsWith('file:') ? fileURLToPath(resolved) : resolved\n const source = readFileSync(filePath, { encoding: 'utf-8' })\n const ext = path.extname(filePath)\n return { path: filePath, source, ext } as const\n}\n","export async function timeout(ms: number): Promise<unknown> {\n return new Promise((resolve) => {\n const timeout = setTimeout(() => {\n resolve(timeout)\n }, ms)\n }).then((timeout) => {\n clearTimeout(timeout as NodeJS.Timeout)\n\n return true\n })\n}\n"],"mappings":";;;;;;;;;;;;;;;;AAMA,SAAgB,WACd,UACA,UAgBI,EAAE,EACE;CACR,MAAM,EAAE,SAAS,SAAS,SAAS,QAAQ,WAAW,SAAS;AAE/D,KAAI,SAAS,WAAW,EACtB,QAAO;AAGT,QAAO,QAAQ,SAAS,KAAK,MAAM,GAAG,SAAS,IAAI,CAAC,KAAK,KAAK,CAAC,SAAS;;;;;AChC1E,IAAa,QAAb,MAAsB;CACpB,0BAAU,IAAI,KAAgB;CAE9B,MAAM,IAAI,KAAgC;AACxC,SAAO,MAAKA,OAAQ,IAAI,IAAI,IAAI;;CAGlC,MAAM,IAAI,KAAa,OAAyB;AAC9C,QAAKA,OAAQ,IAAI,KAAK,MAAM;;CAG9B,MAAM,OAAO,KAA4B;AACvC,QAAKA,OAAQ,OAAO,IAAI;;CAG1B,MAAM,QAAuB;AAC3B,QAAKA,OAAQ,OAAO;;CAGtB,MAAM,OAA0B;AAC9B,SAAO,CAAC,GAAG,MAAKA,OAAQ,MAAM,CAAC;;CAGjC,MAAM,SAAuB;AAC3B,SAAO,CAAC,GAAG,MAAKA,OAAQ,QAAQ,CAAC;;CAGnC,MAAM,QAAuB;;;;;;;;ACY/B,IAAa,iBAAb,MAAa,eAAe;CAC1B,SAAyD,EAAE;CAC3D,cAAc;AACZ,SAAO;;CAGT,IAAI,QAA6B;AAC/B,SAAO,MAAKC,MAAO,MAAM;;CAG3B,IAAI,MAAkH;AACpH,MAAI,CAAC,KACH,QAAO;AAGT,MAAI,MAAM,QAAQ,KAAK,EAAE;AACvB,QAAK,OAAO,QAAQ,CAAC,SAAS,OAAO;AACnC,UAAKA,MAAO,KAAK,GAAG;KACpB;AACF,UAAO;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AAQ,cAAc,GAAG;AAK3C,QAFgB,SAAS,MAAM,aAAa,EAGjC,QAAQ,MAAM,SAAS;EAC9B,MAAM,QAAQ,KAAK,MAAM,QAAQ,CAAC,OAAO,QAAQ,CAAC,IAAI,MAAM;AAC5D,MAAI,UAAU,OACZ,QAAO;EAET,MAAM,QAAQ,KAAK;AAEnB,MAAI,UAAU,OACZ,QAAO;AAGT,SAAO,KACJ,QAAQ,YAAY;AACnB,OAAI,OAAO,UAAU,UACnB,QAAO,GAAG,MAAM,UAAU,MAAM;AAGlC,UAAQ,SAAoB;IAC5B,CACD,MAAM;IACR,SAAS,IAAI;;;;;ACvBpB,SAAgB,oBAAoB,SAAiB;CACnD,MAAM,YAAY,OAAO,KAAK;CAG9B,MAAM,WAFO,WAAW,UAAU,CAEZ,WAAW,SAAS,UAAU;CACpD,MAAM,WAAW,SAAS,WAAW,QAAQ,GAAG,cAAc,SAAS,GAAG;AAG1E,QAAO;EAAE,MAAM;EAAU,QAFV,aAAa,UAAU,EAAE,UAAU,SAAS,CAAC;EAE3B,KADrB,KAAK,QAAQ,SAAS;EACI;;;;;ACbxC,eAAsB,QAAQ,IAA8B;AAC1D,QAAO,IAAI,SAAS,cAAY;EAC9B,MAAMI,YAAU,iBAAiB;AAC/B,aAAQA,UAAQ;KACf,GAAG;GACN,CAAC,MAAM,cAAY;AACnB,eAAaA,UAA0B;AAEvC,SAAO;GACP"}
1
+ {"version":3,"file":"utils.js","names":["#buffer","#items","#orderItems","#addParams","item","timeout"],"sources":["../src/utils/buildJSDoc.ts","../src/utils/Cache.ts","../src/utils/FunctionParams.ts","../src/utils/getNestedAccessor.ts","../src/utils/promise.ts","../src/utils/renderTemplate.ts","../src/utils/resolveModuleSource.ts","../src/utils/timeout.ts"],"sourcesContent":["/**\n * Builds a JSDoc comment block with custom indentation.\n * @param comments - Array of comment strings to include in the JSDoc block\n * @param options - Configuration options for formatting\n * @returns Formatted JSDoc string or fallback string if no comments\n */\nexport function buildJSDoc(\n comments: Array<string>,\n options: {\n /**\n * String to use for indenting each line of the JSDoc comment\n * @default ' * ' (3 spaces + asterisk + space)\n */\n indent?: string\n /**\n * String to append after the closing JSDoc tag\n * @default '\\n ' (newline + 2 spaces)\n */\n suffix?: string\n /**\n * String to return when there are no comments\n * @default ' ' (2 spaces)\n */\n fallback?: string\n } = {},\n): string {\n const { indent = ' * ', suffix = '\\n ', fallback = ' ' } = options\n\n if (comments.length === 0) {\n return fallback\n }\n\n return `/**\\n${comments.map((c) => `${indent}${c}`).join('\\n')}\\n */${suffix}`\n}\n","export class Cache<T> {\n #buffer = new Map<string, T>()\n\n async get(key: string): Promise<T | null> {\n return this.#buffer.get(key) ?? null\n }\n\n async set(key: string, value: T): Promise<void> {\n this.#buffer.set(key, value)\n }\n\n async delete(key: string): Promise<void> {\n this.#buffer.delete(key)\n }\n\n async clear(): Promise<void> {\n this.#buffer.clear()\n }\n\n async keys(): Promise<string[]> {\n return [...this.#buffer.keys()]\n }\n\n async values(): Promise<T[]> {\n return [...this.#buffer.values()]\n }\n\n async flush(): Promise<void> {\n // No-op for base cache\n }\n}\n","import { orderBy } from 'natural-orderby'\n\nimport { camelCase } from '../transformers/casing.ts'\n\ntype FunctionParamsASTWithoutType = {\n name?: string\n type?: string\n /**\n * @default true\n */\n required?: boolean\n /**\n * @default true\n */\n enabled?: boolean\n default?: string\n}\n\ntype FunctionParamsASTWithType = {\n name?: never\n type: string\n /**\n * @default true\n */\n required?: boolean\n /**\n * @default true\n */\n enabled?: boolean\n default?: string\n}\n/**\n * @deprecated\n */\nexport type FunctionParamsAST = FunctionParamsASTWithoutType | FunctionParamsASTWithType\n\n/**\n * @deprecated\n */\nexport class FunctionParams {\n #items: Array<FunctionParamsAST | FunctionParamsAST[]> = []\n constructor() {\n return this\n }\n\n get items(): FunctionParamsAST[] {\n return this.#items.flat()\n }\n\n add(item: FunctionParamsAST | Array<FunctionParamsAST | FunctionParamsAST[] | undefined> | undefined): FunctionParams {\n if (!item) {\n return this\n }\n\n if (Array.isArray(item)) {\n item.filter(Boolean).forEach((it) => {\n this.#items.push(it)\n })\n return this\n }\n this.#items.push(item)\n\n return this\n }\n static #orderItems(items: Array<FunctionParamsAST | FunctionParamsAST[]>) {\n return orderBy(\n items.filter(Boolean),\n [\n (v) => {\n if (Array.isArray(v)) {\n return undefined\n }\n return !v.default\n },\n (v) => {\n if (Array.isArray(v)) {\n return undefined\n }\n return v.required ?? true\n },\n ],\n ['desc', 'desc'],\n )\n }\n\n static #addParams(acc: string[], item: FunctionParamsAST) {\n const { enabled = true, name, type, required = true, ...rest } = item\n\n if (!enabled) {\n return acc\n }\n\n if (!name) {\n // when name is not se we uses TypeScript generics\n acc.push(`${type}${rest.default ? ` = ${rest.default}` : ''}`)\n\n return acc\n }\n // TODO check whey we still need the camelcase here\n const parameterName = name.startsWith('{') ? name : camelCase(name)\n\n if (type) {\n if (required) {\n acc.push(`${parameterName}: ${type}${rest.default ? ` = ${rest.default}` : ''}`)\n } else {\n acc.push(`${parameterName}?: ${type}`)\n }\n } else {\n acc.push(`${parameterName}`)\n }\n\n return acc\n }\n\n static toObject(items: FunctionParamsAST[]): FunctionParamsAST {\n let type: string[] = []\n let name: string[] = []\n\n const enabled = items.every((item) => item.enabled) ? items.at(0)?.enabled : true\n const required = items.every((item) => item.required) ?? true\n\n items.forEach((item) => {\n name = FunctionParams.#addParams(name, { ...item, type: undefined })\n if (items.some((item) => item.type)) {\n type = FunctionParams.#addParams(type, item)\n }\n })\n\n return {\n name: `{ ${name.join(', ')} }`,\n type: type.length ? `{ ${type.join('; ')} }` : undefined,\n enabled,\n required,\n }\n }\n\n toObject(): FunctionParamsAST {\n const items = FunctionParams.#orderItems(this.#items).flat()\n\n return FunctionParams.toObject(items)\n }\n\n static toString(items: (FunctionParamsAST | FunctionParamsAST[])[]): string {\n const sortedData = FunctionParams.#orderItems(items)\n\n return sortedData\n .reduce((acc, item) => {\n if (Array.isArray(item)) {\n if (item.length <= 0) {\n return acc\n }\n const subItems = FunctionParams.#orderItems(item) as FunctionParamsAST[]\n const objectItem = FunctionParams.toObject(subItems)\n\n return FunctionParams.#addParams(acc, objectItem)\n }\n\n return FunctionParams.#addParams(acc, item)\n }, [] as string[])\n .join(', ')\n }\n\n toString(): string {\n const items = FunctionParams.#orderItems(this.#items)\n\n return FunctionParams.toString(items)\n }\n}\n","/**\n * Converts a param path (string with dot notation or array of strings) to a JavaScript accessor expression.\n * @param param - The param path, e.g., 'pagination.next.id' or ['pagination', 'next', 'id']\n * @param accessor - The base accessor, e.g., 'lastPage' or 'firstPage'\n * @returns A JavaScript accessor expression, e.g., \"lastPage?.['pagination']?.['next']?.['id']\", or undefined if param is empty\n *\n * @example\n * ```ts\n * getNestedAccessor('pagination.next.id', 'lastPage')\n * // returns: \"lastPage?.['pagination']?.['next']?.['id']\"\n *\n * getNestedAccessor(['pagination', 'next', 'id'], 'lastPage')\n * // returns: \"lastPage?.['pagination']?.['next']?.['id']\"\n *\n * getNestedAccessor('', 'lastPage')\n * // returns: undefined\n * ```\n */\nexport function getNestedAccessor(param: string | string[], accessor: string): string | undefined {\n const parts = Array.isArray(param) ? param : param.split('.')\n if (parts.length === 0 || (parts.length === 1 && parts[0] === '')) {\n return undefined\n }\n return parts.reduce((acc, part) => `${acc}?.['${part}']`, accessor)\n}\n","import type { PossiblePromise } from './types.ts'\n\nexport function isPromise<T>(result: PossiblePromise<T>): result is Promise<T> {\n return !!result && typeof (result as Promise<unknown>)?.then === 'function'\n}\n\nexport function isPromiseFulfilledResult<T = unknown>(result: PromiseSettledResult<unknown>): result is PromiseFulfilledResult<T> {\n return result.status === 'fulfilled'\n}\n\nexport function isPromiseRejectedResult<T>(result: PromiseSettledResult<unknown>): result is Omit<PromiseRejectedResult, 'reason'> & { reason: T } {\n return result.status === 'rejected'\n}\n","export function renderTemplate<TData extends Record<string, unknown> = Record<string, unknown>>(template: string, data: TData | undefined = undefined): string {\n if (!data || !Object.keys(data).length) {\n return template.replace(/{{(.*?)}}/g, '')\n }\n\n const matches = template.match(/{{(.*?)}}/g)\n\n return (\n matches?.reduce((prev, curr) => {\n const index = curr.split(/{{|}}/).filter(Boolean)[0]?.trim()\n if (index === undefined) {\n return prev\n }\n const value = data[index]\n\n if (value === undefined) {\n return prev\n }\n\n return prev\n .replace(curr, () => {\n if (typeof value === 'boolean') {\n return `${value.toString()}` || 'false'\n }\n\n return (value as string) || ''\n })\n .trim()\n }, template) || ''\n )\n}\n","import { readFileSync } from 'node:fs'\nimport path from 'node:path'\nimport { fileURLToPath } from 'node:url'\nimport createJiti from 'jiti'\n\nexport function resolveModuleSource(pkgName: string) {\n const parentURL = import.meta.url\n const jiti = createJiti(parentURL)\n\n const resolved = jiti.esmResolve(pkgName, parentURL)\n const filePath = resolved.startsWith('file:') ? fileURLToPath(resolved) : resolved\n const source = readFileSync(filePath, { encoding: 'utf-8' })\n const ext = path.extname(filePath)\n return { path: filePath, source, ext } as const\n}\n","export async function timeout(ms: number): Promise<unknown> {\n return new Promise((resolve) => {\n const timeout = setTimeout(() => {\n resolve(timeout)\n }, ms)\n }).then((timeout) => {\n clearTimeout(timeout as NodeJS.Timeout)\n\n return true\n })\n}\n"],"mappings":";;;;;;;;;;;;;;;;AAMA,SAAgB,WACd,UACA,UAgBI,EAAE,EACE;CACR,MAAM,EAAE,SAAS,SAAS,SAAS,QAAQ,WAAW,SAAS;AAE/D,KAAI,SAAS,WAAW,EACtB,QAAO;AAGT,QAAO,QAAQ,SAAS,KAAK,MAAM,GAAG,SAAS,IAAI,CAAC,KAAK,KAAK,CAAC,SAAS;;;;;AChC1E,IAAa,QAAb,MAAsB;CACpB,0BAAU,IAAI,KAAgB;CAE9B,MAAM,IAAI,KAAgC;AACxC,SAAO,MAAKA,OAAQ,IAAI,IAAI,IAAI;;CAGlC,MAAM,IAAI,KAAa,OAAyB;AAC9C,QAAKA,OAAQ,IAAI,KAAK,MAAM;;CAG9B,MAAM,OAAO,KAA4B;AACvC,QAAKA,OAAQ,OAAO,IAAI;;CAG1B,MAAM,Q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IAA8B;AAC1D,QAAO,IAAI,SAAS,cAAY;EAC9B,MAAMI,YAAU,iBAAiB;AAC/B,aAAQA,UAAQ;KACf,GAAG;GACN,CAAC,MAAM,cAAY;AACnB,eAAaA,UAA0B;AAEvC,SAAO;GACP"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kubb/core",
3
- "version": "4.18.4",
3
+ "version": "4.19.0",
4
4
  "description": "Core functionality for Kubb's plugin-based code generation system, providing the foundation for transforming OpenAPI specifications.",
5
5
  "keywords": [
6
6
  "typescript",