@skmtc/core 0.0.782 → 0.0.785

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.
Files changed (61) hide show
  1. package/esm/context/CoreContext.d.ts +175 -0
  2. package/esm/context/CoreContext.d.ts.map +1 -1
  3. package/esm/context/CoreContext.js +178 -0
  4. package/esm/dsl/ContentBase.d.ts +115 -0
  5. package/esm/dsl/ContentBase.d.ts.map +1 -1
  6. package/esm/dsl/ContentBase.js +110 -0
  7. package/esm/dsl/File.d.ts +208 -0
  8. package/esm/dsl/File.d.ts.map +1 -1
  9. package/esm/dsl/File.js +197 -0
  10. package/esm/dsl/model/ModelBase.d.ts +257 -0
  11. package/esm/dsl/model/ModelBase.d.ts.map +1 -1
  12. package/esm/dsl/model/ModelBase.js +248 -0
  13. package/esm/dsl/operation/OperationBase.d.ts +175 -0
  14. package/esm/dsl/operation/OperationBase.d.ts.map +1 -1
  15. package/esm/dsl/operation/OperationBase.js +166 -0
  16. package/esm/helpers/strings.d.ts +63 -0
  17. package/esm/helpers/strings.d.ts.map +1 -1
  18. package/esm/helpers/strings.js +59 -0
  19. package/esm/mod.d.ts +66 -0
  20. package/esm/mod.d.ts.map +1 -1
  21. package/esm/mod.js +66 -0
  22. package/esm/run/toArtifacts.d.ts +114 -0
  23. package/esm/run/toArtifacts.d.ts.map +1 -1
  24. package/esm/run/toArtifacts.js +86 -0
  25. package/esm/types/Settings.d.ts +129 -0
  26. package/esm/types/Settings.d.ts.map +1 -1
  27. package/esm/types/Settings.js +3 -0
  28. package/esm/typescript/List.d.ts +111 -0
  29. package/esm/typescript/List.d.ts.map +1 -1
  30. package/esm/typescript/List.js +106 -0
  31. package/package.json +5 -1
  32. package/script/context/CoreContext.d.ts +175 -0
  33. package/script/context/CoreContext.d.ts.map +1 -1
  34. package/script/context/CoreContext.js +178 -0
  35. package/script/dsl/ContentBase.d.ts +115 -0
  36. package/script/dsl/ContentBase.d.ts.map +1 -1
  37. package/script/dsl/ContentBase.js +110 -0
  38. package/script/dsl/File.d.ts +208 -0
  39. package/script/dsl/File.d.ts.map +1 -1
  40. package/script/dsl/File.js +197 -0
  41. package/script/dsl/model/ModelBase.d.ts +257 -0
  42. package/script/dsl/model/ModelBase.d.ts.map +1 -1
  43. package/script/dsl/model/ModelBase.js +248 -0
  44. package/script/dsl/operation/OperationBase.d.ts +175 -0
  45. package/script/dsl/operation/OperationBase.d.ts.map +1 -1
  46. package/script/dsl/operation/OperationBase.js +166 -0
  47. package/script/helpers/strings.d.ts +63 -0
  48. package/script/helpers/strings.d.ts.map +1 -1
  49. package/script/helpers/strings.js +59 -0
  50. package/script/mod.d.ts +66 -0
  51. package/script/mod.d.ts.map +1 -1
  52. package/script/mod.js +66 -0
  53. package/script/run/toArtifacts.d.ts +114 -0
  54. package/script/run/toArtifacts.d.ts.map +1 -1
  55. package/script/run/toArtifacts.js +86 -0
  56. package/script/types/Settings.d.ts +129 -0
  57. package/script/types/Settings.d.ts.map +1 -1
  58. package/script/types/Settings.js +3 -0
  59. package/script/typescript/List.d.ts +111 -0
  60. package/script/typescript/List.d.ts.map +1 -1
  61. package/script/typescript/List.js +106 -0
