Skip to content

Commit f9d20f3

Browse files
committed
new transformers added
1 parent b93ef0b commit f9d20f3

File tree

74 files changed

+993
-530
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

74 files changed

+993
-530
lines changed

CHANGELOG.md

Lines changed: 40 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,36 @@
11
# Changelog
22

3-
## [Unreleased] - TBD
3+
## v1.0.4
44

55
### 🚀 **New Features**
6-
- _No new features yet_
6+
- **Added**: `addKeySuffix` transformer - Adds suffixes to all keys within a map object
7+
- **Usage**: Transforms map keys by appending specified suffix to each key name
8+
- **Fields**: `type: "addKeySuffix"`, `path: "path.to.map"`, `suffix: "_suffix"`
9+
- **Example**: Transform `{host: "localhost", port: 5432}``{host_prod: "localhost", port_prod: 5432}`
10+
- **Added**: `deleteKey` transformer - Removes specified keys from configuration
11+
- **Usage**: Deletes configuration keys at specified paths (useful for removing sensitive data)
12+
- **Fields**: `type: "deleteKey"`, `path: "path.to.key"`
13+
- **Example**: Remove secrets, temporary values, or deprecated configuration keys
14+
- **Added**: `trim` transformer - Trims whitespace or custom patterns from string values
15+
- **Usage**: Cleans up string values by removing unwanted characters from start/end
16+
- **Fields**: `type: "trim"`, `path: "path.to.string"`, `pattern: "characters"` (optional)
17+
- **Default**: Trims whitespace if no pattern specified
18+
- **Example**: `" value "``"value"` or `"---token---"``"token"` (with pattern: "-")
19+
- **Added**: `replaceKey` transformer - Replaces value with content from another path
20+
- **Usage**: Takes value from target path, places it at destination path, then deletes target
21+
- **Fields**: `type: "replaceKey"`, `path: "destination.path"`, `target: "source.path"`
22+
- **Example**: Move temporary/staged values to their final configuration locations
723

824
### 🔧 **Enhancements**
9-
- _No enhancements yet_
25+
- **Enhanced**: `changeCase` transformer now supports additional case formats
26+
- **Added**: `kebab` case support for kebab-case conversions
27+
- **Added**: `pascal` case support for PascalCase conversions
28+
- **Supported formats**: upper, lower, snake, camel, kebab, pascal
29+
- **Enhanced**: Transformer Definition structure with new fields
30+
- **Added**: `suffix` field for addKeySuffix transformer
31+
- **Added**: `pattern` field for trim transformer
32+
- **Added**: `target` field for replaceKey transformer
33+
- **Improved**: Variable substitution now supports all new transformer fields
1034

1135
### 🐛 **Bug Fixes**
1236
- _No bug fixes yet_
@@ -15,9 +39,20 @@
1539
- _No internal changes yet_
1640

1741
### 🧪 **Tests**
18-
- _No test changes yet_
42+
- **Enhanced**: Transformer test suite to include new transformer types
43+
- **Added**: Test schemas for addKeySuffix, deleteKey, trim, and replaceKey transformers
44+
- **Added**: Test cases covering all new transformer functionality and edge cases
45+
- **Added**: Error handling tests for new transformers (missing paths, type mismatches)
46+
- **Added**: Variable substitution tests for new transformer fields
47+
- **Updated**: Test documentation to reflect new transformer coverage
1948

2049
### 📚 **Documentation**
21-
- _No documentation changes yet_
50+
- **Enhanced**: Transformation documentation with comprehensive coverage of new transformers
51+
- **Added**: Complete documentation for `addKeySuffix` transformer with examples
52+
- **Added**: Complete documentation for `deleteKey` transformer with use cases
53+
- **Added**: Complete documentation for `trim` transformer with pattern examples
54+
- **Added**: Complete documentation for `replaceKey` transformer with workflow examples
55+
- **Updated**: Transformation overview to include all eight available transformer types
56+
- **Enhanced**: Combined transformation examples showing new transformers in action
2257

