@skmtc/core 0.0.806 → 0.0.808

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 (55) hide show
  1. package/esm/helpers/toResolvedArtifactPath.d.ts +64 -0
  2. package/esm/helpers/toResolvedArtifactPath.d.ts.map +1 -1
  3. package/esm/helpers/toResolvedArtifactPath.js +61 -0
  4. package/esm/types/EnrichmentRequest.d.ts +62 -0
  5. package/esm/types/EnrichmentRequest.d.ts.map +1 -1
  6. package/esm/types/EnrichmentRequest.js +53 -0
  7. package/esm/types/GeneratorKeys.d.ts +64 -0
  8. package/esm/types/GeneratorKeys.d.ts.map +1 -1
  9. package/esm/types/GeneratorKeys.js +64 -0
  10. package/esm/types/Manifest.d.ts +72 -0
  11. package/esm/types/Manifest.d.ts.map +1 -1
  12. package/esm/types/Manifest.js +72 -0
  13. package/esm/types/Method.d.ts +68 -0
  14. package/esm/types/Method.d.ts.map +1 -1
  15. package/esm/types/Method.js +68 -0
  16. package/esm/types/PrettierConfig.d.ts +74 -0
  17. package/esm/types/PrettierConfig.d.ts.map +1 -1
  18. package/esm/types/PrettierConfig.js +74 -0
  19. package/esm/types/Preview.d.ts +75 -0
  20. package/esm/types/Preview.d.ts.map +1 -1
  21. package/esm/types/Preview.js +75 -0
  22. package/esm/types/RefName.d.ts +70 -0
  23. package/esm/types/RefName.d.ts.map +1 -1
  24. package/esm/types/RefName.js +70 -0
  25. package/esm/types/Results.d.ts +97 -0
  26. package/esm/types/Results.d.ts.map +1 -1
  27. package/esm/types/Results.js +97 -0
  28. package/package.json +1 -1
  29. package/script/helpers/toResolvedArtifactPath.d.ts +64 -0
  30. package/script/helpers/toResolvedArtifactPath.d.ts.map +1 -1
  31. package/script/helpers/toResolvedArtifactPath.js +61 -0
  32. package/script/types/EnrichmentRequest.d.ts +62 -0
  33. package/script/types/EnrichmentRequest.d.ts.map +1 -1
  34. package/script/types/EnrichmentRequest.js +53 -0
  35. package/script/types/GeneratorKeys.d.ts +64 -0
  36. package/script/types/GeneratorKeys.d.ts.map +1 -1
  37. package/script/types/GeneratorKeys.js +64 -0
  38. package/script/types/Manifest.d.ts +72 -0
  39. package/script/types/Manifest.d.ts.map +1 -1
  40. package/script/types/Manifest.js +72 -0
  41. package/script/types/Method.d.ts +68 -0
  42. package/script/types/Method.d.ts.map +1 -1
  43. package/script/types/Method.js +68 -0
  44. package/script/types/PrettierConfig.d.ts +74 -0
  45. package/script/types/PrettierConfig.d.ts.map +1 -1
  46. package/script/types/PrettierConfig.js +74 -0
  47. package/script/types/Preview.d.ts +75 -0
  48. package/script/types/Preview.d.ts.map +1 -1
  49. package/script/types/Preview.js +75 -0
  50. package/script/types/RefName.d.ts +70 -0
  51. package/script/types/RefName.d.ts.map +1 -1
  52. package/script/types/RefName.js +70 -0
  53. package/script/types/Results.d.ts +97 -0
  54. package/script/types/Results.d.ts.map +1 -1
  55. package/script/types/Results.js +97 -0
@@ -34,6 +34,78 @@ var __importStar = (this && this.__importStar) || (function () {
34
34
  })();
35
35
  Object.defineProperty(exports, "__esModule", { value: true });
36
36
  exports.manifestContent = exports.previewItem = exports.manifestEntry = void 0;
