@shepherdjerred/helm-types 1.1.0 → 1.2.0-dev.893
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/README.md +11 -2
- package/dist/cli.js +4570 -3203
- package/dist/index.js +8 -20585
- package/package.json +5 -1
- package/src/chart-fetcher.ts +37 -16
- package/src/chart-info-parser.ts +54 -34
- package/src/cli.ts +76 -58
- package/src/code-generator.ts +57 -22
- package/src/comment-parser.ts +79 -55
- package/src/config.ts +12 -5
- package/src/helm-types.ts +16 -46
- package/src/index.ts +14 -1
- package/src/interface-generator.ts +58 -23
- package/src/schemas.ts +3 -1
- package/src/type-converter-helpers.ts +180 -0
- package/src/type-converter.ts +273 -300
- package/src/type-inference.ts +302 -194
- package/src/utils.ts +2 -2
- package/src/yaml-comment-filters.ts +103 -0
- package/src/yaml-comment-regex-parser.ts +150 -0
- package/src/yaml-comments.ts +216 -508
- package/src/yaml-preprocess.ts +235 -0
package/README.md
CHANGED
|
@@ -78,7 +78,11 @@ npx @shepherdjerred/helm-types \
|
|
|
78
78
|
## Programmatic API
|
|
79
79
|
|
|
80
80
|
```typescript
|
|
81
|
-
import {
|
|
81
|
+
import {
|
|
82
|
+
fetchHelmChart,
|
|
83
|
+
convertToTypeScriptInterface,
|
|
84
|
+
generateTypeScriptCode,
|
|
85
|
+
} from "@shepherdjerred/helm-types";
|
|
82
86
|
|
|
83
87
|
// 1. Define your chart
|
|
84
88
|
const chart = {
|
|
@@ -90,7 +94,12 @@ const chart = {
|
|
|
90
94
|
|
|
91
95
|
// 2. Fetch and generate types
|
|
92
96
|
const { values, schema, yamlComments } = await fetchHelmChart(chart);
|
|
93
|
-
const tsInterface = convertToTypeScriptInterface(
|
|
97
|
+
const tsInterface = convertToTypeScriptInterface(
|
|
98
|
+
values,
|
|
99
|
+
"ArgocdHelmValues",
|
|
100
|
+
schema,
|
|
101
|
+
yamlComments,
|
|
102
|
+
);
|
|
94
103
|
const code = generateTypeScriptCode(tsInterface, chart.name);
|
|
95
104
|
|
|
96
105
|
// 3. Write output
|