2358
---

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@ Whether you're managing simple settings or complex, multi-layered configurations
1212
* **Flexible Merging**: Intelligently merges multiple configuration sources, respecting order and immutability rules.
1313
* **Powerful Schema Processing**:
1414
* **Variable Substitution**: Inject dynamic values from environment variables (`KONFIGO_VAR_...`), dedicated variable files (`-V`), or schema defaults.
15-
* **Data Generation**: Create new configuration values (e.g., `concat` strings).
16-
* **Data Transformation**: Modify keys and values (e.g., `renameKey`, `changeCase`, `addKeyPrefix`, `setValue`).
15+
* **Data Generation**: Create new configuration values (e.g., `concat`, `timestamp`, `random`, `id`).
16+
* **Data Transformation**: Modify keys and values (e.g., `renameKey`, `changeCase`, `addKeyPrefix`, `addKeySuffix`, `deleteKey`, `trim`, `replaceKey`, `setValue`).
1717
* **Data Validation**: Enforce rules (`required`, `type`, `min`, `max`, `minLength`, `enum`, `regex`).
1818
* **Input/Output Schemas**: Validate incoming data and filter outgoing data against defined structures.
1919
* **Batch Processing**: Use the `konfigo_forEach` directive in a variables file to generate multiple tailored configuration outputs from a single schema and run.