package/script/mod.js CHANGED
@@ -14,6 +14,72 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
14
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
+ /**
18
+ * @module SKMTC Core
19
+ *
20
+ * SKMTC (Schema Kit Mapping & Type Conversion) is a powerful TypeScript/Deno library
21
+ * for processing OpenAPI v3 documents and generating code artifacts. It provides a
22
+ * comprehensive three-phase pipeline for parsing, generating, and rendering OpenAPI
23
+ * schemas into various output formats.
24
+ *
25
+ * ## Quick Start
26
+ *
27
+ * ```typescript
28
+ * import { toArtifacts } from '@skmtc/core';
29
+ *
30
+ * const result = await toArtifacts({
31
+ * traceId: 'my-trace',
32
+ * spanId: 'my-span',
33
+ * documentObject: openApiDoc,
34
+ * settings: clientSettings,
35
+ * toGeneratorConfigMap: () => generatorMap,
36
+ * startAt: Date.now(),
37
+ * silent: false
38
+ * });
39
+ *
40
+ * console.log(result.artifacts); // Generated code files
41
+ * console.log(result.manifest); // Generation metadata
42
+ * ```
43
+ *
44
+ * ## Architecture
45
+ *
46
+ * The library follows a three-phase pipeline:
47
+ * - **Parse Phase**: Converts OpenAPI v3 JSON into internal OAS objects
48
+ * - **Generate Phase**: Transforms OAS objects into generator artifacts
49
+ * - **Render Phase**: Renders artifacts to formatted files
50
+ *
51
+ * ## Key Components
52
+ *
53
+ * - {@link CoreContext} - Main orchestration class for the pipeline
54
+ * - {@link toArtifacts} - Primary transformation function
55
+ * - {@link ContentBase} - Base class for creating generators
56
+ * - {@link ModelBase} and {@link OperationBase} - DSL building blocks
57
+ * - {@link List} - Powerful string manipulation and code generation utility
58
+ *
59
+ * ## Type System
60
+ *
61
+ * The library provides comprehensive TypeScript types for OpenAPI schemas,
62
+ * generator configurations, and output artifacts. All major types are
63
+ * validated using Valibot schemas for runtime safety.
64
+ *
65
+ * @example Basic Usage
66
+ * ```typescript
67
+ * import { CoreContext } from '@skmtc/core';
68
+ *
69
+ * const context = new CoreContext({
70
+ * spanId: 'my-span',
71
+ * silent: false
72
+ * });
73
+ *
74
+ * const result = await context.toArtifacts({
75
+ * documentObject: myOpenApiDoc,
76
+ * settings: mySettings,
77
+ * toGeneratorConfigMap: () => myGenerators,
78
+ * prettier: prettierConfig,
79
+ * silent: false
80
+ * });
81
+ * ```
82
+ */
17
83
  require("./_dnt.polyfills.js");
18
84
  __exportStar(require("./app/validate.js"), exports);
19
85
  __exportStar(require("./context/CoreContext.js"), exports);
@@ -3,17 +3,131 @@ import type { PrettierConfigType } from '../types/PrettierConfig.js';
3
3
  import type { ManifestContent } from '../types/Manifest.js';
4
4
  import type { GeneratorsMapContainer } from '../types/GeneratorType.js';
5
5
  import type { OpenAPIV3 } from 'openapi-types';
6
+ /**
7
+ * Arguments for the {@link toArtifacts} transformation function.
8
+ *
9
+ * @example
10
+ * ```typescript
11
+ * const args: TransformArgs = {
12
+ * traceId: 'api-generation-v1',
13
+ * spanId: 'user-api-span',
14
+ * documentObject: openApiDocument,
15
+ * settings: {
16
+ * basePath: './generated',
17
+ * skip: { models: ['InternalModel'] }
18
+ * },
19
+ * toGeneratorConfigMap: () => myGeneratorMap,
20
+ * startAt: Date.now(),
21
+ * silent: false
22
+ * };
23
+ * ```
24
+ */
6
25
  type TransformArgs = {
26
+ /** Unique identifier for the transformation trace */
7
27
  traceId: string;
28
+ /** Unique identifier for this transformation span */
8
29
  spanId: string;
30
+ /** The OpenAPI v3 document to process */
9
31
  documentObject: OpenAPIV3.Document;
32
+ /** Client settings for customizing generation behavior */
10
33
  settings: ClientSettings | undefined;
34
+ /** Optional Prettier configuration for code formatting */
11
35
  prettier?: PrettierConfigType;
36
+ /** Optional path for writing log files */
12
37
  logsPath?: string;
38
+ /** Function that returns the generator configuration map */
13
39
  toGeneratorConfigMap: <EnrichmentType = undefined>() => GeneratorsMapContainer<EnrichmentType>;
40
+ /** Timestamp when transformation started */
14
41
  startAt: number;
42
+ /** Whether to suppress console output during generation */
15
43
  silent: boolean;
16
44
  };
