@skmtc/core 0.0.808 → 0.0.809

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 (43) hide show
  1. package/esm/oas/array/array-types.d.ts +238 -25
  2. package/esm/oas/array/array-types.d.ts.map +1 -1
  3. package/esm/oas/array/array-types.js +97 -5
  4. package/esm/oas/boolean/boolean-types.d.ts +81 -9
  5. package/esm/oas/boolean/boolean-types.d.ts.map +1 -1
  6. package/esm/oas/boolean/boolean-types.js +32 -2
  7. package/esm/oas/contact/contact-types.d.ts +176 -0
  8. package/esm/oas/contact/contact-types.d.ts.map +1 -1
  9. package/esm/oas/contact/contact-types.js +102 -0
  10. package/esm/oas/mediaType/toMediaTypeItemV3.d.ts +288 -0
  11. package/esm/oas/mediaType/toMediaTypeItemV3.d.ts.map +1 -1
  12. package/esm/oas/mediaType/toMediaTypeItemV3.js +272 -0
  13. package/esm/oas/operation/operation-types.d.ts +251 -0
  14. package/esm/oas/operation/operation-types.d.ts.map +1 -1
  15. package/esm/oas/operation/operation-types.js +98 -0
  16. package/esm/oas/string/string-types.d.ts +192 -18
  17. package/esm/oas/string/string-types.d.ts.map +1 -1
  18. package/esm/oas/string/string-types.js +76 -4
  19. package/esm/types/ModuleExport.d.ts +130 -0
  20. package/esm/types/ModuleExport.d.ts.map +1 -1
  21. package/esm/types/ModuleExport.js +36 -0
  22. package/package.json +1 -1
  23. package/script/oas/array/array-types.d.ts +238 -25
  24. package/script/oas/array/array-types.d.ts.map +1 -1
  25. package/script/oas/array/array-types.js +97 -5
  26. package/script/oas/boolean/boolean-types.d.ts +81 -9
  27. package/script/oas/boolean/boolean-types.d.ts.map +1 -1
  28. package/script/oas/boolean/boolean-types.js +32 -2
  29. package/script/oas/contact/contact-types.d.ts +176 -0
  30. package/script/oas/contact/contact-types.d.ts.map +1 -1
  31. package/script/oas/contact/contact-types.js +102 -0
  32. package/script/oas/mediaType/toMediaTypeItemV3.d.ts +288 -0
  33. package/script/oas/mediaType/toMediaTypeItemV3.d.ts.map +1 -1
  34. package/script/oas/mediaType/toMediaTypeItemV3.js +272 -0
  35. package/script/oas/operation/operation-types.d.ts +251 -0
  36. package/script/oas/operation/operation-types.d.ts.map +1 -1
  37. package/script/oas/operation/operation-types.js +98 -0
  38. package/script/oas/string/string-types.d.ts +192 -18
  39. package/script/oas/string/string-types.d.ts.map +1 -1
  40. package/script/oas/string/string-types.js +76 -4
  41. package/script/types/ModuleExport.d.ts +130 -0
  42. package/script/types/ModuleExport.d.ts.map +1 -1
  43. package/script/types/ModuleExport.js +36 -0