docs/404.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
</head>
1717
<body>
1818
<div id="app"></div>
19-
<script>window.__VP_HASH_MAP__=JSON.parse("{\"advanced_best-practices.md\":\"BZdEZBG-\",\"advanced_schema-features.md\":\"C62pWRML\",\"advanced_troubleshooting.md\":\"ir1Id5sb\",\"concepts_formats.md\":\"BJNQ7cuO\",\"concepts_index.md\":\"BFMROgAN\",\"concepts_merging.md\":\"DfbWz53s\",\"examples_index.md\":\"Cx9VrN5G\",\"features_batch-processing.md\":\"BcwGKvB1\",\"features_env-integration.md\":\"CkUVWH8U\",\"features_format-conversion.md\":\"ZANl6uKI\",\"features_index.md\":\"D5AFN5xH\",\"features_merging.md\":\"DM3BpT8P\",\"features_recursive-discovery.md\":\"BXDZAzOu\",\"getting-started_concepts.md\":\"B3Szl5BD\",\"getting-started_index.md\":\"pBYGdbJ2\",\"getting-started_installation.md\":\"CdpsIGOQ\",\"getting-started_quick-start.md\":\"B5zUGxHb\",\"guide_cli-reference.md\":\"BMoM3Zge\",\"guide_environment-variables.md\":\"D9c5CH2T\",\"guide_format-conversion.md\":\"JLWC-B6F\",\"guide_index.md\":\"3gok0mF1\",\"guide_merging.md\":\"99kyFIlR\",\"guide_recipes.md\":\"BFtlgONJ\",\"guide_use-cases.md\":\"Df2UHXKu\",\"index.md\":\"kcKc0qnG\",\"installation.md\":\"CyUAQnVv\",\"overview.md\":\"Bpu0V5vh\",\"quick-start.md\":\"Bmz38pgT\",\"reference_best-practices.md\":\"D7xWCyqa\",\"reference_config.md\":\"BMwdGL40\",\"reference_errors.md\":\"ClXwxwT_\",\"reference_faq.md\":\"CBMoKXSf\",\"reference_flags.md\":\"B9SwDN9b\",\"reference_index.md\":\"qYfP4X5m\",\"reference_troubleshooting.md\":\"B479MM8B\",\"schema_advanced.md\":\"D0D-5L6a\",\"schema_generation.md\":\"NZd7yEn0\",\"schema_index.md\":\"BHUS7_xA\",\"schema_transformation.md\":\"Dhfj2C3x\",\"schema_validation.md\":\"BcnJPsx8\",\"schema_variables.md\":\"CRD2MTaY\"}");window.__VP_SITE_DATA__=JSON.parse("{\"lang\":\"en-US\",\"dir\":\"ltr\",\"title\":\"Konfigo Docs\",\"description\":\"Documentation for the Konfigo project\",\"base\":\"/konfigo/\",\"head\":[],\"router\":{\"prefetchLinks\":true},\"appearance\":true,\"themeConfig\":{\"nav\":[{\"text\":\"Home\",\"link\":\"/\"},{\"text\":\"Getting Started\",\"link\":\"/getting-started/\"},{\"text\":\"User Guide\",\"link\":\"/guide/\"},{\"text\":\"Schema Guide\",\"link\":\"/schema/\"},{\"text\":\"Reference\",\"link\":\"/reference/\"},{\"text\":\"GitHub\",\"link\":\"https://github.com/ebogdum/konfigo\"}],\"sidebar\":[{\"text\":\"Getting Started\",\"items\":[{\"text\":\"Introduction\",\"link\":\"/\"},{\"text\":\"Installation\",\"link\":\"/getting-started/installation\"},{\"text\":\"Quick Start\",\"link\":\"/getting-started/quick-start\"},{\"text\":\"Basic Concepts\",\"link\":\"/getting-started/concepts\"}]},{\"text\":\"User Guide\",\"items\":[{\"text\":\"Common Tasks\",\"link\":\"/guide/\"},{\"text\":\"Converting Formats\",\"link\":\"/guide/format-conversion\"},{\"text\":\"Merging Configurations\",\"link\":\"/guide/merging\"},{\"text\":\"Environment Variables\",\"link\":\"/guide/environment-variables\"},{\"text\":\"CLI Reference\",\"link\":\"/guide/cli-reference\"},{\"text\":\"Recipes & Examples\",\"link\":\"/guide/recipes\"}]},{\"text\":\"Schema Guide\",\"items\":[{\"text\":\"Schema Basics\",\"link\":\"/schema/\"},{\"text\":\"Variables & Substitution\",\"link\":\"/schema/variables\"},{\"text\":\"Validation\",\"link\":\"/schema/validation\"},{\"text\":\"Transformation\",\"link\":\"/schema/transformation\"},{\"text\":\"Data Generation\",\"link\":\"/schema/generation\"},{\"text\":\"Advanced Features\",\"link\":\"/schema/advanced\"}]},{\"text\":\"Reference\",\"items\":[{\"text\":\"Command Flags\",\"link\":\"/reference/flags\"},{\"text\":\"Configuration Options\",\"link\":\"/reference/config\"},{\"text\":\"Error Messages\",\"link\":\"/reference/errors\"},{\"text\":\"Best Practices\",\"link\":\"/reference/best-practices\"},{\"text\":\"Troubleshooting\",\"link\":\"/reference/troubleshooting\"},{\"text\":\"FAQ\",\"link\":\"/reference/faq\"}]}]},\"locales\":{},\"scrollOffset\":134,\"cleanUrls\":false}");</script>
19+
<script>window.__VP_HASH_MAP__=JSON.parse("{\"advanced_best-practices.md\":\"BZdEZBG-\",\"advanced_schema-features.md\":\"C62pWRML\",\"advanced_troubleshooting.md\":\"ir1Id5sb\",\"concepts_formats.md\":\"BJNQ7cuO\",\"concepts_index.md\":\"BFMROgAN\",\"concepts_merging.md\":\"DfbWz53s\",\"examples_index.md\":\"Cx9VrN5G\",\"features_batch-processing.md\":\"BcwGKvB1\",\"features_env-integration.md\":\"CkUVWH8U\",\"features_format-conversion.md\":\"ZANl6uKI\",\"features_index.md\":\"D5AFN5xH\",\"features_merging.md\":\"DM3BpT8P\",\"features_recursive-discovery.md\":\"BXDZAzOu\",\"getting-started_concepts.md\":\"B3Szl5BD\",\"getting-started_index.md\":\"pBYGdbJ2\",\"getting-started_installation.md\":\"CdpsIGOQ\",\"getting-started_quick-start.md\":\"BfCkSmFg\",\"guide_cli-reference.md\":\"BMoM3Zge\",\"guide_environment-variables.md\":\"D9c5CH2T\",\"guide_format-conversion.md\":\"JLWC-B6F\",\"guide_index.md\":\"3gok0mF1\",\"guide_merging.md\":\"99kyFIlR\",\"guide_recipes.md\":\"BFtlgONJ\",\"guide_use-cases.md\":\"Df2UHXKu\",\"index.md\":\"kcKc0qnG\",\"installation.md\":\"CyUAQnVv\",\"overview.md\":\"Bpu0V5vh\",\"quick-start.md\":\"Bmz38pgT\",\"reference_best-practices.md\":\"D7xWCyqa\",\"reference_config.md\":\"BMwdGL40\",\"reference_errors.md\":\"ClXwxwT_\",\"reference_faq.md\":\"CBMoKXSf\",\"reference_flags.md\":\"B9SwDN9b\",\"reference_index.md\":\"qYfP4X5m\",\"reference_troubleshooting.md\":\"B479MM8B\",\"schema_advanced.md\":\"D0D-5L6a\",\"schema_generation.md\":\"NZd7yEn0\",\"schema_index.md\":\"BHUS7_xA\",\"schema_transformation.md\":\"szKL2rse\",\"schema_validation.md\":\"BcnJPsx8\",\"schema_variables.md\":\"CRD2MTaY\"}");window.__VP_SITE_DATA__=JSON.parse("{\"lang\":\"en-US\",\"dir\":\"ltr\",\"title\":\"Konfigo Docs\",\"description\":\"Documentation for the Konfigo project\",\"base\":\"/konfigo/\",\"head\":[],\"router\":{\"prefetchLinks\":true},\"appearance\":true,\"themeConfig\":{\"nav\":[{\"text\":\"Home\",\"link\":\"/\"},{\"text\":\"Getting Started\",\"link\":\"/getting-started/\"},{\"text\":\"User Guide\",\"link\":\"/guide/\"},{\"text\":\"Schema Guide\",\"link\":\"/schema/\"},{\"text\":\"Reference\",\"link\":\"/reference/\"},{\"text\":\"GitHub\",\"link\":\"https://github.com/ebogdum/konfigo\"}],\"sidebar\":[{\"text\":\"Getting Started\",\"items\":[{\"text\":\"Introduction\",\"link\":\"/\"},{\"text\":\"Installation\",\"link\":\"/getting-started/installation\"},{\"text\":\"Quick Start\",\"link\":\"/getting-started/quick-start\"},{\"text\":\"Basic Concepts\",\"link\":\"/getting-started/concepts\"}]},{\"text\":\"User Guide\",\"items\":[{\"text\":\"Common Tasks\",\"link\":\"/guide/\"},{\"text\":\"Converting Formats\",\"link\":\"/guide/format-conversion\"},{\"text\":\"Merging Configurations\",\"link\":\"/guide/merging\"},{\"text\":\"Environment Variables\",\"link\":\"/guide/environment-variables\"},{\"text\":\"CLI Reference\",\"link\":\"/guide/cli-reference\"},{\"text\":\"Recipes & Examples\",\"link\":\"/guide/recipes\"}]},{\"text\":\"Schema Guide\",\"items\":[{\"text\":\"Schema Basics\",\"link\":\"/schema/\"},{\"text\":\"Variables & Substitution\",\"link\":\"/schema/variables\"},{\"text\":\"Validation\",\"link\":\"/schema/validation\"},{\"text\":\"Transformation\",\"link\":\"/schema/transformation\"},{\"text\":\"Data Generation\",\"link\":\"/schema/generation\"},{\"text\":\"Advanced Features\",\"link\":\"/schema/advanced\"}]},{\"text\":\"Reference\",\"items\":[{\"text\":\"Command Flags\",\"link\":\"/reference/flags\"},{\"text\":\"Configuration Options\",\"link\":\"/reference/config\"},{\"text\":\"Error Messages\",\"link\":\"/reference/errors\"},{\"text\":\"Best Practices\",\"link\":\"/reference/best-practices\"},{\"text\":\"Troubleshooting\",\"link\":\"/reference/troubleshooting\"},{\"text\":\"FAQ\",\"link\":\"/reference/faq\"}]}]},\"locales\":{},\"scrollOffset\":134,\"cleanUrls\":false}");</script>
2020

2121
</body>
2222
</html>

0 commit comments

Comments
 (0)