45
+ /**
46
+ * Transforms an OpenAPI v3 document into generated code artifacts and metadata.
47
+ *
48
+ * This is the primary function for the SKMTC transformation pipeline. It orchestrates
49
+ * the three-phase process of parsing OpenAPI documents, generating code artifacts,
50
+ * and rendering them to formatted files.
51
+ *
52
+ * The function creates a {@link CoreContext} instance and executes the full pipeline:
53
+ * 1. **Parse**: Converts the OpenAPI document into internal OAS objects
54
+ * 2. **Generate**: Transforms OAS objects using the provided generator configuration
55
+ * 3. **Render**: Formats and prepares the final code artifacts
56
+ *
57
+ * @param args - Configuration for the transformation process
58
+ * @returns A promise resolving to the generated artifacts and manifest
59
+ *
60
+ * @example Basic usage
61
+ * ```typescript
62
+ * import { toArtifacts } from '@skmtc/core';
63
+ *
64
+ * const result = await toArtifacts({
65
+ * traceId: 'my-api-generation',
66
+ * spanId: 'user-service',
67
+ * documentObject: myOpenApiDoc,
68
+ * settings: {
69
+ * basePath: './src/generated',
70
+ * skip: {
71
+ * models: ['InternalModel', 'DebugInfo'],
72
+ * operations: {
73
+ * '/internal/**': ['get', 'post']
74
+ * }
75
+ * }
76
+ * },
77
+ * toGeneratorConfigMap: () => ({
78
+ * models: modelGenerator,
79
+ * operations: operationGenerator
80
+ * }),
81
+ * startAt: Date.now(),
82
+ * silent: false
83
+ * });
84
+ *
85
+ * // Access generated files
86
+ * Object.entries(result.artifacts).forEach(([path, content]) => {
87
+ * console.log(`Generated: ${path}`);
88
+ * await Deno.writeTextFile(path, content);
89
+ * });
90
+ *
91
+ * // Access generation metadata
92
+ * console.log(`Generated ${Object.keys(result.manifest.files).length} files`);
93
+ * console.log(`Generation took ${result.manifest.endAt - result.manifest.startAt}ms`);
94
+ * ```
95
+ *
96
+ * @example With Prettier formatting
97
+ * ```typescript
98
+ * const result = await toArtifacts({
99
+ * traceId: 'formatted-generation',
100
+ * spanId: 'api-client',
101
+ * documentObject: openApiDoc,
102
+ * settings: clientSettings,
103
+ * prettier: {
104
+ * semi: true,
105
+ * singleQuote: true,
106
+ * trailingComma: 'es5'
107
+ * },
108
+ * toGeneratorConfigMap: () => generatorMap,
109
+ * startAt: Date.now(),
110
+ * silent: true
111
+ * });
112
+ * ```
113
+ *
114
+ * @example Error handling
115
+ * ```typescript
116
+ * try {
117
+ * const result = await toArtifacts(transformArgs);
118
+ *
119
+ * // Check for generation errors in the results
120
+ * const hasErrors = Object.values(result.manifest.results)
121
+ * .some(result => result === 'error');
122
+ *
123
+ * if (hasErrors) {
124
+ * console.warn('Generation completed with errors');
125
+ * }
126
+ * } catch (error) {
127
+ * console.error('Transformation failed:', error);
128
+ * }
129
+ * ```
130
+ */
17
131
  export declare const toArtifacts: ({ traceId, spanId, documentObject, settings, prettier, toGeneratorConfigMap, logsPath, startAt, silent }: TransformArgs) => Promise<{
18
132
  artifacts: Record<string, string>;
19
133
  manifest: ManifestContent;
@@ -1 +1 @@
1
- {"version":3,"file":"toArtifacts.d.ts","sourceRoot":"","sources":["../../src/run/toArtifacts.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAA;AAC1D,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,4BAA4B,CAAA;AAEpE,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAA;AAC3D,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,2BAA2B,CAAA;AACvE,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAA;AAC9C,KAAK,aAAa,GAAG;IACnB,OAAO,EAAE,MAAM,CAAA;IACf,MAAM,EAAE,MAAM,CAAA;IACd,cAAc,EAAE,SAAS,CAAC,QAAQ,CAAA;IAClC,QAAQ,EAAE,cAAc,GAAG,SAAS,CAAA;IACpC,QAAQ,CAAC,EAAE,kBAAkB,CAAA;IAC7B,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,oBAAoB,EAAE,CAAC,cAAc,GAAG,SAAS,OAAO,sBAAsB,CAAC,cAAc,CAAC,CAAA;IAC9F,OAAO,EAAE,MAAM,CAAA;IACf,MAAM,EAAE,OAAO,CAAA;CAChB,CAAA;AAED,eAAO,MAAM,WAAW,GAAU,0GAU/B,aAAa,KAAG,OAAO,CAAC;IAAE,SAAS,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAAC,QAAQ,EAAE,eAAe,CAAA;CAAE,CAyB1F,CAAA"}
1
+ {"version":3,"file":"toArtifacts.d.ts","sourceRoot":"","sources":["../../src/run/toArtifacts.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAA;AAC1D,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,4BAA4B,CAAA;AAEpE,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAA;AAC3D,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,2BAA2B,CAAA;AACvE,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAA;AAE9C;;;;;;;;;;;;;;;;;;GAkBG;AACH,KAAK,aAAa,GAAG;IACnB,qDAAqD;IACrD,OAAO,EAAE,MAAM,CAAA;IACf,qDAAqD;IACrD,MAAM,EAAE,MAAM,CAAA;IACd,yCAAyC;IACzC,cAAc,EAAE,SAAS,CAAC,QAAQ,CAAA;IAClC,0DAA0D;IAC1D,QAAQ,EAAE,cAAc,GAAG,SAAS,CAAA;IACpC,0DAA0D;IAC1D,QAAQ,CAAC,EAAE,kBAAkB,CAAA;IAC7B,0CAA0C;IAC1C,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,4DAA4D;IAC5D,oBAAoB,EAAE,CAAC,cAAc,GAAG,SAAS,OAAO,sBAAsB,CAAC,cAAc,CAAC,CAAA;IAC9F,4CAA4C;IAC5C,OAAO,EAAE,MAAM,CAAA;IACf,2DAA2D;IAC3D,MAAM,EAAE,OAAO,CAAA;CAChB,CAAA;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAqFG;AACH,eAAO,MAAM,WAAW,GAAU,0GAU/B,aAAa,KAAG,OAAO,CAAC;IAAE,SAAS,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAAC,QAAQ,EAAE,eAAe,CAAA;CAAE,CAyB1F,CAAA"}
@@ -36,6 +36,92 @@ Object.defineProperty(exports, "__esModule", { value: true });
36
36
  exports.toArtifacts = void 0;
37
37
  const dntShim = __importStar(require("../_dnt.shims.js"));
38
38
  const CoreContext_js_1 = require("../context/CoreContext.js");
39
+ /**
40
+ * Transforms an OpenAPI v3 document into generated code artifacts and metadata.
41
+ *
42
+ * This is the primary function for the SKMTC transformation pipeline. It orchestrates
43
+ * the three-phase process of parsing OpenAPI documents, generating code artifacts,
44
+ * and rendering them to formatted files.
45
+ *
46
+ * The function creates a {@link CoreContext} instance and executes the full pipeline:
47
+ * 1. **Parse**: Converts the OpenAPI document into internal OAS objects
48
+ * 2. **Generate**: Transforms OAS objects using the provided generator configuration
49
+ * 3. **Render**: Formats and prepares the final code artifacts
50
+ *
51
+ * @param args - Configuration for the transformation process
52
+ * @returns A promise resolving to the generated artifacts and manifest
53
+ *
54
+ * @example Basic usage
55
+ * ```typescript
56
+ * import { toArtifacts } from '@skmtc/core';
57
+ *
58
+ * const result = await toArtifacts({
59
+ * traceId: 'my-api-generation',
60
+ * spanId: 'user-service',
61
+ * documentObject: myOpenApiDoc,
62
+ * settings: {
63
+ * basePath: './src/generated',
64
+ * skip: {
65
+ * models: ['InternalModel', 'DebugInfo'],
66
+ * operations: {
67
+ * '/internal/**': ['get', 'post']
68
+ * }
69
+ * }
70
+ * },
71
+ * toGeneratorConfigMap: () => ({
72
+ * models: modelGenerator,
73
+ * operations: operationGenerator
74
+ * }),
75
+ * startAt: Date.now(),
76
+ * silent: false
77
+ * });
78
+ *
79
+ * // Access generated files
80
+ * Object.entries(result.artifacts).forEach(([path, content]) => {
81
+ * console.log(`Generated: ${path}`);
82
+ * await Deno.writeTextFile(path, content);
83
+ * });
84
+ *
85
+ * // Access generation metadata
86
+ * console.log(`Generated ${Object.keys(result.manifest.files).length} files`);
87
+ * console.log(`Generation took ${result.manifest.endAt - result.manifest.startAt}ms`);
88
+ * ```
89
+ *
90
+ * @example With Prettier formatting
91
+ * ```typescript
92
+ * const result = await toArtifacts({
93
+ * traceId: 'formatted-generation',
94
+ * spanId: 'api-client',
95
+ * documentObject: openApiDoc,
96
+ * settings: clientSettings,
97
+ * prettier: {
98
+ * semi: true,
99
+ * singleQuote: true,
100
+ * trailingComma: 'es5'
101
+ * },
102
+ * toGeneratorConfigMap: () => generatorMap,
103
+ * startAt: Date.now(),
104
+ * silent: true
105
+ * });
106
+ * ```
107
+ *
108
+ * @example Error handling
109
+ * ```typescript
110
+ * try {
111
+ * const result = await toArtifacts(transformArgs);
112
+ *
113
+ * // Check for generation errors in the results
114
+ * const hasErrors = Object.values(result.manifest.results)
115
+ * .some(result => result === 'error');
116
+ *
117
+ * if (hasErrors) {
118
+ * console.warn('Generation completed with errors');
119
+ * }
120
+ * } catch (error) {
121
+ * console.error('Transformation failed:', error);
122
+ * }
123
+ * ```
124
+ */
39
125
  const toArtifacts = async ({ traceId, spanId, documentObject, settings, prettier, toGeneratorConfigMap, logsPath, startAt, silent }) => {
40
126
  const context = new CoreContext_js_1.CoreContext({ spanId, logsPath, silent });
41
127
  const { artifacts, files, previews, results, mappings } = await context.toArtifacts({
@@ -2,23 +2,152 @@ import "../_dnt.polyfills.js";
2
2
  import { type GeneratorEnrichments } from './Enrichments.js';
3
3
  import * as v from 'valibot';
4
4
  import { type Method } from './Method.js';
5
+ /**
6
+ * Valibot schema for {@link ModulePackage}.
7
+ */
5
8
  export declare const modulePackage: v.GenericSchema<ModulePackage>;
9
+ /**
10
+ * Configuration for a module package in the generation output.
11
+ *
12
+ * Module packages allow organizing generated code into separate npm packages
13
+ * or modules with custom root paths and naming conventions.
14
+ *
15
+ * @example
16
+ * ```typescript
17
+ * const packages: ModulePackage[] = [
18
+ * {
19
+ * rootPath: './packages/api-client',
20
+ * moduleName: '@myorg/api-client'
21
+ * },
22
+ * {
23
+ * rootPath: './packages/types',
24
+ * moduleName: '@myorg/api-types'
25
+ * }
26
+ * ];
27
+ * ```
28
+ */
6
29
  export type ModulePackage = {
30
+ /** The root file system path for this package */
7
31
  rootPath: string;
32
+ /** Optional module name for package.json or imports */
8
33
  moduleName?: string;
9
34
  };
10
35
  export declare const skipPaths: v.GenericSchema<SkipPaths>;
11
36
  export declare const skipOperations: v.GenericSchema<SkipOperations>;
12
37
  export declare const skipModels: v.GenericSchema<SkipModels>;
13
38
  export declare const clientSettings: v.GenericSchema<ClientSettings>;
39
+ /**
40
+ * Configuration for skipping specific HTTP methods on API paths.
41
+ *
42
+ * Maps path patterns to arrays of HTTP methods that should be excluded
43
+ * from generation.
44
+ *
45
+ * @example
46
+ * ```typescript
47
+ * const skipPaths: SkipPaths = {
48
+ * '/admin/**': ['get', 'post'],
49
+ * '/debug': ['*'] // Skip all methods
50
+ * };
51
+ * ```
52
+ */
14
53
  export type SkipPaths = Record<string, Method[]>;
54
+ /**
55
+ * Configuration for skipping model generation by generator type.
56
+ *
57
+ * Maps generator keys to arrays of model names that should be excluded.
58
+ *
59
+ * @example
60
+ * ```typescript
61
+ * const skipModels: SkipModels = {
62
+ * 'typescript-models': ['InternalModel', 'DebugInfo'],
63
+ * 'validation': ['TempModel*'] // Supports glob patterns
64
+ * };
65
+ * ```
66
+ */
15
67
  export type SkipModels = Record<string, string[]>;
68
+ /**
69
+ * Configuration for skipping operation generation by generator type.
70
+ *
71
+ * Maps generator keys to {@link SkipPaths} configurations for excluding
72
+ * specific operations from generation.
73
+ *
74
+ * @example
75
+ * ```typescript
76
+ * const skipOperations: SkipOperations = {
77
+ * 'api-client': {
78
+ * '/internal/**': ['*'],
79
+ * '/admin': ['delete']
80
+ * }
81
+ * };
82
+ * ```
83
+ */
16
84
  export type SkipOperations = Record<string, SkipPaths>;
85
+ /**
86
+ * Union type representing different skip configurations.
87
+ *
88
+ * Can be either operation-specific skipping, model-specific skipping,
89
+ * or a simple string pattern for broad exclusions.
90
+ */
17
91
  export type Skip = SkipOperations | SkipModels | string;
92
+ /**
93
+ * Main configuration object for SKMTC client settings.
94
+ *
95
+ * Controls various aspects of code generation including output paths,
96
+ * package organization, enrichments, and selective skipping of content.
97
+ *
98
+ * @example Basic configuration
99
+ * ```typescript
100
+ * const settings: ClientSettings = {
101
+ * basePath: './src/generated',
102
+ * skip: [
103
+ * 'InternalModel', // Skip specific model
104
+ * {
105
+ * 'api-client': {
106
+ * '/admin/**': ['*'] // Skip all admin operations
107
+ * }
108
+ * }
109
+ * ]
110
+ * };
111
+ * ```
112
+ *
113
+ * @example Advanced configuration with packages
114
+ * ```typescript
115
+ * const settings: ClientSettings = {
116
+ * basePath: './generated',
117
+ * packages: [
118
+ * {
119
+ * rootPath: './packages/client',
120
+ * moduleName: '@company/api-client'
121
+ * },
122
+ * {
123
+ * rootPath: './packages/types',
124
+ * moduleName: '@company/api-types'
125
+ * }
126
+ * ],
127
+ * enrichments: {
128
+ * models: customModelEnrichments,
129
+ * operations: customOperationEnrichments
130
+ * },
131
+ * skip: [
132
+ * {
133
+ * 'models': ['Internal*', 'Debug*'],
134
+ * 'operations': {
135
+ * '/health': ['get'],
136
+ * '/metrics/**': ['*']
137
+ * }
138
+ * }
139
+ * ]
140
+ * };
141
+ * ```
142
+ */
18
143
  export type ClientSettings = {
144
+ /** Base output path for generated files */
19
145
  basePath?: string;
146
+ /** Array of module package configurations */
20
147
  packages?: ModulePackage[];
148
+ /** Custom enrichments for extending generation */
21
149
  enrichments?: GeneratorEnrichments;
150
+ /** Array of skip configurations to exclude content */
22
151
  skip?: Skip[];
23
152
  };
24
153
  export type SkmtcClientConfig = {
@@ -1 +1 @@
1
- {"version":3,"file":"Settings.d.ts","sourceRoot":"","sources":["../../src/types/Settings.ts"],"names":[],"mappings":"AAAA,OAAO,sBAAsB,CAAC;AAC9B,OAAO,EAAwB,KAAK,oBAAoB,EAAE,MAAM,kBAAkB,CAAA;AAClF,OAAO,KAAK,CAAC,MAAM,SAAS,CAAA;AAC5B,OAAO,EAAU,KAAK,MAAM,EAAE,MAAM,aAAa,CAAA;AAEjD,eAAO,MAAM,aAAa,EAAE,CAAC,CAAC,aAAa,CAAC,aAAa,CAGvD,CAAA;AAEF,MAAM,MAAM,aAAa,GAAG;IAC1B,QAAQ,EAAE,MAAM,CAAA;IAChB,UAAU,CAAC,EAAE,MAAM,CAAA;CACpB,CAAA;AAED,eAAO,MAAM,SAAS,EAAE,CAAC,CAAC,aAAa,CAAC,SAAS,CAAyC,CAAA;AAE1F,eAAO,MAAM,cAAc,EA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;IAC9B,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,QAAQ,EAAE,cAAc,CAAA;CACzB,CAAA;AAED,eAAO,MAAM,iBAAiB,EAAE,CAAC,CAAC,aAAa,CAAC,iBAAiB,CAG/D,CAAA"}
@@ -38,6 +38,9 @@ require("../_dnt.polyfills.js");
38
38
  const Enrichments_js_1 = require("./Enrichments.js");
39
39
  const v = __importStar(require("valibot"));
40
40
  const Method_js_1 = require("./Method.js");
41
+ /**
42
+ * Valibot schema for {@link ModulePackage}.
43
+ */
41
44
  exports.modulePackage = v.object({
42
45
  rootPath: v.string(),
43
46
  moduleName: v.optional(v.string())
@@ -1,8 +1,13 @@
1
1
  import type { Stringable } from '../dsl/Stringable.js';
2
+ /** Type alias for object-style lists with curly braces: `{item1, item2}` */
2
3
  export type ListObject<V extends Stringable> = List<V[], ', ', '{}'>;
4
+ /** Type alias for line-separated lists without bookends */
3
5
  export type ListLines<V extends Stringable> = List<V[], '\n', 'none'>;
6
+ /** Type alias for array-style lists with square brackets: `[item1, item2]` */
4
7
  export type ListArray<V extends Stringable> = List<V[], ', ', '[]'>;
8
+ /** Type alias for parameter-style lists with parentheses: `(param1, param2)` */
5
9
  export type ListParams<V extends Stringable> = List<V[], ', ', '()'>;
10
+ /** Options for controlling empty list behavior */
6
11
  export type SkipEmptyOption = {
7
12
  skipEmpty?: boolean;
8
13
  };
@@ -19,11 +24,117 @@ type ConstructorOptions<Separator extends string = ', ', Bookends extends Booken
19
24
  type ExtractArrayItem<ArrayOf> = ArrayOf extends Array<infer Item> ? Item : never;
20
25
  type ToFilteredKeyValueReturn<Value extends undefined | Stringable | Stringable[] | List> = Value extends undefined ? undefined : List<[string, Stringable | Stringable[] | List], ': ', 'none'>;
21
26
  type ToConditionalReturn<Value extends Stringable, Condition extends boolean> = Condition extends true ? List<[Value], ', ', 'none'> : List<never[], ', ', 'none'>;
27
+ /**
28
+ * A powerful utility class for building formatted lists of stringable items.
29
+ *
30
+ * The `List` class is a core component of the SKMTC DSL system, providing type-safe
31
+ * construction of formatted lists with customizable separators and bookends. It's
32
+ * extensively used throughout the codebase for generating code constructs like
33
+ * function parameters, object properties, array literals, and more.
34
+ *
35
+ * ## Type Safety
36
+ *
37
+ * The class uses TypeScript's generic system to provide compile-time guarantees
38
+ * about the list structure, separator, and bookend styles. This enables rich
39
+ * type inference and helps prevent formatting errors.
40
+ *
41
+ * ## Common Patterns
42
+ *
43
+ * - **Objects**: `List.toObject()` creates `{key: value, ...}` structures
44
+ * - **Arrays**: `List.toArray()` creates `[item, item, ...]` structures
45
+ * - **Parameters**: `List.toParams()` creates `(param, param, ...)` structures
46
+ * - **Lines**: `List.toLines()` creates newline-separated content
47
+ *
48
+ * @template Values - Array of stringable values
49
+ * @template Separator - String used to separate items
50
+ * @template Bookends - Style of bookends ('[]', '{}', '()', '<>', 'none')
51
+ *
52
+ * @example Basic usage
53
+ * ```typescript
54
+ * import { List } from '@skmtc/core';
55
+ *
56
+ * // Create a comma-separated list
57
+ * const items = new List(['apple', 'banana', 'cherry']);
58
+ * console.log(items.toString()); // "apple, banana, cherry"
59
+ *
60
+ * // Create an array-style list
61
+ * const array = new List(['a', 'b', 'c'], { bookends: '[]' });
62
+ * console.log(array.toString()); // "[a, b, c]"
63
+ *
64
+ * // Create an object-style list
65
+ * const obj = new List(['x: 1', 'y: 2'], { bookends: '{}' });
66
+ * console.log(obj.toString()); // "{x: 1, y: 2}"
67
+ * ```
68
+ *
69
+ * @example Using type aliases
70
+ * ```typescript
71
+ * // Type-safe array construction
72
+ * const params: ListParams<string> = List.toParams(['id', 'name', 'email']);
73
+ * console.log(params.toString()); // "(id, name, email)"
74
+ *
75
+ * // Object properties with filtering
76
+ * const props = List.toObject(['title', undefined, 'author'], { skipEmpty: true });
77
+ * console.log(props.toString()); // "{title, author}"
78
+ *
79
+ * // Line-separated content
80
+ * const lines = List.toLines(['import React from "react"', 'import { useState } from "react"']);
81
+ * console.log(lines.toString());
82
+ * // import React from "react"
83
+ * // import { useState } from "react"
84
+ * ```
85
+ *
86
+ * @example Advanced usage with builders
87
+ * ```typescript
88
+ * // Function signature generation
89
+ * const signature = List.toParams([
90
+ * 'id: string',
91
+ * 'options?: RequestOptions',
92
+ * 'callback?: (result: T) => void'
93
+ * ]);
94
+ *
95
+ * // Interface properties
96
+ * const interfaceProps = List.toObject([
97
+ * 'readonly id: string',
98
+ * 'name: string',
99
+ * 'createdAt: Date',
100
+ * 'updatedAt?: Date'
101
+ * ]);
102
+ *
103
+ * console.log(`interface User ${interfaceProps}`);
104
+ * // interface User {readonly id: string, name: string, createdAt: Date, updatedAt?: Date}
105
+ * ```
106
+ */
22
107
  export declare class List<Values extends Stringable[] = Stringable[], Separator extends string = string, Bookends extends BookendsType = BookendsType> {
108
+ /** The array of values in this list */
23
109
  values: ExtractArrayItem<Values>[];
110
+ /** The separator string used between items */
24
111
  separator: Separator;
112
+ /** The bookend style for wrapping the list */
25
113
  bookends: Bookends;
114
+ /** Whether to skip rendering when the list is empty */
26
115
  skipEmpty: boolean;
116
+ /**
117
+ * Creates a new List instance.
118
+ *
119
+ * @param values - Array of values (undefined values are automatically filtered out)
120
+ * @param options - Configuration options
121
+ * @param options.separator - String to use between items (default: ', ')
122
+ * @param options.bookends - Style of bookends to wrap the list (default: 'none')
123
+ * @param options.skipEmpty - Whether to return empty string for empty lists (default: false)
124
+ *
125
+ * @example
126
+ * ```typescript
127
+ * // Basic list with default comma separator
128
+ * const basic = new List(['a', 'b', 'c']);
129
+ *
130
+ * // Custom separator and bookends
131
+ * const custom = new List(['x', 'y', 'z'], {
132
+ * separator: ' | ',
133
+ * bookends: '[]',
134
+ * skipEmpty: true
135
+ * });
136
+ * ```
137
+ */
27
138
  constructor(values: (ExtractArrayItem<Values> | undefined)[], { separator, bookends, skipEmpty }?: ConstructorOptions<Separator, Bookends>);
28
139
  toString(): string;
29
140
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"List.d.ts","sourceRoot":"","sources":["../../src/typescript/List.ts"],"names":[],"mapp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