37
+ /**
38
+ * @fileoverview Generation Manifest System for SKMTC Core
39
+ *
40
+ * This module provides comprehensive manifest generation for tracking and organizing
41
+ * all artifacts produced during the SKMTC code generation process. The manifest
42
+ * system captures metadata about generated files, including size metrics, locations,
43
+ * preview information, and generation statistics.
44
+ *
45
+ * Manifests serve as a complete inventory of generated content, enabling tools,
46
+ * IDEs, and other systems to understand what was generated and how to interact
47
+ * with the generated code.
48
+ *
49
+ * ## Key Features
50
+ *
51
+ * - **File Tracking**: Complete inventory of all generated files with metrics
52
+ * - **Size Analytics**: Line counts, character counts, and size statistics
53
+ * - **Preview Integration**: Rich preview metadata for UI generation
54
+ * - **Generation Stats**: Detailed metrics about the generation process
55
+ * - **Type Safety**: Comprehensive validation with Valibot schemas
56
+ *
57
+ * @example Creating a manifest entry
58
+ * ```typescript
59
+ * import type { ManifestEntry } from '@skmtc/core/Manifest';
60
+ *
61
+ * const entry: ManifestEntry = {
62
+ * lines: 150,
63
+ * characters: 4200,
64
+ * destinationPath: './src/generated/UserApi.ts'
65
+ * };
66
+ * ```
67
+ *
68
+ * @example Processing manifest content
69
+ * ```typescript
70
+ * import type { ManifestContent } from '@skmtc/core/Manifest';
71
+ *
72
+ * const manifest: ManifestContent = {
73
+ * files: {
74
+ * 'UserApi.ts': {
75
+ * lines: 150,
76
+ * characters: 4200,
77
+ * destinationPath: './src/generated/UserApi.ts'
78
+ * }
79
+ * },
80
+ * stats: {
81
+ * totalFiles: 1,
82
+ * totalLines: 150,
83
+ * totalCharacters: 4200,
84
+ * generatedAt: new Date().toISOString()
85
+ * },
86
+ * previews: [],
87
+ * mappings: []
88
+ * };
89
+ * ```
90
+ *
91
+ * @example Using manifest for tooling
92
+ * ```typescript
93
+ * function analyzeGeneration(manifest: ManifestContent) {
94
+ * const fileCount = Object.keys(manifest.files).length;
95
+ * const totalSize = Object.values(manifest.files)
96
+ * .reduce((sum, file) => sum + file.characters, 0);
97
+ *
98
+ * console.log(`Generated ${fileCount} files with ${totalSize} characters`);
99
+ *
100
+ * // Process previews for UI generation
101
+ * manifest.previews.forEach(preview => {
102
+ * console.log(`Preview available: ${preview.title}`);
103
+ * });
104
+ * }
105
+ * ```
106
+ *
107
+ * @module Manifest
108
+ */
37
109
  require("../_dnt.polyfills.js");
38
110
  const Results_js_1 = require("./Results.js");
39
111
  const Preview_js_1 = require("./Preview.js");
@@ -1,3 +1,70 @@
1
+ /**
2
+ * @fileoverview HTTP Method System for SKMTC Core
3
+ *
4
+ * This module provides comprehensive HTTP method definitions and utilities for
5
+ * handling OpenAPI operations. It includes type-safe method definitions,
6
+ * validation utilities, and constants for all HTTP methods supported by
7
+ * the OpenAPI v3 specification.
8
+ *
9
+ * The module ensures type safety when working with HTTP methods throughout
10
+ * the SKMTC pipeline and provides utilities for method validation and processing.
11
+ *
12
+ * ## Key Features
13
+ *
14
+ * - **Complete Method Support**: All HTTP methods from OpenAPI v3 specification
15
+ * - **Type Safety**: Branded types and type guards for method handling
16
+ * - **Validation**: Runtime validation with Valibot integration
17
+ * - **Case Handling**: Proper case normalization for method strings
18
+ * - **Specification Compliance**: Full adherence to OpenAPI v3 method definitions
19
+ *
20
+ * @example Working with HTTP methods
21
+ * ```typescript
22
+ * import { Method, isMethod, methodValues } from '@skmtc/core/Method';
23
+ *
24
+ * // Type-safe method handling
25
+ * const method: Method = 'GET';
26
+ *
27
+ * // Validate unknown method strings
28
+ * const userInput = 'post';
29
+ * if (isMethod(userInput)) {
30
+ * console.log(`Valid method: ${userInput}`); // TypeScript knows it's a Method
31
+ * }
32
+ *
33
+ * // List all supported methods
34
+ * console.log('Supported methods:', methodValues);
35
+ * ```
36
+ *
37
+ * @example Method validation in generators
38
+ * ```typescript
39
+ * import { isMethod, Method } from '@skmtc/core/Method';
40
+ *
41
+ * function processOperation(path: string, method: string, operation: any) {
42
+ * if (!isMethod(method)) {
43
+ * throw new Error(`Unsupported HTTP method: ${method}`);
44
+ * }
45
+ *
46
+ * // TypeScript now knows method is of type Method
47
+ * return generateOperationCode(path, method, operation);
48
+ * }
49
+ * ```
50
+ *
51
+ * @example Case-insensitive method handling
52
+ * ```typescript
53
+ * import { normalizeMethod, isMethod } from '@skmtc/core/Method';
54
+ *
55
+ * function handleMethodString(methodStr: string) {
56
+ * const normalized = methodStr.toLowerCase();
57
+ *
58
+ * if (isMethod(normalized)) {
59
+ * return processValidMethod(normalized);
60
+ * } else {
61
+ * throw new Error(`Invalid method: ${methodStr}`);
62
+ * }
63
+ * }
64
+ * ```
65
+ *
66
+ * @module Method
67
+ */
1
68
  import "../_dnt.polyfills.js";