@@ -2,54 +2,228 @@ import * as v from 'valibot';
2
2
  /**
3
3
  * Union type for OpenAPI string format specifiers.
4
4
  *
5
- * Represents the standard string formats defined in OpenAPI v3,
6
- * providing semantic meaning for string validation and processing.
7
- * Used for generating appropriate validation rules in target languages.
5
+ * Represents the standard string formats defined in the OpenAPI v3 specification,
6
+ * providing semantic meaning for string validation and processing. These formats
7
+ * are used by generators to produce appropriate validation rules, UI components,
8
+ * and type annotations in target languages.
9
+ *
10
+ * ## Format Categories
11
+ *
12
+ * **Date/Time Formats:**
13
+ * - `date-time`: Full RFC3339 date-time (e.g., "2018-03-20T09:12:28Z")
14
+ * - `time`: RFC3339 time only (e.g., "09:12:28")
15
+ * - `date`: RFC3339 full-date (e.g., "2018-03-20")
16
+ * - `duration`: RFC3339 duration (e.g., "P3Y6M4DT12H30M5S")
17
+ *
18
+ * **Network Formats:**
19
+ * - `email`: RFC5322 email address
20
+ * - `hostname`: RFC1123 hostname
21
+ * - `ipv4`: IPv4 address
22
+ * - `ipv6`: IPv6 address
23
+ * - `uri`: RFC3986 URI
24
+ * - `uuid`: RFC4122 UUID
25
+ *
26
+ * **Encoding/Pattern Formats:**
27
+ * - `regex`: Regular expression pattern
28
+ * - `password`: Password field hint for UI components
29
+ * - `byte`: Base64 encoded data
30
+ * - `binary`: Binary data
31
+ *
32
+ * @example Using string formats in schema definitions
33
+ * ```typescript
34
+ * import type { StringFormat } from '@skmtc/core/oas/string';
35
+ *
36
+ * const emailFormat: StringFormat = 'email';
37
+ * const timestampFormat: StringFormat = 'date-time';
38
+ * ```
8
39
  */
9
40
  export type StringFormat = 'date-time' | 'time' | 'date' | 'duration' | 'email' | 'hostname' | 'ipv4' | 'ipv6' | 'uuid' | 'uri' | 'regex' | 'password' | 'byte' | 'binary';
10
41
  /**
11
42
  * Valibot enum schema for valid OpenAPI string format values.
12
43
  *
13
- * Defines the standard string formats supported by OpenAPI v3,
14
- * including date/time formats, network formats, and encoding formats.
44
+ * This schema validates that string format values conform to the OpenAPI v3
45
+ * specification's standard format identifiers. It includes date/time formats,
46
+ * network address formats, and encoding formats that provide semantic meaning
47
+ * for string validation and UI generation.
48
+ *
49
+ * @example Validating string formats
50
+ * ```typescript
51
+ * import { stringFormat } from '@skmtc/core/oas/string';
52
+ * import * as v from 'valibot';
53
+ *
54
+ * const validFormat = v.parse(stringFormat, 'email'); // 'email'
55
+ * const invalidFormat = v.parse(stringFormat, 'invalid'); // Throws ValiError
56
+ * ```
57
+ *
58
+ * @example Using in schema validation
59
+ * ```typescript
60
+ * const schema = {
61
+ * type: 'string',
62
+ * format: 'email',
63
+ * description: 'User email address'
64
+ * };
65
+ *
66
+ * // Validate the format field
67
+ * if (schema.format) {
68
+ * const validatedFormat = v.parse(stringFormat, schema.format);
69
+ * console.log(`Valid format: ${validatedFormat}`);
70
+ * }
71
+ * ```
15
72
  */
16
73
  export declare const stringFormat: v.GenericSchema<StringFormat>;
17
74
  /**
18
75
  * Valibot schema for validating OpenAPI string data objects.
19
76
  *
20
- * Validates string schema objects including length constraints,
21
- * pattern validation, format specifiers, and enumeration values.
77
+ * This comprehensive schema validates OpenAPI string schemas according to the
78
+ * OpenAPI v3 specification, including all standard properties like length
79
+ * constraints, pattern validation, format specifiers, enumeration values,
80
+ * and metadata fields. Used throughout the SKMTC pipeline for runtime
81
+ * validation of string schema definitions.
82
+ *
83
+ * @example Validating a basic string schema
84
+ * ```typescript
85
+ * import { oasStringData } from '@skmtc/core/oas/string';
86
+ * import * as v from 'valibot';
87
+ *
88
+ * const schema = {
89
+ * type: 'string',
90
+ * description: 'User name',
91
+ * minLength: 1,
92
+ * maxLength: 100,
93
+ * pattern: '^[a-zA-Z\\s]+$'
94
+ * };
95
+ *
96
+ * const validated = v.parse(oasStringData, schema);
97
+ * console.log(validated.minLength); // 1
98
+ * ```
99
+ *
100
+ * @example Validating formatted strings
101
+ * ```typescript
102
+ * const emailSchema = {
103
+ * type: 'string',
104
+ * format: 'email',
105
+ * title: 'Email Address',
106
+ * example: 'user@example.com'
107
+ * };
108
+ *
109
+ * const result = v.parse(oasStringData, emailSchema);
110
+ * console.log(result.format); // 'email'
111
+ * ```
112
+ *
113
+ * @example Validating enumerated strings
114
+ * ```typescript
115
+ * const statusSchema = {
116
+ * type: 'string',
117
+ * enum: ['pending', 'approved', 'rejected'],
118
+ * default: 'pending',
119
+ * description: 'Application status'
120
+ * };
121
+ *
122
+ * const validated = v.parse(oasStringData, statusSchema);
123
+ * console.log(validated.enum); // ['pending', 'approved', 'rejected']
124
+ * ```
22
125
  */
