@skmtc/core 0.0.804 → 0.0.806
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.
- package/esm/helpers/strings.d.ts +44 -0
- package/esm/helpers/strings.d.ts.map +1 -1
- package/esm/helpers/strings.js +44 -0
- package/esm/oas/contact/Contact.d.ts +42 -0
- package/esm/oas/contact/Contact.d.ts.map +1 -1
- package/esm/oas/contact/Contact.js +36 -0
- package/esm/oas/info/Info.d.ts +36 -0
- package/esm/oas/info/Info.d.ts.map +1 -1
- package/esm/oas/info/Info.js +37 -0
- package/esm/oas/mediaType/MediaType.d.ts +17 -0
- package/esm/oas/mediaType/MediaType.d.ts.map +1 -1
- package/esm/oas/mediaType/MediaType.js +17 -0
- package/esm/run/toV3JsonDocument.d.ts +54 -0
- package/esm/run/toV3JsonDocument.d.ts.map +1 -1
- package/esm/run/toV3JsonDocument.js +54 -0
- package/esm/types/Brand.d.ts +41 -0
- package/esm/types/Brand.d.ts.map +1 -1
- package/esm/types/Brand.js +41 -0
- package/esm/types/Enrichments.d.ts +58 -0
- package/esm/types/Enrichments.d.ts.map +1 -1
- package/esm/types/Enrichments.js +58 -0
- package/esm/types/Settings.d.ts +50 -0
- package/esm/types/Settings.d.ts.map +1 -1
- package/esm/types/Settings.js +50 -0
- package/package.json +1 -1
- package/script/helpers/strings.d.ts +44 -0
- package/script/helpers/strings.d.ts.map +1 -1
- package/script/helpers/strings.js +44 -0
- package/script/oas/contact/Contact.d.ts +42 -0
- package/script/oas/contact/Contact.d.ts.map +1 -1
- package/script/oas/contact/Contact.js +36 -0
- package/script/oas/info/Info.d.ts +36 -0
- package/script/oas/info/Info.d.ts.map +1 -1
- package/script/oas/info/Info.js +37 -0
- package/script/oas/mediaType/MediaType.d.ts +17 -0
- package/script/oas/mediaType/MediaType.d.ts.map +1 -1
- package/script/oas/mediaType/MediaType.js +17 -0
- package/script/run/toV3JsonDocument.d.ts +54 -0
- package/script/run/toV3JsonDocument.d.ts.map +1 -1
- package/script/run/toV3JsonDocument.js +54 -0
- package/script/types/Brand.d.ts +41 -0
- package/script/types/Brand.d.ts.map +1 -1
- package/script/types/Brand.js +41 -0
- package/script/types/Enrichments.d.ts +58 -0
- package/script/types/Enrichments.d.ts.map +1 -1
- package/script/types/Enrichments.js +58 -0
- package/script/types/Settings.d.ts +50 -0
- package/script/types/Settings.d.ts.map +1 -1
- package/script/types/Settings.js +50 -0
package/esm/types/Brand.js
CHANGED
|
@@ -1,3 +1,44 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @fileoverview Brand Type System for SKMTC Core
|
|
3
|
+
*
|
|
4
|
+
* This module provides TypeScript branded types for creating type-safe identifiers
|
|
5
|
+
* and values that are structurally identical but nominally distinct. Branded types
|
|
6
|
+
* help prevent mixing up similar primitive types and provide better type safety
|
|
7
|
+
* across the SKMTC codebase.
|
|
8
|
+
*
|
|
9
|
+
* ## Key Features
|
|
10
|
+
*
|
|
11
|
+
* - **Type Safety**: Prevents accidental mixing of similar primitive types
|
|
12
|
+
* - **Nominal Typing**: Creates distinct types from the same underlying type
|
|
13
|
+
* - **Zero Runtime Cost**: Pure TypeScript compile-time construct
|
|
14
|
+
* - **Developer Experience**: Better IntelliSense and error messages
|
|
15
|
+
*
|
|
16
|
+
* @example Creating branded types
|
|
17
|
+
* ```typescript
|
|
18
|
+
* import type { Brand } from '@skmtc/core/Brand';
|
|
19
|
+
*
|
|
20
|
+
* type UserId = Brand<string, 'UserId'>;
|
|
21
|
+
* type ProductId = Brand<string, 'ProductId'>;
|
|
22
|
+
*
|
|
23
|
+
* const userId: UserId = 'user-123' as UserId;
|
|
24
|
+
* const productId: ProductId = 'prod-456' as ProductId;
|
|
25
|
+
*
|
|
26
|
+
* // TypeScript will prevent this error:
|
|
27
|
+
* // const wrong: UserId = productId; // Type error!
|
|
28
|
+
* ```
|
|
29
|
+
*
|
|
30
|
+
* @example Using with numbers
|
|
31
|
+
* ```typescript
|
|
32
|
+
* type Score = Brand<number, 'Score'>;
|
|
33
|
+
* type Percentage = Brand<number, 'Percentage'>;
|
|
34
|
+
*
|
|
35
|
+
* function calculateGrade(score: Score, total: Score): Percentage {
|
|
36
|
+
* return ((score / total) * 100) as Percentage;
|
|
37
|
+
* }
|
|
38
|
+
* ```
|
|
39
|
+
*
|
|
40
|
+
* @module Brand
|
|
41
|
+
*/
|
|
1
42
|
/**
|
|
2
43
|
* Unique symbol used for branding types.
|
|
3
44
|
*
|
|
@@ -1,3 +1,61 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @fileoverview Enrichment System for SKMTC Core
|
|
3
|
+
*
|
|
4
|
+
* This module provides comprehensive enrichment types and schemas for enhancing
|
|
5
|
+
* OpenAPI operations with UI generation metadata. Enrichments allow generators
|
|
6
|
+
* to create forms, tables, inputs, and other UI components with rich metadata
|
|
7
|
+
* about how data should be presented and interacted with.
|
|
8
|
+
*
|
|
9
|
+
* The enrichment system supports a hierarchical structure:
|
|
10
|
+
* Generator → Path → Method → Operation → Component Type (form/table/input)
|
|
11
|
+
*
|
|
12
|
+
* ## Key Features
|
|
13
|
+
*
|
|
14
|
+
* - **Form Enrichments**: Field definitions with inputs, labels, and validation
|
|
15
|
+
* - **Table Enrichments**: Column definitions with formatters and headers
|
|
16
|
+
* - **Input Enrichments**: Standalone input components with formatting
|
|
17
|
+
* - **Hierarchical Organization**: Nested structure for easy lookup and management
|
|
18
|
+
* - **Type Safety**: Comprehensive Valibot validation for all enrichment data
|
|
19
|
+
*
|
|
20
|
+
* @example Basic form enrichment
|
|
21
|
+
* ```typescript
|
|
22
|
+
* import type { FormItem } from '@skmtc/core/Enrichments';
|
|
23
|
+
*
|
|
24
|
+
* const userForm: FormItem = {
|
|
25
|
+
* title: 'User Registration',
|
|
26
|
+
* description: 'Create a new user account',
|
|
27
|
+
* fields: [
|
|
28
|
+
* {
|
|
29
|
+
* id: 'name',
|
|
30
|
+
* accessorPath: ['name'],
|
|
31
|
+
* input: { moduleName: 'TextInput', exportName: 'default' },
|
|
32
|
+
* label: 'Full Name',
|
|
33
|
+
* placeholder: 'Enter your full name'
|
|
34
|
+
* }
|
|
35
|
+
* ],
|
|
36
|
+
* submitLabel: 'Create Account'
|
|
37
|
+
* };
|
|
38
|
+
* ```
|
|
39
|
+
*
|
|
40
|
+
* @example Table enrichment with formatters
|
|
41
|
+
* ```typescript
|
|
42
|
+
* import type { TableItem } from '@skmtc/core/Enrichments';
|
|
43
|
+
*
|
|
44
|
+
* const userTable: TableItem = {
|
|
45
|
+
* title: 'User Directory',
|
|
46
|
+
* columns: [
|
|
47
|
+
* {
|
|
48
|
+
* id: 'email',
|
|
49
|
+
* accessorPath: ['email'],
|
|
50
|
+
* formatter: { moduleName: 'EmailFormatter', exportName: 'default' },
|
|
51
|
+
* label: 'Email Address'
|
|
52
|
+
* }
|
|
53
|
+
* ]
|
|
54
|
+
* };
|
|
55
|
+
* ```
|
|
56
|
+
*
|
|
57
|
+
* @module Enrichments
|
|
58
|
+
*/
|
|
1
59
|
import "../_dnt.polyfills.js";
|
|
2
60
|
import { type ModuleExport } from './ModuleExport.js';
|
|
3
61
|
import * as v from 'valibot';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Enrichments.d.ts","sourceRoot":"","sources":["../../src/types/Enrichments.ts"],"names":[],"mappings":"AAAA,OAAO,sBAAsB,CAAC;
|
|
1
|
+
{"version":3,"file":"Enrichments.d.ts","sourceRoot":"","sources":["../../src/types/Enrichments.ts"],"names":[],"mappings":"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"}
|
package/esm/types/Enrichments.js
CHANGED
|
@@ -1,3 +1,61 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @fileoverview Enrichment System for SKMTC Core
|
|
3
|
+
*
|
|
4
|
+
* This module provides comprehensive enrichment types and schemas for enhancing
|
|
5
|
+
* OpenAPI operations with UI generation metadata. Enrichments allow generators
|
|
6
|
+
* to create forms, tables, inputs, and other UI components with rich metadata
|
|
7
|
+
* about how data should be presented and interacted with.
|
|
8
|
+
*
|
|
9
|
+
* The enrichment system supports a hierarchical structure:
|
|
10
|
+
* Generator → Path → Method → Operation → Component Type (form/table/input)
|
|
11
|
+
*
|
|
12
|
+
* ## Key Features
|
|
13
|
+
*
|
|
14
|
+
* - **Form Enrichments**: Field definitions with inputs, labels, and validation
|
|
15
|
+
* - **Table Enrichments**: Column definitions with formatters and headers
|
|
16
|
+
* - **Input Enrichments**: Standalone input components with formatting
|
|
17
|
+
* - **Hierarchical Organization**: Nested structure for easy lookup and management
|
|
18
|
+
* - **Type Safety**: Comprehensive Valibot validation for all enrichment data
|
|
19
|
+
*
|
|
20
|
+
* @example Basic form enrichment
|
|
21
|
+
* ```typescript
|
|
22
|
+
* import type { FormItem } from '@skmtc/core/Enrichments';
|
|
23
|
+
*
|
|
24
|
+
* const userForm: FormItem = {
|
|
25
|
+
* title: 'User Registration',
|
|
26
|
+
* description: 'Create a new user account',
|
|
27
|
+
* fields: [
|
|
28
|
+
* {
|
|
29
|
+
* id: 'name',
|
|
30
|
+
* accessorPath: ['name'],
|
|
31
|
+
* input: { moduleName: 'TextInput', exportName: 'default' },
|
|
32
|
+
* label: 'Full Name',
|
|
33
|
+
* placeholder: 'Enter your full name'
|
|
34
|
+
* }
|
|
35
|
+
* ],
|
|
36
|
+
* submitLabel: 'Create Account'
|
|
37
|
+
* };
|
|
38
|
+
* ```
|
|
39
|
+
*
|
|
40
|
+
* @example Table enrichment with formatters
|
|
41
|
+
* ```typescript
|
|
42
|
+
* import type { TableItem } from '@skmtc/core/Enrichments';
|
|
43
|
+
*
|
|
44
|
+
* const userTable: TableItem = {
|
|
45
|
+
* title: 'User Directory',
|
|
46
|
+
* columns: [
|
|
47
|
+
* {
|
|
48
|
+
* id: 'email',
|
|
49
|
+
* accessorPath: ['email'],
|
|
50
|
+
* formatter: { moduleName: 'EmailFormatter', exportName: 'default' },
|
|
51
|
+
* label: 'Email Address'
|
|
52
|
+
* }
|
|
53
|
+
* ]
|
|
54
|
+
* };
|
|
55
|
+
* ```
|
|
56
|
+
*
|
|
57
|
+
* @module Enrichments
|
|
58
|
+
*/
|
|
1
59
|
import "../_dnt.polyfills.js";
|
|
2
60
|
import { moduleExport } from './ModuleExport.js';
|
|
3
61
|
import * as v from 'valibot';
|
package/esm/types/Settings.d.ts
CHANGED
|
@@ -1,3 +1,53 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @fileoverview SKMTC Core Settings and Configuration
|
|
3
|
+
*
|
|
4
|
+
* This module provides comprehensive configuration types and schemas for the SKMTC
|
|
5
|
+
* code generation pipeline. It defines settings for generators, modules, packages,
|
|
6
|
+
* and runtime behavior that control how OpenAPI documents are processed and what
|
|
7
|
+
* artifacts are generated.
|
|
8
|
+
*
|
|
9
|
+
* ## Key Features
|
|
10
|
+
*
|
|
11
|
+
* - **Generator Configuration**: Settings for individual code generators
|
|
12
|
+
* - **Module Management**: Package and module resolution configuration
|
|
13
|
+
* - **Runtime Settings**: Control generation behavior and output preferences
|
|
14
|
+
* - **Enrichment Integration**: Support for UI enrichment metadata
|
|
15
|
+
* - **Type Safety**: Comprehensive Valibot validation for all configuration
|
|
16
|
+
*
|
|
17
|
+
* @example Basic generator settings
|
|
18
|
+
* ```typescript
|
|
19
|
+
* import type { Settings } from '@skmtc/core/Settings';
|
|
20
|
+
*
|
|
21
|
+
* const settings: Settings = {
|
|
22
|
+
* generators: {
|
|
23
|
+
* 'my-generator': {
|
|
24
|
+
* enabled: true,
|
|
25
|
+
* config: {
|
|
26
|
+
* outputPath: './generated',
|
|
27
|
+
* typescript: true
|
|
28
|
+
* }
|
|
29
|
+
* }
|
|
30
|
+
* },
|
|
31
|
+
* enrichments: {},
|
|
32
|
+
* filters: {
|
|
33
|
+
* includePaths: ['/api/v1/*'],
|
|
34
|
+
* excludeMethods: ['OPTIONS']
|
|
35
|
+
* }
|
|
36
|
+
* };
|
|
37
|
+
* ```
|
|
38
|
+
*
|
|
39
|
+
* @example Module package configuration
|
|
40
|
+
* ```typescript
|
|
41
|
+
* import type { ModulePackage } from '@skmtc/core/Settings';
|
|
42
|
+
*
|
|
43
|
+
* const moduleConfig: ModulePackage = {
|
|
44
|
+
* rootPath: './src/generated',
|
|
45
|
+
* moduleName: '@my-org/api-client'
|
|
46
|
+
* };
|
|
47
|
+
* ```
|
|
48
|
+
*
|
|
49
|
+
* @module Settings
|
|
50
|
+
*/
|
|
1
51
|
import "../_dnt.polyfills.js";
|
|
2
52
|
import { type GeneratorEnrichments } from './Enrichments.js';
|
|
3
53
|
import * as v from 'valibot';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Settings.d.ts","sourceRoot":"","sources":["../../src/types/Settings.ts"],"names":[],"mappings":"AAAA,OAAO,sBAAsB,CAAC;
|
|
1
|
+
{"version":3,"file":"Settings.d.ts","sourceRoot":"","sources":["../../src/types/Settings.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiDG;AACH,OAAO,sBAAsB,CAAC;AAG9B,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;;GAEG;AACH,eAAO,MAAM,aAAa,EAAE,CAAC,CAAC,aAAa,CAAC,aAAa,CAGvD,CAAA;AAEF;;;;;;;;;;;;;;;;;;;GAmBG;AACH,MAAM,MAAM,aAAa,GAAG;IAC1B,iDAAiD;IACjD,QAAQ,EAAE,MAAM,CAAA;IAChB,uDAAuD;IACvD,UAAU,CAAC,EAAE,MAAM,CAAA;CACpB,CAAA;AAED;;;;GAIG;AACH,eAAO,MAAM,SAAS,EAAE,CAAC,CAAC,aAAa,CAAC,SAAS,CAAyC,CAAA;AAE1F;;;;GAIG;AACH,eAAO,MAAM,cAAc,EAAE,CAAC,CAAC,aAAa,CAAC,cAAc,CAAmC,CAAA;AAE9F;;;;GAIG;AACH,eAAO,MAAM,UAAU,EAAE,CAAC,CAAC,aAAa,CAAC,UAAU,CAA6C,CAAA;AAIhG;;;;;GAKG;AACH,eAAO,MAAM,cAAc,EAAE,CAAC,CAAC,aAAa,CAAC,cAAc,CAKzD,CAAA;AAEF;;;;;;;;;;;;;GAaG;AACH,MAAM,MAAM,SAAS,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,EAAE,CAAC,CAAA;AAEhD;;;;;;;;;;;;GAYG;AACH,MAAM,MAAM,UAAU,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,EAAE,CAAC,CAAA;AAEjD;;;;;;;;;;;;;;;GAeG;AACH,MAAM,MAAM,cAAc,GAAG,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,CAAA;AAEtD;;;;;GAKG;AACH,MAAM,MAAM,IAAI,GAAG,cAAc,GAAG,UAAU,GAAG,MAAM,CAAA;AAEvD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkDG;AACH,MAAM,MAAM,cAAc,GAAG;IAC3B,2CAA2C;IAC3C,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,6CAA6C;IAC7C,QAAQ,CAAC,EAAE,aAAa,EAAE,CAAA;IAC1B,kDAAkD;IAClD,WAAW,CAAC,EAAE,oBAAoB,CAAA;IAClC,sDAAsD;IACtD,IAAI,CAAC,EAAE,IAAI,EAAE,CAAA;CACd,CAAA;AAED;;;;;GAKG;AACH,MAAM,MAAM,iBAAiB,GAAG;IAC9B,8DAA8D;IAC9D,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,0DAA0D;IAC1D,QAAQ,EAAE,cAAc,CAAA;CACzB,CAAA;AAED;;;;;GAKG;AACH,eAAO,MAAM,iBAAiB,EAAE,CAAC,CAAC,aAAa,CAAC,iBAAiB,CAG/D,CAAA"}
|
package/esm/types/Settings.js
CHANGED
|
@@ -1,3 +1,53 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @fileoverview SKMTC Core Settings and Configuration
|
|
3
|
+
*
|
|
4
|
+
* This module provides comprehensive configuration types and schemas for the SKMTC
|
|
5
|
+
* code generation pipeline. It defines settings for generators, modules, packages,
|
|
6
|
+
* and runtime behavior that control how OpenAPI documents are processed and what
|
|
7
|
+
* artifacts are generated.
|
|
8
|
+
*
|
|
9
|
+
* ## Key Features
|
|
10
|
+
*
|
|
11
|
+
* - **Generator Configuration**: Settings for individual code generators
|
|
12
|
+
* - **Module Management**: Package and module resolution configuration
|
|
13
|
+
* - **Runtime Settings**: Control generation behavior and output preferences
|
|
14
|
+
* - **Enrichment Integration**: Support for UI enrichment metadata
|
|
15
|
+
* - **Type Safety**: Comprehensive Valibot validation for all configuration
|
|
16
|
+
*
|
|
17
|
+
* @example Basic generator settings
|
|
18
|
+
* ```typescript
|
|
19
|
+
* import type { Settings } from '@skmtc/core/Settings';
|
|
20
|
+
*
|
|
21
|
+
* const settings: Settings = {
|
|
22
|
+
* generators: {
|
|
23
|
+
* 'my-generator': {
|
|
24
|
+
* enabled: true,
|
|
25
|
+
* config: {
|
|
26
|
+
* outputPath: './generated',
|
|
27
|
+
* typescript: true
|
|
28
|
+
* }
|
|
29
|
+
* }
|
|
30
|
+
* },
|
|
31
|
+
* enrichments: {},
|
|
32
|
+
* filters: {
|
|
33
|
+
* includePaths: ['/api/v1/*'],
|
|
34
|
+
* excludeMethods: ['OPTIONS']
|
|
35
|
+
* }
|
|
36
|
+
* };
|
|
37
|
+
* ```
|
|
38
|
+
*
|
|
39
|
+
* @example Module package configuration
|
|
40
|
+
* ```typescript
|
|
41
|
+
* import type { ModulePackage } from '@skmtc/core/Settings';
|
|
42
|
+
*
|
|
43
|
+
* const moduleConfig: ModulePackage = {
|
|
44
|
+
* rootPath: './src/generated',
|
|
45
|
+
* moduleName: '@my-org/api-client'
|
|
46
|
+
* };
|
|
47
|
+
* ```
|
|
48
|
+
*
|
|
49
|
+
* @module Settings
|
|
50
|
+
*/
|
|
1
51
|
import "../_dnt.polyfills.js";
|
|
2
52
|
import { generatorEnrichments } from './Enrichments.js';
|
|
3
53
|
import * as v from 'valibot';
|
package/package.json
CHANGED
|
@@ -1,3 +1,47 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @fileoverview String Manipulation Utilities for SKMTC Core
|
|
3
|
+
*
|
|
4
|
+
* This module provides a comprehensive collection of string manipulation utilities
|
|
5
|
+
* commonly needed for code generation, identifier transformation, and text processing
|
|
6
|
+
* within the SKMTC pipeline. These utilities handle case conversions, pluralization,
|
|
7
|
+
* sanitization, and various text transformations.
|
|
8
|
+
*
|
|
9
|
+
* ## Key Features
|
|
10
|
+
*
|
|
11
|
+
* - **Case Conversion**: camelCase, PascalCase, snake_case, kebab-case, and more
|
|
12
|
+
* - **Pluralization**: Smart singular/plural transformations with irregular forms
|
|
13
|
+
* - **Sanitization**: Clean strings for use as identifiers and file names
|
|
14
|
+
* - **Text Processing**: Trimming, padding, wrapping, and formatting utilities
|
|
15
|
+
* - **Unicode Support**: Proper handling of international characters
|
|
16
|
+
*
|
|
17
|
+
* @example Case conversions
|
|
18
|
+
* ```typescript
|
|
19
|
+
* import { capitalize, camelCase, pascalCase } from '@skmtc/core/strings';
|
|
20
|
+
*
|
|
21
|
+
* capitalize('hello world'); // 'Hello world'
|
|
22
|
+
* camelCase('user_profile_data'); // 'userProfileData'
|
|
23
|
+
* pascalCase('api-response-type'); // 'ApiResponseType'
|
|
24
|
+
* ```
|
|
25
|
+
*
|
|
26
|
+
* @example Pluralization
|
|
27
|
+
* ```typescript
|
|
28
|
+
* import { pluralize, singularize } from '@skmtc/core/strings';
|
|
29
|
+
*
|
|
30
|
+
* pluralize('user'); // 'users'
|
|
31
|
+
* pluralize('child'); // 'children'
|
|
32
|
+
* singularize('categories'); // 'category'
|
|
33
|
+
* ```
|
|
34
|
+
*
|
|
35
|
+
* @example Identifier sanitization
|
|
36
|
+
* ```typescript
|
|
37
|
+
* import { sanitizeIdentifier, toFileName } from '@skmtc/core/strings';
|
|
38
|
+
*
|
|
39
|
+
* sanitizeIdentifier('123-invalid name!'); // 'invalid_name'
|
|
40
|
+
* toFileName('My API Response'); // 'my-api-response'
|
|
41
|
+
* ```
|
|
42
|
+
*
|
|
43
|
+
* @module strings
|
|
44
|
+
*/
|
|
1
45
|
/**
|
|
2
46
|
* Capitalizes the first character of a string.
|
|
3
47
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"strings.d.ts","sourceRoot":"","sources":["../../src/helpers/strings.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AACH,OAAO,sBAAsB,CAAC;AAE9B,eAAO,MAAM,UAAU,GAAI,KAAK,MAAM,KAAG,MAExC,CAAA;AAED;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,YAAY,GAAI,KAAK,MAAM,KAAG,MAE1C,CAAA;AAED;;GAEG;AACH,KAAK,gBAAgB,GAAG;IACtB,6DAA6D;IAC7D,UAAU,CAAC,EAAE,OAAO,CAAA;CACrB,CAAA;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;AACH,eAAO,MAAM,SAAS,GAAI,KAAK,MAAM,EAAE,iBAAgB,gBAAqB,KAAG,MAgB9E,CAAA"}
|
|
1
|
+
{"version":3,"file":"strings.d.ts","sourceRoot":"","sources":["../../src/helpers/strings.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2CG;AAEH;;;;;;;;;;;;GAYG;AACH,OAAO,sBAAsB,CAAC;AAE9B,eAAO,MAAM,UAAU,GAAI,KAAK,MAAM,KAAG,MAExC,CAAA;AAED;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,YAAY,GAAI,KAAK,MAAM,KAAG,MAE1C,CAAA;AAED;;GAEG;AACH,KAAK,gBAAgB,GAAG;IACtB,6DAA6D;IAC7D,UAAU,CAAC,EAAE,OAAO,CAAA;CACrB,CAAA;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;AACH,eAAO,MAAM,SAAS,GAAI,KAAK,MAAM,EAAE,iBAAgB,gBAAqB,KAAG,MAgB9E,CAAA"}
|
|
@@ -1,4 +1,48 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* @fileoverview String Manipulation Utilities for SKMTC Core
|
|
4
|
+
*
|
|
5
|
+
* This module provides a comprehensive collection of string manipulation utilities
|
|
6
|
+
* commonly needed for code generation, identifier transformation, and text processing
|
|
7
|
+
* within the SKMTC pipeline. These utilities handle case conversions, pluralization,
|
|
8
|
+
* sanitization, and various text transformations.
|
|
9
|
+
*
|
|
10
|
+
* ## Key Features
|
|
11
|
+
*
|
|
12
|
+
* - **Case Conversion**: camelCase, PascalCase, snake_case, kebab-case, and more
|
|
13
|
+
* - **Pluralization**: Smart singular/plural transformations with irregular forms
|
|
14
|
+
* - **Sanitization**: Clean strings for use as identifiers and file names
|
|
15
|
+
* - **Text Processing**: Trimming, padding, wrapping, and formatting utilities
|
|
16
|
+
* - **Unicode Support**: Proper handling of international characters
|
|
17
|
+
*
|
|
18
|
+
* @example Case conversions
|
|
19
|
+
* ```typescript
|
|
20
|
+
* import { capitalize, camelCase, pascalCase } from '@skmtc/core/strings';
|
|
21
|
+
*
|
|
22
|
+
* capitalize('hello world'); // 'Hello world'
|
|
23
|
+
* camelCase('user_profile_data'); // 'userProfileData'
|
|
24
|
+
* pascalCase('api-response-type'); // 'ApiResponseType'
|
|
25
|
+
* ```
|
|
26
|
+
*
|
|
27
|
+
* @example Pluralization
|
|
28
|
+
* ```typescript
|
|
29
|
+
* import { pluralize, singularize } from '@skmtc/core/strings';
|
|
30
|
+
*
|
|
31
|
+
* pluralize('user'); // 'users'
|
|
32
|
+
* pluralize('child'); // 'children'
|
|
33
|
+
* singularize('categories'); // 'category'
|
|
34
|
+
* ```
|
|
35
|
+
*
|
|
36
|
+
* @example Identifier sanitization
|
|
37
|
+
* ```typescript
|
|
38
|
+
* import { sanitizeIdentifier, toFileName } from '@skmtc/core/strings';
|
|
39
|
+
*
|
|
40
|
+
* sanitizeIdentifier('123-invalid name!'); // 'invalid_name'
|
|
41
|
+
* toFileName('My API Response'); // 'my-api-response'
|
|
42
|
+
* ```
|
|
43
|
+
*
|
|
44
|
+
* @module strings
|
|
45
|
+
*/
|
|
2
46
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
47
|
exports.camelCase = exports.decapitalize = exports.capitalize = void 0;
|
|
4
48
|
/**
|
|
@@ -1,15 +1,57 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Constructor fields for {@link OasContact}.
|
|
3
|
+
*
|
|
4
|
+
* Defines the configuration options for creating contact information,
|
|
5
|
+
* including name, URL, email, and extension fields.
|
|
6
|
+
*/
|
|
1
7
|
export type ContactFields = {
|
|
2
8
|
name?: string;
|
|
3
9
|
url?: string;
|
|
4
10
|
email?: string;
|
|
5
11
|
extensionFields?: Record<string, unknown>;
|
|
6
12
|
};
|
|
13
|
+
/**
|
|
14
|
+
* Represents a Contact Object in the OpenAPI Specification.
|
|
15
|
+
*
|
|
16
|
+
* The `OasContact` class encapsulates contact information for the API,
|
|
17
|
+
* providing details about who to contact for support, questions, or issues.
|
|
18
|
+
* This information is typically displayed in API documentation.
|
|
19
|
+
*
|
|
20
|
+
* @example Basic contact information
|
|
21
|
+
* ```typescript
|
|
22
|
+
* import { OasContact } from '@skmtc/core';
|
|
23
|
+
*
|
|
24
|
+
* const contact = new OasContact({
|
|
25
|
+
* name: 'API Support Team',
|
|
26
|
+
* email: 'support@example.com'
|
|
27
|
+
* });
|
|
28
|
+
* ```
|
|
29
|
+
*
|
|
30
|
+
* @example Complete contact details
|
|
31
|
+
* ```typescript
|
|
32
|
+
* const fullContact = new OasContact({
|
|
33
|
+
* name: 'John Doe',
|
|
34
|
+
* url: 'https://example.com/contact',
|
|
35
|
+
* email: 'john@example.com'
|
|
36
|
+
* });
|
|
37
|
+
* ```
|
|
38
|
+
*/
|
|
7
39
|
export declare class OasContact {
|
|
40
|
+
/** Type identifier for this OAS contact object */
|
|
8
41
|
oasType: "contact";
|
|
42
|
+
/** The identifying name of the contact person/organization */
|
|
9
43
|
name: string | undefined;
|
|
44
|
+
/** URL pointing to the contact information */
|
|
10
45
|
url: string | undefined;
|
|
46
|
+
/** Email address of the contact person/organization */
|
|
11
47
|
email: string | undefined;
|
|
48
|
+
/** Custom extension fields (x-* properties) for additional contact metadata */
|
|
12
49
|
extensionFields: Record<string, unknown> | undefined;
|
|
50
|
+
/**
|
|
51
|
+
* Creates a new OasContact instance.
|
|
52
|
+
*
|
|
53
|
+
* @param fields - Contact information fields including name, URL, and email
|
|
54
|
+
*/
|
|
13
55
|
constructor(fields?: ContactFields);
|
|
14
56
|
}
|
|
15
57
|
//# sourceMappingURL=Contact.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Contact.d.ts","sourceRoot":"","sources":["../../../src/oas/contact/Contact.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,aAAa,GAAG;IAC1B,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,GAAG,CAAC,EAAE,MAAM,CAAA;IACZ,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,eAAe,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;CAC1C,CAAA;AAED,qBAAa,UAAU;IACrB,OAAO,EAAG,SAAS,CAAS;IAE5B,IAAI,EAAE,MAAM,GAAG,SAAS,CAAA;IACxB,GAAG,EAAE,MAAM,GAAG,SAAS,CAAA;IACvB,KAAK,EAAE,MAAM,GAAG,SAAS,CAAA;IACzB,eAAe,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,SAAS,CAAA;
|
|
1
|
+
{"version":3,"file":"Contact.d.ts","sourceRoot":"","sources":["../../../src/oas/contact/Contact.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,MAAM,MAAM,aAAa,GAAG;IAC1B,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,GAAG,CAAC,EAAE,MAAM,CAAA;IACZ,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,eAAe,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;CAC1C,CAAA;AAED;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,qBAAa,UAAU;IACrB,kDAAkD;IAClD,OAAO,EAAG,SAAS,CAAS;IAE5B,8DAA8D;IAC9D,IAAI,EAAE,MAAM,GAAG,SAAS,CAAA;IACxB,8CAA8C;IAC9C,GAAG,EAAE,MAAM,GAAG,SAAS,CAAA;IACvB,uDAAuD;IACvD,KAAK,EAAE,MAAM,GAAG,SAAS,CAAA;IACzB,+EAA+E;IAC/E,eAAe,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,SAAS,CAAA;IAEpD;;;;OAIG;gBACS,MAAM,GAAE,aAAkB;CAMvC"}
|
|
@@ -1,32 +1,68 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.OasContact = void 0;
|
|
4
|
+
/**
|
|
5
|
+
* Represents a Contact Object in the OpenAPI Specification.
|
|
6
|
+
*
|
|
7
|
+
* The `OasContact` class encapsulates contact information for the API,
|
|
8
|
+
* providing details about who to contact for support, questions, or issues.
|
|
9
|
+
* This information is typically displayed in API documentation.
|
|
10
|
+
*
|
|
11
|
+
* @example Basic contact information
|
|
12
|
+
* ```typescript
|
|
13
|
+
* import { OasContact } from '@skmtc/core';
|
|
14
|
+
*
|
|
15
|
+
* const contact = new OasContact({
|
|
16
|
+
* name: 'API Support Team',
|
|
17
|
+
* email: 'support@example.com'
|
|
18
|
+
* });
|
|
19
|
+
* ```
|
|
20
|
+
*
|
|
21
|
+
* @example Complete contact details
|
|
22
|
+
* ```typescript
|
|
23
|
+
* const fullContact = new OasContact({
|
|
24
|
+
* name: 'John Doe',
|
|
25
|
+
* url: 'https://example.com/contact',
|
|
26
|
+
* email: 'john@example.com'
|
|
27
|
+
* });
|
|
28
|
+
* ```
|
|
29
|
+
*/
|
|
4
30
|
class OasContact {
|
|
31
|
+
/**
|
|
32
|
+
* Creates a new OasContact instance.
|
|
33
|
+
*
|
|
34
|
+
* @param fields - Contact information fields including name, URL, and email
|
|
35
|
+
*/
|
|
5
36
|
constructor(fields = {}) {
|
|
37
|
+
/** Type identifier for this OAS contact object */
|
|
6
38
|
Object.defineProperty(this, "oasType", {
|
|
7
39
|
enumerable: true,
|
|
8
40
|
configurable: true,
|
|
9
41
|
writable: true,
|
|
10
42
|
value: 'contact'
|
|
11
43
|
});
|
|
44
|
+
/** The identifying name of the contact person/organization */
|
|
12
45
|
Object.defineProperty(this, "name", {
|
|
13
46
|
enumerable: true,
|
|
14
47
|
configurable: true,
|
|
15
48
|
writable: true,
|
|
16
49
|
value: void 0
|
|
17
50
|
});
|
|
51
|
+
/** URL pointing to the contact information */
|
|
18
52
|
Object.defineProperty(this, "url", {
|
|
19
53
|
enumerable: true,
|
|
20
54
|
configurable: true,
|
|
21
55
|
writable: true,
|
|
22
56
|
value: void 0
|
|
23
57
|
});
|
|
58
|
+
/** Email address of the contact person/organization */
|
|
24
59
|
Object.defineProperty(this, "email", {
|
|
25
60
|
enumerable: true,
|
|
26
61
|
configurable: true,
|
|
27
62
|
writable: true,
|
|
28
63
|
value: void 0
|
|
29
64
|
});
|
|
65
|
+
/** Custom extension fields (x-* properties) for additional contact metadata */
|
|
30
66
|
Object.defineProperty(this, "extensionFields", {
|
|
31
67
|
enumerable: true,
|
|
32
68
|
configurable: true,
|
|
@@ -84,13 +84,49 @@ export type InfoFields = {
|
|
|
84
84
|
*/
|
|
85
85
|
export declare class OasInfo {
|
|
86
86
|
#private;
|
|
87
|
+
/** Type identifier for this OAS info object */
|
|
87
88
|
oasType: 'info';
|
|
89
|
+
/**
|
|
90
|
+
* Creates a new OasInfo instance.
|
|
91
|
+
*
|
|
92
|
+
* @param fields - API information fields including title, version, description, and contact details
|
|
93
|
+
*/
|
|
88
94
|
constructor(fields: InfoFields);
|
|
95
|
+
/**
|
|
96
|
+
* Gets the API title.
|
|
97
|
+
*
|
|
98
|
+
* @returns The title of the API
|
|
99
|
+
*/
|
|
89
100
|
get title(): string;
|
|
101
|
+
/**
|
|
102
|
+
* Gets the API description.
|
|
103
|
+
*
|
|
104
|
+
* @returns Optional detailed description of the API's purpose and functionality
|
|
105
|
+
*/
|
|
90
106
|
get description(): string | undefined;
|
|
107
|
+
/**
|
|
108
|
+
* Gets the terms of service URL.
|
|
109
|
+
*
|
|
110
|
+
* @returns Optional URL pointing to the API's terms of service
|
|
111
|
+
*/
|
|
91
112
|
get termsOfService(): string | undefined;
|
|
113
|
+
/**
|
|
114
|
+
* Gets the contact information.
|
|
115
|
+
*
|
|
116
|
+
* @returns Optional contact information for API support and inquiries
|
|
117
|
+
*/
|
|
92
118
|
get contact(): OasContact | undefined;
|
|
119
|
+
/**
|
|
120
|
+
* Gets the license information.
|
|
121
|
+
*
|
|
122
|
+
* @returns Optional license information governing API usage
|
|
123
|
+
*/
|
|
93
124
|
get license(): OasLicense | undefined;
|
|
125
|
+
/**
|
|
126
|
+
* Gets the API version.
|
|
127
|
+
*
|
|
128
|
+
* @returns The version string of the API (e.g., '1.0.0', '2.1.3')
|
|
129
|
+
*/
|
|
94
130
|
get version(): string;
|
|
95
131
|
/** Specification Extension fields */
|
|
96
132
|
get extensionFields(): Record<string, unknown> | undefined;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Info.d.ts","sourceRoot":"","sources":["../../../src/oas/info/Info.ts"],"names":[],"mappings":"AAAA,OAAO,yBAAyB,CAAC;AACjC,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAA;AACvD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAA;AAEvD;;GAEG;AACH,MAAM,MAAM,UAAU,GAAG;IACvB,2BAA2B;IAC3B,KAAK,EAAE,MAAM,CAAA;IACb,0CAA0C;IAC1C,OAAO,EAAE,MAAM,CAAA;IACf,+BAA+B;IAC/B,WAAW,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;IAChC,gDAAgD;IAChD,cAAc,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;IACnC,kDAAkD;IAClD,OAAO,CAAC,EAAE,UAAU,GAAG,SAAS,CAAA;IAChC,kDAAkD;IAClD,OAAO,CAAC,EAAE,UAAU,GAAG,SAAS,CAAA;IAChC,+CAA+C;IAC/C,eAAe,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;CAC1C,CAAA;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6DG;AACH,qBAAa,OAAO;;IAClB,OAAO,EAAE,MAAM,CAAS;
|
|
1
|
+
{"version":3,"file":"Info.d.ts","sourceRoot":"","sources":["../../../src/oas/info/Info.ts"],"names":[],"mappings":"AAAA,OAAO,yBAAyB,CAAC;AACjC,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAA;AACvD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAA;AAEvD;;GAEG;AACH,MAAM,MAAM,UAAU,GAAG;IACvB,2BAA2B;IAC3B,KAAK,EAAE,MAAM,CAAA;IACb,0CAA0C;IAC1C,OAAO,EAAE,MAAM,CAAA;IACf,+BAA+B;IAC/B,WAAW,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;IAChC,gDAAgD;IAChD,cAAc,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;IACnC,kDAAkD;IAClD,OAAO,CAAC,EAAE,UAAU,GAAG,SAAS,CAAA;IAChC,kDAAkD;IAClD,OAAO,CAAC,EAAE,UAAU,GAAG,SAAS,CAAA;IAChC,+CAA+C;IAC/C,eAAe,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;CAC1C,CAAA;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6DG;AACH,qBAAa,OAAO;;IAClB,+CAA+C;IAC/C,OAAO,EAAE,MAAM,CAAS;IAIxB;;;;OAIG;gBACS,MAAM,EAAE,UAAU;IAI9B;;;;OAIG;IACH,IAAI,KAAK,IAAI,MAAM,CAElB;IAED;;;;OAIG;IACH,IAAI,WAAW,IAAI,MAAM,GAAG,SAAS,CAEpC;IAED;;;;OAIG;IACH,IAAI,cAAc,IAAI,MAAM,GAAG,SAAS,CAEvC;IAED;;;;OAIG;IACH,IAAI,OAAO,IAAI,UAAU,GAAG,SAAS,CAEpC;IAED;;;;OAIG;IACH,IAAI,OAAO,IAAI,UAAU,GAAG,SAAS,CAEpC;IAED;;;;OAIG;IACH,IAAI,OAAO,IAAI,MAAM,CAEpB;IAED,qCAAqC;IACrC,IAAI,eAAe,IAAI,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,SAAS,CAEzD;CACF"}
|
package/script/oas/info/Info.js
CHANGED
|
@@ -77,31 +77,68 @@ require("../../_dnt.polyfills.js");
|
|
|
77
77
|
* ```
|
|
78
78
|
*/
|
|
79
79
|
class OasInfo {
|
|
80
|
+
/**
|
|
81
|
+
* Creates a new OasInfo instance.
|
|
82
|
+
*
|
|
83
|
+
* @param fields - API information fields including title, version, description, and contact details
|
|
84
|
+
*/
|
|
80
85
|
constructor(fields) {
|
|
86
|
+
/** Type identifier for this OAS info object */
|
|
81
87
|
Object.defineProperty(this, "oasType", {
|
|
82
88
|
enumerable: true,
|
|
83
89
|
configurable: true,
|
|
84
90
|
writable: true,
|
|
85
91
|
value: 'info'
|
|
86
92
|
});
|
|
93
|
+
/** Private storage for all info fields */
|
|
87
94
|
_OasInfo_fields.set(this, void 0);
|
|
88
95
|
__classPrivateFieldSet(this, _OasInfo_fields, fields, "f");
|
|
89
96
|
}
|
|
97
|
+
/**
|
|
98
|
+
* Gets the API title.
|
|
99
|
+
*
|
|
100
|
+
* @returns The title of the API
|
|
101
|
+
*/
|
|
90
102
|
get title() {
|
|
91
103
|
return __classPrivateFieldGet(this, _OasInfo_fields, "f").title;
|
|
92
104
|
}
|
|
105
|
+
/**
|
|
106
|
+
* Gets the API description.
|
|
107
|
+
*
|
|
108
|
+
* @returns Optional detailed description of the API's purpose and functionality
|
|
109
|
+
*/
|
|
93
110
|
get description() {
|
|
94
111
|
return __classPrivateFieldGet(this, _OasInfo_fields, "f").description;
|
|
95
112
|
}
|
|
113
|
+
/**
|
|
114
|
+
* Gets the terms of service URL.
|
|
115
|
+
*
|
|
116
|
+
* @returns Optional URL pointing to the API's terms of service
|
|
117
|
+
*/
|
|
96
118
|
get termsOfService() {
|
|
97
119
|
return __classPrivateFieldGet(this, _OasInfo_fields, "f").termsOfService;
|
|
98
120
|
}
|
|
121
|
+
/**
|
|
122
|
+
* Gets the contact information.
|
|
123
|
+
*
|
|
124
|
+
* @returns Optional contact information for API support and inquiries
|
|
125
|
+
*/
|
|
99
126
|
get contact() {
|
|
100
127
|
return __classPrivateFieldGet(this, _OasInfo_fields, "f").contact;
|
|
101
128
|
}
|
|
129
|
+
/**
|
|
130
|
+
* Gets the license information.
|
|
131
|
+
*
|
|
132
|
+
* @returns Optional license information governing API usage
|
|
133
|
+
*/
|
|
102
134
|
get license() {
|
|
103
135
|
return __classPrivateFieldGet(this, _OasInfo_fields, "f").license;
|
|
104
136
|
}
|
|
137
|
+
/**
|
|
138
|
+
* Gets the API version.
|
|
139
|
+
*
|
|
140
|
+
* @returns The version string of the API (e.g., '1.0.0', '2.1.3')
|
|
141
|
+
*/
|
|
105
142
|
get version() {
|
|
106
143
|
return __classPrivateFieldGet(this, _OasInfo_fields, "f").version;
|
|
107
144
|
}
|