2
69
  import * as v from 'valibot';
3
70
  /**
@@ -5,6 +72,7 @@ import * as v from 'valibot';
5
72
  *
6
73
  * This constant array includes all HTTP methods that can be used
7
74
  * in OpenAPI path operations, as defined by the OpenAPI specification.
75
+ * All methods are in lowercase to match OpenAPI conventions.
8
76
  */
9
77
  export declare const methodValues: readonly ["get", "put", "post", "delete", "options", "head", "patch", "trace"];
10
78
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"Method.d.ts","sourceRoot":"","sources":["../../src/types/Method.ts"],"names":[],"mappings":"AAAA,OAAO,sBAAsB,CAAC;AAC9B,OAAO,KAAK,CAAC,MAAM,SAAS,CAAA;AAE5B;;;;;GAKG;AACH,eAAO,MAAM,YAAY,gFASf,CAAA;AAEV;;;;;GAKG;AACH,eAAO,MAAM,mBAAmB,UAA+D,CAAA;AAE/F;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,eAAO,MAAM,MAAM,EAAE,CAAC,CAAC,WAAW,CAChC;IACE,CAAC,CAAC,aAAa,CAAC,KAAK,EAAE,SAAS,CAAC;IACjC,CAAC,CAAC,aAAa,CAAC,MAAM,EAAE,SAAS,CAAC;IAClC,CAAC,CAAC,aAAa,CAAC,KAAK,EAAE,SAAS,CAAC;IACjC,CAAC,CAAC,aAAa,CAAC,OAAO,EAAE,SAAS,CAAC;IACnC,CAAC,CAAC,aAAa,CAAC,QAAQ,EAAE,SAAS,CAAC;IACpC,CAAC,CAAC,aAAa,CAAC,MAAM,EAAE,SAAS,CAAC;IAClC,CAAC,CAAC,aAAa,CAAC,SAAS,EAAE,SAAS,CAAC;IACrC,CAAC,CAAC,aAAa,CAAC,OAAO,EAAE,SAAS,CAAC;CACpC,EACD,SAAS,CAUT,CAAA;AAEF;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,MAAM,MAAM,MAAM,GAAG,KAAK,GAAG,KAAK,GAAG,MAAM,GAAG,QAAQ,GAAG,SAAS,GAAG,MAAM,GAAG,OAAO,GAAG,OAAO,CAAA;AAG/F;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,eAAO,MAAM,OAAO,EAAE,CAAC,CAAC,WAAW,CAAC,OAAO,MAAM,EAAE,SAAS,CAAmB,CAAA;AAE/E;;;;;;;;;;;;;;;;;;;;;;;;;;GA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C,OAAO,MAAM,EAAE,SAAS,CAAmB,CAAA;AAE/E;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH,eAAO,MAAM,QAAQ,GAAI,KAAK,OAAO,KAAG,GAAG,IAAI,MAE9C,CAAA"}
@@ -34,6 +34,73 @@ var __importStar = (this && this.__importStar) || (function () {
34
34
  })();
35
35
  Object.defineProperty(exports, "__esModule", { value: true });
36
36
  exports.isMethod = exports.methods = exports.method = exports.methodValuesNoTrace = exports.methodValues = void 0;