23
126
  export declare const oasStringData: v.GenericSchema<OasStringData>;
24
127
  /**
25
128
  * Data type for OpenAPI string schema objects.
26
129
  *
27
- * Represents string schemas with validation constraints,
28
- * format specifiers, and metadata. Used throughout the
29
- * SKMTC pipeline for string type processing and code generation.
130
+ * Represents the complete structure of OpenAPI string schemas as processed by the
131
+ * SKMTC pipeline. This type includes all standard OpenAPI string schema properties
132
+ * including validation constraints (length, pattern), format specifiers, enumeration
133
+ * values, and metadata fields. It's used throughout the string processing pipeline
134
+ * for type-safe handling of string schema definitions.
135
+ *
136
+ * ## Usage in SKMTC Pipeline
137
+ *
138
+ * This type is used by:
139
+ * - Schema parsers to validate incoming string schema data
140
+ * - String processors to transform OpenAPI schemas into OAS objects
141
+ * - Code generators to access string constraints and generate validation code
142
+ * - UI generators to create appropriate form controls based on formats and constraints
143
+ *
144
+ * @example Basic string schema
145
+ * ```typescript
146
+ * import type { OasStringData } from '@skmtc/core/oas/string';
147
+ *
148
+ * const nameSchema: OasStringData = {
149
+ * type: 'string',
150
+ * title: 'Full Name',
151
+ * description: 'User full name',
152
+ * minLength: 1,
153
+ * maxLength: 200,
154
+ * example: 'John Doe'
155
+ * };
156
+ * ```
157
+ *
158
+ * @example Email string with format
159
+ * ```typescript
160
+ * const emailSchema: OasStringData = {
161
+ * type: 'string',
162
+ * format: 'email',
163
+ * title: 'Email Address',
164
+ * description: 'User email for notifications',
165
+ * example: 'john.doe@example.com'
166
+ * };
167
+ * ```
168
+ *
169
+ * @example Enumerated string values
170
+ * ```typescript
171
+ * const roleSchema: OasStringData = {
172
+ * type: 'string',
173
+ * title: 'User Role',
174
+ * description: 'User access level',
175
+ * enum: ['admin', 'moderator', 'user', 'guest'],
176
+ * default: 'user'
177
+ * };
178
+ * ```
179
+ *
180
+ * @example Pattern-constrained string
181
+ * ```typescript
182
+ * const phoneSchema: OasStringData = {
183
+ * type: 'string',
184
+ * title: 'Phone Number',
185
+ * description: 'US phone number',
186
+ * pattern: '^\\+?1?[2-9]\\d{9}$',
187
+ * example: '+1234567890',
188
+ * minLength: 10,
189
+ * maxLength: 15
190
+ * };
191
+ * ```
192
+ *
193
+ * @example Nullable string with constraints
194
+ * ```typescript
195
+ * const commentSchema: OasStringData = {
196
+ * type: 'string',
197
+ * title: 'Comment',
198
+ * description: 'Optional user comment',
199
+ * maxLength: 500,
200
+ * nullable: true,
201
+ * default: null
202
+ * };
203
+ * ```
30
204
  */