37
+ /**
38
+ * @fileoverview HTTP Method System for SKMTC Core
39
+ *
40
+ * This module provides comprehensive HTTP method definitions and utilities for
41
+ * handling OpenAPI operations. It includes type-safe method definitions,
42
+ * validation utilities, and constants for all HTTP methods supported by
43
+ * the OpenAPI v3 specification.
44
+ *
45
+ * The module ensures type safety when working with HTTP methods throughout
46
+ * the SKMTC pipeline and provides utilities for method validation and processing.
47
+ *
48
+ * ## Key Features
49
+ *
50
+ * - **Complete Method Support**: All HTTP methods from OpenAPI v3 specification
51
+ * - **Type Safety**: Branded types and type guards for method handling
52
+ * - **Validation**: Runtime validation with Valibot integration
53
+ * - **Case Handling**: Proper case normalization for method strings
54
+ * - **Specification Compliance**: Full adherence to OpenAPI v3 method definitions
55
+ *
56
+ * @example Working with HTTP methods
57
+ * ```typescript
58
+ * import { Method, isMethod, methodValues } from '@skmtc/core/Method';
59
+ *
60
+ * // Type-safe method handling
61
+ * const method: Method = 'GET';
62
+ *
63
+ * // Validate unknown method strings
64
+ * const userInput = 'post';
65
+ * if (isMethod(userInput)) {
66
+ * console.log(`Valid method: ${userInput}`); // TypeScript knows it's a Method
67
+ * }
68
+ *
69
+ * // List all supported methods
70
+ * console.log('Supported methods:', methodValues);
71
+ * ```
72
+ *
73
+ * @example Method validation in generators
74
+ * ```typescript
75
+ * import { isMethod, Method } from '@skmtc/core/Method';
76
+ *
77
+ * function processOperation(path: string, method: string, operation: any) {
78
+ * if (!isMethod(method)) {
79
+ * throw new Error(`Unsupported HTTP method: ${method}`);
80
+ * }
81
+ *
82
+ * // TypeScript now knows method is of type Method
83
+ * return generateOperationCode(path, method, operation);
84
+ * }
85
+ * ```
86
+ *
87
+ * @example Case-insensitive method handling
88
+ * ```typescript
89
+ * import { normalizeMethod, isMethod } from '@skmtc/core/Method';
90
+ *
91
+ * function handleMethodString(methodStr: string) {
92
+ * const normalized = methodStr.toLowerCase();
93
+ *
94
+ * if (isMethod(normalized)) {
95
+ * return processValidMethod(normalized);
96
+ * } else {
97
+ * throw new Error(`Invalid method: ${methodStr}`);
98
+ * }
99
+ * }
100
+ * ```
101
+ *
102
+ * @module Method
103
+ */
37
104
  require("../_dnt.polyfills.js");
38
105
  const v = __importStar(require("valibot"));
39
106
  /**
@@ -41,6 +108,7 @@ const v = __importStar(require("valibot"));
41
108
  *
42
109
  * This constant array includes all HTTP methods that can be used
43
110
  * in OpenAPI path operations, as defined by the OpenAPI specification.
111
+ * All methods are in lowercase to match OpenAPI conventions.
44
112
  */