31
205
  export type OasStringData = {
32
- /** Human-readable title for the string */
206
+ /** Human-readable title for the string schema */
33
207
  title?: string;
34
- /** Detailed description of the string's purpose */
208
+ /** Detailed description explaining the string's purpose and usage */
35
209
  description?: string;
36
- /** Default value for the string */
210
+ /** Default value used when no explicit value is provided */
37
211
  default?: string;
38
212
  /** Type identifier (always 'string') */
39
213
  type: 'string';
40
- /** Maximum allowed length */
214
+ /** Maximum allowed length in characters */
41
215
  maxLength?: number;
42
- /** Minimum required length */
216
+ /** Minimum required length in characters */
43
217
  minLength?: number;
44
218
  /** Regular expression pattern for validation */
45
219
  pattern?: string;
46
220
  /** Array of valid enumeration values */
47
221
  enum?: string[];
48
- /** Format specifier (date-time, email, etc.) */
222
+ /** Format specifier (email, date-time, uuid, etc.) */
49
223
  format?: string;
50
- /** Whether null values are allowed */
224
+ /** Whether null values are allowed in addition to string values */
51
225
  nullable?: boolean;
52
- /** Example value for documentation */
226
+ /** Example value for documentation and testing */
53
227
  example?: string;
54
228
  };
55
229
  //# sourceMappingURL=string-types.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"string-types.d.ts","sourceRoot":"","sources":["../../../src/oas/string/string-types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,SAAS,CAAA;AAE5B;;;;;;GAMG;AACH,MAAM,MAAM,YAAY,GACpB,WAAW,GACX,MAAM,GACN,MAAM,GACN,UAAU,GACV,OAAO,GACP,UAAU,GACV,MAAM,GACN,MAAM,GACN,MAAM,GACN,KAAK,GACL,OAAO,GACP,UAAU,GACV,MAAM,GACN,QAAQ,CAAA;AAEZ;;;;;GAKG;AACH,eAAO,MAAM,YAAY,EAAE,CAAC,CAAC,aAAa,CAAC,YAAY,CAerD,CAAA;AAEF;;;;;GAKG;AACH,eAAO,MAAM,aAAa,EAAE,CAAC,CAAC,aAAa,CAAC,aAAa,CAYvD,CAAA;AAEF;;;;;;GAMG;AACH,MAAM,MAAM,aAAa,GAAG;IAC1B,0CAA0C;IAC1C,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,mDAAmD;IACnD,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,mCAAmC;IACnC,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,wCAAwC;IACxC,IAAI,EAAE,QAAQ,CAAA;IACd,6BAA6B;IAC7B,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,8BAA8B;IAC9B,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,gDAAgD;IAChD,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,wCAAwC;IACxC,IAAI,CAAC,EAAE,MAAM,EAAE,CAAA;IACf,gDAAgD;IAChD,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,sCAAsC;IACtC,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,sCAAsC;IACtC,OAAO,CAAC,EAAE,MAAM,CAAA;CACjB,CAAA"}
1
+ {"version":3,"file":"string-types.d.ts","sourceRoot":"","sources":["../../../src/oas/string/string-types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,SAAS,CAAA;AAE5B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAqCG;AACH,MAAM,MAAM,YAAY,GACpB,WAAW,GACX,MAAM,GACN,MAAM,GACN,UAAU,GACV,OAAO,GACP,UAAU,GACV,MAAM,GACN,MAAM,GACN,MAAM,GACN,KAAK,GACL,OAAO,GACP,UAAU,GACV,MAAM,GACN,QAAQ,CAAA;AAEZ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AACH,eAAO,MAAM,YAAY,EAAE,CAAC,CAAC,aAAa,CAAC,YAAY,CAerD,CAAA;AAEF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmDG;AACH,eAAO,MAAM,aAAa,EAAE,CAAC,CAAC,aAAa,CAAC,aAAa,CAYvD,CAAA;AAEF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6EG;AACH,MAAM,MAAM,aAAa,GAAG;IAC1B,iDAAiD;IACjD,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,qEAAqE;IACrE,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,4DAA4D;IAC5D,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,wCAAwC;IACxC,IAAI,EAAE,QAAQ,CAAA;IACd,2CAA2C;IAC3C,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,4CAA4C;IAC5C,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,gDAAgD;IAChD,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,wCAAwC;IACxC,IAAI,CAAC,EAAE,MAAM,EAAE,CAAA;IACf,sDAAsD;IACtD,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,mEAAmE;IACnE,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,kDAAkD;IAClD,OAAO,CAAC,EAAE,MAAM,CAAA;CACjB,CAAA"}
@@ -2,8 +2,34 @@ import * as v from 'valibot';
2
2
  /**
3
3
  * Valibot enum schema for valid OpenAPI string format values.
4
4
  *
5
- * Defines the standard string formats supported by OpenAPI v3,
6
- * including date/time formats, network formats, and encoding formats.
5
+ * This schema validates that string format values conform to the OpenAPI v3
6
+ * specification's standard format identifiers. It includes date/time formats,
7
+ * network address formats, and encoding formats that provide semantic meaning
8
+ * for string validation and UI generation.
9
+ *
10
+ * @example Validating string formats
11
+ * ```typescript
12
+ * import { stringFormat } from '@skmtc/core/oas/string';
13
+ * import * as v from 'valibot';
14
+ *
15
+ * const validFormat = v.parse(stringFormat, 'email'); // 'email'
16
+ * const invalidFormat = v.parse(stringFormat, 'invalid'); // Throws ValiError
17
+ * ```
18
+ *
19
+ * @example Using in schema validation
20
+ * ```typescript
21
+ * const schema = {
22
+ * type: 'string',
23
+ * format: 'email',
24
+ * description: 'User email address'
25
+ * };
26
+ *
27
+ * // Validate the format field
28
+ * if (schema.format) {
29
+ * const validatedFormat = v.parse(stringFormat, schema.format);
30
+ * console.log(`Valid format: ${validatedFormat}`);
31
+ * }
32
+ * ```
7
33
  */
8
34
  export const stringFormat = v.enum({
9
35
  'date-time': 'date-time',
@@ -24,8 +50,54 @@ export const stringFormat = v.enum({
24
50
  /**
25
51
  * Valibot schema for validating OpenAPI string data objects.
26
52
  *
27
- * Validates string schema objects including length constraints,
28
- * pattern validation, format specifiers, and enumeration values.
53
+ * This comprehensive schema validates OpenAPI string schemas according to the
54
+ * OpenAPI v3 specification, including all standard properties like length
55
+ * constraints, pattern validation, format specifiers, enumeration values,
56
+ * and metadata fields. Used throughout the SKMTC pipeline for runtime
57
+ * validation of string schema definitions.
58
+ *
59
+ * @example Validating a basic string schema
60
+ * ```typescript
61
+ * import { oasStringData } from '@skmtc/core/oas/string';
62
+ * import * as v from 'valibot';
63
+ *
64
+ * const schema = {
65
+ * type: 'string',
66
+ * description: 'User name',
67
+ * minLength: 1,
68
+ * maxLength: 100,
69
+ * pattern: '^[a-zA-Z\\s]+$'
70
+ * };
71
+ *
72
+ * const validated = v.parse(oasStringData, schema);
73
+ * console.log(validated.minLength); // 1
74
+ * ```
75
+ *
76
+ * @example Validating formatted strings
77
+ * ```typescript
78
+ * const emailSchema = {
79
+ * type: 'string',
80
+ * format: 'email',
81
+ * title: 'Email Address',
82
+ * example: 'user@example.com'
83
+ * };
84
+ *
85
+ * const result = v.parse(oasStringData, emailSchema);
86
+ * console.log(result.format); // 'email'
87
+ * ```
88
+ *
89
+ * @example Validating enumerated strings
90
+ * ```typescript
91
+ * const statusSchema = {
92
+ * type: 'string',
93
+ * enum: ['pending', 'approved', 'rejected'],
94
+ * default: 'pending',
95
+ * description: 'Application status'
96
+ * };
97
+ *
98
+ * const validated = v.parse(oasStringData, statusSchema);
99
+ * console.log(validated.enum); // ['pending', 'approved', 'rejected']
100
+ * ```
29
101
  */
30
102
  export const oasStringData = v.object({
31
103
  type: v.literal('string'),
@@ -1,8 +1,138 @@
1
1
  import "../_dnt.polyfills.js";
2
2
  import * as v from 'valibot';
3
+ /**
4
+ * Valibot schema for validating module export configuration objects.
5
+ *
6
+ * This schema validates module export structures used throughout the SKMTC
7
+ * code generation pipeline. Module exports define how generated code modules
8
+ * are exposed and imported, specifying both the export name and the file path
9
+ * where the export can be found.
10
+ *
11
+ * @example Validating a basic module export
12
+ * ```typescript
13
+ * import { moduleExport } from '@skmtc/core/types';
14
+ * import * as v from 'valibot';
15
+ *
16
+ * const config = {
17
+ * exportName: 'UserApi',
18
+ * exportPath: './generated/UserApi.ts'
19
+ * };
20
+ *
21
+ * const validated = v.parse(moduleExport, config);
22
+ * console.log(validated.exportName); // 'UserApi'
23
+ * ```
24
+ *
25
+ * @example Validating multiple exports
26
+ * ```typescript
27
+ * const exports = [
28
+ * { exportName: 'createUser', exportPath: './api/users.ts' },
29
+ * { exportName: 'updateUser', exportPath: './api/users.ts' },
30
+ * { exportName: 'UserModel', exportPath: './models/User.ts' }
31
+ * ];
32
+ *
33
+ * exports.forEach(exp => {
34
+ * const validated = v.parse(moduleExport, exp);
35
+ * console.log(`Export: ${validated.exportName} from ${validated.exportPath}`);
36
+ * });
37
+ * ```
38
+ */
3
39
  export declare const moduleExport: v.GenericSchema<ModuleExport>;
40
+ /**
41
+ * Configuration object for module exports in the SKMTC pipeline.
42
+ *
43
+ * This type defines the structure for describing how generated code modules
44
+ * should be exported and made available for import. It's used throughout
45
+ * the SKMTC system for organizing generated code, managing dependencies,
46
+ * and creating proper import/export relationships between generated files.
47
+ *
48
+ * ## Usage in SKMTC Pipeline
49
+ *
50
+ * This type is used by:
51
+ * - Code generators to define export configurations
52
+ * - File processors to organize generated modules
53
+ * - Import managers to resolve module dependencies
54
+ * - Build systems to understand code structure
55
+ *
56
+ * @example Basic module export definition
57
+ * ```typescript
58
+ * import type { ModuleExport } from '@skmtc/core/types';
59
+ *
60
+ * const apiExport: ModuleExport = {
61
+ * exportName: 'UserApiClient',
62
+ * exportPath: './generated/api/UserApiClient.ts'
63
+ * };
64
+ *
65
+ * console.log(`Import ${apiExport.exportName} from '${apiExport.exportPath}'`);
66
+ * // Import UserApiClient from './generated/api/UserApiClient.ts'
67
+ * ```
68
+ *
69
+ * @example Function export configuration
70
+ * ```typescript
71
+ * const functionExport: ModuleExport = {
72
+ * exportName: 'validateUserData',
73
+ * exportPath: './generated/validators/userValidation.ts'
74
+ * };
75
+ *
76
+ * // Used to generate: export { validateUserData } from './generated/validators/userValidation.ts'
77
+ * ```
78
+ *
79
+ * @example Type export configuration
80
+ * ```typescript
81
+ * const typeExport: ModuleExport = {
82
+ * exportName: 'UserType',
83
+ * exportPath: './generated/types/User.ts'
84
+ * };
85
+ *
86
+ * // Used to generate: export type { UserType } from './generated/types/User.ts'
87
+ * ```
88
+ *
89
+ * @example Multiple exports from same file
90
+ * ```typescript
91
+ * const userModuleExports: ModuleExport[] = [
92
+ * {
93
+ * exportName: 'User',
94
+ * exportPath: './generated/models/User.ts'
95
+ * },
96
+ * {
97
+ * exportName: 'UserValidator',
98
+ * exportPath: './generated/models/User.ts'
99
+ * },
100
+ * {
101
+ * exportName: 'createUser',
102
+ * exportPath: './generated/models/User.ts'
103
+ * }
104
+ * ];
105
+ *
106
+ * // All exports reference the same file but different symbols
107
+ * ```
108
+ *
109
+ * @example Integration with build systems
110
+ * ```typescript
111
+ * class ModuleRegistry {
112
+ * private exports: ModuleExport[] = [];
113
+ *
114
+ * addExport(moduleExport: ModuleExport) {
115
+ * this.exports.push(moduleExport);
116
+ * }
117
+ *
118
+ * generateIndexFile(): string {
119
+ * return this.exports
120
+ * .map(exp => `export { ${exp.exportName} } from '${exp.exportPath}';`)
121
+ * .join('\n');
122
+ * }
123
+ * }
124
+ *
125
+ * const registry = new ModuleRegistry();
126
+ * registry.addExport({
127
+ * exportName: 'ApiClient',
128
+ * exportPath: './api/client.ts'
129
+ * });
130
+ * ```
131
+ */
4
132
  export type ModuleExport = {
133
+ /** The name of the symbol being exported (function, class, type, etc.) */
5
134
  exportName: string;
135
+ /** The file path where the export can be found */
6
136
  exportPath: string;
7
137
  };
8
138
  //# sourceMappingURL=ModuleExport.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"ModuleExport.d.ts","sourceRoot":"","sources":["../../src/types/ModuleExport.ts"],"names":[],"mappings":"AAAA,OAAO,sBAAsB,CAAC;AAC9B,OAAO,KAAK,CAAC,MAAM,SAAS,CAAA;AAE5B,eAAO,MAAM,YAAY,EAAE,CAAC,CAAC,aAAa,CAAC,YAAY,CAGrD,CAAA;AAEF,MAAM,MAAM,YAAY,GAAG;IACzB,UAAU,EAAE,MAAM,CAAA;IAClB,UAAU,EAAE,MAAM,CAAA;CACnB,CAAA"}
1
+ {"version":3,"file":"ModuleExport.d.ts","sourceRoot":"","sources":["../../src/types/ModuleExport.ts"],"names":[],"mappings":"AAAA,OAAO,sBAAsB,CAAC;AAC9B,OAAO,KAAK,CAAC,MAAM,SAAS,CAAA;AAE5B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmCG;AACH,eAAO,MAAM,YAAY,EAAE,CAAC,CAAC,aAAa,CAAC,YAAY,CAGrD,CAAA;AAEF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2FG;AACH,MAAM,MAAM,YAAY,GAAG;IACzB,0EAA0E;IAC1E,UAAU,EAAE,MAAM,CAAA;IAClB,kDAAkD;IAClD,UAAU,EAAE,MAAM,CAAA;CACnB,CAAA"}
@@ -1,5 +1,41 @@
1
1
  import "../_dnt.polyfills.js";
2
2
  import * as v from 'valibot';
3
+ /**
4
+ * Valibot schema for validating module export configuration objects.
5
+ *
6
+ * This schema validates module export structures used throughout the SKMTC
7
+ * code generation pipeline. Module exports define how generated code modules
8
+ * are exposed and imported, specifying both the export name and the file path
9
+ * where the export can be found.
10
+ *
11
+ * @example Validating a basic module export
12
+ * ```typescript
13
+ * import { moduleExport } from '@skmtc/core/types';
14
+ * import * as v from 'valibot';
15
+ *
16
+ * const config = {
17
+ * exportName: 'UserApi',
18
+ * exportPath: './generated/UserApi.ts'
19
+ * };
20
+ *
21
+ * const validated = v.parse(moduleExport, config);
22
+ * console.log(validated.exportName); // 'UserApi'
23
+ * ```
24
+ *
25
+ * @example Validating multiple exports
26
+ * ```typescript
27
+ * const exports = [
28
+ * { exportName: 'createUser', exportPath: './api/users.ts' },
29
+ * { exportName: 'updateUser', exportPath: './api/users.ts' },
30
+ * { exportName: 'UserModel', exportPath: './models/User.ts' }
31
+ * ];
32
+ *
33
+ * exports.forEach(exp => {
34
+ * const validated = v.parse(moduleExport, exp);
35
+ * console.log(`Export: ${validated.exportName} from ${validated.exportPath}`);
36
+ * });
37
+ * ```
38
+ */
3
39
  export const moduleExport = v.object({
4
40
  exportName: v.string(),
5
41
  exportPath: v.string()
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@skmtc/core",
3
- "version": "0.0.808",
3
+ "version": "0.0.809",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "https://github.com/skmtc/skmtc.git"