45
113
  exports.methodValues = [
46
114
  'get',
@@ -1,3 +1,77 @@
1
+ /**
2
+ * @fileoverview Prettier Configuration System for SKMTC Core
3
+ *
4
+ * This module provides comprehensive type definitions and validation schemas for
5
+ * Prettier code formatting configuration within the SKMTC code generation pipeline.
6
+ * It ensures that generated code is properly formatted according to specified
7
+ * formatting rules and style guidelines.
8
+ *
9
+ * The Prettier configuration system supports all standard Prettier options,
10
+ * enabling fine-tuned control over code formatting for different output targets
11
+ * and project requirements.
12
+ *
13
+ * ## Key Features
14
+ *
15
+ * - **Complete Option Coverage**: All Prettier configuration options supported
16
+ * - **Type Safety**: Full TypeScript typing and Valibot validation
17
+ * - **Flexible Configuration**: Optional settings with sensible defaults
18
+ * - **Multi-Language Support**: Formatting options for JavaScript, TypeScript, JSX, HTML, and more
19
+ * - **Integration Ready**: Direct integration with the SKMTC rendering pipeline
20
+ *
21
+ * @example Basic Prettier configuration
22
+ * ```typescript
23
+ * import type { PrettierConfigType } from '@skmtc/core/PrettierConfig';
24
+ *
25
+ * const config: PrettierConfigType = {
26
+ * printWidth: 100,
27
+ * tabWidth: 2,
28
+ * useTabs: false,
29
+ * semi: true,
30
+ * singleQuote: true,
31
+ * trailingComma: 'es5'
32
+ * };
33
+ * ```
34
+ *
35
+ * @example TypeScript and JSX formatting
36
+ * ```typescript
37
+ * import type { PrettierConfigType } from '@skmtc/core/PrettierConfig';
38
+ *
39
+ * const tsConfig: PrettierConfigType = {
40
+ * printWidth: 120,
41
+ * tabWidth: 2,
42
+ * semi: true,
43
+ * singleQuote: true,
44
+ * jsxSingleQuote: true,
45
+ * bracketSameLine: false,
46
+ * arrowParens: 'avoid'
47
+ * };
48
+ * ```
49
+ *
50
+ * @example Validation usage
51
+ * ```typescript
52
+ * import { prettierConfigType, PrettierConfigType } from '@skmtc/core/PrettierConfig';
53
+ * import * as v from 'valibot';
54
+ *
55
+ * function validatePrettierConfig(config: unknown): PrettierConfigType {
56
+ * return v.parse(prettierConfigType, config);
57
+ * }
58
+ *
59
+ * const userConfig = {
60
+ * printWidth: 80,
61
+ * singleQuote: true,
62
+ * invalidOption: 'test' // This would cause validation error
63
+ * };
64
+ *
65
+ * try {
66
+ * const validConfig = validatePrettierConfig(userConfig);
67
+ * console.log('Valid configuration:', validConfig);
68
+ * } catch (error) {
69
+ * console.error('Invalid Prettier configuration:', error);
70
+ * }
71
+ * ```
72
+ *
73
+ * @module PrettierConfig
74
+ */
1
75
  import "../_dnt.polyfills.js";
2
76
  import * as v from 'valibot';
3
77
  export type PrettierConfigType = {
@@ -1 +1 @@
1
- {"version":3,"file":"PrettierConfig.d.ts","sourceRoot":"","sources":["../../src/types/PrettierConfig.ts"],"names":[],"mappings":"AAAA,OAAO,sBAAsB,CAAC;AAC9B,OAAO,KAAK,CAAC,MAAM,SAAS,CAAA;AAE5B,MAAM,MAAM,kBAAkB,GAAG;IAC/B,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,OAAO,CAAC,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MAAM,MAAM,kBAAkB,GAAG;IAC/B,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,IAAI,CAAC,EAAE,OAAO,CAAA;IACd,WAAW,CAAC,EAAE,OAAO,CAAA;IACrB,UAAU,CAAC,EAAE,WAAW,GAAG,YAAY,GAAG,UAAU,CAAA;IACpD,cAAc,CAAC,EAAE,OAAO,CAAA;IACxB,aAAa,CAAC,EAAE,MAAM,GAAG,KAAK,GAAG,KAAK,CAAA;IACtC,eAAe,CAAC,EAAE,OAAO,CAAA;IACzB,cAAc,CAAC,EAAE,OAAO,CAAA;IACxB,kBAAkB,CAAC,EAAE,OAAO,CAAA;IAC5B,WAAW,CAAC,EAAE,OAAO,GAAG,QAAQ,CAAA;IAChC,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,aAAa,CAAC,EAAE,OAAO,CAAA;IACvB,YAAY,CAAC,EAAE,OAAO,CAAA;IACtB,SAAS,CAAC,EAAE,QAAQ,GAAG,OAAO,GAAG,UAAU,CAAA;IAC3C,yBAAyB,CAAC,EAAE,KAAK,GAAG,QAAQ,GAAG,QAAQ,CAAA;IACvD,uBAAuB,CAAC,EAAE,OAAO,CAAA;IACjC,SAAS,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,MAAM,GAAG,IAAI,CAAA;IACzC,0BAA0B,CAAC,EAAE,MAAM,GAAG,KAAK,CAAA;IAC3C,sBAAsB,CAAC,EAAE,OAAO,CAAA;CACjC,CAAA;AAED,eAAO,MAAM,kBAAkB,EAAE,CAAC,CAAC,aAAa,CAAC,kBAAkB,CA6BjE,CAAA"}
@@ -34,6 +34,80 @@ var __importStar = (this && this.__importStar) || (function () {
34
34
  })();
35
35
  Object.defineProperty(exports, "__esModule", { value: true });
36
36
  exports.prettierConfigType = void 0;
37
+ /**
38
+ * @fileoverview Prettier Configuration System for SKMTC Core
39
+ *
40
+ * This module provides comprehensive type definitions and validation schemas for
41
+ * Prettier code formatting configuration within the SKMTC code generation pipeline.
42
+ * It ensures that generated code is properly formatted according to specified
43
+ * formatting rules and style guidelines.
44
+ *
45
+ * The Prettier configuration system supports all standard Prettier options,
46
+ * enabling fine-tuned control over code formatting for different output targets
47
+ * and project requirements.
48
+ *
49
+ * ## Key Features
50
+ *
51
+ * - **Complete Option Coverage**: All Prettier configuration options supported
52
+ * - **Type Safety**: Full TypeScript typing and Valibot validation
53
+ * - **Flexible Configuration**: Optional settings with sensible defaults
54
+ * - **Multi-Language Support**: Formatting options for JavaScript, TypeScript, JSX, HTML, and more
55
+ * - **Integration Ready**: Direct integration with the SKMTC rendering pipeline
56
+ *
57
+ * @example Basic Prettier configuration
58
+ * ```typescript
59
+ * import type { PrettierConfigType } from '@skmtc/core/PrettierConfig';
60
+ *
61
+ * const config: PrettierConfigType = {
62
+ * printWidth: 100,
63
+ * tabWidth: 2,
64
+ * useTabs: false,
65
+ * semi: true,
66
+ * singleQuote: true,
67
+ * trailingComma: 'es5'
68
+ * };
69
+ * ```
70
+ *
71
+ * @example TypeScript and JSX formatting
72
+ * ```typescript
73
+ * import type { PrettierConfigType } from '@skmtc/core/PrettierConfig';
74
+ *
75
+ * const tsConfig: PrettierConfigType = {
76
+ * printWidth: 120,
77
+ * tabWidth: 2,
78
+ * semi: true,
79
+ * singleQuote: true,
80
+ * jsxSingleQuote: true,
81
+ * bracketSameLine: false,
82
+ * arrowParens: 'avoid'
83
+ * };
84
+ * ```
85
+ *
86
+ * @example Validation usage
87
+ * ```typescript
88
+ * import { prettierConfigType, PrettierConfigType } from '@skmtc/core/PrettierConfig';
89
+ * import * as v from 'valibot';
90
+ *
91
+ * function validatePrettierConfig(config: unknown): PrettierConfigType {
92
+ * return v.parse(prettierConfigType, config);
93
+ * }
94
+ *
95
+ * const userConfig = {
96
+ * printWidth: 80,
97
+ * singleQuote: true,
98
+ * invalidOption: 'test' // This would cause validation error
99
+ * };
100
+ *
101
+ * try {
102
+ * const validConfig = validatePrettierConfig(userConfig);
103
+ * console.log('Valid configuration:', validConfig);
104
+ * } catch (error) {
105
+ * console.error('Invalid Prettier configuration:', error);
106
+ * }
107
+ * ```
108
+ *
109
+ * @module PrettierConfig
110
+ */
37
111
  require("../_dnt.polyfills.js");
38
112
  const v = __importStar(require("valibot"));
39
113
  exports.prettierConfigType = v.object({
@@ -1,3 +1,78 @@
1
+ /**
2
+ * @fileoverview Preview and Mapping System for SKMTC Core
3
+ *
4
+ * This module provides comprehensive types and utilities for creating preview
5
+ * interfaces and mapping configurations for generated code. The preview system
6
+ * enables interactive demonstrations of generated APIs, forms, tables, and
7
+ * other UI components within development tools and documentation.
8
+ *
9
+ * The mapping system provides metadata about how OpenAPI operations and models
10
+ * translate to generated code, enabling rich tooling experiences and
11
+ * reverse-engineering capabilities.
12
+ *
13
+ * ## Key Features
14
+ *
15
+ * - **Interactive Previews**: Rich preview interfaces for generated components
16
+ * - **Source Mapping**: Traceability from generated code back to OpenAPI sources
17
+ * - **UI Grouping**: Organized grouping of related UI components (forms, tables, inputs)
18
+ * - **Generator Integration**: Deep integration with the generator pipeline
19
+ * - **Type Safety**: Comprehensive validation and type safety throughout
20
+ *
21
+ * @example Creating operation previews
22
+ * ```typescript
23
+ * import type { PreviewModule, OperationSource } from '@skmtc/core/Preview';
24
+ *
25
+ * const operationSource: OperationSource = {
26
+ * type: 'operation',
27
+ * generatorId: 'react-forms',
28
+ * operationPath: '/users',
29
+ * operationMethod: 'POST'
30
+ * };
31
+ *
32
+ * const preview: PreviewModule = {
33
+ * title: 'Create User Form',
34
+ * description: 'Interactive form for creating new users',
35
+ * group: 'forms',
36
+ * source: operationSource,
37
+ * moduleName: 'CreateUserForm',
38
+ * exportName: 'default'
39
+ * };
40
+ * ```
41
+ *
42
+ * @example Creating model previews
43
+ * ```typescript
44
+ * import type { PreviewModule, ModelSource } from '@skmtc/core/Preview';
45
+ *
46
+ * const modelSource: ModelSource = {
47
+ * type: 'model',
48
+ * generatorId: 'typescript-types',
49
+ * refName: 'User'
50
+ * };
51
+ *
52
+ * const preview: PreviewModule = {
53
+ * title: 'User Type Definition',
54
+ * description: 'TypeScript interface for User model',
55
+ * group: 'tables',
56
+ * source: modelSource,
57
+ * moduleName: 'UserTypes',
58
+ * exportName: 'User'
59
+ * };
60
+ * ```
61
+ *
62
+ * @example Working with mappings
63
+ * ```typescript
64
+ * import type { MappingModule } from '@skmtc/core/Preview';
65
+ *
66
+ * const mapping: MappingModule = {
67
+ * source: operationSource,
68
+ * moduleName: 'UserApi',
69
+ * exportName: 'createUser',
70
+ * generatedPath: './src/generated/UserApi.ts'
71
+ * };
72
+ * ```
73
+ *
74
+ * @module Preview
75
+ */
1
76
  import "../_dnt.polyfills.js";
2
77
  import { type Method } from './Method.js';
3
78
  import * as v from 'valibot';
@@ -1 +1 @@
1
- {"version":3,"file":"Preview.d.ts","sourceRoot":"","sources":["../../src/types/Preview.ts"],"names":[],"mappings":"AAAA,OAAO,sBAAsB,CAAC;AAC9B,OAAO,EAAU,KAAK,MAAM,EAAE,MAAM,aAAa,CAAA;AACjD,OAAO,KAAK,CAAC,MAAM,SAAS,CAAA;AAE5B,MAAM,MAAM,eAAe,GAAG;IAC5B,IAAI,EAAE,WAAW,CAAA;IACjB,WAAW,EAAE,MAAM,CAAA;IACnB,aAAa,EAAE,MAAM,CAAA;IACrB,eAAe,EAAE,MAAM,CAAA;CACxB,CAAA;AAED,MAAM,MAAM,WAAW,GAAG;IACxB,IAAI,EAAE,OAAO,CAAA;IACb,WAAW,EAAE,MAAM,CAAA;IACnB,OAAO,EAAE,MAAM,CAAA;CAChB,CAAA;AAED,MAAM,MAAM,YAAY,GAAG,OAAO,GAAG,QAAQ,GAAG,QAAQ,CAAA;AAExD,MAAM,MAAM,aAAa,GAAG;IAC1B,IAAI,EAAE,MAAM,CAAA;IACZ,UAAU,EAAE,MAAM,CAAA;IAClB,KAAK,EAAE,YAAY,C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81 @@ var __importStar = (this && this.__importStar) || (function () {
34
34
  })();
35
35
  Object.defineProperty(exports, "__esModule", { value: true });
36
36
  exports.mapping = exports.preview = exports.mappingModule = exports.previewModule = exports.previewGroup = exports.modelSource = exports.operationSource = void 0;
37
+ /**
38
+ * @fileoverview Preview and Mapping System for SKMTC Core
39
+ *
40
+ * This module provides comprehensive types and utilities for creating preview
41
+ * interfaces and mapping configurations for generated code. The preview system
42
+ * enables interactive demonstrations of generated APIs, forms, tables, and
43
+ * other UI components within development tools and documentation.
44
+ *
45
+ * The mapping system provides metadata about how OpenAPI operations and models
46
+ * translate to generated code, enabling rich tooling experiences and
47
+ * reverse-engineering capabilities.
48
+ *
49
+ * ## Key Features
50
+ *
51
+ * - **Interactive Previews**: Rich preview interfaces for generated components
52
+ * - **Source Mapping**: Traceability from generated code back to OpenAPI sources
53
+ * - **UI Grouping**: Organized grouping of related UI components (forms, tables, inputs)
54
+ * - **Generator Integration**: Deep integration with the generator pipeline
55
+ * - **Type Safety**: Comprehensive validation and type safety throughout
56
+ *
57
+ * @example Creating operation previews
58
+ * ```typescript
59
+ * import type { PreviewModule, OperationSource } from '@skmtc/core/Preview';
60
+ *
61
+ * const operationSource: OperationSource = {
62
+ * type: 'operation',
63
+ * generatorId: 'react-forms',
64
+ * operationPath: '/users',
65
+ * operationMethod: 'POST'
66
+ * };
67
+ *
68
+ * const preview: PreviewModule = {
69
+ * title: 'Create User Form',
70
+ * description: 'Interactive form for creating new users',
71
+ * group: 'forms',
72
+ * source: operationSource,
73
+ * moduleName: 'CreateUserForm',
74
+ * exportName: 'default'
75
+ * };
76
+ * ```
77
+ *
78
+ * @example Creating model previews
79
+ * ```typescript
80
+ * import type { PreviewModule, ModelSource } from '@skmtc/core/Preview';
81
+ *
82
+ * const modelSource: ModelSource = {
83
+ * type: 'model',
84
+ * generatorId: 'typescript-types',
85
+ * refName: 'User'
86
+ * };
87
+ *
88
+ * const preview: PreviewModule = {
89
+ * title: 'User Type Definition',
90
+ * description: 'TypeScript interface for User model',
91
+ * group: 'tables',
92
+ * source: modelSource,
93
+ * moduleName: 'UserTypes',
94
+ * exportName: 'User'
95
+ * };
96
+ * ```
97
+ *
98
+ * @example Working with mappings
99
+ * ```typescript
100
+ * import type { MappingModule } from '@skmtc/core/Preview';
101
+ *
102
+ * const mapping: MappingModule = {
103
+ * source: operationSource,
104
+ * moduleName: 'UserApi',
105
+ * exportName: 'createUser',
106
+ * generatedPath: './src/generated/UserApi.ts'
107
+ * };
108
+ * ```
109
+ *
110
+ * @module Preview
111
+ */
37
112
  require("../_dnt.polyfills.js");
38
113
  const Method_js_1 = require("./Method.js");
39
114
  const v = __importStar(require("valibot"));
@@ -1,3 +1,73 @@
1
+ /**
2
+ * @fileoverview Reference Name System for SKMTC Core
3
+ *
4
+ * This module provides a type-safe reference name system for identifying
5
+ * OpenAPI schema components throughout the SKMTC pipeline. Reference names
6
+ * are branded types that ensure schema identifiers are handled safely and
7
+ * prevent accidental mixing with regular strings.
8
+ *
9
+ * The reference name system is crucial for maintaining type safety when
10
+ * working with OpenAPI component references, schema lookups, and cross-references
11
+ * between different parts of the generated code.
12
+ *
13
+ * ## Key Features
14
+ *
15
+ * - **Type Safety**: Branded types prevent string confusion and improve code reliability
16
+ * - **Schema Integration**: Direct mapping to OpenAPI components.schemas keys
17
+ * - **Reference Tracking**: Safe handling of schema references throughout generation
18
+ * - **IDE Support**: Enhanced IntelliSense and error detection in development
19
+ * - **Validation**: Compile-time validation of schema reference usage
20
+ *
21
+ * @example Basic reference name usage
22
+ * ```typescript
23
+ * import type { RefName } from '@skmtc/core/RefName';
24
+ *
25
+ * // Create a reference name (typically done by the parser)
26
+ * const userRef: RefName = 'User' as RefName;
27
+ * const productRef: RefName = 'Product' as RefName;
28
+ *
29
+ * // TypeScript prevents mixing with regular strings
30
+ * const regularString = 'User';
31
+ * // const invalid: RefName = regularString; // Type error!
32
+ * ```
33
+ *
34
+ * @example Using reference names in generators
35
+ * ```typescript
36
+ * import type { RefName } from '@skmtc/core/RefName';
37
+ *
38
+ * function generateModelImport(refName: RefName): string {
39
+ * return `import type { ${refName} } from './models/${refName}';`;
40
+ * }
41
+ *
42
+ * function generateModelReference(refName: RefName): string {
43
+ * return `#/components/schemas/${refName}`;
44
+ * }
45
+ *
46
+ * // Usage with type safety
47
+ * const userRef: RefName = 'User' as RefName;
48
+ * const importStatement = generateModelImport(userRef);
49
+ * const schemaRef = generateModelReference(userRef);
50
+ * ```
51
+ *
52
+ * @example Reference name validation
53
+ * ```typescript
54
+ * import type { RefName } from '@skmtc/core/RefName';
55
+ *
56
+ * function isValidRefName(value: string): value is RefName {
57
+ * // Validate that the string is a valid schema reference name
58
+ * return /^[A-Za-z][A-Za-z0-9_]*$/.test(value) && value.length > 0;
59
+ * }
60
+ *
61
+ * function safeCreateRefName(value: string): RefName | null {
62
+ * if (isValidRefName(value)) {
63
+ * return value as RefName;
64
+ * }
65
+ * return null;
66
+ * }
67
+ * ```
68
+ *
69
+ * @module RefName
70
+ */
1
71
  import "../_dnt.polyfills.js";
2
72
  import type { Brand } from './Brand.js';
3
73
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"RefName.d.ts","sourceRoot":"","sources":["../../src/types/RefName.ts"],"names":[],"mappings":"AAAA,OAAO,sBAAsB,CAAC;AAC9B,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,YAAY,CAAA;AAEvC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4DG;AACH,MAAM,MAAM,OAAO,GAAG,KAAK,CAAC,MAAM,EAAE,SAAS,CAAC,CAAA"}
1
+ {"version":3,"file":"RefName.d.ts","sourceRoot":"","sources":["../../src/types/RefName.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAqEG;AACH,OAAO,sBAAsB,CAAC;AAG9B,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,YAAY,CAAA;AAEvC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4DG;AACH,MAAM,MAAM,OAAO,GAAG,KAAK,CAAC,MAAM,EAAE,SAAS,CAAC,CAAA"}